JHEAD(1) JHEAD(1) NAME jhead - Digicam JPEG Exif header manipulation tool SYNOPSIS jhead [ options ] [ file... ] DESCRIPTION jhead is used to display and manipulate data contained in the Exif header of JPEG images from digital cameras. By default, jhead displays the more useful camera settings from the file in a user-friendly format. jhead can also be used to manipulate some aspects of the image relating to JPEG and Exif headers, such as changing the internal timestamps, removing the thumbnail, or transferring Exif headers back into edited images after graphical editors deleted the Exif header. jhead can also be used to launch other programs, similar in style to the UNIX find com‐ mand, but much simpler. GENERAL METADATA OPTIONS -te file Transplant Exif header from a JPEG (with Exif header) in file into the image that is manipulated. This option is useful if you like to edit the photos but still want the Exif header on your photos. As most photo editing programs will wipe out the Exif header, this option can be used to re-copy them back from original copies after editing the photos. This feature has an interesting 'relative path' option for speci‐ fying the thumbnail name. Whenever the <name> contains the char‐ acters '&i', will substitute the original filename for this name. This allows creating a jhead 'relative name' when doing a whole batch of files. For example, the incantation: jhead -te "originals/&i" *.jpg would transfer the exif header for each .jpg file in the originals directory by the same name, Both Win32 and most Unix shells treat the '&' character in a special way, so you have to put quotes around that command line option for the '&' to even be passed to the program. -dc Delete comment field from the JPEG header. Note that the comment is not part of the Exif header. -de Delete the Exif header entirely. Leaves other metadata sections intact. -di Delete the IPTC section, if present. Leaves other metadata sec‐ tions intact. -dx Delete the XMP section, if present. Leaves other metadata sec‐ tions intact. -du Delete sections of jpeg that are not Exif, not comment, and other‐ wise not contributing to the image either - such as data that pho‐ toshop might leave in the image. -purejpg Delete all JPEG sections that aren't necessary for rendering the image. Strips any metadata that various applications may have left in the image. A combination of the -de -dc and -du options. -mkexif Creates minimal exif header. Exif header contains date/time, and empty thumbnail fields only. Date/time set to file time by default. Use with -rgt option if you want the exif header to con‐ tain a thumbnail. Note that exif header creation is very limited at this time, and no other fields can be added to the exif header this way. -ce Edit the JPEG header comment field (note, this comment field is outside the Exif structure and can be part of Exif and non Exif style JPEG images). A temporary file containing the comment is created and a text edi‐ tor is launched to edit the file. The editor is specified in the EDITOR environment variable. If none is specified notepad or vi are used under Windows and Unix respectively. After the editor exits, the data is transferred back into the image, and the tempo‐ rary file deleted. -cs file Save comment section to a file -ci file Replace comment with text from file -cl string Replace comment with specified string from command line file DATE / TIME MANIPULATION OPTIONS -ft Sets the file's system time stamp to what is stored in the Exif header. -dsft Sets the Exif timestamp to the file's timestamp. Requires an Exif header to pre-exist. Use -mkexif option to create one if needed. -n[format_string] This option causes files to be renamed and/ or mmoved using the date information from the Exif header "DateTimeOriginal" field. If the file is not an Exif file, or the DateTimeOriginal does not contain a valid value, the file date is used. Renaming is by default restricted to files whose names consist largely of digits. This effectively restricts renaming to files that have not already been manually renamed, as the default sequential names from digi‐ tal cameras consist largely of digits. Use the -n option to force renaming of all files. If the new name contains a '/', this will be interpreted as a new path, and the file will be moved accord‐ ingly. If the format_string is omitted, the file will be renamed to MMDD- HHMMSS. Note that this scheme doesn't include the year (I never have photos from different years together anyway). If a format_string is provided, it will be passed to the strftime function as the format string. In addition, if the format string contains '%f', this will substitute the original name of the file (minus extension). '%i' will substitute a sequence number. Lead‐ ing zeros can be specified like with printf - i.e. '%04i' pads the number to 4 digits using leading zeros. If the name includes '/', this is interpreted as a new path for the file. If the new path does not exist, the path will be cre‐ ated. If the target name already exists, the name will be appended with "a", "b", "c", etc, unless the name ends with a letter, in which case it will be appended with "0", "1", "2", etc. This feature is especially useful if more than one digital camera was used to take pictures of an event. By renaming them to a scheme according to date, they will automatically appear in order of taking in most directory listings and image browsers. Alterna‐ tively, if your image browser supports listing by file time, you can use the -ft option to set the file time to the time the photo was taken. Some of the more useful arguments for strftime are: %H Hour in 24-hour format (00 - 23) %j Day of year as decimal number (001 - 366) %m Month as decimal number (01 - 12) %M Minute as decimal number (00 - 59) %S Second as decimal number (00 - 59) %w Weekday as decimal number (0 - 6; Sunday is 0) %y Year without century, as decimal number (00 - 99) %Y Year with century, as decimal number Example: jhead -n%Y%m%d-%H%M%S *.jpg This will rename files matched by *.jpg in the format YYYYM‐ MDD-HHMMSS For a full listing of strftime arguments, look up the strftime in them man pages. Note that some arguments to the strftime function (not listed here) produce strings with characters such as ':' that may not be valid as part of a filename on some systems. -ta<+|-><timediff> Adjust time stored in the Exif header by h:mm backwards or for‐ wards. Useful when having taken pictures with the wrong time set on the camera, such as after travelling across time zones, or when daylight savings time has changed. This option changes all Date/time fields in the exif header, including "DateTimeOriginal" (tag 0x9003) and "DateTimeDigitized" (tag 0x9004). -da<newdate>-<olddate> Works like -ta, but for specifying large date offsets, to be used when fixing dates from cameras where the date was set incorrectly, such as having date and time reset by battery removal on some cam‐ eras Because different months and years have different numbers of days in them, a simple offset for months, days, years would lead to unexpected results at times. The time offset is thus specified as a difference between two dates, so that jhead can figure out exactly how many days the timestamp needs to be adjusted by, including leap years and daylight savings time changes. The dates are specified as yyyy:mm:dd. For sub-day adjustments, a time of day can also be included, by specifying yyyy:nn:dd/hh:mm or yyyy:mm:dd/hh:mm:ss Examples: Year on camera was set to 2005 instead of 2004 for pictures taken in April jhead -da2004:03:01-2005:03:01 Default camera date is 2002:01:01, and date was reset on 2005:05:29 at 11:21 am jhead -da2005:05:29/11:21-2002:01:01 -ts Sets the time stored in the Exif header to what is specified on the command line. Time must be specified as: yyyy:mm:dd-hh:mm:ss -ds Sets the date stored in the Exif header to what is specified on the command line. Can be used to set date, just year and month, or just year. Date is specified as: yyyy:mm:dd, yyyy:mm, or yyyy THUMBNAIL MANIPULATION OPTIONS -dt Delete thumbnails from the Exif header, but leave the interesting parts intact. This option truncates the thumbnail from the Exif header, provided that the thumbnail is the last part of the Exif header (which so far as I know is always the case). Exif headers have a built-in thumbnail, which typically occupies around 10k of space. This thumbnail is used by digital cameras. Windows XP may also use this thumbnail if present (but it doesn't need it). The thumbnails are too small to use even full screen on the digicam's LCD. I have not encountered any adverse side effects of deleting the thumbnails, even from the software provided with my old Olym‐ pus digicam. Use with caution. -st file Save the integral thumbnail to file The thumbnail lives inside the Exif header, and is a very low-res JPEG image. Note that making any changes to a photo, except for with some programs, generally wipes out the Exif header and with it the thumbnail. The thumbnail is too low res to really use for very much. This feature has an interesting 'relative path' option for speci‐ fying the thumbnail name. Whenever the name for file contains the characters '&i', jhead will substitute the original filename for this name. This allows creating a 'relative name' when doing a whole batch of files. For example, the incantation: jhead -st "thumbnails/&i" *.jpg would create a thumbnail for each .jpg file in the thumbnails directory by the same name, (provided that the thumbnails direc‐ tory exists, of course). Both Win32 and UNIX shells treat the '&'character in a special way, so you have to put quotes around that command line option for the '&' to even be passed to the pro‐ gram. If a '-' is specified for the output file, the thumbnail is sent to stdout. (UNIX build only) -rt Replace thumbnails from the Exif header. This only works if the exif header already contains a thumbnail, and the thumbnail is at the end of the header (both always the case if the photo came from a digital camera) -rgt size Regenerate exif thumbnail. 'size' specifies maximum height or width of thumbnail. Relies on 'mogrify' program (from ImageMag‐ ick) to regenerate the thumbnail. This only works if the image already contains a thumbnail. ROTATION OPTIONS -autorot Using the 'Orientation' tag of the Exif header, rotate the image so that it is upright. The program jpegtran is used to perform the rotation. This program is present in most Linux distributions. For windows, you need to get a copy of it. After rotation, the orientation tag of the Exif header is set to '1' (normal orienta‐ tion). The thumbnail is also rotated. Other fields of the Exif header, including dimensions are untouched, but the JPEG height/width are adjusted. This feature is especially useful with newer Canon cameras, that set the orientation tag automatically using a gravity sensor. -norot Clears the rotation field in the Exif header without altering the image. Useful if the images were previously rotated without clearing the Exif rotation tag, as some image browsers will auto rotate images when the rotation tag is set. Sometimes, thumbnails and rotation tags can get very out of sync from manipulation with various tools. To reset it all use -norot with -rgt to clear this out. OUTPUT VERBOSITY CONTROL -h Displays summary of command line options. -v Makes the program even more verbose than it already is. Like DOS programs, and unlike UNIX programs, Jhead gives feedback as to what it is doing, even when nothing goes wrong. Windows user that I am, when something doesn't give me feedback for 20 seconds, I assume its crashed. -q No output on success, more like Unix programs. -V Print version info and compilation date. -exifmap Show a map of the bytes in the exif header. Useful when analyzing strange exif headers, not of much use to non software developers. -se Suppress error messages relating to corrupt Exif header structure. -c Concise output. This causes picture info to be summarized on one line instead of several. Useful for grep-ing through images, as well as importing into spread sheets (data is space delimited with quotes as text qualifier). FILE MATCHING OPTIONS -model Restricts processing of files to those whose camera model, as indicated by the Exif image information, contains the substring specified in the argument after '-model'. For example, the fol‐ lowing command will list only images that are from an S100 camera: jhead -model S100 *.jpg I use this option to restrict my JPEG recompensing to those images that came from my Canon S100 digicam, (see the -cmd option). -exonly Skip all files that don't have an Exif header. Photos straight from a digital camera have an Exif header, whereas many photo manipulation tools discard the Exif header. -cmd Executes the specified command on each JPEG file to be processed. The Exif section of each file is read before running the command, and reinserted after the command finishes. The specified command invoked separately for each JPEG that is processed, even if multiple files are specified (explicitly or by wild card). Example use: Having a whole directory of photos from my S100, I run the follow‐ ing commands: jhead -cmd "mogrify -quality 80 &i" -model S100 *.jpg jhead -cmd "jpegtran -progressive &i > &o" *.jpg The first command mogrifies all JPEGs in the tree that indicate that they are from a Canon S100 in their Exif header to 80% qual‐ ity at the same resolution. This is a 'lossy' process, so I only run it on files that are from the Canon, and only run it once. The next command then takes a JPEGs and converts them to progres‐ sive JPEGs. The result is the same images, with no discernible differences, stored in half the space. This produces substantial savings on some cameras. SEE ALSO jpegtran(1), mogrify(1), rdjpgcom(1), wrjpgcom(1) AUTHOR Matthias Wandel BUGS After jhead runs a program to rotate or resize an image, the image dimen‐ sions and thumbnail in the Exif header are not adjusted. Modifying of Exif header data is very limited, as Jhead internally only has a read only implementation of the file system contained in the Exif header. For example, there is no way to replace the thumbnail or edit the Exif comment in the Exif header. There is also no way to create min‐ imal exif headers. Some Canon digital SLR cameras fail to adjust the effective sensor reso‐ lution when shooting at less than full resolution, causing jhead to incorrectly miscalculate the sensor width and 35mm equivalent focal length. The same can result from resizing photos with Photoshop, which will manipulate parts of the exif header. This is often reported as a bug in Jhead, but Jhead can't do much about incorrect data. Send bug reports to mwandel at sentex dot net. COPYING PERMISSIONS Jhead is 'public domain'. You may freely copy jhead, and reuse part or all of its code in free or proprietary programs. I do however request that you do not post my e-mail address in ways that spam robots can har‐ vest it. jhead 2.95 16 Mar 2012 JHEAD(1)


plots module¶
-
shap.
summary_plot
(shap_values, features=None, feature_names=None, max_display=None, plot_type='dot', color=None, axis_color='#333333', title=None, alpha=1, show=True, sort=True, color_bar=True, auto_size_plot=True, layered_violin_max_num_bins=20)¶ Create a SHAP summary plot, colored by feature values when they are provided.
- shap_values : numpy.array
- Matrix of SHAP values (# samples x # features)
- features : numpy.array or pandas.DataFrame or list
- Matrix of feature values (# samples x # features) or a feature_names list as shorthand
- feature_names : list
- Names of the features (length # features)
- max_display : int
- How many top features to include in the plot (default is 20, or 7 for interaction plots)
- plot_type : “dot” (default) or “violin”
- What type of summary plot to produce
-
shap.
dependence_plot
(ind, shap_values, features, feature_names=None, display_features=None, interaction_index='auto', color='#1E88E5', axis_color='#333333', dot_size=16, alpha=1, title=None, show=True)¶ Create a SHAP dependence plot, colored by an interaction feature.
- ind : int
- Index of the feature to plot.
- shap_values : numpy.array
- Matrix of SHAP values (# samples x # features)
- features : numpy.array or pandas.DataFrame
- Matrix of feature values (# samples x # features)
- feature_names : list
- Names of the features (length # features)
- display_features : numpy.array or pandas.DataFrame
- Matrix of feature values for visual display (such as strings instead of coded values)
- interaction_index : “auto”, None, or int
- The index of the feature used to color the plot.
-
shap.
force_plot
(shap_values, features=None, feature_names=None, out_names=None, link='identity', plot_cmap='RdBu')¶ Visualize the given SHAP values with an additive force layout.


” - 5 . . . . . he . Sone fepects of tanta tavhars, Channel Prehistery
By
Bebert Linvilie Foover
AWB. (University of C2liforaiz) 1235 MA. (University 22 “nlifernie) 1965
DISSERTATION
Submitted in partial satisfaction of the réequiremants tor the dcerce of DOCTOP. OF PHILOSOPHY — in
Anthroptlosy
in the GRACUATE DIVISION of the
UNIVERSITY OF CALIFORNIA, BEPFELEY
Approved :
ye am
Comnittee in Charge
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.


Bluetooth all the way
Three rules for buying a new Bluetooth speaker on Black Friday
Bluetooth speakers are becoming super popular. Don't get stuck with a crappy one just because it was on sale!
by Peter CaoAs Black Friday approaches, deals will start swinging at you left and right, especially Bluetooth speakers. More and more people are now owning smartphones and other gadgets that no longer feature the 3.5mm audio jack and that means one of two things: they need a dongle or gear upgrades to Bluetooth.

Check the model number and price
One common practice technology vendors use for Black Friday is to create special variations for their products during shopping season. Typically, these models are a blend of the vendor's various other products. It may sound like a good deal but vendors usually don't offer support or warranty replacements on Black Friday models because they're built specifically for the holiday season. These models will typically state on the box in super small text that there is no warranty support on them. This doesn't necessarily mean you'll get a bad product in the end, but it's worth noting that if something goes wrong, you're on your own.
After you've verified the model number actually exists and it isn't a specialty model, go ahead and check the price of the speaker. Some speakers may look like they're on a steep discount but in reality, the price was recently reduced and could potentially be the new price going forward. While rare, some vendors choose to hike the price a few months before to make it look like you're getting a discount. CamelCamelCamel is a fantastic resource to check whether or not an item has recently hiked in price or has seen an even greater price reduction.
Is it waterproof?
 While it's not a requirement and highly depends on what you plan on doing with your speaker, water resistance is something you should be looking for.
Electronic devices typically get IP ratings so you'll want to do your research on the specific speaker you're looking for. If you're wanting to take your speaker on the beach, for example, you'll want IPX7, IPX8 or IP67/IP68. If your speaker has a IPX8 or IPX68 rating, you'll have the highest level of protection. Your speaker could get splashed by an ocean wave and it should survive it no problem. Surprisingly, some speakers take it a step further and offer full water protection, even enticing you to let the speaker float on the water.
If your speaker is rated anything less like IPX4, you'll want to be super careful when using it out and about. It should survive rain, sweat, and things of that nature, buy beyond that, you'll need to be extra careful.
Also, be aware that most vendors will have an IP rating but won't actually cover you under warranty if your speaker gets water damaged.
Are there additional features?
Lastly, you'll want to look at whether or not the speaker provides any extra value. For example, some will come with a USB port that allows you to plug your phone in for charging if you're in a pinch. This is super useful, especially if you're going somewhere remote like the beach or camping where outlets might be limited. Some speakers may even come with Qi wireless charging as well. While it may be slower than some other forms of charging, it comes in handy if your friends have an assortment of devices with varying charging connectors.
Speaking of camping, some speakers will have an AM/FM tuner. Not only will that allow you to tune into the radio, but it's helpful if any bad weather is brewing or if any potential threats are in your area.
Some speakers may even come with party lights — yep, you read that right. If you're planning to use your Bluetooth speaker at a party, it can really liven up the room. Light-enabled speakers come in various shapes and sizes with some offering strobe lights, multicolored lights. Some may even sync up the lights to the music.
Conclusion
Whether you're going to the beach, camping, hiking, or a party, a Bluetooth speaker is essential. Don't be that person that plays music from your phone's speaker at max volume. Take a Bluetooth speaker with you and impress your friends, family, or coworkers.
Juice Up
Altec Lansing IMW580 Lifejacket Jolt
Qi wireless charging
In addition to Bluetooth audio, you get wired 3.5mm audio, wireless charging, and 30 hours of audio payback.
Lighten up the mood
JBL Pulse 3
Time to party
Lighten the mood by throwing up lights from your Bluetooth speaker. Customize the colors and patterns through the JBL companion smartphone app.
Almost completely waterproof
Ultimate Ears Megaboom 3
Comfortable listening
This is a speaker you can bring anywhere thanks to its water-resistant design. It also features a boomy, bass-heavy sound and 20 hours of battery life.
Now that you're prepared to brave Black Friday Bluetooth speaker deals, be sure to follow along with all our latest updates and deals on Android Central. Good luck!
We may earn a commission for purchases using our links. Learn more.


Established in 2005, GEO is a voluntary partnership of governments and organizations that en- visions “a future wherein decisions and actions for the benefit of humankind are informed by coordinated, comprehensive and sustained Earth observations and information.” GEO Member governments include 96 nations and the European Commission, and 87 Participating Organizations comprised of international bodies with a mandate in Earth observations. Together, the GEO community is creating a Global Earth Observation System of Systems (GEOSS) that will link Earth ob- servation resources world-wide across multiple Societal Benefit Areas - agriculture, biodiversity, climate, disasters, ecosystems, energy, health, water and weather - and make those resources available for better informed decision-making. In an attempt to link Earth Observation (EO) resources, the GEO Discovery and Access Broker(DAB) was created by ESSI lab. DAB is a middleware component which is in charge of interconnecting the heterogeneous and distributed capacities contributing to GEOSS and became part of the GEOSS Common Infrastructure (GCI) since November 2011. The DAB provides three main functionalities: Discovery of resources from brokered sources Semantics-enriched discovery Access of resources DAB is used in GEOSS Portal to provide an entry point to EO data from all over the world.
To support EO data discovery, exploration and visualization, we added the DAB component in Sextant. We can search for datasets using the button in Sextant's main menu bar and then select Search Datasets, or view the results of our last search be selecting Show Results, as shown in the figure below.
Then we have to fill in the following form to search for datasets. The first field is key words where we can provide keywords that appear in the title of the datasets. Next we can choose between some large categories and provide two dates that correspond to the starting date end ending date of the observations in the dataset. The last element in the form is the Draw Extent button. When we click this button a mini map appears in the form where the user can use the button to draw a rectangle on this map. This rectangle is used to represent the area of interest and the results of our search will contain only datasets that meet our criteria and spatialy intersect with the given area. We can use the button to remove the rectangle and draw a new one.
The results are presented using the reports DAB provides, that follow the ISO 19115 specification, which suggests formats for visualizing the results' metadata, such as KML, KMZ, WMS, GeoTIFF and more. If such visualization methods are used for a dataset, corresponding buttons are created in the results page under the the dataset's information, that can be used to create a layer in Sextant. In the following figure we demonstrate the results of a search query for water themed EO data in the area of Europe.


qiskit_acqua.utils package¶
Subpackages¶
- qiskit_acqua.utils.initial_states package
- qiskit_acqua.utils.iqfts package
- qiskit_acqua.utils.optimizers package
- Subpackages
- Submodules
- qiskit_acqua.utils.optimizers.cg module
- qiskit_acqua.utils.optimizers.cobyla module
- qiskit_acqua.utils.optimizers.l_bfgs_b module
- qiskit_acqua.utils.optimizers.nelder_mead module
- qiskit_acqua.utils.optimizers.optimizer module
- qiskit_acqua.utils.optimizers.p_bfgs module
- qiskit_acqua.utils.optimizers.powell module
- qiskit_acqua.utils.optimizers.slsqp module
- qiskit_acqua.utils.optimizers.spsa module
- qiskit_acqua.utils.optimizers.tnc module
- Module contents
- qiskit_acqua.utils.oracles package
- qiskit_acqua.utils.variational_forms package
Submodules¶
qiskit_acqua.utils.decimal_to_binary module¶
qiskit_acqua.utils.jsonutils module¶
Utilities for dict and json convertion.
-
qiskit_acqua.utils.jsonutils.
convert_dict_to_json
(in_item)[source]¶ Combs recursively through a list/dictionary and finds any non-json compatible elements and converts them. E.g. complex ndarray’s are converted to lists of strings. Assume that all such elements are stored in dictionaries! Arg:
in_item (dict or list): the input dict/listReturns: Result in_item possibly modified
-
qiskit_acqua.utils.jsonutils.
convert_json_to_dict
(in_item)[source]¶ Combs recursively through a list/dictionary that was loaded from json and finds any lists that were converted from ndarray and converts them back Arg:
in_item (dict or list): the input dict/listReturns: Result in_item possibly modified
qiskit_acqua.utils.pauligraph module¶
For coloring Pauli Graph for transforming paulis into grouped Paulis
qiskit_acqua.utils.random_matrix_generator module¶
-
qiskit_acqua.utils.random_matrix_generator.
random_h1_body
(N)[source]¶ Generate a random one body integrals.
Parameters: N (int) – the number of spin orbitals. Returns: a 2-D matrix with np.complex data type. Return type: np.ndarray
-
qiskit_acqua.utils.random_matrix_generator.
random_h2_body
(N, M)[source]¶ Generate a random two body integrals. :param N: number of spin-orbitals (dimentsion of h2) :type N: int :param M: number of non-zero entries :type M: int
Returns: a numpy 4-D tensor with np.complex data type. Return type: np.ndarray
qiskit_acqua.utils.subsystem module¶
qiskit_acqua.utils.tensorproduct module¶
-
qiskit_acqua.utils.tensorproduct.
tensorproduct
(*args)[source]¶ Calculate tensor product.
m = tensorproduct(a,b,c,…) returns the kronecker product of its arguments. Each argument should either be a tensor, or a tuple containing a tensor and an integer, and tensor is put in zero-index slot. In the latter case, the integer specifies the repeat count for the tensor, e.g. tensorproduct(a,(b,3),c) = tensorproduct(a,b,b,b,c).
Parameters: args (-) – Returns: the tensor product Return type: np.ndarray
Module contents¶
-
qiskit_acqua.utils.
tensorproduct
(*args)[source]¶ Calculate tensor product.
m = tensorproduct(a,b,c,…) returns the kronecker product of its arguments. Each argument should either be a tensor, or a tuple containing a tensor and an integer, and tensor is put in zero-index slot. In the latter case, the integer specifies the repeat count for the tensor, e.g. tensorproduct(a,(b,3),c) = tensorproduct(a,b,b,b,c).
Parameters: args (-) – Returns: the tensor product Return type: np.ndarray
-
class
qiskit_acqua.utils.
PauliGraph
(paulis, mode='largest-degree')[source]¶ Bases:
object
Pauli Graph
-
grouped_paulis
¶ Getter of grouped Pauli list.
-
-
qiskit_acqua.utils.
convert_dict_to_json
(in_item)[source]¶ Combs recursively through a list/dictionary and finds any non-json compatible elements and converts them. E.g. complex ndarray’s are converted to lists of strings. Assume that all such elements are stored in dictionaries! Arg:
in_item (dict or list): the input dict/listReturns: Result in_item possibly modified
-
qiskit_acqua.utils.
convert_json_to_dict
(in_item)[source]¶ Combs recursively through a list/dictionary that was loaded from json and finds any lists that were converted from ndarray and converts them back Arg:
in_item (dict or list): the input dict/listReturns: Result in_item possibly modified
-
qiskit_acqua.utils.
random_unitary
(N)[source]¶ Generate a random unitary matrix with NxN matrix.
Parameters: N – the dimension of unitary matrixs Returns: a 2-D matrix with np.complex data type. Return type: np.ndarray
-
qiskit_acqua.utils.
random_h2_body
(N, M)[source]¶ Generate a random two body integrals. :param N: number of spin-orbitals (dimentsion of h2) :type N: int :param M: number of non-zero entries :type M: int
Returns: a numpy 4-D tensor with np.complex data type. Return type: np.ndarray


When not using ngModel or a reactive form, the current selection can be cleared with the clear method.
ngModel
clear


Behind every successful business, there is a good UI and a good UX. At DEV.INC.CO we
value innovation in the design and its implementation. Unlike some other development
competition, we at Kaivalya don’t have any limits or any restrictions. Using any of the technologies like Android, ASP.NET, etc. we want participants to develop an innovative
solution based on a given theme which will be judged on the basis of all factors like UI, UX
and efficiency.
DEV.INC.CO is a team event which is conducted in BTKIT Campus with a single round.
The main motive is to find innovation among creative minds by judging their work based on
the themes provided to them.The rules are simple:
Pick a theme and develop it.....
Not helpful???
no problem... here is the detailed description:
Pick one of the below:
1) Develop a Mess Management Project.
Develop a project that handles the mess management like how's the cashflow going?? What's the schedule for the vendors ?? Well you get the idea!!
2) Develop an Online CV Maker.
 Well just simply create an efficient and more importantly an awesome looking website or if you prefer.. an app, which showcases your resume the best!!
3) Dream Interpretation (DI)
Have a dream develop it.
4) Spardha
Yes you figured it right..
Develop an app or webapp for our own sports event -- Spardha 2k19..
Enroll yourself and show the world that you’re the Da Vinci of Code
COMPETITION RULES:
- “DEV.INC.CO” will be conducted onsite in the Campus of BTKIT Dwarahat.
- It is an individual event and teams aren’t allowed.
- We only allow college students to participate and hence a certificate and prizes will be
given to winners.
- Winners will be decided on the basis of overall performance of the solution
- The decision of the jury remains final while deciding the winners for the same.


cat file | tr ' ' _ | nl
cat file | while IFS= read -r i; do echo "${i%?}"; done
< file tr ' ' _ | nl
while IFS= read -r i; do echo "${i%?}"; done < file
cat
is a tool for con"cat"enating files. Reading a single file as input to a program is considered a Useless Use Of Cat (UUOC)#Useless_use_of_cat).
It's more efficient and less roundabout to simply use redirection. This is especially true for programs that can benefit from seekable input, like tail
or tar
.
Many tools also accept optional filenames, e.g. grep -q foo file
instead of cat file | grep -q foo
.
Pointing out UUOC is a long standing shell programming tradition, and removing them from a short-lived pipeline in a loop can speed it up by 2x. However, it's not necessarily a good use of time in practice, and rarely affects correctness. [[Ignore]] as you see fit.


Back
Data parameters:
Choose a option:
Research id
Research participant
Permission id
Archive Id
Research manager
Table to view at:
Choose a option:
Research id
Research participant
Permission id
Archive Id
Research manager
Click here to move
Move
this
DIV


Below are a few reviews and usage examples by users:
Version 1.x can create 2 types of grids, sample for each below:
The following have been added to the the latest version:
This library is developed and maintained by:
Simply add the following to your pom.xml:
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>1.41</version>
</dependency>
To initialize, simple call the init method:
init(filePath, replaceExisting)
init(filePath, overwriteExisting, DisplayOrder)
init(filePath, overwriteExisting, GridType)
init(filePath, overwriteExisting, DisplayOrder, GridType)
where:
filePath: path of the file, in .htm or .html format
overwriteExisting: (true|false)
true: the file will be replaced with brand new markup,
and all existing data will be lost. Use this option to create a
brand new report
false: existing data will remain, new tests will be appended to the existing
report
DisplayOrder: this determines the order in which your tests will be displayed
BY_OLDEST_TO_LATEST (default) - oldest test at the top, newest at the end
BY_LATEST_TO_OLDEST - newest test at the top, oldest at the end
GridType: determines the type of grid to be used
STANDARD (default) - standard grid with 1 test per row
MASONRY - creates a masonry style grid with 2 tests per row
Its not required to call the init
method before each test. Its recommended to use "init" method only once, at the beginning of the run session to set the reporting path.
By default, the oldest test appears at the top. To change this behavior, or to allow the latest test to appear at the top, use the code below. Report started in one order will remain in that order unless the report is over-written or a new report is created.
It is possible to log your execution steps in 3 ways:
// log(LogStatus, details)
extent.log(LogStatus.INFO, "This step shows usage of log(logStatus, details)");
// log(logStatus, stepName, details)
extent.log(LogStatus.PASS, "StepName", "PASS Details");
// log(logStatus, stepName, details, screenCapturePath)
extent.log(LogStatus.INFO, "Image", "Image example:", "C:\\img.png");
If you use #1 above, it is advised to not use #2 and #3 as it may break the table layout due to the difference in columns.
Easy! Simply use overwriteExisting = false
setting to initialize and your tests will be appended to your existing report:
extent.init("path-to-file", false);
You can insert a description for your test using:
// startTest(String testName, String testDescription)
extent.startTest("Test - With Description", "This description will show up under Test.");
You can insert snapshot as a link or directly into the report using:
// log(LogStatus logStatus, String stepName, String details, String screenCapturePath)
extent.log(LogStatus.INFO, "Image", "Image example:", "C:\\img.png");
You can attach a snapshot to the report (v1.2+) without having to specify status using:
// void attachScreenshot(path, details)
extent.attachScreenshot("pathToImg.png", "Attach screenshot without status.");
Attaching a screen-shot is not counted as a step and will not show under Execution Info either.
Relative paths starting with "." and "/" characters are supported:
// ./pathToImg.png
extent.log(LogStatus.INFO, "Image", "Image example:", "./pathToImg.png");
// /pathToImg.png
extent.log(LogStatus.INFO, "Image", "Image example:", "/pathToImg.png");
If you using an absolute path, "file:///" will be automatically be appended for the image to load.
You can add labels to your log events using label message
.
extent.log(LogStatus.INFO, "Example: success");
extent.log(LogStatus.INFO, "Example: fail");
extent.log(LogStatus.INFO, "Example: info");
extent.log(LogStatus.INFO, "Example: warning");
You can use HTML anywhere in this report.
Just like above, you can insert any HTML tag to your report:
test.log(LogStatus.INFO, "HTML", "Usage: BOLD TEXT");
This section shows basic examples to get started with ExtentReports.
A simple example with a static method.
import com.relevantcodes.extentreports.*;
public class Main {
// *REQUIRED
// put this in every class
// * Main.class will become TheClassName.class
static final ExtentReports extent = ExtentReports.get(Main.class);
public static void main(String[] args) {
extent.init("C:\\Extent.html", true);
// *REQUIRED
// startTest( testName )
// creates a toggle for the given test, adds all log events under it
extent.startTest("Main");
// log(logStatus, stepName, details)
extent.log(LogStatus.PASS, "StepName", "PASS Details");
// log(LogStatus, details)
extent.log(LogStatus.INFO, "This step shows usage of log(logStatus, details)");
// report with snapshot
// log(logStatus, stepName, details, screenCapturePath)
extent.log(LogStatus.INFO, "Image", "Image example:", "C:\\img.png");
// only report a snapshot, without status
extent.attachScreenshot("pathtoImg.png", "This step attaches a screenshot without status.");
// end test
extent.endTest();
}
}
A basic TestNG example that creates a local class instance.
public class TestNGExample {
private ExtentReports extent = ExtentReports.get(TestNGExample.class);
@BeforeClass
public void beforeClass() {
extent.init("C:/TestNGBasicExample.html", true);
}
@Test
public void testOne() {
extent.startTest("My First Test", "Sample description");
extent.log(LogStatus.PASS, "Details");
extent.log(LogStatus.ERROR, "Details");
}
@Test
public void testTwo() {
extent.startTest("My Second Test", "Sample description");
extent.log(LogStatus.INFO, "Details");
extent.log(LogStatus.WARNING, "Details");
}
@AfterTest
public void afterTest() {
extent.endTest();
}
}
You can customize the report as you want. Changes can be easily made to the overall CSS by bringing your own custom css, changes to the icons can be made by picking your own from font-awesome etc. Below is some basic usage to demonstrate this library's customization.
You can use your custom CSS directly in the document or load a custom css-stylesheet.
// custom styles
String style = "p{font-size:20px;}" +
".test{background-color:#000 !important;color:#fff !important;}";
extent.config().addCustomStyles(style);
// custom stylesheet
extent.config().addCustomStylesheet("C:\\css.css");
It is possible to change the title of the report file (v1.2+) using:
extent.config().documentTitle("MyTestReport");
ExtentReports can be heavily themed/modified to suit a layout as per your needs. The example below shows a Cucumber like color-scheme:
String css = "#topbar { background-color: #8bb1ec; }" +
".topbar-items-right span { color: white; }" +
".menu span { color: darkgreen; }" +
".menu-item-selected span { border-bottom: 1px solid green; }" +
"#dashboard { background-color: transparent; }" +
".test { border: 1px solid lightseagreen; }" +
".description { background-color: transparent; border-left: 2px solid orange; padding: 2px 15px;}" +
".name { color: darkgreen; }" +
".extent-table { border: 1px solid #bbb; }" +
".extent-table th { background: none repeat scroll 0 0 olivedrab; color: #fff; }" +
".extent-table td { border-bottom: 1px solid #bbb; }";
extent.config().addCustomStyles(css);
The above will result in the following output. Its a small change, but quite different from the original.
Just like having the ability to change document styles, you can also add your own custom scripts.
extent.config().insertJS("$('.test').click(function(){ alert('test clicked'); });");
Its possible to add/remove the Extent footer using the following configuration:
// remove the footer
extent.config().useExtentFooter(false);
// use the footer
extent.config().useExtentFooter(true);
Not a lot of people would do this, but you can choose to use your own icons for log status (PASS, FAIL, WARNING etc.) by choosing one of the icons from Fontawesome website: http://fortawesome.github.io/Font-Awesome/icons/.
extent.config().statusIcon(LogStatus.PASS, "check-circle");
You can remove or add your own summary by using the following config:
extent.config().reportHeadline("My custom report summary.");
It is possible (v1.4+) to customize the chart-title text by using the following config:
extent.config()
.chartTitleText(Chart.TEST, "Test Summary")
.chartTitleText(Chart.STEP, "Step Summary");
The default screenshot size attached to the report is 50%
. It is possible to change screenshot size (v1.4+) by specifying a percentage:
extent.config().setImageSize("30%");
It is now possible to hide the caller class by this simple setting:
extent.config().displayCallerClass(false);
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.


API Reference¶
graph¶
vt_graph_api.graph.
This module provides the Python object wrapper for VirusTotal Graph representation.
- Documentation:
- VT API: https://virustotal.github.io/vt-graph-api/
-
class
vt_graph_api.graph.
VTGraph
(api_key, name='', private=False, user_editors=None, user_viewers=None, group_editors=None, group_viewers=None, verbose=False)¶ Bases:
object
Python object wrapper for Virustotal Graph representation.
Variables: - api_key (str) – VT API Key.
- graph_id (str) – graph identifier for VT.
- name (str) – graph title.
- api_calls (int) – total api calls consumed by graph.
- private (bool) – whether graph is private or not.
- user_editors ([str]) – list with users that can edit graph.
- user_viewers ([str]) – list with users that can see graph.
- group_editors ([str]) – list with groups that can edit graph.
- group_viewers ([str]) – list with groups that can see graph.
- verbose (bool) – if True log will be displayed.
- nodes (dict) – graph nodes.
- links (dict) – graph links.
-
MAX_API_EXPANSION_LIMIT
= 40¶
-
MAX_CHARACTERS
= 100¶
-
MAX_PARALLEL_REQUESTS
= 1000¶
-
MIN_API_EXPANSION_NUMBER
= 10¶
-
REQUEST_TIMEOUT
= 40¶
-
add_link
(source_node, target_node, connection_type='')¶ Adds a link between source_node and target_node with the given connection_type.
If there’s no connection type supplied, the link will be drawed without relationship node in VirusTotal UI.
Parameters: - source_node (str) – source node ID.
- target_node (str) – target node ID.
- connection_type (str, optional) – connection type, for example compressed_parent. Defaults to “”.
Raises: NodeNotFoundError
– if any of the given nodes are not found.SameNodeError
– if the source_node and the target_node are the same.
This call does NOT consume API quota.
-
add_links_if_match
(source_node, target_node, max_api_quotas=100000, max_depth=3, max_qps=1000, fetch_info_collected_nodes=True)¶ Try to find a relationship between the source_node and the target_node.
Adds the needed links between the source_node and the target_node if the target_node could be reached by source_node.
Parameters: - source_node (str) – source node ID.
- target_node (str) – target node ID.
- max_api_quotas (int, optional) – maximum number of api quotas that could be consumed. Defaults to 100000.
- max_depth (int, optional) – maximum number of hops between the nodes. Defaults to 3.
- max_qps (int, optional) – maximum number of requests per second. Defaults to 1000.
- fetch_info_collected_nodes (bool, optional) – if True, when a new node is added to graph to compute the connection, it will be fetched on VT for information. It consumes api quotas which are not included in max_api_quota. Defaults to True.
Returns: whether relation has been found.
Return type: bool
Raises: NodeNotFoundError
– if source or target node is not found.SameNodeError
– if source_node and target_node are the same.
This call consumes API quota (as much as max_api_quotas value), one for each expansion required to find the relation.
-
add_node
(node_id, node_type, fetch_information=True, fetch_vt_enterprise=True, label='', node_attributes=None, x=0, y=0)¶ Adds a node with id node_id of node_type type to the graph.
Parameters: - node_id (string) – node ID. Example: https://www.virustotal.com for a url.
- node_type (string) – file, url, ip_address or domain.
- fetch_information (bool, optional) – whether the script will fetch information for this node in VT. If the node already exist in the graph it will not fetch information for it. Defaults to True.
- fetch_vt_enterprise (bool, optional) – if True, the graph will search any available information using VT intelligence for the node if there is no normal information for it. Defaults to True.
- label (str, optional) – label that appears next to the node. Defaults to “”.
- node_attributes (dict, optional) – if it is set and fetch_information is False, node_attributes will be added to new node with the given node id. Defaults to None.
- x (int, optional) – X coordinate for Node representation in VT Graph UI.
- y (int, optional) – Y coordinate for Node representation in VT Graph UI.
Returns: the node object appended to graph.
Return type: This call consumes API quota if fetch_information=True. It also consumes API quota if the given node_id is not standard, such as file with id in SHA1 or MD5, URL instead of an VT URL identifier or if the given node_id belongs to an unknown identifier.
-
add_nodes
(node_list, fetch_information=True, fetch_vt_enterprise=True)¶ Adds the node_list to the graph concurrently.
Parameters: - node_list ([dict]) – a list of dictionaries with the following keys {node_id, node_type, label, attributes, x_position, y_position}.
- fetch_information (bool, optional) – whether the script will fetch information for the nodes that will be added in VT. Defaults to True.
- fetch_vt_enterprise (bool, optional) – if True, the graph will search any available information using VT intelligence for the node if there is no normal information for it. Defaults to True.
Returns: the list with the added nodes.
Return type: [Node]
-
static
clone_graph
(graph_id, api_key, name='', private=False, user_editors=None, user_viewers=None, group_editors=None, group_viewers=None)¶ Clone VirusTotal Graph and make it yours according the given parameters.
Parameters: - graph_id (str) – VirusTotal Graph ID.
- api_key (str) – VT API Key
- name (str, optional) – graph title. Defaults to “”.
- private (bool, optional) – true for private graphs. You need to have Private Graph premium feature enabled in your subscription. Defaults to False.
- user_editors ([str], optional) – usernames that can edit the graph. Defaults to None.
- user_viewers ([str], optional) – usernames that can view the graph. Defaults to None.
- group_editors ([str], optional) – groups that can edit the graph. Defaults to None.
- group_viewers ([str], optional) – groups that can view the graph. Defaults to None.
Raises: vt_graph_api.errors.LoadError
– whether the given graph_id cannot be found or JSON does not have the correct structure.Returns: the cloned graph.
Return type:
-
connect_with_graph
(source_node, max_api_quotas=100000, max_depth=3, max_qps=1000, fetch_info_collected_nodes=True)¶ Try to connect the source_node with the current graph nodes.
Parameters: - source_node (Node) – source_node ID.
- max_api_quotas (int, optional) – maximum number of api quotas that could be consumed. Defaults to 100000.
- max_depth (int, optional) – maximum number of hops between the nodes. Defaults to 3.
- max_qps (int, optional) – maximum number requests per second. Defaults to 1000.
- fetch_info_collected_nodes (bool, optional) – if True, when a new node is added to graph to compute the connection, it will be fetched on VT for information. It consumes api quotas which are not included in max_api_quota. Defaults to True.
Raises: NodeNotFoundError
– if the node source is not found.Returns: whether at least one relationship has been found.
Return type: bool
This call consumes API quota (as much as max_api_quotas value), one for each expansion required to find the relationships.
-
delete_link
(source_node, target_node, connection_type)¶ Deletes the link between source_node and target_node with the given connection_type.
Parameters: - source_node (str) – source node ID.
- target_node (str) – target node ID.
- connection_type (str) – connection type, for example compressed_parent.
Raises: NodeNotFoundError
– if any of the given nodes are not found.SameNodeError
– if the source_node and the target_node are the same.LinkNotFoundError
– if the given link does not exists in the graph.
-
delete_links
(node_id)¶ Deletes all the links which contains the given node_id.
Parameters: node_id (str) – the node which are in the links that will be deleted from the graph. Raises: NodeNotFoundError
– if the given node_id is not found.
-
delete_node
(node_id)¶ Deletes the node with the given node_id from the graph.
Parameters: node_id (str) – node ID. Raises: NodeNotFoundError
– if there is no node with the given node_id in the graph.This call does NOT consume API quota.
-
expand
(node_id, expansion, max_nodes_per_relationship=40)¶ Expands the given node with the given expansion.
Parameters: - node_id (str) – identifier of the node. See the top level documentation to understand IDs.
- expansion (str) – expansion name. For example: compressed_parents for nodes of type file.
- max_nodes_per_relationship (int, optional) – max number of nodes that will be expanded per relationship. Minimum value will be MIN_API_EXPANSION_NUMBER. Defaults to 40.
Raises: NodeNotFoundError
– if the node is not found.NodeNotSupportedExpansionError
– if the node cannot be expanded with the given expansion.
Returns: - a list with the nodes resulted by the expansion of the given node
with the given relationship.
Return type: [Node]
This call consumes API quota.
-
expand_n_level
(level=1, max_nodes_per_relationship=40, max_nodes=10000)¶ Expands all the nodes in the graph level levels.
- For example:
If your graph has three nodes, and you apply a expand_n_level(1). It will expand the three nodes with all the known expansions for those nodes.
If you select 2 levels of expansions. After the first expansion is applied to the three nodes, the new discovered nodes will be expanded as well.
Parameters: - level (int, optional) – number of layers down the graph that will be expanded. Defaults to 1.
- max_nodes_per_relationship – (int, optional): max number of nodes that will be expanded per relationship. Defaults to 40.
- max_nodes (int, optional) – max number of nodes that will be added to the graph. The expansion will stop as soon as any expansion result adds more than this limit to the graph. Defaults to 10000.
Returns: - a list with the nodes resulted by the expansion of each graph
node in all his known relationships.
Return type: [Node]
This call consumes API quota, one for each node expansion.
-
expand_one_level
(node_id, max_nodes_per_relationship=40)¶ Expands all relationship that we know in VirusTotal for the give node.
Parameters: - node_id (str) – node ID.
- max_nodes_per_relationship (int, optional) – max number of nodes that will be expanded per relationship. Defaults to None.
Raises: NodeNotFoundError
– if the node is not found.It consumes API quota, one for each expansion available for the node.
Returns: - a list with the nodes resulted by te expansion of the given node
- in all his known relationships.
Return type: [Node]
-
get_api_calls
()¶ Get api counter in thread safe mode.
-
get_iframe_code
()¶ Return VirusTotal UI iframe for the graph.
Requires that save_graph was called.
Raises: vt_graph_api.errors.SaveGraphError
– if save_graph was not called.Returns: VirusTotal UI iframe. Return type: str
-
get_ui_link
()¶ Return VirusTotal UI link for the graph.
Requires that save_graph was called.
Raises: vt_graph_api.errors.SaveGraphError
– if save_graph was not called.Returns: VirusTotal UI link. Return type: str
-
has_node
(node_id)¶ Check if the graph contains the node with the given node_id.
Parameters: node_id (str) – node ID. Returns: whether the graph contains the node with the given node_id. Return type: bool This call consumes API quota if the given node_id is not a standard VT id.
-
static
is_editor
(vt_user, graph_id, api_key)¶ Check if the given vt_user can edit the graph with the given graph_id.
Parameters: - vt_user (str) – VirusTotal user/group name.
- graph_id (str) – VirusTotal Graph ID.
- api_key (str) – VirusTotal Api key.
Returns: whether the given vt_user can edit the graph.
Return type: bool
-
static
is_viewer
(vt_user, graph_id, api_key)¶ Check if the given vt_user can view the graph with the given graph_id.
Parameters: - vt_user (str) – VirusTotal user/group name.
- graph_id (str) – VirusTotal Graph ID.
- api_key (str) – VirusTotal Api key.
Returns: whether the given vt_user can view the graph.
Return type: bool
-
static
load_graph
(graph_id, api_key)¶ Load the graph using the given VirusTotal graph id.
Parameters: - graph_id (str) – VirusTotal Graph ID.
- api_key (str) – VirusTotal API key.
Raises: vt_graph_api.errors.LoadError
– whether the given graph_id cannot be found or JSON does not have the correct structure.vt_graph_api.errors.InvalidJSONError
– if the JSON response is invalid.
Returns: the imported graph.
Return type:
-
save_graph
()¶ Saves the graph into VirusTotal Graph database.
At this point if the Graph is set to public it will be searchable in VirusTotal UI.
Raises: CollaboratorNotFoundError
– if any of the collaborators is not found in VirusTotal user and group database.SaveGraphError
– if something went bad when saving the graph.
This call not consume API quota.
node¶
vt_graph_api.node.
This module provides the Python object wrapper for VTGraph node representation.
-
class
vt_graph_api.node.
Node
(node_id, node_type, x=0, y=0)¶ Bases:
object
Python object wraper for the VT Graph Node representation.
Variables: - node_id (str) – node identifier.
- node_type (str) – node type, must be one of the SUPPORTED_NODE_TYPES.
- pretty_id (str) – node identifier without dots.
- x (int, optional) – X coordinate for Node representation in VT Graph GUI.
- y (int, optional) – Y coordinate for Node representation in VT Graph GUI.
- expansions_available ([str]) – available expansions for the node.
- attributes (dict) – VirusTotal attribute dict.
- label (str) – node name.
- children (dict) – dict with the children for each expansion type.
- relationship_ids (dict) – dict with the relationship id for each expansion type.
-
NODE_EXPANSIONS
= {'domain': ['inmediate_parent', 'parent', 'communicating_files', 'downloaded_files', 'referrer_files', 'resolutions', 'siblings', 'subdomains', 'urls'], 'file': ['bundled_files', 'carbonblack_children', 'carbonblack_parents', 'compressed_parents', 'contacted_domains', 'contacted_ips', 'contacted_urls', 'email_parents', 'embedded_domains', 'embedded_urls', 'embedded_ips', 'execution_parents', 'itw_domains', 'itw_urls', 'overlay_parents', 'pcap_parents', 'pe_resource_parents', 'similar_files'], 'ip_address': ['communicating_files', 'downloaded_files', 'referrer_files', 'resolutions', 'urls'], 'url': ['downloaded_files', 'last_serving_ip_address', 'network_location', 'redirecting_urls']}¶
-
SUPPORTED_NODE_TYPES
= ('file', 'url', 'domain', 'ip_address')¶
-
add_attributes
(attributes)¶ Adds the attributes if the node doesn’t have it yet.
Parameters: attributes (dict) – VirusTotal attribute dict.
-
add_child
(node_id, expansion)¶ Add child to Node in the given expansion.
Parameters: - node_id (str) – child node id.
- expansion (str) – expansion for the given node_id.
-
add_label
(label)¶ Adds a label to the node.
Parameters: label (str) – value of the label.
-
delete_child
(node_id, expansion)¶ Delete child from Node in the given expansion.
Parameters: - node_id (str) – child node id.
- expansion (str) – expansion for the given node_id.
-
get_detections
()¶ Get the node detections from attributes.
Returns: the number of detections. Return type: int
-
static
is_domain
(node_id)¶ Check if node_id belongs to domain name.
Parameters: node_id (str) – node ID. Returns: wether node_id belongs to a domain name. Return type: bool
-
static
is_ipv4
(node_id)¶ Check if node_id belongs to ipv4.
Parameters: node_id (str) – node ID. Returns: wether node_id belongs to a ipv4. Return type: bool
-
static
is_md5
(node_id)¶ Check if node_id belongs to md5 hash.
Parameters: node_id (str) – node ID. Returns: wether node_id belongs to a md5 hash. Return type: bool
-
static
is_sha1
(node_id)¶ Check if node_id belongs to sha1 hash.
Parameters: node_id (str) – node ID. Returns: wether node_id belongs to a sha1 hash. Return type: bool
-
static
is_sha256
(node_id)¶ Check if node_id belongs to a sha256 hash.
Parameters: node_id (str) – node ID. Returns: wether node_id belongs to a sha256 hash. Return type: bool
-
static
is_url
(node_id)¶ Check if node_id belongs to url.
Parameters: node_id (str) – node ID. Returns: whether node_id belongs to a url Return type: bool
-
reset_relationship_ids
()¶ Reset relationship_ids.
errors¶
vt_graph_api.errors.
This modules provides all errors that could be raised by the methods in vt_graph_api package.
-
exception
vt_graph_api.errors.
CollaboratorNotFoundError
¶ Bases:
exceptions.Exception
-
exception
vt_graph_api.errors.
InvalidJSONError
¶ Bases:
exceptions.Exception
-
exception
vt_graph_api.errors.
LinkNotFoundError
¶ Bases:
exceptions.Exception
-
exception
vt_graph_api.errors.
LoadError
¶ Bases:
exceptions.Exception
-
exception
vt_graph_api.errors.
MaximumConnectionRetriesError
¶ Bases:
exceptions.Exception
-
exception
vt_graph_api.errors.
NodeNotFoundError
¶ Bases:
exceptions.Exception
-
exception
vt_graph_api.errors.
NodeNotSupportedExpansionError
¶ Bases:
exceptions.Exception
-
exception
vt_graph_api.errors.
NodeNotSupportedTypeError
¶ Bases:
exceptions.Exception
-
exception
vt_graph_api.errors.
SameNodeError
¶ Bases:
exceptions.Exception
-
exception
vt_graph_api.errors.
SaveGraphError
¶ Bases:
exceptions.Exception


Before Change
cs = [c for _, c in global_RVs.items()]
shps = [shp for _, _, shp, _ in global_order.vmap]
c_g = [c * tt.ones(np.prod(shp)) for c, shp in zip(cs, shps)]
return inarray_global, uw_global, replace_global, c_g
After Change
// Replace RVs with reshaped subvectors of the joined vector
// The order of global_order is the same with that of global_RVs
subvecs = [reshape_t(inarray_global[slc], shp).astype(dtyp)
for _, slc, shp, dtyp in global_order.vmap]
replace_global = {v: subvec for v, subvec in zip(global_RVs, subvecs)}
// Weight vector
cs = [c for _, c in global_RVs.items()]
oness = [tt.ones(v.ravel().tag.test_value.shape) for v in global_RVs]


LibJS test262 results
These are the results of the SerenityOS JavaScript engine, LibJS, running the official ECMAScript conformance test suite test262 as well as the test262 parser tests. All tests are re-run and the results updated automatically for every push to the master branch of the repository on GitHub. Dates and times are shown in your browser's timezone. Development of the engine started in March 2020 (see this YouTube video), continuous running of test262 in June 2021 (see this PR on GitHub) — results before that time are not available.
The source code of the LibJS test262 runner and aggregation script is available here, the source code of this website here, and the raw data here (JSON).
If you have any questions or want to help out with improving these test
scores, feel free to get in touch on the
SerenityOS Discord server
(#js
).
test262
Loading...
test262 run by the bytecode interpreter
Loading...
test262 parser tests
Loading...


PTI - PhoenixOS Terminal Interface
PhoenixOS Terminal Interface - Temporary access authorized.
Type 'help' + Enter -- for available reports.
»About
Date: 20th February 2026 Subject: SPECIMEN 2.4 Field Team Leader, Specimen 2.4 was last documented during the Alpheros-Class Security Anomaly; responsible for the anarchy that ensued, namely the escape of all Novaraptors in captivity. With incredible foresight, coordination and collaboration Specimen 2.4 has successfully evaded our grasp and has eluded us ever since. Alpheros - a cataclysm that has gone without any form of accountability or liability for any parties involved. I refuse to believe that it was the mere deception of an animal that we created. It simply could not have occurred without inside intervention - which as we have established prior is not something unheard of. In any case: the few observations made with reference to Specimen 2.4 suggest atypical intellect, strength and 'influence'. Of course, studies have made evident the existence of 'alphas' in a pack of Novaraptors - but a leader of the entire species seems outright unrealistic. So, it is my firm and unfaltering belief that we must track down and subdue Specimen 2.4 "Ruvik" for meticulous study and scrutiny, good luck.
»Usage
Using it is pretty straight forward. Create several(as much as you need) divs or «section» elements each with it's unique id to hold your content. Make sure to have an error section (id="error") with some information to warn the user when he/she mistypes a command or if there is no section with that name, think of it as a 404 page.
A section with id="help" is also required so you can list all the available sections and let your users know what words to write to access that particular content.
The input field must be a standalone element and must not be placed inside any of the content divs or sections, and make sure you give it a classname "command", if you want to name it anything else you need to edit the app.js and change all instances of .command in the script to match your chosen classname.
In short, just view the source code of this demo, copy/modify it to your liking making sure you include the error and help sections.
»Download
Download/fork the source code: Github License: MIT
Command not found!
Type 'help' + Enter -- for available commands.
»Help?
Type [command] + Enter
- 'home' -- Thats obvious!
- 'SPECIMEN' -- Specimen report
- 'usage' -- How to
- 'download' -- Download + license
- 'help' -- displays this list


We make the tools of Wall Street available to everyone - with Trality bots for all levels of experience.
If anyone is interested, if you apply for their newsletter, next month they will launch a public beta
and if you register you automatically get a mail to try it out
should be interesting to fiddle around with
smk762 - dracocanis ominator16-Apr-19 11:42 AM
An interesting data analysis project for anyone interested would be to check the movement of KMD in the top VOTE2019 addresses after the airdrop. Isn't conclusive, but could indicate potential sell off contributing to red candle by those more interested in extra VOTE2019 than hodling KMD.
Not saying there's anything wrong with that...
 The trashed Hyundai holds the most p...
1
1
smk762 - dracocanis ominator16-Apr-19 12:03 PM
It's far from conclusive though, people could be transfering off a ledger, paper wallet or CEX. Or just using a different address for privacy, or simply being sent to a change address after a subsequent transaction.
dokrates16-Apr-19 12:03 PM
hhahahaha
smk762 - dracocanis ominator16-Apr-19 12:09 PM
wonders how the "dont resend votes" rule works with change addresses....
74D3016-Apr-19 12:17 PM
@REX Komodo was found innocent of the baby's murder. BSV did it
Hollowman900016-Apr-19 12:39 PM
markhanna absolutely BTFO
expected KMD pump
Got KMD dump
sφldat16-Apr-19 12:40 PM
expected KMD dump..
jl777c16-Apr-19 12:44 PM
so its over?
CHMEX16-Apr-19 12:45 PM
lesson learned and confirmed once again, when you say you WTB people should sell to you
Keppie16-Apr-19 12:45 PM
JL, anyone took you up on your offer yet?
CHMEX16-Apr-19 12:46 PM
doesn't look like BTC is still in the crypto address
jl777c16-Apr-19 12:47 PM
i did arrange a swap
CHMEX16-Apr-19 12:47 PM
nice
Keppie16-Apr-19 12:48 PM
40btc ? or none of my bussiness ?
ComputerGenie 👴👴👴16-Apr-19 12:51 PM
would have swapped, but the price was off by 1/2 (edited)
Hollowman900016-Apr-19 12:51 PM
@jl777c yes it’s over
Time to go home
jl777c16-Apr-19 12:52 PM
ok
thanks for the heads up
Hollowman900016-Apr-19 12:52 PM
Vbk is futar
and block
Can’t forget block
jl777c16-Apr-19 12:55 PM
VBK is trading at the OTC price now
120BTC per day with 10BTC per day selling pressure from just the BTC costs, not counting fpga miners that are dumping
Hollowman900016-Apr-19 12:56 PM
sustainability
too big to fail, need bailout
round 2 funding
Notify the click-monkey farm
jl777c16-Apr-19 12:56 PM
but writing the same data 500x makes it more secure, since just 1 BTC tx per block, maybe the bits will just randomly change on you
oh, and it needs to change in a way that still keeps the signature valid
if a single BTC tx couldnt be trusted to be immutable, there are some big problems going on and VBK found this!
Markus16-Apr-19 12:58 PM
VBK hype is over, ppl got over it that it was a massive failure. Now let it die in peace
Hollowman900016-Apr-19 12:58 PM
If 1 tx = bitcoin security, then 500 tx = 500x bitcoin security
jl777c16-Apr-19 01:01 PM
but its 500 decentralized tx, that must be better than just one? how can just one be good enough. you dont eat just one hotdog do you?
i cant help but notice the lack of TA and actual trade talk about KMD in here
meanwhile bashing other projects
Malti16-Apr-19 01:25 PM
@siu - Chainmakers get in here and prove him wrong
siu - Chainmakers16-Apr-19 01:26 PM
lol
who is this guy?
wanna see some charts?
p.16-Apr-19 01:27 PM
yes
or hotdog orgy pics
i mean same same right
jl777c16-Apr-19 01:27 PM
it wasnt me that claimed that having the data 500x was better than 1x
siu - Chainmakers16-Apr-19 01:29 PM
Here we have a daily chart of KMDBTC who has broken resistance above 200sma and now seems to be retesting and making a support out of it on a correction from the top of what resembles a leading diagonal wave 1 with rising volume.
You cant say you notice the lack of something when you not even been here a whole day
BTW, price in the dialy chart is resting right above 200sma with a oversold formation on daily RSI.
jl777c16-Apr-19 01:31 PM
ok, that picture proves it, eating 500 hotdogs is indeed better than just one
siu - Chainmakers16-Apr-19 01:31 PM
daily RSI has been forming what is known as hidden bull divergences during this correction
jl777c16-Apr-19 01:31 PM
i can now recommend that people issue the same transaction 500x, but probably best to send just 0.2% each time. that way you get the redundancy of 500x
Malti16-Apr-19 01:32 PM
@siu - Chainmakers oversold indicators you say? I just bought extra
siu - Chainmakers16-Apr-19 01:33 PM
that is what you do when things are over sold
you buy
when things are overbought you should sell
jl777c16-Apr-19 01:33 PM
what is the historical return if you only buy when oversold and sell when overbought?
Malti16-Apr-19 01:34 PM
yes sorry you're right.. i'm not here with my head today
jl777c16-Apr-19 01:34 PM
too many hotdogs?
Malti16-Apr-19 01:35 PM
@jl777c selling x amount of hotdogs and buying back x+x amount of hot dogs
which implies more hotdogs
siu - Chainmakers16-Apr-19 01:36 PM
from this daily chart most oversold RSI where good entrances even during the bear market
only one that could be called "failed" is during the actual bottom where even though RSI was going up creating bull divs, the price kept going down.
jl777c16-Apr-19 01:37 PM
but isnt it too easy if all you have to do is wait for oversold/overbought?
siu - Chainmakers16-Apr-19 01:37 PM
not so easy, right now its oversold and people are not too eager to buy


| DOSE: |
1 tablet |
oral |
MDMA |
(pill / tablet) |
I finally did MDMA. I've had my doubts and temptations to try MDMA for many years. Pretty much ever sense I heard about it and decided that it was morally ok for me to use illegal substances. It was a wonderful experience.
I dropped my pill at 9:30 PM on Wednesday evening. I had a normal amount of food that day, my homework was finished, and I was ready. I cleaned up my room, brushed my teeth, and took my contacts out just like I was going to bed. I had myself prepared for almost anything. Not to mention I was relaxed. My mind felt content. Perhaps it was a little nervous, but no big deal.
During the first half hour, or so, I was talking to my little brother. We were talking about school, what things we liked, etc.  I was completely relaxed.
Then about another half an hour later I just started feeling a little funny. I was even more relaxed, and my mind was completely clear of worries and fears. I just felt happy.  I could still tell that my mind and body were connected. I was still myself. That part I was a little surprised about. I wasn't sure how well my soul would be connect to me, like some other drugs. It was great.
I was watching Better Living Through Circuity, a documentary on electronic dance music and rave culture. The music was terrific, but I am glad to say that it's just as good, or even better, when I'm straight. I can recall tears just flowing down my cheeks. I wasn't sad, I was happy. I just felt so good. My body felt alive.
Things were going well. I wasn't getting intense rushs and I wasn't freaking out.  I had to drink charcoal, go to the ER, and spend a day at an institute. This is part of the reason why I wanted to try MDMA. I wanted to prove to myself that I can take certain drugs on my own and be ok. I know I shouldn't be alone, but for once I felt the need to. I definitely achieved my goal.
Later on, I danced and flowed. My arms felt like water. Free flowing and cool. I was in heaven. At that time I noticed my jaw clenching and chattering. I sucked on a lollipop and that helped it a lot. I was sure to drink water. I wasn't dancing that much, but my mouth was getting dry. What's a little water anyway? Those were the only bad side effects during the experience.
The peak was incredible. I'm not exactly sure how far along I was when I peaked. Tears were flowing again, and I just sat in my bed. I was getting little fuzzy buzzes over my body. I just felt like I could fly. I kept thinking about how wonderful I was feeling. It was intense, but in a very pleasant way.
I think it was 4:30 AM when I attempted to settle down a little. I tried to sleep some, but I had music on. I needed to let my arms flow. I think I got to sleep around 5:30.  I slept for that half an hour, but when I got up for school I still had a fair amount of energy. I rushed to the store before school to get a lunch and some caffiene just in case I needed it.
I was relaxed and content with myself all day at school. I didn't need to take my Zoloft either. I was starting to feel pretty tired. I made it through the day. Work was kind of brutal though. I was very, very tired. I made it though. Sleep was still a litle uncomfortable.
The day after is when I really started to feel the negative side effects. My mouth is still incredibly dry, my stomach is a little queasy, my arms hurt (that's from dancing though), and I'm tired. It's kind of like having a minor cold. I'm sure it'll clear up within a few days.
But yes, it was so worth it. It's not something I would want to do every weekend. Once a month is plenty for me. It's a nice thing to use when I want to relax. It's fun. I don't really suggest doing it during the school week. I kind of got my schedule a little messed up. Rolling by yourself is ok, but I'm sure with close friends would be better. Be prepared for NASTY cotton mouth. It's gross.
 It's the best thing I ever tasted. Plus, the vitamin C doesn't hurt either.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


| 1 | /* =========================================================== | |
| 2 | * JFreeChart : a free chart library for the Java(tm) platform | |
| 3 | * =========================================================== | |
| 4 | * | |
| 5 | * (C) Copyright 2000-2008, by Object Refinery Limited and Contributors. | |
| 6 | * | |
| 7 | * Project Info: http://www.jfree.org/jfreechart/index.html | |
| 8 | * | |
| 9 | * This library is free software; you can redistribute it and/or modify it | |
| 10 | * under the terms of the GNU Lesser General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2.1 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This library is distributed in the hope that it will be useful, but | |
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
| 16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |
| 17 | * License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU Lesser General Public | |
| 20 | * License along with this library; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
| 22 | * USA. | |
| 23 | * | |
| 24 | * [Java is a trademark or registered trademark of Sun Microsystems, Inc. | |
| 25 | * in the United States and other countries.] | |
| 26 | * | |
| 27 | * ---------------------------- | |
| 28 | * StandardXYZURLGenerator.java | |
| 29 | * ---------------------------- | |
| 30 | * (C) Copyright 2003-2008, by Object Refinery Limited and Contributors. | |
| 31 | * | |
| 32 | * Original Author: David Gilbert (for Object Refinery Limited); | |
| 33 | * Contributors: -; | |
| 34 | * | |
| 35 | * Changes: | |
| 36 | * -------- | |
| 37 | * 03-Feb-2003 : Version 1 (DG); | |
| 38 | * | |
| 39 | */ | |
| 40 | ||
| 41 | package org.jfree.chart.urls; | |
| 42 | ||
| 43 | import org.jfree.data.xy.XYZDataset; | |
| 44 | ||
| 45 | /** | |
| 46 | * A URL generator. | |
| 47 | */ | |
| 48 | public class StandardXYZURLGenerator extends StandardXYURLGenerator | |
| 49 | implements XYZURLGenerator { | |
| 50 | ||
| 51 | /** | |
| 52 | * Generates a URL for a particular item within a series. | |
| 53 | * | |
| 54 | * @param dataset the dataset. | |
| 55 | * @param series the series index (zero-based). | |
| 56 | * @param item the item index (zero-based). | |
| 57 | * | |
| 58 | * @return A string containing the generated URL. | |
| 59 | */ | |
| 60 | public String generateURL(XYZDataset dataset, int series, int item) { | |
| 61 |
1
1. generateURL : mutated return of Object value for org/jfree/chart/urls/StandardXYZURLGenerator::generateURL to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return super.generateURL(dataset, series, item); |
| 62 | } | |
| 63 | ||
| 64 | } | |
Mutations | ||
| 61 |
1.1 |


Are you curious why I am selling here, since it's not a village?
"No. Please show me items I can use on the battlefield."
"Yes, I'm a little curious."


‘Game Of Thrones’ star says unreleased season 8 alternate ending “may mend fans’ hearts”
"I'll be watching."
Game of Thrones star Dean-Charles Chapman has suggested the release of a filmed alternate ending to the show could “mend the fans’ hearts” following the show’s controversial finale.
It comes in response to star Kristofer Hivju’s revelation last week that they had shot a second ending to the series.
“Well, we shot an alternative ending,” the Tormund Giantsbane actor said at a Q&A. “That was mostly for fun but I don’t know if I’m allowed to tell you about that.”
Chapman, who played Tommen Baratheon on the HBO series until 2016, has now backed calls to release the alternate ending, telling TMZ when quizzed on a possible release: “Yeah, why not”.
When the interviewer suggested it could be to “see what it’s about”, the actor responded: “Yeah exactly. I know they’re doing spin-offs as well…”.
‘Game of Thrones’ Season 8
The interviewer then argued it could “mend the fans’ hearts”, Chapman adding: “Exactly… I’ll be watching”.
The show’s ending proved very divisive when it aired earlier this year, with show director Neil Marshall admitting the finale was “really rushed”.
- Read more: ‘Game of Thrones’ star Emilia Clarke says she was told to perform nude scenes or “disappoint” fans
Star Emilia Clarke also said fan petitions to remake the season and the backlash were “flattering”.
However, Alfie Allen revealed he was “pissed off” by the backlash, adding: “I can’t even delve into that world too much, for my own sanity.”
Game of Thrones is set to get a spin-off series called House of the Dragon, which was given the go-ahead by HBO after scrapping another prequel series that had already shot a pilot episode.


Hello. If you are seeing this then either you pushed the button to verify that you're human or it's the first time
MinkeBox has tried to registered an application with the MinkeBox DDNS service.
This service is completely free and allows MinkeBox to programmatically generate public fully qualified
domain names for your applications so they can be accessed from the Internet.
Before you can use this service, and to prevent abusive behaviour by bots, we need to verify that you're a human.
This should only happens once. If you choose not to verify now, you can explicitly do it later.


Paragraph 1
Paragraph 2
Paragraph 3
Paragraph 4
This is a "::first-line" example.
This is a "::first-letter" example.
This is a "::selection" example.
- This is a "::before" and "::after" example.


|
Guting Paper Implementation
Implementation of paper on Optimal Divide-and-Conquer to Compute Measure and Contour for a Set of Iso-Rectangles by Ralf Hartmut Guting
|
Class representing stripe data structure to find the measure for given set of input rectangles. More...
#include <stripe.hpp>
Public Member Functions | |
| StripeMeasure () | |
| Default Constructor. | |
| StripeMeasure (Interval x_interval, Interval y_interval, double x_measure) | |
| Constructor to initialize stripe for contour function using two Intervals x-interval, y-interval and a double variable x_measure. More... | |
| bool | operator== (const StripeMeasure &S) const |
| Compares two StripeMeasure objects. More... | |
| bool | operator!= (const StripeMeasure &S) const |
| Compares two StripeMeasure objects. More... | |
| bool | operator< (const StripeMeasure &S) const |
| Compares two StripeMeasure objects. Priority for ordering - x_interval > y_interval > x_measure. More... | |
Public Attributes | |
| Interval | x_interval |
| Defines StripeMeasure using two intervals and a real number (x_interval, y_interval, x_measure) | |
| Interval | y_interval |
| Defines StripeMeasure using two intervals and a real number (x_interval, y_interval, x_measure) | |
| double | x_measure |
| Defines StripeMeasure using two intervals and a real number (x_interval, y_interval, x_measure) | |
Class representing stripe data structure to find the measure for given set of input rectangles.
Constructor to initialize stripe for contour function using two Intervals x-interval, y-interval and a double variable x_measure.
| [in] | x_interval | x_interval of the stripe |
| [in] | y_interval | y_interval of the stripe |
| [in] | x_measure | real value of length of x_interval occupied by rectangles in a stripe |
|
inline |
Compares two StripeMeasure objects.
|
inline |
Compares two StripeMeasure objects. Priority for ordering - x_interval > y_interval > x_measure.
|
inline |
Compares two StripeMeasure objects.


Kylie Jenner only 'sees Drake occasionally' after dating rumours
Kylie Jenner reportedly only sees Drake occasionally after facing speculation about the pair of them dating.
The makeup mogul, who shares baby Stormi with Travis, previously faced rumours that she was dating the God’s Plan hitmaker.
However, a source told PEOPLE that the apparent romance ‘doesn’t seem serious’.
‘Kylie doesn’t seem to be dating,’ they said. ‘She sees Drake occasionally, but it doesn’t seem serious.’
Meanwhile, other reports have suggested that ‘she could be doing it just to make Travis jealous.’
It was previously reported that the pair are ‘spending time together.’
One source told People: ‘He and Kylie have been spending time together recently.
‘They’ve been friends for a long time and Drake is very close to the family.’
Although some describe their relationship as ‘friendly’, another source claims Kylie and Drake are spending time together ‘romantically’.
Advertisement Advertisement
It’s alleged that Drake sees a potential romance with the cosmetics mogul, but she’s said to only see him as a friend.
However, in an interview around the same time, the singer described himself as a Kardashian/Jenner family friend, and even classed momager Kris Jenner as his favourite.
Really, who can blame him?
It was also said that Travis would feel betrayed if Drake and Kylie were to get together after their split earlier this year.
After additional comments from another source claims the duo ‘had an attraction’, Hollywood Life reports that Travis is less than impressed by the whispers he’s been hearing.
‘He would feel a bit betrayed if Drake started anything with Kylie that was anything romantic,’ the insider explained.
‘Travis considers Drake a good friend. He trusts that it was just a fun night out and nothing more happened and people are just overshooting their expectations on this potential relationship.’
Since their split, Travis and Kylie have been focused on co-parenting baby Stormi, giving their little girl a cracking Halloween as they took her to a pumpkin patch.
The little one could be seen looking content with both parents in tow, loving life as she ran around.
Advertisement Advertisement
So cute!
Metro.co.uk has contacted reps for Kylie, Drake, and Travis.
Got a showbiz story?
If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click.


Step 2 of 4
Confirm your government email address
Tell us your government email address, so that we can confirm that you are eligible for a government data science sandbox. You’ll receive an email with a confirmation link.
{% extends 'main.html' %} {% load static %} {% load i18n %} {% block inner_content %}
Tell us your government email address, so that we can confirm that you are eligible for a government data science sandbox. You’ll receive an email with a confirmation link.


Welcome to our site about Moon Bootz!
Moon Bootz are a very special kind of boot. They are inspired by the MOON!
Image by Dinobike
Original image link
License URL
Click here to navigate to other parts of our site
Product Details
Contact Us
Wavier


6 Lab - Correlation
6.1 Question 1
This is Exercise 1 in Chapter 7 of the Textbook [R].
6.1.1 Problem 1a
Find the correlation coefficient, r, for the following sample data on income and education:
library(knitr)
obs <- seq(1:5)
income <- c(30,28,52,40,35)
edu <- c(12,13,18,16,17)
df <- data.frame(obs,income,edu)
names(df) <- c("Observation","Income ($*1000)","Education (Years)")
kable(df)
| Observation | Income ($*1000) | Education (Years) |
|---|---|---|
| 1 | 30 | 12 |
| 2 | 28 | 13 |
| 3 | 52 | 18 |
| 4 | 40 | 16 |
| 5 | 35 | 17 |
Solution 1a
income <- c(30,28,52,40,35)
edu <- c(12,13,18,16,17)
result_1a <- cor(x = edu,y = income,method = "pearson")
result_1a
## [1] 0.83577
The correlation coefficient is 0.83577.
6.1.2 Problem 1b
Test the null hypothesis ρ = 0.
Solution 1b
result_1b <- cor.test(x = edu,y = income,method = "pearson")
if(result_1b$p.value>0.05) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We cannot reject the null hypothesis."
6.1.3 Problem 1c
Find Spearman’s rank correlation coefficient for these data.
Solution 1c
result_1c <- cor(x = edu,y = income,method = "spearman")
result_1c
## [1] 0.8
The Spearman’s rank correlation coefficient is 0.8.
6.1.4 Problem 1d
Test whether the observed value of rs from part (c) is significantly different from zero.
Solution 1d
result_1d <- cor.test(x = edu,y = income,method = "spearman")
result_1d
##
## Spearman's rank correlation rho
##
## data: edu and income
## S = 4, p-value = 0.1333
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
## rho
## 0.8
if(result_1d$p.value>0.05) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We cannot reject the null hypothesis."
6.2 Question 2
This is Exercise 3 in Chapter 7 of the Textbook [R].
6.2.1 Problem
The distribution of the t-statistic for testing the significance of a correlation coefficient has n – 2 degrees of freedom. If the sample size is 36 and α = 0.05, what is the smallest absolute value a correlation coefficient must have to be significant? What if the sample size is 80?
6.2.2 Solution
n=36
n <- 36
r.36 <- round(2/sqrt(n),3)
# r <- 0.3333
t.critical <- qt(0.975,df = n - 2) ## = 2.0322
t <- r.36*sqrt(n-2)/sqrt(1-r.36^2) ## = 2.0615
When the sample size is 36, the smallest absolute value a correlation coefficient must have to be significant is 0.333
n=80
n <- 80
r.80 <- 2/sqrt(n)
# r <- 0.2236
t.critical <- qt(0.975,df = n - 2) ## = 1.9908
t <- r.80*sqrt(n-2)/sqrt(1-r.80^2) ## = 2.0261
When the sample size is 80, the smallest absolute value a correlation coefficient must have to be significant is 0.2236068
6.3 Question 3
This is Exercise 4 in Chapter 7 of the Textbook [R].
6.3.1 Problem
Find the correlation coefficient for the following data:
library(knitr)
Obs <- seq(1:4)
X <- c(2,8,9,7)
Y <- c(6,6,10,4)
df <- data.frame(Obs,X,Y)
kable(df)
| Obs | X | Y |
|---|---|---|
| 1 | 2 | 6 |
| 2 | 8 | 6 |
| 3 | 9 | 10 |
| 4 | 7 | 4 |
6.3.2 Solution
X <- c(2,8,9,7)
Y <- c(6,6,10,4)
cor(X,Y,method = "pearson")
## [1] 0.3834129
result_3 <- cor.test(X,Y,method = "pearson")
if(result_3$p.value>0.05) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We cannot reject the null hypothesis."
6.4 Question 4
This is Exercise 6 in Chapter 7 of the Textbook [R].
6.4.1 Problem
Find the correlation coefficient between median annual income in the United States and the number of horse races won by the leading jockey, for the period 1984–1995. Test the hypothesis that the true correlation coefficient is equal to zero. Interpret your results.
year <- 1984:1994
income <- c(35165,35778,37027,37256,37512,37997,37343,36054,35593,35241,35486)
races <- c(399,469,429,450,474,598,364,430,433,410,317)
df <- data.frame(year,income,races)
names(df) <- c("Year","Median income","Number of races won by leading jockey")
kable(df)
| Year | Median income | Number of races won by leading jockey |
|---|---|---|
| 1984 | 35165 | 399 |
| 1985 | 35778 | 469 |
| 1986 | 37027 | 429 |
| 1987 | 37256 | 450 |
| 1988 | 37512 | 474 |
| 1989 | 37997 | 598 |
| 1990 | 37343 | 364 |
| 1991 | 36054 | 430 |
| 1992 | 35593 | 433 |
| 1993 | 35241 | 410 |
| 1994 | 35486 | 317 |
6.4.2 Solution
income <- c(35165,35778,37027,37256,37512,37997,37343,36054,35593,35241,35486)
races <- c(399,469,429,450,474,598,364,430,433,410,317)
cor(x = races,y = income)
## [1] 0.5583199
# r = 0.5583199
r.min <- 2/sqrt(11)
# r.min = 0.603
result_4 <- cor.test(x = races,y = income)
if(result_4$p.value>0.05) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We cannot reject the null hypothesis."
6.5 Question 5
This is Exercise 7 in Chapter 7 of the Textbook [R].
6.5.1 Problem
For the following ranked data, find Spearman’s r, and then test the null hypothesis (using a Type I error probability of 0.10) that the true correlation is equal to zero.
library(knitr)
obs <- 1:6
x <- c(1,2,5,6,11,12)
y <- c(8,4,12,3,10,7)
df <- data.frame(obs,x,y)
names(df) <- c("Observation","Rank of x","Rank of y")
kable(df)
| Observation | Rank of x | Rank of y |
|---|---|---|
| 1 | 1 | 8 |
| 2 | 2 | 4 |
| 3 | 5 | 12 |
| 4 | 6 | 3 |
| 5 | 11 | 10 |
| 6 | 12 | 7 |
6.5.2 Solution
x <- c(1,2,5,6,11,12)
y <- c(8,4,12,3,10,7)
cor(x,y,method = "spearman")
## [1] -0.02857143
# r = -0.02857143
result_5 <- cor.test(x,y,method = "spearman",conf.level = 0.95)
if(result_5$p.value>0.1) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We cannot reject the null hypothesis."
6.6 Question 6
This is Exercise 8 in Chapter 7 of the Textbook [R].
6.6.1 Problem
Find Pearson’s r for the following data, and then test the null hypothesis that the correlation coefficient is equal to zero. Use a Type I error probability of 0.05.
library(knitr)
obs <- 1:6
x <- c(3.2,2.4,1.6,8.3,7.2,5.1)
y <- c(6.2,7.3,8.1,2.6,6.3,4.3)
df <- data.frame(obs,x,y)
names(df) <- c("Observation","x","y")
kable(df)
| Observation | x | y |
|---|---|---|
| 1 | 3.2 | 6.2 |
| 2 | 2.4 | 7.3 |
| 3 | 1.6 | 8.1 |
| 4 | 8.3 | 2.6 |
| 5 | 7.2 | 6.3 |
| 6 | 5.1 | 4.3 |
6.6.2 Solution
x <- c(3.2,2.4,1.6,8.3,7.2,5.1)
y <- c(6.2,7.3,8.1,2.6,6.3,4.3)
cor(x,y)
## [1] -0.8073491
# r = -0.8073491
result_6 <- cor.test(x,y,conf.level = 0.95)
if(result_6$p.value>0.05) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We cannot reject the null hypothesis."
6.7 Question 7
This is Exercise 9 in Chapter 7 of the Textbook [R].
6.7.1 Problem
Using R and the Milwaukee dataset, find the correlation between number of bedrooms and lot size.
6.7.2 Solution
library(knitr)
url <- "http://spatial.binghamton.edu/geog533/data/Milwaukee_Sales.csv"
df <- read.csv(url,header = TRUE)
kable(head(df,10))
| Stories | FinSqft | Bedrms | Baths | LotSize | SaleDate | SalePrice | Ald | Age | FullBase | Attic | FIREPLACE | AIR_CONDITIONING | Garage | X | Y |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1560 | 4 | 1.5 | 4680 | 2012-04 | 61000 | 1 | 76 | 1 | 1 | 0 | 0 | 1 | 2551960 | 405664.0 |
| 1 | 1538 | 3 | 1.5 | 7100 | 2012-06 | 85900 | 1 | 65 | 1 | 1 | 1 | 1 | 1 | 2543593 | 416385.2 |
| 1 | 1359 | 3 | 1.0 | 5040 | 2012-07 | 87500 | 1 | 72 | 0 | 1 | 0 | 1 | 1 | 2553561 | 412893.6 |
| 1 | 1339 | 3 | 2.5 | 5000 | 2012-03 | 89900 | 1 | 70 | 1 | 1 | 0 | 1 | 1 | 2551449 | 408569.1 |
| 1 | 1213 | 3 | 1.0 | 5125 | 2012-09 | 64500 | 1 | 61 | 1 | 1 | 0 | 1 | 1 | 2541430 | 412143.4 |
| 1 | 1206 | 3 | 1.0 | 5880 | 2012-01 | 35000 | 1 | 72 | 1 | 1 | 0 | 1 | 1 | 2547222 | 412509.6 |
| 1 | 1062 | 3 | 1.5 | 7560 | 2012-04 | 74700 | 1 | 71 | 1 | 1 | 0 | 0 | 1 | 2552115 | 410277.9 |
| 1 | 1033 | 3 | 1.0 | 5320 | 2012-04 | 71000 | 1 | 67 | 1 | 1 | 0 | 0 | 1 | 2552460 | 404941.9 |
| 2 | 1664 | 3 | 2.5 | 7800 | 2012-10 | 127500 | 1 | 63 | 1 | 0 | 1 | 1 | 1 | 2553976 | 414520.8 |
| 2 | 1237 | 4 | 1.5 | 5542 | 2012-02 | 73027 | 1 | 42 | 1 | 0 | 0 | 0 | 1 | 2549400 | 405251.3 |
cor(x = df$Bedrms,y = df$LotSize,method = "spearman")
## [1] -0.06929767
# r = -0.06929767
result_7 <- cor.test(x = df$Bedrms,y = df$LotSize)
if(result_7$p.value>0.05) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We cannot reject the null hypothesis."
6.8 Question 8
This is Exercise 10 in Chapter 7 of the Textbook [R].
6.8.1 Problem
Using R and the Hypothetical UK Housing Prices dataset, find the correlation between floor area and number of bedrooms.
6.8.2 Solution
library(knitr)
url <- "http://spatial.binghamton.edu/geog533/data/UK_Housing.csv"
df <- read.csv(url,header = TRUE)
kable(head(df,10))
| region | price | garage | bedrooms | bathrooms | datebuilt | floorarea | detached | fireplace | agelessthan15 | age65andover | nonwhite | unemploy | ownocc | carsperhh | manuf |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 6 | 25500 | 0 | 3 | 2 | 1973 | 70.4 | 0 | 0 | 26.86 | 8.50 | 0.038 | 11.38 | 52.706 | 0.583 | 23.273 |
| 6 | 17450 | 0 | 1 | 1 | 1982 | 40.9 | 0 | 0 | 23.22 | 16.74 | 1.836 | 11.73 | 60.440 | 0.402 | 11.524 |
| 6 | 22450 | 0 | 2 | 1 | 1883 | 78.6 | 0 | 1 | 20.41 | 15.79 | 0.153 | 5.18 | 59.692 | 0.952 | 12.325 |
| 1 | 22500 | 0 | 2 | 1 | 1912 | 81.9 | 0 | 0 | 19.53 | 15.82 | 2.881 | 4.84 | 59.046 | 0.745 | 12.618 |
| 5 | 53500 | 0 | 3 | 1 | 1959 | 83.9 | 0 | 0 | 19.69 | 18.55 | 0.626 | 8.08 | 57.439 | 0.587 | 12.593 |
| 6 | 48100 | 1 | 2 | 1 | 1952 | 104.8 | 0 | 0 | 18.18 | 19.69 | 1.012 | 0.96 | 61.262 | 0.849 | 7.251 |
| 1 | 29250 | 0 | 3 | 1 | 1894 | 136.8 | 0 | 0 | 24.88 | 17.21 | 1.653 | 12.40 | 59.455 | 0.178 | 19.546 |
| 1 | 35450 | 1 | 3 | 1 | 1975 | 65.3 | 0 | 0 | 21.82 | 16.26 | 1.102 | 3.46 | 53.283 | 0.501 | 12.353 |
| 6 | 21500 | 0 | 2 | 2 | 1910 | 95.6 | 0 | 0 | 21.61 | 18.59 | 0.302 | 9.18 | 58.230 | 0.772 | 16.160 |
| 6 | 28250 | 0 | 1 | 1 | 1900 | 76.8 | 0 | 0 | 23.66 | 15.52 | 3.506 | 11.16 | 51.821 | 0.277 | 11.491 |
cor(df$bedrooms,df$floorarea,method = "spearman")
## [1] 0.6004428
# r = 0.6004428
result_8 <- cor.test(df$bedrooms,df$floorarea)
if(result_8$p.value>0.05) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We reject the null hypothesis."
6.9 Question 9
Use the cars data frame in the datasets package to perform the following tasks:
6.9.1 Problem 9a
Plot a scatterplot for the data frame (x: speed, y: dist)
Solution 9a
df <- cars
plot(cars)
6.9.2 Problem 9b
How many rows in the data frame?
Solution 9b
n <- nrow(df)
The data frame has 50 rows.
6.9.3 Problem 9c
Calculate Pearson’s correlation coefficient using the equation below: \[r=\frac{\sum_{n}^{i=1}(x_i-\bar{x})(y_i-\bar{y})}{(n-1)s_{x}s_{y}}\]
Solution 9c
df$speed.z <- scale(df$speed)
df$dist.z <- scale(df$dist)
df$product <- df$speed.z * df$dist.z
r <- sum(df$product) / (n-1) # r = 0.8068949
t <- r*sqrt(n-2)/sqrt(1-r^2) # t = 9.464
t.critical <- qt(0.975,df = n-2)
The Pearson’s correlation coefficient is 0.8068949
6.9.4 Problem 9d
Use the cor.test() function to find Pearson’s correlation coefficient and compare it to the one from part (c)
Solution 9d
cor(df$speed,df$dist,method = "pearson") # r = 0.8068949
## [1] 0.8068949
result_9d <- cor.test(df$speed,df$dist) # t = 9.464
if(result_9d$p.value>0.05) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We reject the null hypothesis."
6.9.5 Problem 9e
Calculate Spearman’s rank correlation coefficient using the equation below: \[r_{S} = 1 - \frac{6\sum_{i=1}^{n}d_{i}^{2}}{n^3-n}\]
Solution 9e
df$speed.r <- rank(df$speed,ties.method = "average")
df$dist.r <- rank(df$dist,ties.method = "average")
df$d <- (df$speed.r - df$dist.r)^2
r <- 1 - (6*sum(df$d)/(n^3-n)) # r = 0.8308282
The Spearman’s rank correlation coefficient is 0.8308283
6.9.6 Problem 9f
Use the cor.test() function to find Spearman’s rank correlation coefficient and compare it to the one from part (e)
Solution 9f
cor(df$speed,df$dist,method = "spearman")
## [1] 0.8303568
result_9f <- cor.test(df$speed,df$dist)
if(result_9f$p.value>0.05) {
print("We cannot reject the null hypothesis.")
} else {
print("We reject the null hypothesis.")
}
## [1] "We reject the null hypothesis."