hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9cd46dbde3d284f4f7d4efaec8f2ae8009191856
| 138
|
py
|
Python
|
references/aoapc-book/BeginningAlgorithmContests/python/ch1/p1-1.py
|
voleking/ICPC
|
fc2cf408fa2607ad29b01eb00a1a212e6d0860a5
|
[
"MIT"
] | 68
|
2017-10-08T04:44:23.000Z
|
2019-08-06T20:15:02.000Z
|
BAC/python/ch1/p1-1.py
|
Anyrainel/aoapc-related-code
|
e787a01380698fb9236d933462052f97b20e6132
|
[
"Apache-2.0"
] | null | null | null |
BAC/python/ch1/p1-1.py
|
Anyrainel/aoapc-related-code
|
e787a01380698fb9236d933462052f97b20e6132
|
[
"Apache-2.0"
] | 18
|
2017-05-31T02:52:23.000Z
|
2019-07-05T09:18:34.000Z
|
from sys import stdin
from math import *
r, h = map(float, stdin.readline().strip().split())
print "Area = %.3lf" % (pi*r*r*2 + 2*pi*r*h)
| 27.6
| 51
| 0.630435
| 26
| 138
| 3.346154
| 0.653846
| 0.045977
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025641
| 0.152174
| 138
| 4
| 52
| 34.5
| 0.717949
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
9ce37d57f9f562c50e2473794f4708a2f2797dc1
| 21,032
|
py
|
Python
|
alpaca/resources/tutorials/ALPACA_create_docker.py
|
C0C0AN/ALPACA
|
bfe6012ebc7f7df92ddda2eede3b1b41eb39db90
|
[
"BSD-3-Clause"
] | 5
|
2018-12-14T14:17:44.000Z
|
2020-11-03T03:15:04.000Z
|
alpaca/resources/tutorials/ALPACA_create_docker.py
|
PeerHerholz/ALPACA
|
39b037c38a122d4e8c3cf2cfe465d38a7c31fa99
|
[
"BSD-3-Clause"
] | 9
|
2018-06-01T16:11:39.000Z
|
2020-03-21T01:37:35.000Z
|
alpaca/resources/tutorials/ALPACA_create_docker.py
|
C0C0AN/ALPACA
|
bfe6012ebc7f7df92ddda2eede3b1b41eb39db90
|
[
"BSD-3-Clause"
] | 5
|
2018-01-26T15:16:40.000Z
|
2020-11-03T03:15:05.000Z
|
# ---
# jupyter:
# jupytext:
# formats: py,ipynb
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.3.3
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # Automatic Locazation and Parcellation of Auditory Cortex Areas
## (ALPACA)
# <img src="../img/ALPACA_logo.png" alt="alpaca logo" width="370" height="250" border="10">
# ## create the ALPACA docker container
# ### This notebook will show you how to create the ALPACA docker container used to apply the toolbox, including short explanations of the respective packages and software. Furthermore, it'll also give a brief introduction into docker itself, as well as the process of generating, building and managing docker containers.
# Please note that this notebook won't work on on [binder](https://mybinder.org/) as it includes commands to create and build a Docker image and the same holds true when you run it within the ALPACA Docker or Singularity image. It thus only runs locally. Furterhmore, to not be dependent on adding the bash kernel, every cell starts with `%%bash` to allow the execution of
# bash commands in a jupyter notebook running a python kernel.
# ### docker - reproducibility in a container
# *This section is taken from the [ALPACA - data organization and prerequisites notebook](ALPACA_data_organization_prerequisites.ipynb).*
# <img src="../img/logoDocker.png" alt="Drawing" style="width: 400px;"/>
# [Docker](https://www.docker.com/) is an open-source project that automates the deployment of applications inside software containers. Those containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, system tools, software libraries, such as [Python](https://www.python.org), neuroimaging related software such as [FSL](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSL), [AFNI](https://afni.nimh.nih.gov), [SPM](http://www.fil.ion.ucl.ac.uk/spm/), [FreeSurfer](https://surfer.nmr.mgh.harvard.edu), [ANTs](http://stnava.github.io/ANTs/) and pretty much any other open source software or tools. This guarantees that it will always run the same, regardless of the environment it is running in. As this notebook will just briefly talk about docker and it's application, make sure you go through this very nice and comprehensive [introduction to docker](http://nipy.org/workshops/2017-03-boston/lectures/lesson-container/#1).
#
# Wondering why we're actually talking about this (I mean besides the already mentioned advantages)? Well, as ALPACA is commited and interested in open and reproducible (neuro-)science, the toolbox itself will be in a docker container one day and everything we focus on here will highly depend on / make us of docker. Additionally, and I can't stress this enough, it's incredibly useful. Now, let's check some basic docker commands:
# ##### Install docker
# Before you can do anything, you first need to install [docker](https://www.docker.com/) on your system.
# The installation process differes per system. Luckily, the docker homepage has nice instructions for...
#
# - [Ubuntu](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) or [Debian](https://docs.docker.com/engine/installation/linux/docker-ce/debian/)
# - [Windows 7/8/9/10](https://docs.docker.com/toolbox/toolbox_install_windows/) or [Windows 10Pro](https://docs.docker.com/docker-for-windows/install/)
# - [OS X (from El Capitan 10.11 on)](https://docs.docker.com/docker-for-mac/install/) or [OS X (before El Capitan 10.11)](https://docs.docker.com/toolbox/toolbox_install_mac/)
#
# Once Docker is installed, open up a terminal and test it works properly with the command:
docker run hello-world
# **Note**: Linux users might need to use `sudo` to run `docker` commands or follow [post-installation steps](https://docs.docker.com/engine/installation/linux/linux-postinstall/).
#
# ##### Pulling and checking available docker images
# You can download various docker images from [docker hub](https://hub.docker.com), which always works like this:
#
# `docker pull docker_id/docker_image:version` , e.g. `docker pull peerherholz/ALPACA:latest`
#
# **Note**: you don't have to include `:version` if you're not looking for a specific version. When not including it, `:latest` is set by default.
#
# Once it's done or whenever you want, you can check available images on your system:
docker images
# ##### How to run docker images
# After installing docker on your system, making sure that the hello-world example was running and pulling one or the other docker image you would like to use, you are good to go and actually run a docker image. The exact implementation of that is a bit different for Windows user, but the general commands look similar. The standard version goes something like this:
#
# `docker run -it --rm -p 8888:8888 docker_id/docker_image command`
#
# However, if you want use stuff (notebooks, code, scripts, etc.) which are not included in the respective docker image, but should run within it's environment, access process or save local or remote data, you can also mount your directories, e.g.:
#
# `docker run -it --rm -v /path/to/resources/:/home/resources -v /path/to/data/:/home/data -v /path/to/output/:/home/output -p 8888:8888 docker_id/docker_image command`
#
#
# But what do those flags mean?
#
# - the `-it` flag tells docker that it should open an interactive container instance
# - the `--rm` flag tells docker that the container should automatically be removed after we close docker
# - the `-p` flag specifies which port we want to make available for docker
# - the `-v` flag tells docker which folders should be mount to make them accesible inside the container. Here: /path/to/resources is your local directory where you stored notebooks, functions, scripts. /path/to/data/ is a directory where you stored your data, and /path/to/output can be an empty directory that will be used for output. - The second part of the `-v` flag (here: /home/resources, /data or /output) specifies under which path the mounted folders can be found inside the container. Important: To use the resource, data, output or any other folder, you first need to create them on your local system!
# - `docker_id/docker_image` tells docker which image you want to run
# - `command` tells docker, that you want to directly run a certain command within the container
# ##### Docker tips and tricks
# ###### Access docker container with bash
# You can access a docker container directly with bash or ipython by adding it to the end of your command, i.e.:
#
# `docker run -it --rm -v /path/to/resources/:/home/resources -v /path/to/data/:/home/data -v /path/to/output/:/home/output -p 8888:8888 docker_id/docker_image bash`
#
# `docker run -it --rm -v /path/to/resources/:/home/resources -v /path/to/data/:/home/data -v /path/to/output/:/home/output -p 8888:8888 docker_id/docker_image ipython`
#
#
# This also works with other software commands, such as bet etc.
#
# ###### Stop Docker Container
# To stop a running docker container, either close the docker running terminal or select the terminal and press the `Ctrl-C` shortcut twice.
# ###### List all installed docker images
# To see a list of all installed docker images use:
#
# `docker images`
# ###### Delete a specific docker image
# To delete a specific docker image, first use the `docker images` command to list all installed containers and than use the `IMAGE ID` and the `rmi` instruction to delete the container:
docker rmi -f IMAGE ID
# ###### Export and import a docker image
# If you don't want to depend on a internet connection, you can also export an already downloaded docker image and than later on import it on another PC. To do so, use the following two commands:
#
# - export docker image docker_id/docker_image
#
# `docker save -o docker_image.tar docker_id/docker_image`
#
# - import docker image on another PC
#
# `docker load --input docker_image.tar`
#
# It might be possible that you run into administrator privileges isssues because you ran your docker command with `sudo`. This means that other users don't have access rights to `docker_image.tar`. To avoid this, just change the rights of `docker_image.tar` with the command:
#
# `sudo chmod 777 docker_image.tar`
#
# For more information check the [already mentioned introduction](http://nipy.org/workshops/2017-03-boston/lectures/lesson-container/#1) or Michael Notter's [introduction to docker notebook](https://miykael.github.io/nipype_tutorial/notebooks/introduction_docker.html).
#
# After learning a little bit about docker, let's actually create and build a container.
# ### creating & building docker containers - there and back again
# You might think: do I really need to know this and why is it important anyway? Well, besides a bunch of points, here are two very obvious and major points: reproducibility and sharing/standardization. Focusing the first, the [introduction section](#docker---reproducibility-in-a-container) already briefly mentioned that through the possibility of wrapping up entire systems/setups, docker is a great tool with regard to reproducibility. More precisely, you can provide the exact same setup you used for a certain analysis or even study together with the respective so that others (fellow researchers, reviewers, your friends and family, etc.) can reproduce your results or apply your work to new data with ease. Along many positive effects this also boosts your integrity, big time. Focusing the latter, docker also helps you collaborating with peeps and to establish standards, increasing your impact tremendously. If you've developed a great and robust pipeline, why not share it with others so that they can benefit from it as well? Maybe you'll also be able to support the further standardization of neuroinformatics related applications (in terms of state of the art and best practise, of course), like e.g. [BIDS apps](http://bids-apps.neuroimaging.io) do. After all we're all in this together and for (neuro-)science, not for our egos.
# ##### Dockerception
# There are actually a lot of amazing resources on how to create, build and ship docker containers. From the [documentation on the docker website](https://docs.docker.com/engine/reference/commandline/create/) and [guides](https://deis.com/blog/2015/creating-sharing-first-docker-image/) to even [youtube videos](https://www.youtube.com/watch?v=K6WER0oI-qs). This already seems quite comprehensive and helpful, eh? But wait for it: the neuroscience community is actually lucky enough that there's a docker image that creates docker images for neuroscience related applications, so basically, dockerception! It's called [neurodocker](https://www.youtube.com/watch?v=K6WER0oI-qs) and is nothing but off the charts. As it makes the creation of docker images for reproducible neuroscience reproducible and because it's super straightforward, ALPACA also uses [neurodocker](ttps://www.youtube.com/watch?v=K6WER0oI-qs).
#
# As usally, at first you need to pull the image:
sudo docker pull kaczmarj/neurodocker
# neurodocker supports a vast variety of neuroinformatics related applications and software. For a comprehensive overview make sure to check the [respective sections on it's github page](https://github.com/kaczmarj/neurodocker#supported-software). The basic functionality is as with any other docker image: you need to run it with certain options / specifications.
#
# The run command itself should already look familiar to you:
# `sudo docker run --rm kaczmarj/neurodocker`
#
# What follows aren't mounts of data paths or functions, but all the applications, packages and software you want to include in your docker image. Furthermore, also settings with regard to the container's architecture, where the docker file should be saved, etc. For the ALPACA toolbox this looks like this:
docker run --rm kaczmarj/neurodocker:master generate -b neurodebian:stretch-non-free -p apt \
--install git nano num-utils gcc g++ curl build-essential graphviz gcc g++ tree git-annex-standalone\
--user=alpaca \
--miniconda env_name=alpaca \
conda_install="python=3.7 notebook ipython numpy pandas traits jupyter jupyterlab matplotlib scikit-image scikit-learn seaborn vtk" \
pip_install="ipywidgets ipyevents jupytext nilearn nistats nibabel jupytext nipype nipy rdflib mne mayavi nilearn datalad ipywidgets pythreejs nibabel pymvpa2 PySurfer pybids pygraphviz datalad" \
activate=true \
--run 'mkdir -p ~/.jupyter && echo c.NotebookApp.ip = \"0.0.0.0\" > ~/.jupyter/jupyter_notebook_config.py' \
--entrypoint="/neurodocker/startup.sh"
--cmd jupyter notebook
# This might look confusing and overwhelming at first glance, but don't worry, we're gonna dissect the parts:
# As mentioned, the run command itself should already look familiar to you:
#
# `sudo docker run --rm kaczmarj/neurodocker`
#
# This just tells docker that we want to run the image `kaczmarj/neurodocker` with root privileges and that it should automatically be removed after closing docker (check the corresponding [section](#How-to-run-docker-images) in this notebook).
#
# Subsequently, we tell neurodocker which applications, packages and software we want to include in our container, starting with a minimal neurodebian system and the package manager `apt`:
#
# `-b neurodebian:stretch-non-free -p apt \`
#
# Continuing with neuroimaging related software packages:
#
# `--afni version=latest \`
#
# `--ants version=2.2.0 \`
#
# `--c3d version=1.0.0 \`
#
# `--freesurfer version=6.0.0 min=true \`
#
# `--fsl version=5.0.10 \`
#
# *What are these and how does ALPACA make use of it?*:
#
# - [afni](https://afni.nimh.nih.gov) → preprocessing (e.g. despiking) and surface based analyses
# - [ants](http://stnava.github.io/ANTs/) → registrations & transformations
# - [c3d](https://sourceforge.net/projects/c3d/) → converting of file formats
# - [freesurfer](https://surfer.nmr.mgh.harvard.edu) → registrations & conversions
# - [fsl](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSL) → preprocessing (e.g. motion correction) and statistics
# After that, some useful applications:
#
# `--install git nano swig graphviz\`
#
# *What are these and how does ALPACA make use of it?*:
#
# - [git](https://git-scm.com) → version control for all types of data
# - [nano](https://en.wikipedia.org/wiki/GNU_nanohttps://en.wikipedia.org/wiki/SWIG) → basic text editor to checkt scripts, etc.
# - [graphviz](https://www.graphviz.org) → graph visualization (needed for nipype)
# - [gcc](https://en.wikipedia.org/wiki/GNU_Compiler_Collection) → C compiler for GNU
# - [g++](https://www.cprogramming.com/g++.html) → C++ compiler for GNU
# - [tree](http://manpages.ubuntu.com/manpages/trusty/man1/tree.1.html) → recursive directory listing program
# - [git-annex-standalone](https://git-annex.branchable.com) → file managing with git
# Now to the real fun, a python distribution including a variety of packages:
#
# `--user alpaca \`
#
# `--miniconda env_name=alpaca \`
#
# `conda_install="python=2.7 numpy pandas traits jupyter jupyterlab matplotlib scikit-image scikit-learn seaborn
# vtk" \`
#
# `pip_install="nipype rdflib nipy mne mayavi nilearn datalad nibabel pymvpa2 PySurfer pybids pygraphviz" \`
#
# `activate=true \`
#
# *What are these and how does ALPACA make use of it?*:
#
# - create an environment named "alpaca" using [miniconda](https://conda.io/docs/glossary.html#miniconda-glossary)
# - use [conda](https://conda.io/docs/glossary.html#conda-glossary) to install python packages
# - [python 2.7](https://www.python.org/download/releases/2.7/) → python 2 version as basis for toolbox (needed by certain packages like e.g. pymvpa2)
# - [numpy](http://www.numpy.org) → scientific computing, reading, manipulation & writing of images (through nibabel & nilearn)
# - [pandas](https://pandas.pydata.org) → data munging, preparation and analyses
# - [traits](https://pypi.python.org/pypi/traits) → adding characteristics to python object attributes (important for nipype)
# - [jupyter](http://jupyter.org) → spin-off of [ipython](https://en.wikipedia.org/wiki/IPython) enabling the application of [notebooks](https://en.wikipedia.org/wiki/IPython#Notebook) like this one (or the other interactive tutorials of the ALPACA toolbox)
# - [jupyterlab](https://github.com/jupyterlab/jupyterlab) → further extends the functionality of jupyter notebooks
# - [matplotlib](https://matplotlib.org) → 2 D plotting library used for the generation and adjustment of graphics
# - [scikit-image](http://scikit-image.org) → image processing
# - [scikit-learn](http://scikit-learn.org/stable/index.html) → workhorse for anything related to machine learning analyses (e.g. through nilearn & pymvpa2)
# - [seaborn](https://seaborn.pydata.org/index.html) → generation of statistical graphics
# - [vtk](https://pypi.python.org/pypi/vtk) → 3 D graphics, image processing & visualization
# - [nipype](http://nipype.readthedocs.io/en/latest/) → interface to neuroimaging software, fascilitates interaction between them, used to create processing workflows
# - [rdflib](https://github.com/RDFLib/rdflib) → representation of information in graphs
# - [nipy](http://nipy.org/nipy/) → analyses of neuroimaging data
# - [mne](https://martinos.org/mne/stable/index.html) → exploring, analyzing & visualizing of eeg data
# - [mayavi](http://docs.enthought.com/mayavi/mayavi/) → 3 D data visualization & plotting (mainly within mne)
# - [nilearn](http://nilearn.github.io/index.html) → statistical learning on, reading, manipulating & writing of neuroimaging data, plotting
# - [datalad](http://datalad.org) → manage, download, upload data
# - [nibabel](http://nipy.org/nibabel/) → read, write access to neuroimaging data (through e.g. nilearn)
# - [pymvpa2](http://www.pymvpa.org) → statistical learning analyses on neuroimaging data
# - [PySurfer](https://pysurfer.github.io) → visualization of cortical surface representations of neuroimaging data
# - [pybids](https://github.com/INCF/pybids) → interactions with data sets in BIDS format
# - [pygraphviz](https://pygraphviz.github.io) → python interface to graphviz
# Last but not least, indicate the user working directory within the container:
#
# `--user alpaca \`
#
# `--workdir /home/alpaca \`
# We're gonna finish with providing an output path and name for the dockerfile:
#
# `--no-check-urls > Dockerfile`
# With that we created our Dockerfile containing all information necessary. It should be saved in whatever directory you run the code from above. Subsequently, we need to actually build our docker image to be able to run and ship it.
# ##### build me up dockercup
# Building the docker image is comparably easy, straightforward and done in one line:
docker build -t alpaca -f Dockerfile .
# A bit more in depth, we're starting with telling (kindly asking) docker to build a docker image based on the subsequent specifications (arguments and options):
#
# ``docker build``
# This is followed by providing a name (and optionally a tag if you want) for our docker image, naming ours "alpaca"
#
# ``-t alpaca``
#
# **hint**: the docker build command only accepts all non-capital names. If you want to additionally provide a tag, you should use the following scheme: `name:tag`, e.g. `-t alpaca:firstdraft` . This is very important in terms of enabling a good and comprehnsible version control of your docker image.
# After that, you (hopefully) can relax and enjoy the magic happen. Depending on your machine and the specific Dockerfile, creating a docker image can take a while. So, don't worry if it takes more than a couple of minutes. The terminal output will actually give information on what's currently happening and allows
| 77.608856
| 1,345
| 0.750761
| 3,212
| 21,032
| 4.901308
| 0.256227
| 0.085879
| 0.12577
| 0.163628
| 0.197993
| 0.163565
| 0.143238
| 0.125326
| 0.118338
| 0.103475
| 0
| 0.007197
| 0.134509
| 21,032
| 270
| 1,346
| 77.896296
| 0.857661
| 0.929346
| 0
| 0
| 0
| 0.2
| 0.350168
| 0.050505
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9cf9d48a6b154d4fc231fa41aad805d9aea594a8
| 16,418
|
py
|
Python
|
midca/metamodules/control.py
|
COLAB2/midca
|
18d6b13e3d6b0d980cd3453196e82fad7302e79b
|
[
"MIT"
] | 12
|
2018-01-23T01:31:33.000Z
|
2022-02-03T04:47:10.000Z
|
midca/metamodules/control.py
|
COLAB2/midca
|
18d6b13e3d6b0d980cd3453196e82fad7302e79b
|
[
"MIT"
] | 32
|
2017-11-02T20:58:03.000Z
|
2021-04-15T18:59:27.000Z
|
midca/metamodules/control.py
|
COLAB2/midca
|
18d6b13e3d6b0d980cd3453196e82fad7302e79b
|
[
"MIT"
] | 5
|
2017-12-01T17:28:01.000Z
|
2020-03-18T14:43:32.000Z
|
import os, copy
import importlib
from midca import base, goals, modules
from midca.modules.gens import goaltransform
class MRSimpleControl(base.BaseModule):
midca = None
prev_init_args = [] # TODO: fix, right now used only for planning and saving args
# from a remove module action and then using the args to
# insert a new module action
def run(self, cycle, verbose=2):
self.verbose = verbose
plan = self.mem.get(self.mem.META_PLAN)
self.prev_init_args = []
failed = False
if plan:
for action in plan:
if not self.act(action):
failed = True
if self.verbose >= 1: print(" MRSimpleControl failed to complete an action")
self.cleanup_and_reset()
if not failed:
self.cleanup_and_reset()
else:
if self.verbose >= 1: print(" No actions taken")
def cleanup_and_reset(self):
"""
Temporary function to remove goal and plan,
should eventually be replaced by evaluate
"""
self.mem.set(self.mem.META_PLAN, None)
self.mem.set(self.mem.META_GOALS, None)
self.mem.set(self.mem.META_CURR_GOAL, None)
self.mem.set(self.mem.PLAN, [])
def act(self, action, verbose=2):
# TODO: figure out a way to make the init_args more general (so actions can be kept separate)
if action[0] == "REMOVE-MODULE":
# find the component
module_index = -1
phase = None
mod_str = ""
class Found(Exception):
pass # is this bad python? should this go at top of my file?
try:
for phasei in self.mem.myMidca.get_phases():
i = 0
for mod in self.mem.myMidca.get_modules(phasei):
mod_str = str(mod.__class__.__name__)
print(("-*-*- act(): mod = " + mod_str + ", action[1] = " + str(action[1])))
if mod_str == action[1]:
print("-*-*- act(): we got a match!")
module_index = i
phase = phasei
raise Found
i += 1
except Found:
# remove the component
# print("-*-*- act(): phase = "+str(phase)+", module_index = "+str(module_index))
if phase and module_index > -1:
mod = self.mem.myMidca.remove_module(phase, module_index)
print("mod is " + str(mod))
self.prev_init_args = mod.get_init_args() # TODO: only works for modules implementing get_init_args
print("got init args: " + str(self.prev_init_args))
is_success = mod_str not in [x.__class__.__name__ for x in self.mem.myMidca.get_modules(phase)]
if is_success: print(
(" Metareasoner removed " + mod_str)) # report any actions metareasoner carried out
return is_success
elif action[0] == "ADD-MODULE":
if action[2] == "PyHopPlanner":
# print("current directory: "+str(os.getcwd()))
# print("str(dir(modules)) = "+str(dir(modules)))
planningModuleInstance = importlib.import_module("midca.modules.planning")
print(("loaded planning module, it has following attributes: " + str(dir(planningModuleInstance))))
# get the args used to init the old module and use them to init this one
print("init args is " + str(self.prev_init_args))
# **** BEGIN: MAGIC! Transform the args *****
# This is where the real magic happens
# Hardcoded for now
# Very Important TODO but likely requires serious research effort
from midca.domains.blocksworld.plan import methods
working_methods = methods.declare_methods
corrected_args = self.prev_init_args
hardcoded_index_of_methods_arg = 2 # TODO: I know, so hacky, ahhh magic numbers
corrected_args[2] = working_methods
# **** END: MAGIC! Transform the args *****
pyHopPlannerInstance = planningModuleInstance.PyHopPlanner(*corrected_args)
self.mem.myMidca.runtime_append_module("Plan",
pyHopPlannerInstance) # TODO: hardcoded knowledge of Plan phase
is_success = "PyHopPlanner" in [x.__class__.__name__ for x in self.mem.myMidca.get_modules("Plan")]
if is_success: print(
" Metareasoner added PyHopPlanner") # report any actions metareasoner carried out
return is_success
elif action[2] == "AsynchPyhopPlanner":
# print("current directory: "+str(os.getcwd()))
# print("str(dir(modules)) = "+str(dir(modules)))
planningModuleInstance = importlib.import_module("midca.modules.planning")
print(("loaded asynchronous planning module, it has following attributes: " + str(
dir(planningModuleInstance))))
# get the args used to init the old module and use them to init this one
# print "init args is "+str(self.prev_init_args)
###### HACK: hardcoded for now as a demo, this is because the initial broken
# planner had different parameters for instantiating it, so we cant use the\
# same prev_init_args, and thus changing them here
from midca.modules._plan.asynch import operators_sr, methods_sr
self.prev_init_args = [methods_sr.declare_methods, operators_sr.declare_ops]
# **** BEGIN: MAGIC! Transform the args *****
# This is where the real magic happens
# Hardcoded for now
# Very Important TODO but likely requires serious research effort
# from midca.domains.blocksworld.plan import methods
# working_methods = methods.declare_methods
corrected_args = self.prev_init_args
# hardcoded_index_of_methods_arg = 2 # TODO: I know, so hacky, ahhh magic numbers
# corrected_args[2] = working_methods
# **** END: MAGIC! Transform the args *****
pyHopPlannerInstance = planningModuleInstance.AsynchPyhopPlanner(*corrected_args)
self.mem.myMidca.runtime_append_module("Plan",
pyHopPlannerInstance) # TODO: hardcoded knowledge of Plan phase
is_success = "AsynchPyhopPlanner" in [x.__class__.__name__ for x in
self.mem.myMidca.get_modules("Plan")]
if is_success: print(
" Metareasoner added AsynchPyhopPlanner") # report any actions metareasoner carried out
return is_success
elif action[0] == "TRANSFORM-GOAL":
# really: its going to have this meta plan by changing the things in orange -
# you don't monitor and look at the trace to see if the goal transformation achieved something
# at the ground level, so then meta-evaluate can know if the metagoal succeeded. What if I made the
# wrong transformation?
# specific to mortar and blocks world, not general
# get the highest blocks
goal_atoms = action[1]
goal_args = [x.get_args() for x in goal_atoms]
# figure out how much mortar we have using the world state
num_available_mortar = 0
for atom in map(str, self.mem.get("__world states")[-1].get_atoms()):
if 'available(' in atom:
num_available_mortar += 1
if verbose >= 3: print(("found available mortar: " + str(atom)))
# transform 'stable-on' to 'on' predicates ensuring there is enough mortar for each
bottom_blks = []
top_blks = []
for a_tpl in goal_args:
bottom_blks.append(a_tpl[1])
top_blks.append(a_tpl[0])
bottommost_blk = [b for b in bottom_blks if b not in top_blks][0]
transformed_goal_atoms = []
# transform goal atoms
curr_bottom_blk = bottommost_blk
while curr_bottom_blk in bottom_blks:
i = bottom_blks.index(curr_bottom_blk)
top_blks[i]
if num_available_mortar > 0:
transformed_goal_atoms.append("stable-on," + top_blks[i] + "," + curr_bottom_blk)
num_available_mortar -= 1
else:
transformed_goal_atoms.append("on," + top_blks[i] + "," + curr_bottom_blk)
curr_bottom_blk = top_blks[i]
# now make actual MIDCA goal objects
transformed_goals = []
for atom_str in transformed_goal_atoms:
vals = atom_str.split(",")
transformed_goals.append(goals.Goal(*[vals[1], vals[2]], predicate=vals[0]))
goalGraph = self.mem.get(self.mem.GOAL_GRAPH)
# do removal first
for g in goal_atoms:
goalGraph.remove(g)
if verbose >= 2:
# now display success statement
print("Removed from the goal graph the previous goal:")
for g in goal_atoms:
print((" " + str(g)))
# now display transformed goal
if verbose >= 2:
print("Goal has been transformed to:")
for g in transformed_goals:
print((" " + str(g)))
# now insert the new goal
for g in transformed_goals:
goalGraph.insert(g)
if verbose >= 2:
print("Transformed goal has been inserted into goal graph.")
return True
# goals.Goal(*['A_','B_'], predicate = 'stable-on'),
# goals.Goal(*['C_','A_'], predicate = 'stable-on'),
# goals.Goal(*['D_','C_'], predicate = 'stable-on')
# and go top down
# first, get the heights
class MRSimpleControl1(base.BaseModule):
midca = None
'''
def init(self, world):
if not world:
raise ValueError("world is None!")
self.world = world
'''
def run(self, cycle, verbose=2):
plan = self.mem.get(self.mem.META_PLAN)
failed = False
if plan:
for action in plan:
if not self.act(action):
failed = True
if verbose >= 2: print(" MRSimpleControl failed to complete an action")
self.cleanup_and_reset()
if not failed:
self.cleanup_and_reset()
else:
if verbose >= 2: print(" No actions taken")
def cleanup_and_reset(self):
"""
Temporary function to remove goal and plan,
should eventually be replaced by evaluate
"""
self.mem.set(self.mem.META_PLAN, None)
self.mem.set(self.mem.META_GOALS, None)
self.mem.set(self.mem.META_CURR_GOAL, None)
def act(self, action, verbose=2):
if action[0] == "REMOVE-MODULE":
# find the component
module_index = -1
phase = None
mod_str = ""
class Found(Exception):
pass # is this bad python? should this go at top of my file?
try:
for phasei in self.mem.myMidca.get_phases():
i = 0
for mod in self.mem.myMidca.get_modules(phasei):
mod_str = str(mod.__class__.__name__)
# print("-*-*- act(): mod = "+mod_str+", action[1] = "+str(action[1]))
if mod_str == action[1]:
# print("-*-*- act(): we got a match!")
module_index = i
phase = phasei
raise Found
i += 1
except Found:
# remove the component
# print("-*-*- act(): phase = "+str(phase)+", module_index = "+str(module_index))
if phase and module_index > -1:
self.mem.myMidca.remove_module(phase, module_index)
is_success = mod_str not in [x.__class__.__name__ for x in self.mem.myMidca.get_modules(phase)]
if is_success: print(
(" Metareasoner removed " + mod_str)) # report any actions metareasoner carried out
return is_success
elif action[0] == "ADD-MODULE":
if action[2] == "PyHopPlanner":
# print("current directory: "+str(os.getcwd()))
planningModuleInstance = __import__("modules.planning")
# print("loaded planning module, it has following attributes: "+str(dir(planningModuleInstance)))
pyHopPlannerInstance = planningModuleInstance.planning.PyHopPlanner(True)
self.mem.myMidca.runtime_append_module("Plan",
pyHopPlannerInstance) # TODO: hardcoded knowledge of Plan phase
is_success = "PyHopPlanner" in [x.__class__.__name__ for x in self.mem.myMidca.get_modules("Plan")]
if is_success: print(
" Metareasoner added PyHopPlanner") # report any actions metareasoner carried out
return is_success
elif action[0] == "TRANSFORM-GOAL":
# really: its going to have this meta plan by changing the things in orange -
# you don't monitor and look at the trace to see if the goal transformation achieved something
# at the ground level, so then meta-evaluate can know if the metagoal succeeded. What if I made the
# wrong transformation?
# print(self.world.cltree.rootnode.predicate)
# specific to mortar and blocks world, not general
# get the highest blocks
# goal_check is the copy of goal graph intended to check the goalgraph goals and delete the goals in the goal graph
goal_check = copy.deepcopy(action[1])
goal_atoms = action[1]
goal_args = [x.get_args() for x in goal_atoms]
mem = self.mem
# get the world
world = self.mem.myMidca.midca.world
# initialize the resources for goal transform
goaltransform.resources(mem)
transformed_goals = []
goalGraph = self.mem.get(self.mem.GOAL_GRAPH)
for i in range(0, len(goal_atoms)):
trans_goal = goaltransform.choose(mem, goal_atoms[i])
transformed_goals.append(trans_goal)
world.cltree['checked'] = []
# do removal first
for g in goal_check:
goalGraph.remove(g)
if verbose >= 2:
# now display success statement
print("Removed from the goal graph the previous goal:")
for g in goal_check:
print((" " + str(g)))
# now display transformed goal
if verbose >= 2:
print("Goal has been transformed to:")
for g in transformed_goals:
print((" " + str(g)))
# now insert the new goal
for g in transformed_goals:
goalGraph.insert(g)
self.mem.set(self.mem.CURRENT_GOALS, transformed_goals)
if verbose >= 2:
print("Transformed goal has been inserted into goal graph.")
return True
# goals.Goal(*['A_','B_'], predicate = 'stable-on'),
# goals.Goal(*['C_','A_'], predicate = 'stable-on'),
# goals.Goal(*['D_','C_'], predicate = 'stable-on')
# and go top down
# first, get the heights
| 47.450867
| 127
| 0.542819
| 1,841
| 16,418
| 4.68604
| 0.155894
| 0.033268
| 0.024342
| 0.016692
| 0.742089
| 0.732816
| 0.715081
| 0.704185
| 0.679611
| 0.679611
| 0
| 0.005604
| 0.369655
| 16,418
| 345
| 128
| 47.588406
| 0.828003
| 0.266841
| 0
| 0.665116
| 0
| 0
| 0.093114
| 0.003745
| 0
| 0
| 0
| 0.008696
| 0
| 1
| 0.027907
| false
| 0.009302
| 0.04186
| 0
| 0.134884
| 0.125581
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9cf9fb43abda8ad5b502fe2ae736d8fa9235e840
| 78
|
py
|
Python
|
src/core/__init__.py
|
SELO77/django_template
|
7686ffc3ea0f5eba355702426a94c98a7f71086d
|
[
"BSD-2-Clause"
] | null | null | null |
src/core/__init__.py
|
SELO77/django_template
|
7686ffc3ea0f5eba355702426a94c98a7f71086d
|
[
"BSD-2-Clause"
] | null | null | null |
src/core/__init__.py
|
SELO77/django_template
|
7686ffc3ea0f5eba355702426a94c98a7f71086d
|
[
"BSD-2-Clause"
] | null | null | null |
# from core.urls import urlpatterns
# __all__ = [
# 'urlpatterns', ''
# ]
| 15.6
| 35
| 0.602564
| 7
| 78
| 6.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 78
| 5
| 36
| 15.6
| 0.716667
| 0.884615
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1409f264cedad0a9fc04ae188014bde77a7b4afa
| 114
|
py
|
Python
|
api/views.py
|
CrysthelAparicio/Member-s-Co
|
8dbe37bc175546a126e476288c6d05d7fe65459e
|
[
"MIT"
] | null | null | null |
api/views.py
|
CrysthelAparicio/Member-s-Co
|
8dbe37bc175546a126e476288c6d05d7fe65459e
|
[
"MIT"
] | 7
|
2020-06-05T23:56:39.000Z
|
2021-09-22T18:59:51.000Z
|
api/views.py
|
CrysthelAparicio/Member-s-Co
|
8dbe37bc175546a126e476288c6d05d7fe65459e
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
#Create your views here
def index(request):
render(request,'index.html')
| 19
| 35
| 0.763158
| 16
| 114
| 5.4375
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140351
| 114
| 6
| 36
| 19
| 0.887755
| 0.192982
| 0
| 0
| 0
| 0
| 0.108696
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
141e9885169488f93478f83709041a51a6be6fac
| 184
|
py
|
Python
|
locale/pot/api/core/_autosummary/pyvista-Camera-focal_point-1.py
|
tkoyama010/pyvista-doc-translations
|
23bb813387b7f8bfe17e86c2244d5dd2243990db
|
[
"MIT"
] | 4
|
2020-08-07T08:19:19.000Z
|
2020-12-04T09:51:11.000Z
|
locale/pot/api/core/_autosummary/pyvista-Camera-focal_point-1.py
|
tkoyama010/pyvista-doc-translations
|
23bb813387b7f8bfe17e86c2244d5dd2243990db
|
[
"MIT"
] | 19
|
2020-08-06T00:24:30.000Z
|
2022-03-30T19:22:24.000Z
|
locale/pot/api/core/_autosummary/pyvista-Camera-focal_point-1.py
|
tkoyama010/pyvista-doc-translations
|
23bb813387b7f8bfe17e86c2244d5dd2243990db
|
[
"MIT"
] | 1
|
2021-03-09T07:50:40.000Z
|
2021-03-09T07:50:40.000Z
|
import pyvista
pl = pyvista.Plotter()
pl.camera.focal_point
# Expected:
## (0.0, 0.0, 0.0)
pl.camera.focal_point = (2.0, 0.0, 0.0)
pl.camera.focal_point
# Expected:
## (2.0, 0.0, 0.0)
| 18.4
| 39
| 0.652174
| 37
| 184
| 3.162162
| 0.27027
| 0.222222
| 0.25641
| 0.239316
| 0.752137
| 0.452991
| 0.393162
| 0.393162
| 0.393162
| 0
| 0
| 0.1125
| 0.130435
| 184
| 9
| 40
| 20.444444
| 0.61875
| 0.277174
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1437095909a750a9c391e2eeab2ecb54cf0458ec
| 29
|
py
|
Python
|
snippets/06 - Reshaping data42.py
|
joshuagottardogalvani/pandas-tutorial
|
8308a6eb7d144fff95a6853930e3be4e8ddb2e0f
|
[
"BSD-2-Clause"
] | 183
|
2016-08-24T12:32:07.000Z
|
2022-03-26T14:05:04.000Z
|
snippets/06 - Reshaping data42.py
|
sugurushivakumar10/pandas-tutorial
|
8308a6eb7d144fff95a6853930e3be4e8ddb2e0f
|
[
"BSD-2-Clause"
] | 1
|
2017-08-28T14:22:40.000Z
|
2017-08-28T14:22:40.000Z
|
snippets/06 - Reshaping data42.py
|
sugurushivakumar10/pandas-tutorial
|
8308a6eb7d144fff95a6853930e3be4e8ddb2e0f
|
[
"BSD-2-Clause"
] | 204
|
2016-08-24T14:22:58.000Z
|
2022-03-29T15:09:03.000Z
|
temp.reset_index(name='Fare')
| 29
| 29
| 0.793103
| 5
| 29
| 4.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 29
| 1
| 29
| 29
| 0.758621
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
14373ac78dc975eb9c1d12381efe32d0f183d888
| 2,005
|
py
|
Python
|
server/save_iris.py
|
RaulRomani/Interactive-Data-Projection
|
a9c0864645598d0706b44c4c7331e4e8c173678d
|
[
"MIT"
] | 1
|
2019-06-17T02:33:05.000Z
|
2019-06-17T02:33:05.000Z
|
server/save_iris.py
|
RaulRomani/Interactive-Data-Projection
|
a9c0864645598d0706b44c4c7331e4e8c173678d
|
[
"MIT"
] | null | null | null |
server/save_iris.py
|
RaulRomani/Interactive-Data-Projection
|
a9c0864645598d0706b44c4c7331e4e8c173678d
|
[
"MIT"
] | null | null | null |
# from sklearn import datasets
# import numpy as np
# # import some data to play with
# iris = datasets.load_iris()
# X = iris.data # we only take the first two features.
# y = iris.target
# print(X.shape)
# print(y.shape)
# dataset_name = "Iris"
# np.savetxt("../../datasets/" + dataset_name + '/' + dataset_name + "_prep_encoding2.csv", X, delimiter=",")
# np.savetxt("../../datasets/" + dataset_name + '/' + dataset_name + "_labels.csv", np.reshape(y, (-1,1)), delimiter=",")
import pandas as pd
import numpy as np
# # dataset_name = "GirondeEmployment"
# # dataset_name = "GirondeServices"
# dataset_name = "GirondeEnvironment"
# # df = pd.read_csv("PCAMix/"+ dataset_name + '_projected_PCAMix.csv')
# df = pd.read_csv("../../datasets/" + dataset_name + '/'+ dataset_name + '.csv')
# # labels = pd.read_csv("../../datasets/" + dataset_name + '/'+ dataset_name + '_labels.csv', header=None).values.reshape((-1))
# # print(df.shape)
# # print(df.head(1))
# # print(df.values[0,:])
# np.savetxt("../../datasets/" + dataset_name + '/' + dataset_name + "_prep_encoding2.csv", df.values, delimiter=",")
dataset_name = "Iris"
df = pd.read_csv("../../datasets/" + dataset_name + '/'+ dataset_name + '_prep_encoding2.csv', header=None)
print(df.describe())
# dataset_name = "OrthopedicPatients"
# df = pd.read_csv("../../datasets/" + dataset_name + '/'+ dataset_name + '.csv', header=None)
# labels = pd.read_csv("../../datasets/" + dataset_name + '/'+ dataset_name + '_labels.csv', header=None).values.reshape((-1))
# df[6] = pd.Categorical(df[6])
# df[6] = df[6].cat.codes
# # print(df.head)
# # categorical_values = np.array(list(set(df.values[:,6])))
# # print(categorical_values)
# # print(df.shape)
# # print(df.head(2))
# # print(df.values[0,:])
# np.savetxt("../../datasets/" + dataset_name + '/' + dataset_name + "_prep_encoding2.csv", df.values[:,:6], delimiter=",")
# np.savetxt("../../datasets/" + dataset_name + '/' + dataset_name + "_labels.csv", df.values[:,6], delimiter=",")
| 35.175439
| 128
| 0.641895
| 260
| 2,005
| 4.757692
| 0.230769
| 0.240097
| 0.153597
| 0.210186
| 0.556993
| 0.541633
| 0.504446
| 0.504446
| 0.491512
| 0.458367
| 0
| 0.010882
| 0.129177
| 2,005
| 56
| 129
| 35.803571
| 0.697595
| 0.854863
| 0
| 0
| 0
| 0
| 0.16318
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0.2
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
146abe53668be2fa1acdc8da283361746d3e6745
| 713
|
py
|
Python
|
170_code_challenges/10_code_challenge.py
|
shadykhatab/python-tutorilas-
|
fe3e63d2d5e37c634f1d5549fcf7418937068fc4
|
[
"MIT"
] | null | null | null |
170_code_challenges/10_code_challenge.py
|
shadykhatab/python-tutorilas-
|
fe3e63d2d5e37c634f1d5549fcf7418937068fc4
|
[
"MIT"
] | null | null | null |
170_code_challenges/10_code_challenge.py
|
shadykhatab/python-tutorilas-
|
fe3e63d2d5e37c634f1d5549fcf7418937068fc4
|
[
"MIT"
] | null | null | null |
"""
Write a function that returns the lesser of two given numbers if both numbers are even,
but returns the greater if one or both numbers are odd.
Example 1:
lesser_of_two_evens(2, 4) output: 2
explanation:
the two parameters 2 and 4 are even numbers, therefore, we'll return the smallest even number
Example 2:
lesser_of_two_evens(2, 5) output: 5
explanation:
the first parameter 2 is even, but the second parameter 5 is odd, therefore, we'll return the greatest number
Example 3:
lesser_of_two_evens(7, 5) output: 7
explanation:
the two parameters are odd, therefore, we'll return the greatest number
"""
# write your code here
# don't forget to test your code
def lesser_of_two_evens(a, b):
pass
| 29.708333
| 109
| 0.764376
| 128
| 713
| 4.164063
| 0.421875
| 0.075047
| 0.103189
| 0.120075
| 0.251407
| 0.146341
| 0.146341
| 0.146341
| 0
| 0
| 0
| 0.027211
| 0.175316
| 713
| 24
| 110
| 29.708333
| 0.879252
| 0.927069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
147028a10145906e69e7602e34de70fd01ed7147
| 9,101
|
py
|
Python
|
test/unittests/exception_test/test_xml.py
|
INCF/nineml-python
|
062a2ac8a9be97cee4dad02938e3858e051cf07c
|
[
"BSD-3-Clause"
] | 6
|
2017-12-26T14:15:28.000Z
|
2021-10-10T22:45:51.000Z
|
test/unittests/exception_test/test_xml.py
|
INCF/nineml-python
|
062a2ac8a9be97cee4dad02938e3858e051cf07c
|
[
"BSD-3-Clause"
] | 25
|
2017-07-05T03:53:53.000Z
|
2021-01-19T14:14:05.000Z
|
test/unittests/exception_test/test_xml.py
|
INCF/nineml-python
|
062a2ac8a9be97cee4dad02938e3858e051cf07c
|
[
"BSD-3-Clause"
] | 5
|
2017-12-26T14:15:12.000Z
|
2021-10-10T22:45:39.000Z
|
import unittest
from itertools import chain
from nineml.utils.comprehensive_example import (doc1, dynPropA)
from nineml.exceptions import (
NineMLXMLAttributeError, NineMLXMLBlockError, NineMLUsageError)
from nineml.user import Projection, Population, Definition, DynamicsProperties
from nineml.reference import Reference
#
# class TestExceptions(unittest.TestCase):
#
# def test_get_element_maker_ninemlruntimeerror(self):
# """
# line #: 39
# message: Unrecognised 9ML version {} (1.0
# """
# self.assertRaises(
# NineMLUsageError,
# get_element_maker,
# version=-1.0)
#
# def test_from_child_xml_ninemlxmlattributeerror(self):
# """
# line #: 74
# message: {} in '{}' has '{}' attributes when {} are expected
# """
# elem = Ev2(Projection.nineml_type,
# Ev2.Pre(Ev2(Reference.nineml_type,
# name="popA"),
# bad_attr="bar"))
# self.assertRaises(
# NineMLXMLAttributeError,
# from_child_xml,
# element=elem,
# child_classes=(Population,),
# document=doc1,
# multiple=False,
# allow_reference=True,
# allow_none=False,
# within='Pre',
# unprocessed=None,
# multiple_within=False,
# allowed_attrib=[])
#
# def test_from_child_xml_ninemlxmlblockerror(self):
# """
# line #: 82
# message: {} in '{}' is only expected to contain a single child block,
# found {}
# """
# elem = Ev2(Projection.nineml_type,
# Ev2.Pre(Ev2(Reference.nineml_type,
# name="popA"),
# Ev2(Reference.nineml_type,
# name="popA")))
# self.assertRaises(
# NineMLXMLBlockError,
# from_child_xml,
# element=elem,
# child_classes=(Population,),
# document=doc1,
# multiple=False,
# allow_reference=True,
# allow_none=False,
# within='Pre',
# unprocessed=None,
# multiple_within=False,
# allowed_attrib=[])
#
# def test_from_child_xml_ninemlxmlblockerror2(self):
# """
# line #: 93
# message: Did not find {} block within {} element in '{}'
# """
# elem = Ev2(Projection.nineml_type)
# self.assertRaises(
# NineMLXMLBlockError,
# from_child_xml,
# element=elem,
# child_classes=(Population,),
# document=doc1,
# multiple=False,
# allow_reference=True,
# allow_none=False,
# within='Pre',
# unprocessed=None,
# multiple_within=False,
# allowed_attrib=[])
#
# def test_from_child_xml_ninemlxmlblockerror3(self):
# """
# line #: 97
# message: Found unexpected multiple {} blocks within {} in '{}'
# """
# elem = Ev2(Projection.nineml_type,
# Ev2.Pre(Ev2(Reference.nineml_type,
# name="popA")),
# Ev2.Pre(Ev2(Reference.nineml_type,
# name="popB")))
# self.assertRaises(
# NineMLXMLBlockError,
# from_child_xml,
# element=elem,
# child_classes=(Population,),
# document=doc1,
# multiple=False,
# allow_reference=True,
# allow_none=False,
# within='Pre',
# unprocessed=None,
# multiple_within=False,
# allowed_attrib=[])
#
# def test_from_child_xml_ninemlxmlblockerror4(self):
# """
# line #: 133
# message: Did not find any child blocks with the tag{s}
# '{child_cls_names}'in the {parent_name} in '{url}'
# """
# elem = Ev2(DynamicsProperties.nineml_type,
# Ev2(Definition.nineml_type,
# name="dynA"),
# Ev2(Definition.nineml_type,
# name="dynB"))
# self.assertRaises(
# NineMLXMLBlockError,
# from_child_xml,
# element=elem,
# child_classes=(Definition,),
# document=doc1,
# multiple=False,
# allow_reference=False,
# allow_none=False,
# within=None,
# unprocessed=None,
# multiple_within=False,
# allowed_attrib=[])
#
# def test_from_child_xml_ninemlxmlblockerror5(self):
# """
# line #: 145
# message: Multiple children of types '{}' found within {} in '{}'
# """
# elem = Ev2(DynamicsProperties.nineml_type)
# self.assertRaises(
# NineMLXMLBlockError,
# from_child_xml,
# element=elem,
# child_classes=(Definition,),
# document=doc1,
# multiple=False,
# allow_reference=False,
# allow_none=False,
# within=None,
# unprocessed=None,
# multiple_within=False,
# allowed_attrib=[])
#
# def test_get_xml_attr_ninemlxmlattributeerror(self):
# """
# line #: 172
# message: {} in '{}' is missing the {} attribute (found '{}' attributes)
# """
# elem = Ev2(DynamicsProperties.nineml_type)
# self.assertRaises(
# NineMLXMLAttributeError,
# get_xml_attr,
# element=elem,
# name='name',
# document=doc1)
#
# def test_get_xml_attr_ninemlxmlattributeerror2(self):
# """
# line #: 183
# message: '{}' attribute of {} in '{}', {}, cannot be converted to {}
# type
# """
# elem = Ev2(DynamicsProperties.nineml_type,
# name='foo')
# self.assertRaises(
# NineMLXMLAttributeError,
# get_xml_attr,
# element=elem,
# name='name',
# document=doc1,
# dtype=int)
#
# def test_get_subblock_ninemlxmlblockerror(self):
# """
# line #: 197
# message: Did not find and child blocks with the tag '{}' within {} in
# '{url}'
# """
# elem = Ev2(Population.nineml_type,
# Ev2('ASubBlock'))
# self.assertRaises(
# NineMLXMLBlockError,
# get_subblock,
# element=elem,
# name='AnotherSubBlock',
# unprocessed=[[]],
# document=doc1)
#
# def test_get_subblock_ninemlxmlblockerror2(self):
# """
# line #: 202
# message: Found multiple child blocks with the tag '{}' within {} in
# '{url}'
# """
# elem = Ev2(Population.nineml_type,
# Ev2('ASubBlock'),
# Ev2('ASubBlock'))
# self.assertRaises(
# NineMLXMLBlockError,
# get_subblock,
# element=elem,
# name='ASubBlock',
# unprocessed=[[]],
# document=doc1)
#
# def test_from_xml_with_exception_handling_ninemlxmlblockerror(self):
# """
# line #: 267
# message: Found unrecognised block{s} '{remaining}' within {elem_name}
# in '{url}'
# """
# elem = Ev2(DynamicsProperties.nineml_type,
# dynPropA.serialize(format='xml', version=1, document=doc1),
# Ev2('BadBlock'),
# *list(chain(
# (p.serialize(format='xml', version=1, document=doc1) for p in dynPropA.properties),
# (v.serialize(format='xml', version=1, document=doc1) for v in dynPropA.initial_values))),
# name='dynPropA2')
# self.assertRaises(
# NineMLXMLBlockError,
# DynamicsProperties.from_xml,
# element=elem,
# document=doc1)
#
# def test_from_xml_with_exception_handling_ninemlxmlattributeerror(self):
# """
# line #: 274
# message: Found unrecognised attribute{s} '{remaining}' within
# {elem_name} in '{url}'
# """
# elem = Ev2(DynamicsProperties.nineml_type,
# dynPropA.serialize(format='xml', version=1, document=doc1),
# *list(chain(
# (p.serialize(format='xml', version=1, document=doc1) for p in dynPropA.properties),
# (v.serialize(format='xml', version=1, document=doc1) for v in dynPropA.initial_values))),
# name='dynPropA2',
# bad_attr='bad')
# self.assertRaises(
# NineMLXMLBlockError,
# DynamicsProperties.from_xml,
# element=elem,
# document=doc1)
| 35.275194
| 114
| 0.503901
| 751
| 9,101
| 5.926764
| 0.185087
| 0.042687
| 0.032352
| 0.021568
| 0.680971
| 0.636037
| 0.625253
| 0.605257
| 0.595372
| 0.576949
| 0
| 0.017488
| 0.37798
| 9,101
| 257
| 115
| 35.412451
| 0.768769
| 0.907702
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.857143
| 0
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
14739082da2de7c0bf096ea56efddb0626e58909
| 356
|
py
|
Python
|
src/GSPH/Limiters/SuperbeeLimiterInst.cc.py
|
jmikeowen/Spheral
|
3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4
|
[
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 22
|
2018-07-31T21:38:22.000Z
|
2020-06-29T08:58:33.000Z
|
src/GSPH/Limiters/SuperbeeLimiterInst.cc.py
|
jmikeowen/Spheral
|
3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4
|
[
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 41
|
2020-09-28T23:14:27.000Z
|
2022-03-28T17:01:33.000Z
|
src/GSPH/Limiters/SuperbeeLimiterInst.cc.py
|
jmikeowen/Spheral
|
3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4
|
[
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 7
|
2019-12-01T07:00:06.000Z
|
2020-09-15T21:12:39.000Z
|
text = """
//------------------------------------------------------------------------------
// Explicit instantiation.
//------------------------------------------------------------------------------
#include "Geometry/Dimension.hh"
#include "GSPH/Limiters/SuperbeeLimiter.cc"
namespace Spheral {
template class SuperbeeLimiter<Dim< %(ndim)s > >;
}
"""
| 29.666667
| 80
| 0.390449
| 20
| 356
| 6.95
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073034
| 356
| 11
| 81
| 32.363636
| 0.421212
| 0
| 0
| 0.2
| 0
| 0
| 0.960674
| 0.609551
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
14a2d43166de5c755f3008f82a43d99aac810cba
| 42,669
|
py
|
Python
|
tests/dcerpc/test_lsad.py
|
StanHardy/impacket
|
769c3196124af64d7bc08d51ae4b651e61a87037
|
[
"Apache-1.1"
] | 8
|
2022-03-23T13:02:37.000Z
|
2022-03-27T04:30:16.000Z
|
tests/dcerpc/test_lsad.py
|
anno5750/impacket
|
ed7082cd0bc0d951f6eefb0a98c4c1360fe1a8a2
|
[
"Apache-1.1"
] | null | null | null |
tests/dcerpc/test_lsad.py
|
anno5750/impacket
|
ed7082cd0bc0d951f6eefb0a98c4c1360fe1a8a2
|
[
"Apache-1.1"
] | null | null | null |
# Impacket - Collection of Python classes for working with network protocols.
#
# SECUREAUTH LABS. Copyright (C) 2021 SecureAuth Corporation. All rights reserved.
#
# This software is provided under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Tested so far:
# hLsarOpenPolicy2
# (h)LsarOpenPolicy
# (h)LsarQueryInformationPolicy2
# (h)LsarQueryInformationPolicy
# (h)LsarQueryDomainInformationPolicy
# (h)LsarEnumerateAccounts
# (h)LsarEnumerateAccountsWithUserRight
# (h)LsarEnumerateTrustedDomainsEx
# (h)LsarEnumerateTrustedDomains
# (h)LsarOpenAccount
# (h)LsarClose
# (h)LsarCreateAccount
# (h)LsarCreateAccount
# (h)LsarDeleteObject
# (h)LsarEnumeratePrivilegesAccount
# (h)LsarGetSystemAccessAccount
# (h)LsarSetSystemAccessAccount
# (h)LsarAddPrivilegesToAccount
# (h)LsarRemovePrivilegesFromAccount
# (h)LsarEnumerateAccountRights
# (h)LsarAddAccountRights
# (h)LsarRemoveAccountRights
# (h)LsarCreateSecret
# (h)LsarOpenSecret
# (h)LsarSetSecret
# (h)LsarQuerySecret
# (h)LsarRetrievePrivateData
# (h)LsarStorePrivateData
# (h)LsarEnumeratePrivileges
# (h)LsarLookupPrivilegeValue
# (h)LsarLookupPrivilegeName
# (h)LsarLookupPrivilegeDisplayName
# (h)LsarQuerySecurityObject
# (h)LsarSetSecurityObject
# (h)LsarQueryForestTrustInformation
# (h)LsarSetInformationPolicy
# (h)LsarSetInformationPolicy2
# Not yet
# LsarCreateTrustedDomain
# LsarOpenTrustedDomain
# LsarQueryInfoTrustedDomain
# LsarSetInformationTrustedDomain
# LsarQueryTrustedDomainInfo
# LsarSetTrustedDomainInfo
# LsarDeleteTrustedDomain
# LsarQueryTrustedDomainInfoByName
# LsarSetTrustedDomainInfoByName
# LsarCreateTrustedDomainEx
# LsarSetDomainInformationPolicy
# LsarOpenTrustedDomainByName
# LsarCreateTrustedDomainEx2
# LsarSetForestTrustInformation
#
from __future__ import division
from __future__ import print_function
import pytest
import unittest
from tests.dcerpc import DCERPCTests
from impacket.dcerpc.v5 import lsad
from impacket.dcerpc.v5.ndr import NULL
from impacket.dcerpc.v5.dtypes import MAXIMUM_ALLOWED, RPC_UNICODE_STRING, DELETE
from impacket.structure import hexdump
class LSADTests(DCERPCTests):
iface_uuid = lsad.MSRPC_UUID_LSAD
string_binding = r"ncacn_np:{0.machine}[\PIPE\lsarpc]"
authn = True
def open_policy(self, dce):
resp = lsad.hLsarOpenPolicy2(dce, MAXIMUM_ALLOWED | lsad.POLICY_CREATE_SECRET | DELETE | lsad.POLICY_VIEW_LOCAL_INFORMATION)
return resp['PolicyHandle']
def test_LsarOpenPolicy(self):
dce, rpctransport = self.connect()
request = lsad.LsarOpenPolicy()
request['SystemName'] = NULL
request['ObjectAttributes']['RootDirectory'] = NULL
request['ObjectAttributes']['ObjectName'] = NULL
request['ObjectAttributes']['SecurityDescriptor'] = NULL
request['ObjectAttributes']['SecurityQualityOfService'] = NULL
request['DesiredAccess'] = MAXIMUM_ALLOWED
resp = dce.request(request)
resp.dump()
def test_hLsarOpenPolicy(self):
dce, rpctransport = self.connect()
resp = lsad.hLsarOpenPolicy(dce)
resp.dump()
def test_LsarQueryInformationPolicy2(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarQueryInformationPolicy2()
request['PolicyHandle'] = policyHandle
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAuditLogInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyPrimaryDomainInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyPdAccountInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyLsaServerRoleInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyReplicaSourceInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyDnsDomainInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyDnsDomainInformationInt
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyLocalAccountDomainInformation
resp = dce.request(request)
resp.dump()
def test_hLsarQueryInformationPolicy2(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditLogInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyPrimaryDomainInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyPdAccountInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyLsaServerRoleInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyReplicaSourceInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyDnsDomainInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyDnsDomainInformationInt)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyLocalAccountDomainInformation)
resp.dump()
def test_LsarQueryInformationPolicy(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarQueryInformationPolicy()
request['PolicyHandle'] = policyHandle
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAuditLogInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyPrimaryDomainInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyPdAccountInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyLsaServerRoleInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyReplicaSourceInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyDnsDomainInformation
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyDnsDomainInformationInt
resp = dce.request(request)
resp.dump()
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyLocalAccountDomainInformation
resp = dce.request(request)
resp.dump()
def test_hLsarQueryInformationPolicy(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditLogInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyPrimaryDomainInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyPdAccountInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyLsaServerRoleInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyReplicaSourceInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyDnsDomainInformation)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyDnsDomainInformationInt)
resp.dump()
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyLocalAccountDomainInformation)
resp.dump()
def test_LsarQueryDomainInformationPolicy(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarQueryDomainInformationPolicy()
request['PolicyHandle'] = policyHandle
request['InformationClass'] = lsad.POLICY_DOMAIN_INFORMATION_CLASS.PolicyDomainQualityOfServiceInformation
try:
resp = dce.request(request)
resp.dump()
except Exception as e:
if str(e).find('STATUS_INVALID_PARAMETER') < 0:
raise
request['InformationClass'] = lsad.POLICY_DOMAIN_INFORMATION_CLASS.PolicyDomainEfsInformation
try:
resp = dce.request(request)
resp.dump()
except Exception as e:
if str(e).find('STATUS_OBJECT_NAME_NOT_FOUND') < 0:
raise
request['InformationClass'] = lsad.POLICY_DOMAIN_INFORMATION_CLASS.PolicyDomainKerberosTicketInformation
try:
resp = dce.request(request)
resp.dump()
except Exception as e:
if str(e).find('STATUS_OBJECT_NAME_NOT_FOUND') < 0:
raise
def test_hLsarQueryDomainInformationPolicy(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
try:
resp = lsad.hLsarQueryDomainInformationPolicy(dce, policyHandle, lsad.POLICY_DOMAIN_INFORMATION_CLASS.PolicyDomainQualityOfServiceInformation)
resp.dump()
except Exception as e:
if str(e).find('STATUS_INVALID_PARAMETER') < 0:
raise
try:
resp = lsad.hLsarQueryDomainInformationPolicy(dce, policyHandle, lsad.POLICY_DOMAIN_INFORMATION_CLASS.PolicyDomainEfsInformation)
resp.dump()
except Exception as e:
if str(e).find('STATUS_OBJECT_NAME_NOT_FOUND') < 0:
raise
try:
resp = lsad.hLsarQueryDomainInformationPolicy(dce, policyHandle, lsad.POLICY_DOMAIN_INFORMATION_CLASS.PolicyDomainKerberosTicketInformation)
resp.dump()
except Exception as e:
if str(e).find('STATUS_OBJECT_NAME_NOT_FOUND') < 0:
raise
def test_LsarEnumerateAccounts(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarEnumerateAccounts()
request['PolicyHandle'] = policyHandle
request['PreferedMaximumLength'] = 0xffffffff
resp = dce.request(request)
resp.dump()
#for i in range(resp['EnumerationBuffer']['EntriesRead']):
# print resp['EnumerationBuffer']['Information'][i]['Sid'].formatCanonical()
def test_hLsarEnumerateAccounts(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarEnumerateAccounts(dce, policyHandle)
resp.dump()
#for i in range(resp['EnumerationBuffer']['EntriesRead']):
# print resp['EnumerationBuffer']['Information'][i]['Sid'].formatCanonical()
def test_LsarEnumerateAccountsWithUserRight(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarEnumerateAccountsWithUserRight()
request['PolicyHandle'] = policyHandle
request['UserRight'] = 'SeSystemtimePrivilege'
resp = dce.request(request)
resp.dump()
def test_hLsarEnumerateAccountsWithUserRight(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarEnumerateAccountsWithUserRight(dce,policyHandle, 'SeSystemtimePrivilege')
resp.dump()
def test_LsarEnumerateTrustedDomainsEx(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarEnumerateTrustedDomainsEx()
request['PolicyHandle'] = policyHandle
request['EnumerationContext'] = 0
request['PreferedMaximumLength'] = 0xffffffff
try:
resp = dce.request(request)
resp.dump()
except Exception as e:
if str(e).find('STATUS_NO_MORE_ENTRIES') < 0:
raise
def test_hLsarEnumerateTrustedDomainsEx(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
try:
resp = lsad.hLsarEnumerateTrustedDomainsEx(dce, policyHandle)
resp.dump()
except Exception as e:
if str(e).find('STATUS_NO_MORE_ENTRIES') < 0:
raise
def test_LsarEnumerateTrustedDomains(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarEnumerateTrustedDomains()
request['PolicyHandle'] = policyHandle
request['EnumerationContext'] = 0
request['PreferedMaximumLength'] = 0xffffffff
try:
resp = dce.request(request)
resp.dump()
except Exception as e:
if str(e).find('STATUS_NO_MORE_ENTRIES') < 0:
raise
def test_hLsarEnumerateTrustedDomains(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
try:
resp = lsad.hLsarEnumerateTrustedDomains(dce, policyHandle)
resp.dump()
except Exception as e:
if str(e).find('STATUS_NO_MORE_ENTRIES') < 0:
raise
def test_hLsarOpenAccount(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarEnumerateAccounts(dce, policyHandle)
resp.dump()
resp = lsad.hLsarOpenAccount(dce, policyHandle, resp['EnumerationBuffer']['Information'][0]['Sid'].formatCanonical())
resp.dump()
resp = lsad.hLsarClose(dce, resp['AccountHandle'])
resp.dump()
def test_LsarOpenAccount(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarEnumerateAccounts()
request['PolicyHandle'] = policyHandle
request['PreferedMaximumLength'] = 0xffffffff
resp = dce.request(request)
resp.dump()
request = lsad.LsarOpenAccount()
request['PolicyHandle'] = policyHandle
request['AccountSid'] = resp['EnumerationBuffer']['Information'][0]['Sid']
request['DesiredAccess'] = MAXIMUM_ALLOWED
resp = dce.request(request)
resp.dump()
request = lsad.LsarClose()
request['ObjectHandle'] = resp['AccountHandle']
resp = dce.request(request)
resp.dump()
def test_LsarCreateAccount_LsarDeleteObject(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarQueryInformationPolicy2()
request['PolicyHandle'] = policyHandle
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation
resp = dce.request(request)
sid = resp['PolicyInformation']['PolicyAccountDomainInfo']['DomainSid'].formatCanonical()
sid = sid + '-9999'
request = lsad.LsarCreateAccount()
request['PolicyHandle'] = policyHandle
request['AccountSid'].fromCanonical(sid)
request['DesiredAccess'] = MAXIMUM_ALLOWED
resp = dce.request(request)
resp.dump()
request = lsad.LsarDeleteObject()
request['ObjectHandle'] = resp['AccountHandle']
resp = dce.request(request)
resp.dump()
def test_hLsarCreateAccount_hLsarDeleteObject(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle,lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation)
sid = resp['PolicyInformation']['PolicyAccountDomainInfo']['DomainSid'].formatCanonical()
sid = sid + '-9999'
resp = lsad.hLsarCreateAccount(dce, policyHandle, sid)
resp.dump()
resp = lsad.hLsarDeleteObject(dce,resp['AccountHandle'])
resp.dump()
def test_LsarEnumeratePrivilegesAccount(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
sid = 'S-1-5-32-544'
request = lsad.LsarOpenAccount()
request['PolicyHandle'] = policyHandle
request['AccountSid'].fromCanonical(sid)
request['DesiredAccess'] = MAXIMUM_ALLOWED
resp = dce.request(request)
resp.dump()
request = lsad.LsarEnumeratePrivilegesAccount()
request['AccountHandle'] = resp['AccountHandle']
resp = dce.request(request)
resp.dump()
def test_hLsarEnumeratePrivilegesAccount(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
sid = 'S-1-5-32-544'
resp = lsad.hLsarOpenAccount(dce, policyHandle, sid)
resp.dump()
resp = lsad.hLsarEnumeratePrivilegesAccount(dce,resp['AccountHandle'] )
resp.dump()
def test_LsarGetSystemAccessAccount_LsarSetSystemAccessAccount(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
sid = 'S-1-5-32-544'
request = lsad.LsarOpenAccount()
request['PolicyHandle'] = policyHandle
request['AccountSid'].fromCanonical(sid)
request['DesiredAccess'] = MAXIMUM_ALLOWED
resp = dce.request(request)
resp.dump()
request = lsad.LsarGetSystemAccessAccount()
request['AccountHandle'] = resp['AccountHandle']
resp2 = dce.request(request)
resp.dump()
request = lsad.LsarSetSystemAccessAccount()
request['AccountHandle'] = resp['AccountHandle']
request['SystemAccess'] = resp2['SystemAccess']
resp = dce.request(request)
resp.dump()
def test_hLsarGetSystemAccessAccount_hLsarSetSystemAccessAccount(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
sid = 'S-1-5-32-544'
resp = lsad.hLsarOpenAccount(dce, policyHandle, sid)
resp.dump()
resp2 = lsad.hLsarGetSystemAccessAccount(dce, resp['AccountHandle'])
resp2.dump()
resp = lsad.hLsarSetSystemAccessAccount(dce,resp['AccountHandle'],resp2['SystemAccess'])
resp.dump()
def test_LsarAddPrivilegesToAccount_LsarRemovePrivilegesFromAccount(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarQueryInformationPolicy2()
request['PolicyHandle'] = policyHandle
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation
resp = dce.request(request)
sid = resp['PolicyInformation']['PolicyAccountDomainInfo']['DomainSid'].formatCanonical()
sid = sid + '-9999'
request = lsad.LsarCreateAccount()
request['PolicyHandle'] = policyHandle
request['AccountSid'].fromCanonical(sid)
request['DesiredAccess'] = MAXIMUM_ALLOWED | lsad.ACCOUNT_ADJUST_PRIVILEGES
resp = dce.request(request)
resp.dump()
accountHandle = resp['AccountHandle']
request = lsad.LsarAddPrivilegesToAccount()
request['AccountHandle'] = accountHandle
request['Privileges']['PrivilegeCount'] = 1
request['Privileges']['Control'] = 0
attribute = lsad.LSAPR_LUID_AND_ATTRIBUTES()
attribute['Luid']['LowPart'] = 0
attribute['Luid']['HighPart'] = 3
attribute['Attributes'] = 3
request['Privileges']['Privilege'].append(attribute)
try:
resp = dce.request(request)
resp.dump()
except Exception:
request = lsad.LsarDeleteObject()
request['ObjectHandle'] = accountHandle
dce.request(request)
return
request = lsad.LsarRemovePrivilegesFromAccount()
request['AccountHandle'] = accountHandle
request['AllPrivileges'] = 1
request['Privileges'] = NULL
resp = dce.request(request)
resp.dump()
request = lsad.LsarDeleteObject()
request['ObjectHandle'] = accountHandle
resp = dce.request(request)
resp.dump()
def test_hLsarAddPrivilegesToAccount_hLsarRemovePrivilegesFromAccount(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle,lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation)
sid = resp['PolicyInformation']['PolicyAccountDomainInfo']['DomainSid'].formatCanonical()
sid = sid + '-9999'
resp = lsad.hLsarCreateAccount(dce, policyHandle, sid)
accountHandle = resp['AccountHandle']
attributes = list()
attribute = lsad.LSAPR_LUID_AND_ATTRIBUTES()
attribute['Luid']['LowPart'] = 0
attribute['Luid']['HighPart'] = 3
attribute['Attributes'] = 3
attributes.append(attribute)
try:
resp = lsad.hLsarAddPrivilegesToAccount(dce,accountHandle, attributes)
resp.dump()
except Exception:
resp = lsad.hLsarDeleteObject(dce, accountHandle)
return
resp = lsad.hLsarRemovePrivilegesFromAccount(dce, accountHandle, NULL, 1)
resp.dump()
resp = lsad.hLsarDeleteObject(dce,accountHandle )
resp.dump()
def test_LsarEnumerateAccountRights(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
sid = 'S-1-5-32-544'
request = lsad.LsarEnumerateAccountRights()
request['PolicyHandle'] = policyHandle
request['AccountSid'].fromCanonical(sid)
resp = dce.request(request)
resp.dump()
def test_hLsarEnumerateAccountRights(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
sid = 'S-1-5-32-544'
resp = lsad.hLsarEnumerateAccountRights(dce, policyHandle, sid)
resp.dump()
def test_LsarAddAccountRights_LsarRemoveAccountRights(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
sid = 'S-1-5-32-504'
request = lsad.LsarAddAccountRights()
request['PolicyHandle'] = policyHandle
request['AccountSid'].fromCanonical(sid)
request['UserRights']['EntriesRead'] = 1
right = RPC_UNICODE_STRING()
right['Data'] = 'SeChangeNotifyPrivilege'
request['UserRights']['UserRights'].append(right)
resp = dce.request(request)
resp.dump()
request = lsad.LsarRemoveAccountRights()
request['PolicyHandle'] = policyHandle
request['AccountSid'].fromCanonical(sid)
request['UserRights']['EntriesRead'] = 1
right = RPC_UNICODE_STRING()
right['Data'] = 'SeChangeNotifyPrivilege'
request['UserRights']['UserRights'].append(right)
resp = dce.request(request)
resp.dump()
def test_hLsarAddAccountRights_hLsarRemoveAccountRights(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
sid = 'S-1-5-32-504'
resp = lsad.hLsarAddAccountRights(dce, policyHandle, sid, ('SeChangeNotifyPrivilege', ))
resp.dump()
resp = lsad.hLsarRemoveAccountRights(dce, policyHandle, sid, ('SeChangeNotifyPrivilege', ))
resp.dump()
def test_LsarCreateSecret_LsarOpenSecret(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarCreateSecret()
request['PolicyHandle'] = policyHandle
request['SecretName'] = 'MYSECRET'
request['DesiredAccess'] = MAXIMUM_ALLOWED
resp = dce.request(request)
resp.dump()
request = lsad.LsarOpenSecret()
request['PolicyHandle'] = policyHandle
request['SecretName'] = 'MYSECRET'
request['DesiredAccess'] = MAXIMUM_ALLOWED
resp0 = dce.request(request)
resp0.dump()
request = lsad.LsarSetSecret()
request['SecretHandle'] = resp0['SecretHandle']
request['EncryptedCurrentValue']['Length'] = 16
request['EncryptedCurrentValue']['MaximumLength'] = 16
request['EncryptedCurrentValue']['Buffer'] = list('A'*16)
request['EncryptedOldValue']['Length'] = 16
request['EncryptedOldValue']['MaximumLength'] = 16
request['EncryptedOldValue']['Buffer'] = list('A'*16)
#request['EncryptedCurrentValue'] = NULL
#request['EncryptedOldValue'] = NULL
try:
resp = dce.request(request)
resp.dump()
except Exception:
pass
request = lsad.LsarDeleteObject()
request['ObjectHandle'] = resp0['SecretHandle']
resp = dce.request(request)
resp.dump()
def test_hLsarCreateSecret_hLsarOpenSecret(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarCreateSecret(dce, policyHandle, 'MYSECRET')
resp.dump()
resp0 = lsad.hLsarOpenSecret(dce, policyHandle, 'MYSECRET')
resp0.dump()
try:
resp = lsad.hLsarSetSecret(dce, resp0['SecretHandle'], 'A'*16, 'A'*16)
resp.dump()
except Exception:
pass
resp = lsad.hLsarDeleteObject(dce,resp0['SecretHandle'])
resp.dump()
def test_LsarQuerySecret(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarOpenSecret()
request['PolicyHandle'] = policyHandle
request['SecretName'] = 'DPAPI_SYSTEM'
request['DesiredAccess'] = MAXIMUM_ALLOWED
resp0 = dce.request(request)
resp0.dump()
request = lsad.LsarQuerySecret()
request['SecretHandle'] = resp0['SecretHandle']
request['EncryptedCurrentValue']['Buffer'] = NULL
request['EncryptedOldValue']['Buffer'] = NULL
request['OldValueSetTime'] = NULL
resp = dce.request(request)
resp.dump()
def test_hLsarQuerySecret(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp0 = lsad.hLsarOpenSecret(dce, policyHandle, 'DPAPI_SYSTEM')
resp0.dump()
resp = lsad.hLsarQuerySecret(dce, resp0['SecretHandle'])
resp.dump()
def test_LsarRetrievePrivateData_LsarStorePrivateData(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarRetrievePrivateData()
request['PolicyHandle'] = policyHandle
request['KeyName'] = 'DPAPI_SYSTEM'
resp0 = dce.request(request)
resp0.dump()
request = lsad.LsarStorePrivateData()
request['PolicyHandle'] = policyHandle
request['KeyName'] = 'BETUS'
request['EncryptedData'] = resp0['EncryptedData']
resp = dce.request(request)
resp.dump()
request = lsad.LsarStorePrivateData()
request['PolicyHandle'] = policyHandle
request['KeyName'] = 'BETUS'
request['EncryptedData'] = NULL
resp = dce.request(request)
resp.dump()
def test_hLsarRetrievePrivateData_hLsarStorePrivateData(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp0 = lsad.hLsarRetrievePrivateData(dce,policyHandle, 'DPAPI_SYSTEM')
#hexdump(resp0)
resp = lsad.hLsarStorePrivateData(dce, policyHandle, 'BETUS', resp0)
resp.dump()
resp = lsad.hLsarStorePrivateData(dce, policyHandle, 'BETUS', NULL)
resp.dump()
def test_LsarEnumeratePrivileges(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarEnumeratePrivileges()
request['PolicyHandle'] = policyHandle
request['EnumerationContext'] = 0
request['PreferedMaximumLength'] = 0xffffffff
resp = dce.request(request)
resp.dump()
self.assertEqual(resp['EnumerationBuffer']['Entries'], len(resp['EnumerationBuffer']['Privileges']))
def test_hLsarEnumeratePrivileges(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarEnumeratePrivileges(dce, policyHandle)
resp.dump()
self.assertEqual(resp['EnumerationBuffer']['Entries'], len(resp['EnumerationBuffer']['Privileges']))
def test_LsarLookupPrivilegeValue_LsarLookupPrivilegeName(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarLookupPrivilegeValue()
request['PolicyHandle'] = policyHandle
request['Name'] = 'SeTimeZonePrivilege'
resp = dce.request(request)
resp.dump()
request = lsad.LsarLookupPrivilegeName()
request['PolicyHandle'] = policyHandle
request['Value'] = resp['Value']
resp = dce.request(request)
resp.dump()
self.assertEqual(resp['Name'], 'SeTimeZonePrivilege')
def test_hLsarLookupPrivilegeValue_hLsarLookupPrivilegeName(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarLookupPrivilegeValue(dce, policyHandle,'SeTimeZonePrivilege' )
resp.dump()
resp = lsad.hLsarLookupPrivilegeName(dce, policyHandle, resp['Value'])
resp.dump()
self.assertEqual(resp['Name'], 'SeTimeZonePrivilege')
def test_LsarLookupPrivilegeDisplayName(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarLookupPrivilegeDisplayName()
request['PolicyHandle'] = policyHandle
request['Name'] = 'SeTimeZonePrivilege'
request['ClientLanguage'] = 1
request['ClientSystemDefaultLanguage'] = 1
resp = dce.request(request)
resp.dump()
def test_LsarQuerySecurityObject_LsarSetSecurityObject(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarQuerySecurityObject()
request['PolicyHandle'] = policyHandle
request['SecurityInformation'] = lsad.OWNER_SECURITY_INFORMATION
resp = dce.request(request)
resp.dump()
self.assertEqual(resp['SecurityDescriptor']['Length'], len(resp['SecurityDescriptor']['SecurityDescriptor']))
request = lsad.LsarSetSecurityObject()
request['PolicyHandle'] = policyHandle
request['SecurityInformation'] = lsad.OWNER_SECURITY_INFORMATION
request['SecurityDescriptor'] = resp['SecurityDescriptor']
resp = dce.request(request)
resp.dump()
def test_hLsarQuerySecurityObject_hLsarSetSecurityObject(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarQuerySecurityObject(dce, policyHandle, lsad.OWNER_SECURITY_INFORMATION)
hexdump(resp)
resp = lsad.hLsarSetSecurityObject(dce, policyHandle, lsad.OWNER_SECURITY_INFORMATION,resp)
resp.dump()
def test_LsarQueryForestTrustInformation(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarQueryForestTrustInformation()
request['PolicyHandle'] = policyHandle
request['TrustedDomainName'] = 'CORE'
request['HighestRecordType'] = lsad.LSA_FOREST_TRUST_RECORD_TYPE.ForestTrustTopLevelName
try:
resp = dce.request(request)
resp.dump()
except Exception as e:
if str(e).find('STATUS_NO_SUCH_DOMAIN') < 0:
raise
def test_LsarSetInformationPolicy2(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarQueryInformationPolicy2()
request['PolicyHandle'] = policyHandle
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation
resp = dce.request(request)
resp.dump()
oldValue = resp['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode']
req = lsad.LsarSetInformationPolicy2()
req['PolicyHandle'] = policyHandle
req['InformationClass'] = request['InformationClass']
req['PolicyInformation'] = resp['PolicyInformation']
req['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode'] = 0
resp2 = dce.request(req)
resp2.dump()
resp = dce.request(request)
resp.dump()
req['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode'] = oldValue
resp2 = dce.request(req)
resp2.dump()
################################################################################
#request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyPrimaryDomainInformation
#resp = dce.request(request)
#resp.dump()
#oldValue = resp['PolicyInformation']['PolicyPrimaryDomainInfo']['Name']
#req = lsad.LsarSetInformationPolicy2()
#req['PolicyHandle'] = policyHandle
#req['InformationClass'] = request['InformationClass']
#req['PolicyInformation'] = resp['PolicyInformation']
#req['PolicyInformation']['PolicyPrimaryDomainInfo']['Name'] = 'BETUS'
#resp2 = dce.request(req)
#resp2.dump()
#resp = dce.request(request)
#resp.dump()
#self.assertEqual('BETUS', resp['PolicyInformation']['PolicyPrimaryDomainInfo']['Name'])
#req['PolicyInformation']['PolicyPrimaryDomainInfo']['Name'] = oldValue
#resp2 = dce.request(req)
#resp2.dump()
################################################################################
#request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation
#resp = dce.request(request)
#resp.dump()
#oldValue = resp['PolicyInformation']['PolicyAccountDomainInfo']['DomainName']
#req = lsad.LsarSetInformationPolicy2()
#req['PolicyHandle'] = policyHandle
#req['InformationClass'] = request['InformationClass']
#req['PolicyInformation'] = resp['PolicyInformation']
#req['PolicyInformation']['PolicyAccountDomainInfo']['DomainName'] = 'BETUS'
#resp2 = dce.request(req)
#resp2.dump()
#resp = dce.request(request)
#resp.dump()
#self.assertEqual('BETUS', resp['PolicyInformation']['PolicyAccountDomainInfo']['DomainName'])
#req['PolicyInformation']['PolicyAccountDomainInfo']['DomainName'] = oldValue
#resp2 = dce.request(req)
#resp2.dump()
################################################################################
# ToDo rest of the Information Classes
def test_hLsarSetInformationPolicy2(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation)
resp.dump()
oldValue = resp['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode']
resp['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode'] = 0
resp2 = lsad.hLsarSetInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation, resp['PolicyInformation'] )
resp2.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation)
resp.dump()
resp['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode'] = oldValue
resp2 = lsad.hLsarSetInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation, resp['PolicyInformation'] )
resp2.dump()
def test_LsarSetInformationPolicy(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
request = lsad.LsarQueryInformationPolicy()
request['PolicyHandle'] = policyHandle
request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation
resp = dce.request(request)
resp.dump()
oldValue = resp['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode']
req = lsad.LsarSetInformationPolicy()
req['PolicyHandle'] = policyHandle
req['InformationClass'] = request['InformationClass']
req['PolicyInformation'] = resp['PolicyInformation']
req['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode'] = 0
resp2 = dce.request(req)
resp2.dump()
resp = dce.request(request)
resp.dump()
req['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode'] = oldValue
resp2 = dce.request(req)
resp2.dump()
################################################################################
#request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyPrimaryDomainInformation
#resp = dce.request(request)
#resp.dump()
#oldValue = resp['PolicyInformation']['PolicyPrimaryDomainInfo']['Name']
#req = lsad.LsarSetInformationPolicy()
#req['PolicyHandle'] = policyHandle
#req['InformationClass'] = request['InformationClass']
#req['PolicyInformation'] = resp['PolicyInformation']
#req['PolicyInformation']['PolicyPrimaryDomainInfo']['Name'] = 'BETUS'
#resp2 = dce.request(req)
#resp2.dump()
#resp = dce.request(request)
#resp.dump()
#self.assertEqual('BETUS', resp['PolicyInformation']['PolicyPrimaryDomainInfo']['Name'])
#req['PolicyInformation']['PolicyPrimaryDomainInfo']['Name'] = oldValue
#resp2 = dce.request(req)
#resp2.dump()
################################################################################
#request['InformationClass'] = lsad.POLICY_INFORMATION_CLASS.PolicyAccountDomainInformation
#resp = dce.request(request)
#resp.dump()
#oldValue = resp['PolicyInformation']['PolicyAccountDomainInfo']['DomainName']
#req = lsad.LsarSetInformationPolicy()
#req['PolicyHandle'] = policyHandle
#req['InformationClass'] = request['InformationClass']
#req['PolicyInformation'] = resp['PolicyInformation']
#req['PolicyInformation']['PolicyAccountDomainInfo']['DomainName'] = 'BETUS'
#resp2 = dce.request(req)
#resp2.dump()
#resp = dce.request(request)
#resp.dump()
#self.assertEqual('BETUS', resp['PolicyInformation']['PolicyAccountDomainInfo']['DomainName'])
#req['PolicyInformation']['PolicyAccountDomainInfo']['DomainName'] = oldValue
#resp2 = dce.request(req)
#resp2.dump()
################################################################################
# ToDo rest of the Information Classes
def test_hLsarSetInformationPolicy(self):
dce, rpctransport = self.connect()
policyHandle = self.open_policy(dce)
resp = lsad.hLsarQueryInformationPolicy(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation)
resp.dump()
oldValue = resp['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode']
resp['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode'] = 0
resp2 = lsad.hLsarSetInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation, resp['PolicyInformation'] )
resp2.dump()
resp = lsad.hLsarQueryInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation)
resp.dump()
resp['PolicyInformation']['PolicyAuditEventsInfo']['AuditingMode'] = oldValue
resp2 = lsad.hLsarSetInformationPolicy2(dce, policyHandle, lsad.POLICY_INFORMATION_CLASS.PolicyAuditEventsInformation, resp['PolicyInformation'] )
resp2.dump()
@pytest.mark.remote
class LSADTestsSMBTransport(LSADTests, unittest.TestCase):
transfer_syntax = DCERPCTests.TRANSFER_SYNTAX_NDR
@pytest.mark.remote
class LSADTestsSMBTransport64(LSADTests, unittest.TestCase):
transfer_syntax = DCERPCTests.TRANSFER_SYNTAX_NDR64
# Process command-line arguments.
if __name__ == "__main__":
unittest.main(verbosity=1)
| 38.967123
| 154
| 0.666549
| 3,542
| 42,669
| 7.929701
| 0.092321
| 0.036173
| 0.046
| 0.053085
| 0.749777
| 0.732047
| 0.700822
| 0.686973
| 0.665219
| 0.636665
| 0
| 0.006945
| 0.217113
| 42,669
| 1,094
| 155
| 39.002742
| 0.833857
| 0.120884
| 0
| 0.74359
| 0
| 0
| 0.122066
| 0.027677
| 0
| 0
| 0.001355
| 0.000914
| 0.006748
| 1
| 0.066127
| false
| 0.002699
| 0.012146
| 0
| 0.093117
| 0.00135
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
14af800272826030a04cb8172ba2fd1c6558d103
| 228
|
py
|
Python
|
colossalai/nn/layer/vanilla/__init__.py
|
jiangz17THU/ColossalAI
|
354b7954d1fa6b21a5ba566f0d5ec099280ad315
|
[
"Apache-2.0"
] | null | null | null |
colossalai/nn/layer/vanilla/__init__.py
|
jiangz17THU/ColossalAI
|
354b7954d1fa6b21a5ba566f0d5ec099280ad315
|
[
"Apache-2.0"
] | null | null | null |
colossalai/nn/layer/vanilla/__init__.py
|
jiangz17THU/ColossalAI
|
354b7954d1fa6b21a5ba566f0d5ec099280ad315
|
[
"Apache-2.0"
] | 1
|
2022-01-06T17:16:32.000Z
|
2022-01-06T17:16:32.000Z
|
from .layers import DropPath, VanillaClassifier, VanillaPatchEmbedding, \
WrappedDropout, WrappedDropPath
__all__ = ['VanillaPatchEmbedding', 'VanillaClassifier', 'DropPath',
'WrappedDropout', 'WrappedDropPath']
| 38
| 73
| 0.758772
| 14
| 228
| 12.071429
| 0.642857
| 0.343195
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140351
| 228
| 5
| 74
| 45.6
| 0.862245
| 0
| 0
| 0
| 0
| 0
| 0.328947
| 0.092105
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1aefa2b7c746f8cb2499bcdf5a7a9f97fe844d59
| 204
|
py
|
Python
|
spacy/tokens/__init__.py
|
g4brielvs/spaCy
|
cca8651fc8133172ebaa9d9fc438ed1fbf34fb33
|
[
"BSD-3-Clause",
"MIT"
] | null | null | null |
spacy/tokens/__init__.py
|
g4brielvs/spaCy
|
cca8651fc8133172ebaa9d9fc438ed1fbf34fb33
|
[
"BSD-3-Clause",
"MIT"
] | null | null | null |
spacy/tokens/__init__.py
|
g4brielvs/spaCy
|
cca8651fc8133172ebaa9d9fc438ed1fbf34fb33
|
[
"BSD-3-Clause",
"MIT"
] | 1
|
2021-06-21T07:17:48.000Z
|
2021-06-21T07:17:48.000Z
|
from .doc import Doc
from .token import Token
from .span import Span
from ._serialize import DocBin
from .morphanalysis import MorphAnalysis
__all__ = ["Doc", "Token", "Span", "DocBin", "MorphAnalysis"]
| 25.5
| 61
| 0.754902
| 26
| 204
| 5.730769
| 0.346154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 204
| 7
| 62
| 29.142857
| 0.846591
| 0
| 0
| 0
| 0
| 0
| 0.151961
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.833333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
2105ebce47f4c5aef1edcd27ee3cb12ea68760ff
| 284
|
py
|
Python
|
bob/bio/base/test/dummy/config.py
|
bioidiap/bob.bio.base
|
44b8d192e957eb328591c8110cf0113f602292ef
|
[
"BSD-3-Clause"
] | 16
|
2016-04-06T20:37:55.000Z
|
2019-10-19T08:06:25.000Z
|
bob/bio/base/test/dummy/config.py
|
bioidiap/bob.bio.base
|
44b8d192e957eb328591c8110cf0113f602292ef
|
[
"BSD-3-Clause"
] | 25
|
2015-07-04T17:41:40.000Z
|
2016-08-08T20:36:01.000Z
|
bob/bio/base/test/dummy/config.py
|
bioidiap/bob.bio.base
|
44b8d192e957eb328591c8110cf0113f602292ef
|
[
"BSD-3-Clause"
] | 7
|
2015-08-07T17:21:02.000Z
|
2018-08-13T15:51:54.000Z
|
from bob.bio.base.test.dummy.database import database
from bob.bio.base.test.dummy.preprocessor import preprocessor
from bob.bio.base.test.dummy.extractor import extractor
from bob.bio.base.test.dummy.algorithm import algorithm
zt_norm = True
verbose = 1
sub_directory = "test_dummy"
| 35.5
| 61
| 0.823944
| 45
| 284
| 5.133333
| 0.4
| 0.194805
| 0.17316
| 0.242424
| 0.398268
| 0.398268
| 0
| 0
| 0
| 0
| 0
| 0.003861
| 0.088028
| 284
| 7
| 62
| 40.571429
| 0.888031
| 0
| 0
| 0
| 0
| 0
| 0.035211
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.571429
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
210e4fda108462bd312c617e048dd95f2f5b8464
| 72
|
py
|
Python
|
tests/__init__.py
|
hactar-is/wagtail_app_pages
|
c2147f339b016fd62755a7a6cc8f4ad9b4a4cf84
|
[
"MIT"
] | 27
|
2018-03-28T18:19:10.000Z
|
2021-07-28T18:40:33.000Z
|
tests/__init__.py
|
hactar-is/wagtail_app_pages
|
c2147f339b016fd62755a7a6cc8f4ad9b4a4cf84
|
[
"MIT"
] | 16
|
2018-05-29T01:12:59.000Z
|
2022-02-10T09:31:06.000Z
|
tests/__init__.py
|
hactar-is/wagtail_app_pages
|
c2147f339b016fd62755a7a6cc8f4ad9b4a4cf84
|
[
"MIT"
] | 9
|
2018-10-16T10:53:13.000Z
|
2022-02-18T11:26:05.000Z
|
# -*- coding: utf-8 -*-
"""Unit test package for wagtail_app_pages."""
| 18
| 46
| 0.625
| 10
| 72
| 4.3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016393
| 0.152778
| 72
| 3
| 47
| 24
| 0.688525
| 0.875
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
210fcf692987eeac3e6c063ee1c43ebf199070b3
| 164
|
py
|
Python
|
python_selenium_framework/base/base_test.py
|
Cervidae90/selenium_python
|
5a59bb7e71d82f519c5f0b75a8fa678a3f5d055e
|
[
"MIT"
] | null | null | null |
python_selenium_framework/base/base_test.py
|
Cervidae90/selenium_python
|
5a59bb7e71d82f519c5f0b75a8fa678a3f5d055e
|
[
"MIT"
] | 1
|
2021-06-02T00:26:22.000Z
|
2021-06-02T00:26:22.000Z
|
python_selenium_framework/base/base_test.py
|
Cervidae90/selenium_python
|
5a59bb7e71d82f519c5f0b75a8fa678a3f5d055e
|
[
"MIT"
] | 1
|
2020-01-21T14:05:50.000Z
|
2020-01-21T14:05:50.000Z
|
from managers.page_manager import PageManager
class BaseTest:
pages: PageManager = None
def init(self, driver):
self.pages = PageManager(driver)
| 18.222222
| 45
| 0.713415
| 19
| 164
| 6.105263
| 0.736842
| 0.275862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.213415
| 164
| 8
| 46
| 20.5
| 0.899225
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
2113672feab10a167a22d9f1646fbc914182b7eb
| 157
|
py
|
Python
|
dto/file_shuffling_config.py
|
MolecularAI/Lib-INVENT-dataset
|
d42a4d32aa645831c0c052b2d3515144cd329b83
|
[
"Apache-2.0"
] | 9
|
2021-06-24T14:52:09.000Z
|
2022-03-10T06:41:11.000Z
|
dto/file_shuffling_config.py
|
MolecularAI/Lib-INVENT-dataset
|
d42a4d32aa645831c0c052b2d3515144cd329b83
|
[
"Apache-2.0"
] | null | null | null |
dto/file_shuffling_config.py
|
MolecularAI/Lib-INVENT-dataset
|
d42a4d32aa645831c0c052b2d3515144cd329b83
|
[
"Apache-2.0"
] | 4
|
2021-06-24T14:52:11.000Z
|
2022-02-23T10:52:45.000Z
|
from dataclasses import dataclass
@dataclass
class FileShufflingConfig:
directory: str
n_permutations: int = 1
save_permutations: bool = False
| 17.444444
| 35
| 0.757962
| 17
| 157
| 6.882353
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007937
| 0.197452
| 157
| 8
| 36
| 19.625
| 0.920635
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.166667
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
2126e1fbd2ebab4a5d0dd6fcca8c02d263813a3f
| 17
|
py
|
Python
|
config/development.py
|
Aneureka/njuapi
|
f45f703e20451f12d0900c5c38b93cdd6e9b672c
|
[
"MIT"
] | 6
|
2017-09-16T13:50:28.000Z
|
2019-10-24T03:06:49.000Z
|
config/development.py
|
Aneureka/njuapi
|
f45f703e20451f12d0900c5c38b93cdd6e9b672c
|
[
"MIT"
] | null | null | null |
config/development.py
|
Aneureka/njuapi
|
f45f703e20451f12d0900c5c38b93cdd6e9b672c
|
[
"MIT"
] | 1
|
2017-09-16T13:58:35.000Z
|
2017-09-16T13:58:35.000Z
|
DEBUG = True
| 2.833333
| 12
| 0.529412
| 2
| 17
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.411765
| 17
| 5
| 13
| 3.4
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
212c8f0f2435aa5c55fb0865162c5acebddce40b
| 145
|
py
|
Python
|
segnlp/resources/stopwords.py
|
AxlAlm/SegNLP
|
89b8d077952397dfcea089376b373b117bcf6a65
|
[
"Apache-2.0"
] | 1
|
2021-01-21T17:16:55.000Z
|
2021-01-21T17:16:55.000Z
|
segnlp/resources/stopwords.py
|
AxlAlm/SegNLP
|
89b8d077952397dfcea089376b373b117bcf6a65
|
[
"Apache-2.0"
] | 2
|
2021-01-24T20:07:54.000Z
|
2021-01-26T16:59:28.000Z
|
segnlp/resources/stopwords.py
|
AxlAlm/SegNLP
|
89b8d077952397dfcea089376b373b117bcf6a65
|
[
"Apache-2.0"
] | 1
|
2021-01-21T17:16:57.000Z
|
2021-01-21T17:16:57.000Z
|
import string
from nltk.corpus import stopwords as nltk_stopwords
stopwords = set(nltk_stopwords.words('english')) | set(string.punctuation)
| 20.714286
| 75
| 0.793103
| 19
| 145
| 5.947368
| 0.578947
| 0.230089
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117241
| 145
| 6
| 76
| 24.166667
| 0.882813
| 0
| 0
| 0
| 0
| 0
| 0.048951
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
dcda371b61e1365f4cecab57449e9c5f369438d5
| 107
|
py
|
Python
|
Chapter07/pass_by_ref_vs_value2.py
|
kaushalkumarshah/Learn-Python-in-7-Days
|
2663656767c8959ace836f0c0e272f3e501bbe6e
|
[
"MIT"
] | 12
|
2018-07-09T16:20:31.000Z
|
2022-03-21T22:52:15.000Z
|
Chapter07/pass_by_ref_vs_value2.py
|
kaushalkumarshah/Learn-Python-in-7-Days
|
2663656767c8959ace836f0c0e272f3e501bbe6e
|
[
"MIT"
] | null | null | null |
Chapter07/pass_by_ref_vs_value2.py
|
kaushalkumarshah/Learn-Python-in-7-Days
|
2663656767c8959ace836f0c0e272f3e501bbe6e
|
[
"MIT"
] | 19
|
2018-01-09T12:49:06.000Z
|
2021-11-23T08:05:55.000Z
|
def func(a):
a=a+4
print "Inside the function", a
a= 10
func(a)
print "Outside the function", a
| 17.833333
| 33
| 0.616822
| 20
| 107
| 3.3
| 0.5
| 0.090909
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0375
| 0.252336
| 107
| 6
| 34
| 17.833333
| 0.7875
| 0
| 0
| 0
| 0
| 0
| 0.378641
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.333333
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dce275e18bd4651391d68776db1030ffc82f3191
| 398
|
py
|
Python
|
ietf/redirects/admin.py
|
hassanakbar4/ietfdb
|
cabee059092ae776015410640226064331c293b7
|
[
"BSD-3-Clause"
] | 25
|
2022-03-05T08:26:52.000Z
|
2022-03-30T15:45:42.000Z
|
ietf/redirects/admin.py
|
hassanakbar4/ietfdb
|
cabee059092ae776015410640226064331c293b7
|
[
"BSD-3-Clause"
] | 219
|
2022-03-04T17:29:12.000Z
|
2022-03-31T21:16:14.000Z
|
ietf/redirects/admin.py
|
hassanakbar4/ietfdb
|
cabee059092ae776015410640226064331c293b7
|
[
"BSD-3-Clause"
] | 22
|
2022-03-04T15:34:34.000Z
|
2022-03-28T13:30:59.000Z
|
#coding: utf-8
from django.contrib import admin
from ietf.redirects.models import Command, Redirect, Suffix
class CommandAdmin(admin.ModelAdmin):
pass
admin.site.register(Command, CommandAdmin)
class RedirectAdmin(admin.ModelAdmin):
pass
admin.site.register(Redirect, RedirectAdmin)
class SuffixAdmin(admin.ModelAdmin):
pass
admin.site.register(Suffix, SuffixAdmin)
| 23.411765
| 59
| 0.763819
| 46
| 398
| 6.608696
| 0.478261
| 0.148026
| 0.1875
| 0.236842
| 0.355263
| 0.355263
| 0
| 0
| 0
| 0
| 0
| 0.00295
| 0.148241
| 398
| 16
| 60
| 24.875
| 0.893805
| 0.032663
| 0
| 0.272727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.272727
| 0.181818
| 0
| 0.454545
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
dcf127450fec3393b641c25626e8a657c903e549
| 173
|
py
|
Python
|
HackerRank Solutions/Python/Numpy/Dot and Cross.py
|
DevashishPathrabe/Competetive-Coding
|
91049459359854b7834cbfb31415682600dc9c57
|
[
"MIT"
] | null | null | null |
HackerRank Solutions/Python/Numpy/Dot and Cross.py
|
DevashishPathrabe/Competetive-Coding
|
91049459359854b7834cbfb31415682600dc9c57
|
[
"MIT"
] | null | null | null |
HackerRank Solutions/Python/Numpy/Dot and Cross.py
|
DevashishPathrabe/Competetive-Coding
|
91049459359854b7834cbfb31415682600dc9c57
|
[
"MIT"
] | null | null | null |
import numpy
N = int(input())
A = numpy.array([(input().split()) for i in range(N)], int)
B = numpy.array([(input().split()) for i in range(N)], int)
print (numpy.dot(A, B))
| 34.6
| 59
| 0.618497
| 32
| 173
| 3.34375
| 0.46875
| 0.11215
| 0.280374
| 0.373832
| 0.654206
| 0.654206
| 0.654206
| 0.654206
| 0.654206
| 0.654206
| 0
| 0
| 0.132948
| 173
| 5
| 60
| 34.6
| 0.713333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.2
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dcf5933db90340f53aeb789f3c669b71c1ac2e3e
| 234
|
py
|
Python
|
cli.py
|
thombashi/sqlitebiter
|
fbed3e367b4f0f55edcd4d818c73abae55c34614
|
[
"MIT"
] | 728
|
2016-05-05T05:07:28.000Z
|
2022-03-28T17:54:20.000Z
|
cli.py
|
thombashi/sqlitebiter
|
fbed3e367b4f0f55edcd4d818c73abae55c34614
|
[
"MIT"
] | 55
|
2016-06-14T04:00:49.000Z
|
2022-03-27T15:07:40.000Z
|
cli.py
|
thombashi/sqlitebiter
|
fbed3e367b4f0f55edcd4d818c73abae55c34614
|
[
"MIT"
] | 59
|
2016-05-05T13:23:23.000Z
|
2022-03-15T10:23:10.000Z
|
#!/usr/bin/env python3
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import multiprocessing
from sqlitebiter.__main__ import cmd
if __name__ == "__main__":
multiprocessing.freeze_support()
cmd()
| 15.6
| 63
| 0.722222
| 25
| 234
| 6.24
| 0.76
| 0.205128
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005
| 0.145299
| 234
| 14
| 64
| 16.714286
| 0.775
| 0.363248
| 0
| 0
| 0
| 0
| 0.056738
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0d3b2932afe73a8d224ebc10c9e63799e9a7b67b
| 80
|
py
|
Python
|
combinato-windows/css-signalviewer.py
|
marijeterwal/combinato
|
4ccac676279c1e0bc679d25529849e85323c36df
|
[
"MIT"
] | null | null | null |
combinato-windows/css-signalviewer.py
|
marijeterwal/combinato
|
4ccac676279c1e0bc679d25529849e85323c36df
|
[
"MIT"
] | null | null | null |
combinato-windows/css-signalviewer.py
|
marijeterwal/combinato
|
4ccac676279c1e0bc679d25529849e85323c36df
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
from signalviewer.viewer_files.viewer import main
main()
| 16
| 49
| 0.7875
| 12
| 80
| 5.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 80
| 4
| 50
| 20
| 0.861111
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b49375287915e347cde42daf35930e9ce2cab021
| 397
|
py
|
Python
|
other/cf17_final_a.py
|
ryosuke0825/atcoder_python
|
185cdbe7db44ecca1aaf357858d16d31ce515ddb
|
[
"MIT"
] | null | null | null |
other/cf17_final_a.py
|
ryosuke0825/atcoder_python
|
185cdbe7db44ecca1aaf357858d16d31ce515ddb
|
[
"MIT"
] | null | null | null |
other/cf17_final_a.py
|
ryosuke0825/atcoder_python
|
185cdbe7db44ecca1aaf357858d16d31ce515ddb
|
[
"MIT"
] | null | null | null |
s = input()
if s[0:3] == 'KIH':
s = 'A'+s
elif s[0:4] != 'AKIH':
print('NO')
exit(0)
if s[4:5] == 'B':
s = s[0:4]+'A'+s[4:]
elif s[4:6] != 'AB':
print('NO')
exit(0)
if s[5:7] == 'BR':
s = s[0:6]+'A'+s[6:]
elif s[5:7] != 'BA':
print('NO')
exit(0)
if (s[7:9] == 'RA' and len(s) == 9) or (s[7:8] == 'R' and len(s) == 8):
print('YES')
else:
print('NO')
| 15.88
| 71
| 0.395466
| 84
| 397
| 1.869048
| 0.345238
| 0.076433
| 0.210191
| 0.229299
| 0.286624
| 0.286624
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 0.274559
| 397
| 24
| 72
| 16.541667
| 0.451389
| 0
| 0
| 0.35
| 0
| 0
| 0.078086
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 0
| 0
| 1
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b4938a1f7c89040e0d1ed737f54d344661b00ffd
| 254
|
py
|
Python
|
15_CustomLib_04/Library/CustomLib_04_01.py
|
eleven2017/robotframework-common-example
|
fd1c0376a88fe3383fbf807c3a2db079b3a9adac
|
[
"MIT"
] | null | null | null |
15_CustomLib_04/Library/CustomLib_04_01.py
|
eleven2017/robotframework-common-example
|
fd1c0376a88fe3383fbf807c3a2db079b3a9adac
|
[
"MIT"
] | null | null | null |
15_CustomLib_04/Library/CustomLib_04_01.py
|
eleven2017/robotframework-common-example
|
fd1c0376a88fe3383fbf807c3a2db079b3a9adac
|
[
"MIT"
] | null | null | null |
class CustomLib_04_01:
def my_keyword(self):
print "My Custome Lib 1 My Keyword"
# In class, all methods with underscore is not considered as keyword
def _my_private_keyword(self):
print "My Custome Lib 1 My Private Keyword"
| 31.75
| 72
| 0.704724
| 39
| 254
| 4.435897
| 0.564103
| 0.057803
| 0.184971
| 0.208092
| 0.358382
| 0.358382
| 0.358382
| 0.358382
| 0
| 0
| 0
| 0.03125
| 0.244094
| 254
| 7
| 73
| 36.285714
| 0.869792
| 0.259843
| 0
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.4
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b4947c673499773f8dd7f4512f53d89dc08e4fc9
| 2,099
|
py
|
Python
|
cpdb/data/migrations/0105_change_allegation_to_fk.py
|
invinst/CPDBv2_backend
|
b4e96d620ff7a437500f525f7e911651e4a18ef9
|
[
"Apache-2.0"
] | 25
|
2018-07-20T22:31:40.000Z
|
2021-07-15T16:58:41.000Z
|
cpdb/data/migrations/0105_change_allegation_to_fk.py
|
invinst/CPDBv2_backend
|
b4e96d620ff7a437500f525f7e911651e4a18ef9
|
[
"Apache-2.0"
] | 13
|
2018-06-18T23:08:47.000Z
|
2022-02-10T07:38:25.000Z
|
cpdb/data/migrations/0105_change_allegation_to_fk.py
|
invinst/CPDBv2_backend
|
b4e96d620ff7a437500f525f7e911651e4a18ef9
|
[
"Apache-2.0"
] | 6
|
2018-05-17T21:59:43.000Z
|
2020-11-17T00:30:26.000Z
|
# Generated by Django 2.1.3 on 2019-01-08 03:47
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('data', '0104_make_crid_foreign_key'),
]
operations = [
migrations.AlterField(
model_name='attachmentfile',
name='allegation',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachment_files', to='data.Allegation'),
),
migrations.AlterField(
model_name='attachmentrequest',
name='allegation',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Allegation'),
),
migrations.AlterField(
model_name='complainant',
name='allegation',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='data.Allegation'),
),
migrations.AlterField(
model_name='investigatorallegation',
name='allegation',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Allegation'),
),
migrations.AlterField(
model_name='involvement',
name='allegation',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Allegation'),
),
migrations.AlterField(
model_name='officerallegation',
name='allegation',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='data.Allegation'),
),
migrations.AlterField(
model_name='policewitness',
name='allegation',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='data.Allegation'),
),
migrations.AlterField(
model_name='victim',
name='allegation',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='victims', to='data.Allegation'),
),
]
| 38.163636
| 136
| 0.626489
| 208
| 2,099
| 6.211538
| 0.245192
| 0.06192
| 0.097523
| 0.153251
| 0.725232
| 0.725232
| 0.725232
| 0.690402
| 0.690402
| 0.690402
| 0
| 0.012071
| 0.250119
| 2,099
| 54
| 137
| 38.87037
| 0.808767
| 0.021439
| 0
| 0.625
| 1
| 0
| 0.177388
| 0.023392
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.041667
| 0
| 0.104167
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b496ec1d0c8cf711439882e3d59925392a18d84e
| 175
|
py
|
Python
|
news/__main__.py
|
ChaseKnowlden/vscode-jupyter
|
9bdaf87f0b6dcd717c508e9023350499a6093f97
|
[
"MIT"
] | 2,461
|
2016-01-21T16:40:43.000Z
|
2022-03-31T12:01:55.000Z
|
news/__main__.py
|
ChaseKnowlden/vscode-jupyter
|
9bdaf87f0b6dcd717c508e9023350499a6093f97
|
[
"MIT"
] | 12,536
|
2019-05-06T21:26:14.000Z
|
2022-03-31T23:06:48.000Z
|
news/__main__.py
|
vasili8m/vscode-python
|
846eee870e8b7bab38172600836faedb5fb80166
|
[
"MIT"
] | 871
|
2019-05-15T13:43:55.000Z
|
2022-03-31T03:04:35.000Z
|
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import runpy
runpy.run_module('announce', run_name='__main__', alter_sys=True)
| 25
| 65
| 0.777143
| 24
| 175
| 5.375
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 175
| 6
| 66
| 29.166667
| 0.837662
| 0.508571
| 0
| 0
| 0
| 0
| 0.192771
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b499efd036573c2aa5e1ba83249574847ddd41a9
| 503
|
py
|
Python
|
sqlalchemy_geonames/__init__.py
|
dionysio/sqlalchemy-geonames
|
0d2542cf53512b14415319f23ad53dc4994691a8
|
[
"BSD-2-Clause-FreeBSD"
] | 17
|
2015-02-24T20:20:49.000Z
|
2021-07-21T02:32:15.000Z
|
sqlalchemy_geonames/__init__.py
|
dionysio/sqlalchemy-geonames
|
0d2542cf53512b14415319f23ad53dc4994691a8
|
[
"BSD-2-Clause-FreeBSD"
] | 2
|
2016-11-13T17:00:26.000Z
|
2020-05-28T13:12:07.000Z
|
sqlalchemy_geonames/__init__.py
|
dionysio/sqlalchemy-geonames
|
0d2542cf53512b14415319f23ad53dc4994691a8
|
[
"BSD-2-Clause-FreeBSD"
] | 6
|
2015-03-28T12:23:50.000Z
|
2020-05-28T08:41:50.000Z
|
from .metadata import __version_info__, __version__ # noqa
from .models import (GeonameBase, GeonameMetadata, GeonameFeature, # noqa
GeonameTimezone, GeonameCountry, Geoname)
from .reader import (GeonameReader, GeonameFeatureReader, # noqa
GeonameTimezoneReader, GeonameCountryInfoReader,
GeonameHierarchyReader, GeonameAlternateNamesReader)
from .imports import get_importer_instances # noqa
from .files import filename_config # noqa
| 55.888889
| 74
| 0.733598
| 40
| 503
| 8.925
| 0.675
| 0.044818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2167
| 503
| 8
| 75
| 62.875
| 0.906091
| 0.047714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.625
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b4dd7844ed1606391aad34eb9d2a0ceafa7b50f7
| 892
|
py
|
Python
|
feature_extractor/utils.py
|
intelligent-control-lab/Autoenv
|
8d7697421ca14e317ea7de24b6acb694ecae5148
|
[
"MIT"
] | 4
|
2019-09-25T21:11:20.000Z
|
2020-07-30T03:46:26.000Z
|
feature_extractor/utils.py
|
intelligent-control-lab/Autoenv
|
8d7697421ca14e317ea7de24b6acb694ecae5148
|
[
"MIT"
] | null | null | null |
feature_extractor/utils.py
|
intelligent-control-lab/Autoenv
|
8d7697421ca14e317ea7de24b6acb694ecae5148
|
[
"MIT"
] | 1
|
2019-12-21T19:39:20.000Z
|
2019-12-21T19:39:20.000Z
|
from feature_extractor.CarLidarFeatureExtractor import CarLidarFeatureExtractor
from feature_extractor.CoreFeatureExtractor import CoreFeatureExtractor
from feature_extractor.ForeForeFeatureExtractor import ForeForeFeatureExtractor
from feature_extractor.TemporalFeatureExtractor import TemporalFeatureExtractor
from feature_extractor.WellBehavedFeatureExtractor import WellBehavedFeatureExtractor
from feature_extractor.feature_extractor import MultiFeatureExtractor
from feature_extractor import FeatureState
def build_feature_extractor(params={}):
subexts = list()
subexts.append(CoreFeatureExtractor())
subexts.append(TemporalFeatureExtractor())
subexts.append(WellBehavedFeatureExtractor())
subexts.append(CarLidarFeatureExtractor(20, carlidar_max_range=50.))
subexts.append(ForeForeFeatureExtractor())
ext = MultiFeatureExtractor(subexts)
return ext
| 42.47619
| 85
| 0.858744
| 74
| 892
| 10.189189
| 0.324324
| 0.190981
| 0.185676
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004926
| 0.089686
| 892
| 20
| 86
| 44.6
| 0.923645
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.0625
| false
| 0
| 0.4375
| 0
| 0.5625
| 0
| 0
| 0
| 1
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b4ec3b90472feb5ce1dd9d71084d6a94be0799ef
| 1,117
|
py
|
Python
|
Python/OOP/oop.py
|
abefrandsen/numerical_computing
|
90559f7c4f387885eb44ea7b1fa19bb602f496cb
|
[
"CC-BY-3.0"
] | 10
|
2016-10-18T19:54:25.000Z
|
2021-10-09T20:12:38.000Z
|
Python/OOP/oop.py
|
abefrandsen/numerical_computing
|
90559f7c4f387885eb44ea7b1fa19bb602f496cb
|
[
"CC-BY-3.0"
] | null | null | null |
Python/OOP/oop.py
|
abefrandsen/numerical_computing
|
90559f7c4f387885eb44ea7b1fa19bb602f496cb
|
[
"CC-BY-3.0"
] | 2
|
2017-05-14T16:07:59.000Z
|
2020-06-20T09:05:06.000Z
|
class ComplexNumber(object):
def __init__(self, real, imag):
self.real = real
self.imag = imag
def __add__(self, other):
return ComplexNumber(self.real+other.real, self.imag+other.imag)
def __sub__(self, other):
return ComplexNumber(self.real-other.real, self.imag-other.imag)
def __mul__(self, other):
r = self.real*other.real-(self.imag*other.imag)
i = self.real*other.imag+self.imag*other.real
return ComplexNumber(r, i)
def __div__(self, other):
conj = other.conjugate()
numer = self*conj
denom = float((other*conj).real)
return ComplexNumber(numer.real/denom, numer.imag/denom)
def conjugate(self):
return ComplexNumber(self.real, -self.imag)
def __repr__(self):
return "{}{:+}i".format(self.real, self.imag)
def norm(self):
return ComplexNumber((self.real**2+self.imag**2)**.5, 0)
def __eq__(self, other):
return self.real == other.real and self.imag == other.imag
def dist(self, other):
return self.norm() - other.norm()
| 30.189189
| 72
| 0.617726
| 146
| 1,117
| 4.534247
| 0.205479
| 0.120846
| 0.108761
| 0.163142
| 0.416918
| 0.247734
| 0.247734
| 0.247734
| 0.196375
| 0.196375
| 0
| 0.004739
| 0.244405
| 1,117
| 37
| 73
| 30.189189
| 0.779621
| 0
| 0
| 0
| 0
| 0
| 0.006261
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.37037
| false
| 0
| 0
| 0.259259
| 0.740741
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
3706382474ccdfe408d2c0d65b7a29a14c49389a
| 18
|
py
|
Python
|
data/studio21_generated/introductory/3320/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3320/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3320/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def oracle(arr):
| 9
| 16
| 0.666667
| 3
| 18
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 18
| 2
| 17
| 9
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3723f470a1ceaf44ef6e58c957237f097d67d311
| 50
|
py
|
Python
|
wsgi.py
|
delosrogers/clustergrammer-web
|
14102cfca328214d3bc8285e8331663fe0e5fad4
|
[
"MIT"
] | 5
|
2018-04-04T16:25:06.000Z
|
2021-04-10T23:47:20.000Z
|
wsgi.py
|
delosrogers/clustergrammer-web
|
14102cfca328214d3bc8285e8331663fe0e5fad4
|
[
"MIT"
] | 8
|
2016-07-16T02:55:12.000Z
|
2022-02-02T16:42:17.000Z
|
wsgi.py
|
delosrogers/clustergrammer-web
|
14102cfca328214d3bc8285e8331663fe0e5fad4
|
[
"MIT"
] | 4
|
2019-05-28T08:52:41.000Z
|
2021-01-11T22:14:48.000Z
|
from clustergrammer.app import app as application
| 25
| 49
| 0.86
| 7
| 50
| 6.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 50
| 1
| 50
| 50
| 0.977273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
2ea2932e2f6847f5546d3736772999ba8557bb88
| 27
|
py
|
Python
|
data/studio21_generated/introductory/3234/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3234/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3234/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def select_subarray(arr):
| 13.5
| 25
| 0.777778
| 4
| 27
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 27
| 2
| 26
| 13.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2eac5852dd84681220c6899b9e6acc73ac79b2a1
| 359
|
py
|
Python
|
app/db/__init__.py
|
lukecyx/fastlms
|
01ccc126f8067434698ea53f6274a23d69fc0120
|
[
"MIT"
] | null | null | null |
app/db/__init__.py
|
lukecyx/fastlms
|
01ccc126f8067434698ea53f6274a23d69fc0120
|
[
"MIT"
] | null | null | null |
app/db/__init__.py
|
lukecyx/fastlms
|
01ccc126f8067434698ea53f6274a23d69fc0120
|
[
"MIT"
] | null | null | null |
from app.db.db import AsyncMongoManager
from app.config.settings import get_db_settings
db_settings = get_db_settings()
db = AsyncMongoManager(db_settings)
async def get_db() -> AsyncMongoManager:
return db
# db_name = get_db_settings().DB_NAME
# client = AsyncIOMotorClient(get_db_settings().MONGO_DETAILS)
# db = client.get_database(name=db_name)
| 22.4375
| 62
| 0.788301
| 51
| 359
| 5.235294
| 0.333333
| 0.224719
| 0.194757
| 0.168539
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119777
| 359
| 15
| 63
| 23.933333
| 0.844937
| 0.376045
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
2ebdc64c33ca0a4657d5c00c8071f051d329f2ef
| 328
|
py
|
Python
|
game_over.py
|
Steven-Wilson/pyweek25
|
1547919a17973d0b13ed630bdb1d7285f07f2a5e
|
[
"MIT"
] | null | null | null |
game_over.py
|
Steven-Wilson/pyweek25
|
1547919a17973d0b13ed630bdb1d7285f07f2a5e
|
[
"MIT"
] | null | null | null |
game_over.py
|
Steven-Wilson/pyweek25
|
1547919a17973d0b13ed630bdb1d7285f07f2a5e
|
[
"MIT"
] | null | null | null |
import model
import pyxelen
from view import *
from sounds import *
from utils import *
def on_key_down(key, state):
return model.initial_model
def view(renderer, state):
renderer.draw_sprite(Image('images/game-over.png', FULLSCREEN), FULLSCREEN)
def on_update(state):
return state.set_music(MUSIC_GAME_OVER)
| 17.263158
| 79
| 0.756098
| 48
| 328
| 5
| 0.541667
| 0.083333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152439
| 328
| 18
| 80
| 18.222222
| 0.863309
| 0
| 0
| 0
| 0
| 0
| 0.060976
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.454545
| 0.181818
| 0.909091
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
2ed064568a75b86fb24700e24c8ab0082a44c6d4
| 698
|
py
|
Python
|
User.py
|
lavylipesh/The_Keeper
|
c8f3d9856b44266c7775bd644960e902b19b8d07
|
[
"MIT"
] | 1
|
2019-10-14T14:51:41.000Z
|
2019-10-14T14:51:41.000Z
|
User.py
|
lavylipesh/The_Keeper
|
c8f3d9856b44266c7775bd644960e902b19b8d07
|
[
"MIT"
] | null | null | null |
User.py
|
lavylipesh/The_Keeper
|
c8f3d9856b44266c7775bd644960e902b19b8d07
|
[
"MIT"
] | null | null | null |
import string
import random
class User:
"""
class that generates new instances of users
"""
user_list = []
def __init__(self,username,password):
'''
__init__ method that helps us define properties for our objects
'''
self.username = username
self.password = password
def create_user():
'''
method thhat helps us create our user
'''
def save_user(self):
'''
method that saves user objects into user_list
'''
User.user_list.append(self)
def generatePassword():
return ' '.join(random.choice(string.ascii_letters + string.digits) for i in range (10))
| 26.846154
| 96
| 0.590258
| 79
| 698
| 5.037975
| 0.531646
| 0.060302
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004211
| 0.319484
| 698
| 25
| 97
| 27.92
| 0.833684
| 0.273639
| 0
| 0
| 1
| 0
| 0.00237
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.25
| 0.166667
| 0.083333
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
2edf9bd6df7b909e0c12ad1ae30032eb13db21db
| 306
|
py
|
Python
|
01_strategy/duck/lib/quack_behaviors.py
|
denzow/practice-design-pattern
|
141d59c51375e36769a73b6ff135a8afae64b664
|
[
"MIT"
] | 1
|
2018-08-15T08:07:58.000Z
|
2018-08-15T08:07:58.000Z
|
01_strategy/duck/lib/quack_behaviors.py
|
denzow/practice-design-pattern
|
141d59c51375e36769a73b6ff135a8afae64b664
|
[
"MIT"
] | null | null | null |
01_strategy/duck/lib/quack_behaviors.py
|
denzow/practice-design-pattern
|
141d59c51375e36769a73b6ff135a8afae64b664
|
[
"MIT"
] | null | null | null |
# coding: utf-8
from abc import ABCMeta, abstractmethod
class QuackBehavior(metaclass=ABCMeta):
@abstractmethod
def quack(self):
pass
class Quack(QuackBehavior):
def quack(self):
print('くぁっくぁ')
class Squeak(QuackBehavior):
def quack(self):
print('キューキュー')
| 13.304348
| 39
| 0.653595
| 33
| 306
| 6.060606
| 0.575758
| 0.12
| 0.18
| 0.25
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00431
| 0.24183
| 306
| 22
| 40
| 13.909091
| 0.857759
| 0.042484
| 0
| 0.272727
| 0
| 0
| 0.037801
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0.090909
| 0.090909
| 0
| 0.636364
| 0.181818
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
2ef50669a2ab4c2fad58f1de63abb09ff01504f5
| 137
|
py
|
Python
|
fixtest/tests/__init__.py
|
kennt/fixtest
|
e68f06ba1ceb9d50c7c3b67e0293510f17597aef
|
[
"MIT"
] | 16
|
2015-04-17T12:52:21.000Z
|
2021-12-13T13:56:43.000Z
|
fixtest/tests/__init__.py
|
kennt/fixtest
|
e68f06ba1ceb9d50c7c3b67e0293510f17597aef
|
[
"MIT"
] | 4
|
2015-04-17T14:19:45.000Z
|
2022-02-11T03:40:14.000Z
|
fixtest/tests/__init__.py
|
kennt/fixtest
|
e68f06ba1ceb9d50c7c3b67e0293510f17597aef
|
[
"MIT"
] | 6
|
2015-04-17T12:54:29.000Z
|
2020-10-10T06:43:10.000Z
|
""" tests module for the FIX-specific modules for the fixtest tool.
Copyright (c) 2014 Kenn Takara
See LICENSE for details
"""
| 19.571429
| 67
| 0.70073
| 20
| 137
| 4.8
| 0.85
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037736
| 0.226277
| 137
| 6
| 68
| 22.833333
| 0.867925
| 0.868613
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2c222045d7bef8f68b6319db047c1755ec3c76ae
| 99
|
py
|
Python
|
vuetifyforms/apps.py
|
IronTooch/bounca
|
ad728c39ff8921ec38f924ed8ebcd088516b8438
|
[
"Apache-2.0"
] | 142
|
2016-06-01T18:53:31.000Z
|
2022-01-29T10:22:02.000Z
|
vuetifyforms/apps.py
|
IronTooch/bounca
|
ad728c39ff8921ec38f924ed8ebcd088516b8438
|
[
"Apache-2.0"
] | 32
|
2016-06-12T13:53:05.000Z
|
2022-03-22T21:09:40.000Z
|
vuetifyforms/apps.py
|
IronTooch/bounca
|
ad728c39ff8921ec38f924ed8ebcd088516b8438
|
[
"Apache-2.0"
] | 22
|
2017-12-19T21:29:38.000Z
|
2022-01-29T10:45:25.000Z
|
from django.apps import AppConfig
class VuetifyformsConfig(AppConfig):
name = "vuetifyforms"
| 16.5
| 36
| 0.777778
| 10
| 99
| 7.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151515
| 99
| 5
| 37
| 19.8
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
259457ba1a0ff19f14146fb8a6c1f1a1bdf1e0a1
| 128
|
py
|
Python
|
terrascript/data/hashicorp/random.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 507
|
2017-07-26T02:58:38.000Z
|
2022-01-21T12:35:13.000Z
|
terrascript/data/hashicorp/random.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 135
|
2017-07-20T12:01:59.000Z
|
2021-10-04T22:25:40.000Z
|
terrascript/data/hashicorp/random.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 81
|
2018-02-20T17:55:28.000Z
|
2022-01-31T07:08:40.000Z
|
# terrascript/data/hashicorp/random.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:25:40 UTC)
__all__ = []
| 21.333333
| 73
| 0.75
| 19
| 128
| 4.842105
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106195
| 0.117188
| 128
| 5
| 74
| 25.6
| 0.707965
| 0.84375
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
25b040241c0a044f031931d25cd41ac223563f53
| 142
|
py
|
Python
|
pp/__init__.py
|
Kuro-Rui/Honkertonken-Cogs
|
eaad1c5be1b3f71a0da25af559edbf8d77b6c21d
|
[
"MIT"
] | 2
|
2022-01-07T04:21:09.000Z
|
2022-01-26T22:41:26.000Z
|
pp/__init__.py
|
Kuro-Rui/Honkertonken-Cogs
|
eaad1c5be1b3f71a0da25af559edbf8d77b6c21d
|
[
"MIT"
] | 10
|
2022-01-07T04:33:33.000Z
|
2022-03-29T11:54:55.000Z
|
pp/__init__.py
|
Honkertonken/Cogs-V3
|
1f4ad84475c43bb6e98b29afa59e534dbffb60e3
|
[
"MIT"
] | 1
|
2022-01-28T02:35:17.000Z
|
2022-01-28T02:35:17.000Z
|
from .pp import Pp
__red_end_user_data_statement__ = "This cog does not store any end user data."
def setup(bot):
bot.add_cog(Pp(bot))
| 17.75
| 78
| 0.732394
| 26
| 142
| 3.653846
| 0.692308
| 0.147368
| 0.231579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176056
| 142
| 7
| 79
| 20.285714
| 0.811966
| 0
| 0
| 0
| 0
| 0
| 0.295775
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
25b15ba16a48bd64327f2a530092ecdd8ecb9b8d
| 264
|
py
|
Python
|
src/upgrade-scripts/upgrade/0002_example_script.py
|
aeolusproject/conductor
|
e7a87c96e0f351d54f2b7de6f4eebe2166048eea
|
[
"Apache-2.0"
] | 2
|
2016-07-25T11:30:22.000Z
|
2018-01-26T05:44:28.000Z
|
src/upgrade-scripts/upgrade/0002_example_script.py
|
aeolusproject/conductor
|
e7a87c96e0f351d54f2b7de6f4eebe2166048eea
|
[
"Apache-2.0"
] | 3
|
2021-05-20T00:50:24.000Z
|
2022-02-26T04:51:43.000Z
|
src/upgrade-scripts/upgrade/0002_example_script.py
|
aeolusproject/conductor
|
e7a87c96e0f351d54f2b7de6f4eebe2166048eea
|
[
"Apache-2.0"
] | 1
|
2015-10-19T08:41:16.000Z
|
2015-10-19T08:41:16.000Z
|
#!/usr/bin/python
#name: Example script 2
#apply: katello
#description: Empty python script
import sys
# TODO
print "Test script output"
print "Test script output 2"
sys.stdout.flush()
print >> sys.stderr, "Test script error output"
sys.stderr.flush()
exit(0)
| 15.529412
| 47
| 0.734848
| 40
| 264
| 4.85
| 0.575
| 0.154639
| 0.154639
| 0.216495
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013274
| 0.143939
| 264
| 17
| 48
| 15.529412
| 0.845133
| 0.337121
| 0
| 0
| 0
| 0
| 0.362573
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| null | null | 0
| 0.142857
| null | null | 0.428571
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
25babf5f76fe7e4c2fa08d8186f18394eda77e0b
| 976
|
py
|
Python
|
test/test_cases.py
|
mmatera/Mathics
|
3857068c5683ad688fb6cb441d1e4a215f0a0563
|
[
"Apache-2.0"
] | 3
|
2016-02-15T10:13:01.000Z
|
2021-04-01T03:18:42.000Z
|
test/test_cases.py
|
mmatera/Mathics
|
3857068c5683ad688fb6cb441d1e4a215f0a0563
|
[
"Apache-2.0"
] | 1
|
2016-10-17T16:40:26.000Z
|
2016-10-17T16:40:26.000Z
|
test/test_cases.py
|
mmatera/Mathics
|
3857068c5683ad688fb6cb441d1e4a215f0a0563
|
[
"Apache-2.0"
] | null | null | null |
from .helper import check_evaluation
def test_cases1():
expr ="""
Cases[FeynCalc`Contract`Private`times[
Pair[LorentzIndex[mu], Momentum[p]],
Pair[LorentzIndex[mu],
Momentum[p]]], (LorentzIndex | CartesianIndex)[
FeynCalc`Contract`Private`i_, ___] :>
FeynCalc`Contract`Private`i, Infinity, Heads -> True]
"""
res = "{mu, mu}"
check_evaluation(expr, res)
| 57.411765
| 141
| 0.268443
| 44
| 976
| 5.795455
| 0.568182
| 0.188235
| 0.270588
| 0.203922
| 0.211765
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003096
| 0.669057
| 976
| 16
| 142
| 61
| 0.786378
| 0
| 0
| 0
| 0
| 0
| 0.874872
| 0.142564
| 0
| 0
| 0
| 0
| 0
| 1
| 0.083333
| false
| 0
| 0.083333
| 0
| 0.166667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
25c5fc090360ac456739f2918b382feba83aa015
| 952
|
py
|
Python
|
FreeTAKServer/model/FTSModel/ChecklistDetails.py
|
logikal/FreeTakServer
|
c0916ce65781b5c60079d6440e52db8fc6ee0467
|
[
"MIT"
] | 27
|
2020-05-01T01:45:59.000Z
|
2020-07-03T00:17:13.000Z
|
FreeTAKServer/model/FTSModel/ChecklistDetails.py
|
logikal/FreeTakServer
|
c0916ce65781b5c60079d6440e52db8fc6ee0467
|
[
"MIT"
] | 34
|
2020-04-26T11:25:52.000Z
|
2020-07-03T21:06:34.000Z
|
FreeTAKServer/model/FTSModel/ChecklistDetails.py
|
logikal/FreeTakServer
|
c0916ce65781b5c60079d6440e52db8fc6ee0467
|
[
"MIT"
] | 15
|
2020-05-01T01:46:07.000Z
|
2020-07-03T12:14:04.000Z
|
from FreeTAKServer.model.FTSModel.fts_protocol_object import FTSProtocolObject
from FreeTAKServer.model.FTSModel.Name import Name
from FreeTAKServer.model.FTSModel.Uid import Uid
from FreeTAKServer.model.FTSModel.Description import Description
from FreeTAKServer.model.FTSModel.StartTime import StartTime
from FreeTAKServer.model.FTSModel.CreatorUid import CreatorUid
from FreeTAKServer.model.FTSModel.CreatorCallsign import CreatorCallsign
class ChecklistDetails(FTSProtocolObject):
@staticmethod
def Checklist():
checklistdetails = ChecklistDetails()
checklistdetails.name = Name.Checklist()
checklistdetails.uid = Uid.Checklist()
checklistdetails.description = Description.Checklist()
checklistdetails.starttime = StartTime.Checklist()
checklistdetails.creatoruid = CreatorUid.Checklist()
checklistdetails.creatorcallsign = CreatorCallsign.Checklist()
return checklistdetails
| 47.6
| 78
| 0.80042
| 85
| 952
| 8.941176
| 0.247059
| 0.156579
| 0.202632
| 0.276316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135504
| 952
| 19
| 79
| 50.105263
| 0.923451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.055556
| false
| 0
| 0.388889
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d303a7346971410699f5a39028044f6dbd0bfd80
| 1,154
|
py
|
Python
|
awwwards/migrations/0022_auto_20191021_1614.py
|
SteveMitto/awwwards
|
2564e6cd3bc87fa511f4f10e6f7e4d497f6aa82d
|
[
"MIT"
] | null | null | null |
awwwards/migrations/0022_auto_20191021_1614.py
|
SteveMitto/awwwards
|
2564e6cd3bc87fa511f4f10e6f7e4d497f6aa82d
|
[
"MIT"
] | 9
|
2020-06-06T00:04:01.000Z
|
2022-02-10T13:19:30.000Z
|
awwwards/migrations/0022_auto_20191021_1614.py
|
SteveMitto/awwwards
|
2564e6cd3bc87fa511f4f10e6f7e4d497f6aa82d
|
[
"MIT"
] | 1
|
2020-01-13T00:00:05.000Z
|
2020-01-13T00:00:05.000Z
|
# Generated by Django 2.2.5 on 2019-10-21 13:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('awwwards', '0021_auto_20191021_1546'),
]
operations = [
migrations.AlterField(
model_name='rating',
name='avarage',
field=models.DecimalField(blank=True, decimal_places=2, max_digits=3, null=True),
),
migrations.AlterField(
model_name='rating',
name='content',
field=models.DecimalField(decimal_places=2, max_digits=3),
),
migrations.AlterField(
model_name='rating',
name='creativity',
field=models.DecimalField(blank=True, decimal_places=2, max_digits=3, null=True),
),
migrations.AlterField(
model_name='rating',
name='design',
field=models.DecimalField(decimal_places=2, max_digits=3),
),
migrations.AlterField(
model_name='rating',
name='usability',
field=models.DecimalField(decimal_places=2, max_digits=3),
),
]
| 29.589744
| 93
| 0.582322
| 117
| 1,154
| 5.589744
| 0.376068
| 0.152905
| 0.191132
| 0.221713
| 0.70948
| 0.70948
| 0.649847
| 0.649847
| 0.649847
| 0.577982
| 0
| 0.050868
| 0.30156
| 1,154
| 38
| 94
| 30.368421
| 0.760546
| 0.038995
| 0
| 0.625
| 1
| 0
| 0.090334
| 0.020777
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.03125
| 0
| 0.125
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d30bb1b39856c9f378006f354788bd996e1cdf42
| 169
|
py
|
Python
|
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/common/models/__init__.py
|
mazdakb/django-naqsh
|
1ba19ebe74ed63d96eae9d226f1a0ebcfbb93e84
|
[
"BSD-3-Clause"
] | 50
|
2018-05-04T14:03:30.000Z
|
2021-08-05T19:29:47.000Z
|
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/common/models/__init__.py
|
mazdakb/django-naqsh
|
1ba19ebe74ed63d96eae9d226f1a0ebcfbb93e84
|
[
"BSD-3-Clause"
] | 143
|
2018-05-10T16:51:39.000Z
|
2021-02-27T15:25:44.000Z
|
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/common/models/__init__.py
|
mazdakb/django-naqsh
|
1ba19ebe74ed63d96eae9d226f1a0ebcfbb93e84
|
[
"BSD-3-Clause"
] | 3
|
2019-05-27T18:15:31.000Z
|
2020-04-05T14:31:35.000Z
|
# flake8: noqa
from .abstract import (
ActivatedModelManager,
ActivatedModelMixin,
SluggedModelMixin,
TimestampedModelMixin,
UniversalModelMixin,
)
| 16.9
| 26
| 0.739645
| 10
| 169
| 12.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007407
| 0.201183
| 169
| 9
| 27
| 18.777778
| 0.918519
| 0.071006
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.142857
| 0
| 0.142857
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d329476efa2b7cf0376f8d7206d59c403c467659
| 1,455
|
py
|
Python
|
test/test_ezsignfoldersignerassociation_response_compound_all_of.py
|
ezmaxinc/eZmax-SDK-python
|
6794b8001abfb7d9ae18a3b87aba164839b925a0
|
[
"MIT"
] | null | null | null |
test/test_ezsignfoldersignerassociation_response_compound_all_of.py
|
ezmaxinc/eZmax-SDK-python
|
6794b8001abfb7d9ae18a3b87aba164839b925a0
|
[
"MIT"
] | null | null | null |
test/test_ezsignfoldersignerassociation_response_compound_all_of.py
|
ezmaxinc/eZmax-SDK-python
|
6794b8001abfb7d9ae18a3b87aba164839b925a0
|
[
"MIT"
] | null | null | null |
"""
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.7
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import eZmaxApi
from eZmaxApi.model.ezsignfoldersignerassociation_response_compound_user import EzsignfoldersignerassociationResponseCompoundUser
from eZmaxApi.model.ezsignsigner_response_compound import EzsignsignerResponseCompound
globals()['EzsignfoldersignerassociationResponseCompoundUser'] = EzsignfoldersignerassociationResponseCompoundUser
globals()['EzsignsignerResponseCompound'] = EzsignsignerResponseCompound
from eZmaxApi.model.ezsignfoldersignerassociation_response_compound_all_of import EzsignfoldersignerassociationResponseCompoundAllOf
class TestEzsignfoldersignerassociationResponseCompoundAllOf(unittest.TestCase):
"""EzsignfoldersignerassociationResponseCompoundAllOf unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testEzsignfoldersignerassociationResponseCompoundAllOf(self):
"""Test EzsignfoldersignerassociationResponseCompoundAllOf"""
# FIXME: construct object with mandatory attributes with example values
# model = EzsignfoldersignerassociationResponseCompoundAllOf() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()
| 35.487805
| 132
| 0.805498
| 117
| 1,455
| 9.871795
| 0.564103
| 0.031169
| 0.044156
| 0.079654
| 0.107359
| 0.107359
| 0
| 0
| 0
| 0
| 0
| 0.00716
| 0.136082
| 1,455
| 40
| 133
| 36.375
| 0.911695
| 0.349828
| 0
| 0.176471
| 0
| 0
| 0.093819
| 0.084989
| 0
| 0
| 0
| 0.025
| 0
| 1
| 0.176471
| false
| 0.176471
| 0.352941
| 0
| 0.588235
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
d330e8477aa1f9561bd45b33c643913c5dd9cf62
| 141
|
py
|
Python
|
topmine_src/postprocess.py
|
yyht/topmine_py3
|
b5d124ab389c4389d97c1cb5ac81e4ec22e6cb86
|
[
"MIT"
] | 2
|
2019-11-27T01:59:02.000Z
|
2021-03-04T03:17:30.000Z
|
topmine_src/postprocess.py
|
yyht/topmine_py3
|
b5d124ab389c4389d97c1cb5ac81e4ec22e6cb86
|
[
"MIT"
] | null | null | null |
topmine_src/postprocess.py
|
yyht/topmine_py3
|
b5d124ab389c4389d97c1cb5ac81e4ec22e6cb86
|
[
"MIT"
] | 1
|
2019-04-08T19:22:31.000Z
|
2019-04-08T19:22:31.000Z
|
import numpy as np
def merge_single_char(phrase):
segment_lst = phrase[0].strip().split()
leng = [len(item) for item in segment_lst]
| 14.1
| 43
| 0.70922
| 23
| 141
| 4.173913
| 0.826087
| 0.208333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008547
| 0.170213
| 141
| 9
| 44
| 15.666667
| 0.811966
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d33d4e02bc0aa424a3bba771b030fd7e48bca843
| 9,499
|
py
|
Python
|
frinx_conductor_workers/netconf_worker_test.py
|
FRINXio/uniflow-micros
|
827542cea483ce3ebe73f72d982ec75a1c42aa19
|
[
"Apache-2.0"
] | null | null | null |
frinx_conductor_workers/netconf_worker_test.py
|
FRINXio/uniflow-micros
|
827542cea483ce3ebe73f72d982ec75a1c42aa19
|
[
"Apache-2.0"
] | null | null | null |
frinx_conductor_workers/netconf_worker_test.py
|
FRINXio/uniflow-micros
|
827542cea483ce3ebe73f72d982ec75a1c42aa19
|
[
"Apache-2.0"
] | 1
|
2021-03-29T01:08:21.000Z
|
2021-03-29T01:08:21.000Z
|
import json
from unittest.mock import patch
import unittest
import frinx_conductor_workers.netconf_worker
from frinx_conductor_workers.frinx_rest import uniconfig_url_base
netconf_node_connecting = {
"node": [
{
"node-id": "xr6",
"netconf-node-topology:host": "192.168.1.213",
"netconf-node-topology:connected-message": "Connecting",
"netconf-node-topology:connection-status": "connecting",
"netconf-node-topology:port": 830
}
]
}
netconf_node_connected = {
"node": [
{
"node-id": "xr6",
"netconf-node-topology:unavailable-capabilities": {
"unavailable-capability": []
},
"netconf-node-topology:available-capabilities": {
"available-capability": []
},
"netconf-node-topology:host": "192.168.1.213",
"netconf-node-topology:connected-message": "Success",
"netconf-node-topology:connection-status": "connected",
"netconf-node-topology:port": 830,
"topology-node-extension:node-type-fingerprint": "1319530689"
}
]
}
netconf_node_non_exist = {
"errors": {
"error": [
{
"error-message": "Request could not be completed because the relevant data model content does not exist",
"error-tag": "data-missing",
"error-type": "protocol"
}
]
}
}
bad_request_response = {
"errors": {
"error": [
{
"error-type": "protocol",
"error-tag": "data-missing",
"error-message": "Request could not be completed because the relevant data model content does not exist"
}
]
}
}
alarms_response = {
"alarms": {
"alarm": [
{
"id": "302/1",
"state": {
"severity": "openconfig-alarm-types:CRITICAL",
"id": "302",
"text": "Physical Port Link Down",
"time-created": 1597308680,
"resource": "GigabitEthernet0/0/1",
},
},
{
"id": "387/1",
"state": {
"severity": "openconfig-alarm-types:CRITICAL",
"id": "387",
"text": "Transceiver Missing - Link Down",
"time-created": 1597308667,
"resource": "subslot 0/0 transceiver container 2",
},
}
],
},
}
class MockResponse:
def __init__(self, content, status_code):
self.content = content
self.status_code = status_code
def json(self):
return self.content
class TestMount(unittest.TestCase):
def test_mount_new_device(self):
with patch('frinx_conductor_workers.netconf_worker.requests.post') as mock:
mock.return_value = MockResponse(bytes(json.dumps({}), encoding='utf-8'), 201)
request = frinx_conductor_workers.netconf_worker.execute_mount_netconf(
{"inputData": {"device_id": "xr6", "host": "192.168.1.1", "port": "830", "keepalive-delay": "1000",
"tcp-only": "false", "username": "name", "password": "password"}})
self.assertEqual(request["status"], "COMPLETED")
self.assertEqual(request["output"]["url"], uniconfig_url_base
+ "/operations/connection-manager:install-node")
self.assertEqual(request["output"]["response_code"], 201)
self.assertEqual(request["output"]["response_body"], {})
def test_mount_existing_device(self):
with patch('frinx_conductor_workers.netconf_worker.requests.post') as mock:
mock.return_value = MockResponse(bytes(json.dumps({}), encoding='utf-8'), 204)
request = frinx_conductor_workers.netconf_worker.execute_mount_netconf(
{"inputData": {"device_id": "xr6", "host": "192.168.1.1", "port": "830", "keepalive-delay": "1000",
"tcp-only": "false", "username": "name", "password": "password"}})
self.assertEqual(request["status"], "COMPLETED")
self.assertEqual(request["output"]["url"], uniconfig_url_base
+ "/operations/connection-manager:install-node")
self.assertEqual(request["output"]["response_code"], 204)
self.assertEqual(request["output"]["response_body"], {})
class TestUnmount(unittest.TestCase):
def test_unmount_existing_device(self):
with patch('frinx_conductor_workers.netconf_worker.requests.post') as mock:
mock.return_value = MockResponse(bytes(json.dumps({}), encoding='utf-8'), 204)
request = frinx_conductor_workers.netconf_worker.execute_unmount_netconf({"inputData": {"device_id": "xr6"}})
self.assertEqual(request["status"], "COMPLETED")
self.assertEqual(request["output"]["url"], uniconfig_url_base
+ "/operations/connection-manager:uninstall-node")
self.assertEqual(request["output"]["response_code"], 204)
self.assertEqual(request["output"]["response_body"], {})
class TestReadStructuredData(unittest.TestCase):
def test_read_structured_data_with_device(self):
with patch('frinx_conductor_workers.netconf_worker.requests.get') as mock:
mock.return_value = MockResponse(bytes(json.dumps(alarms_response), encoding='utf-8'), 200)
request = frinx_conductor_workers.netconf_worker.read_structured_data(
{"inputData": {"device_id": "xr5", "uri": "/openconfig-system/system/alarms"}})
self.assertEqual(request["status"], "COMPLETED")
self.assertEqual(request["output"]["url"],
uniconfig_url_base + "/data/network-topology:network-topology/topology=topology-netconf/node=xr5"
"/yang-ext:mount/openconfig-system/system/alarms")
self.assertEqual(request["output"]["response_code"], 200)
self.assertEqual(len(request["output"]["response_body"]["alarms"]["alarm"]), 2)
self.assertEqual(request["output"]["response_body"]["alarms"]["alarm"][0]["id"], "302/1")
self.assertEqual(request["output"]["response_body"]["alarms"]["alarm"][0]["state"]["text"],
"Physical Port Link Down")
self.assertEqual(request["output"]["response_body"]["alarms"]["alarm"][1]["id"], "387/1")
self.assertEqual(request["output"]["response_body"]["alarms"]["alarm"][1]["state"]["text"],
"Transceiver Missing - Link Down")
def test_read_structured_data_no_device(self):
with patch('frinx_conductor_workers.netconf_worker.requests.get') as mock:
mock.return_value = MockResponse(bytes(json.dumps(bad_request_response), encoding='utf-8'), 404)
request = frinx_conductor_workers.netconf_worker.read_structured_data(
{"inputData": {"device_id": "", "uri": "/openconfig-system/system/alarms"}})
self.assertEqual(request["status"], "FAILED")
self.assertEqual(request["output"]["response_code"], 404)
self.assertEqual(request["output"]["response_body"]['errors']['error'][0]["error-type"], "protocol")
self.assertEqual(request["output"]["response_body"]['errors']['error'][0]["error-message"],
"Request could not be completed because the relevant data model content does not exist")
class TestCheckCliConnected(unittest.TestCase):
def test_execute_check_connected_netconf_connecting(self):
with patch('frinx_conductor_workers.netconf_worker.requests.get') as mock:
mock.return_value = MockResponse(bytes(json.dumps(netconf_node_connecting), encoding='utf-8'), 200)
request = frinx_conductor_workers.netconf_worker.execute_check_connected_netconf({"inputData": {"device_id": "xr6"}})
self.assertEqual(request["status"], "FAILED")
self.assertEqual(request["output"]["url"], uniconfig_url_base
+ "/data/network-topology:network-topology/topology=topology-netconf"
"/node=xr6?content=nonconfig")
self.assertEqual(request["output"]["response_body"]["node"][0]["netconf-node-topology:connection-status"],
"connecting")
def test_execute_check_connected_netconf_connected(self):
with patch('frinx_conductor_workers.netconf_worker.requests.get') as mock:
mock.return_value = MockResponse(bytes(json.dumps(netconf_node_connected), encoding='utf-8'), 200)
request = frinx_conductor_workers.netconf_worker.execute_check_connected_netconf({"inputData": {"device_id": "xr6"}})
self.assertEqual(request["status"], "COMPLETED")
self.assertEqual(request["output"]["url"], uniconfig_url_base
+ "/data/network-topology:network-topology/topology=topology-netconf"
"/node=xr6?content=nonconfig")
self.assertEqual(request["output"]["response_body"]["node"][0]["netconf-node-topology:connection-status"],
"connected")
if __name__ == "__main__":
unittest.main()
| 48.464286
| 129
| 0.593115
| 935
| 9,499
| 5.84385
| 0.161497
| 0.082357
| 0.116764
| 0.112738
| 0.805637
| 0.753111
| 0.701135
| 0.683748
| 0.667643
| 0.605417
| 0
| 0.025264
| 0.262449
| 9,499
| 195
| 130
| 48.712821
| 0.754639
| 0
| 0
| 0.348837
| 0
| 0
| 0.335825
| 0.149174
| 0
| 0
| 0
| 0
| 0.174419
| 1
| 0.052326
| false
| 0.011628
| 0.02907
| 0.005814
| 0.116279
| 0.005814
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d33f9ea99a3408e2fcaa5440b0f9e85d20b8620b
| 189
|
py
|
Python
|
webApp/backend/src/models/__init__.py
|
DevinSit/dank-league-of-memeing-battlegrounds
|
282518150c2e68bca437e154005cd836d2cf0e6d
|
[
"MIT"
] | 2
|
2022-02-03T04:13:59.000Z
|
2022-02-03T20:12:20.000Z
|
webApp/backend/src/models/__init__.py
|
DevinSit/dank-league-of-memeing-battlegrounds
|
282518150c2e68bca437e154005cd836d2cf0e6d
|
[
"MIT"
] | null | null | null |
webApp/backend/src/models/__init__.py
|
DevinSit/dank-league-of-memeing-battlegrounds
|
282518150c2e68bca437e154005cd836d2cf0e6d
|
[
"MIT"
] | null | null | null |
from .keras_prediction import KerasPrediction
from .leaderboard_score import LeaderboardScore
from .meme_post import MemePost
__all__ = ["KerasPrediction", "LeaderboardScore", "MemePost"]
| 31.5
| 61
| 0.830688
| 19
| 189
| 7.894737
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 189
| 5
| 62
| 37.8
| 0.877193
| 0
| 0
| 0
| 0
| 0
| 0.206349
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d362c79a5a113c804a1dd094a8468577b1bca7c9
| 295
|
py
|
Python
|
helpers.py
|
adrianmrit/SummerAssistant
|
6afe9f3304dcee2d00066019a66120a53d87ff49
|
[
"MIT"
] | 5
|
2017-10-06T20:52:06.000Z
|
2021-04-22T10:00:35.000Z
|
helpers.py
|
adrianmrit/SummerAssistant
|
6afe9f3304dcee2d00066019a66120a53d87ff49
|
[
"MIT"
] | null | null | null |
helpers.py
|
adrianmrit/SummerAssistant
|
6afe9f3304dcee2d00066019a66120a53d87ff49
|
[
"MIT"
] | null | null | null |
def append_helper(initial_list, append_this):
if type(initial_list) is not list:
raise TypeError("initial_list must be a list")
if type(append_this) == list:
return initial_list + append_this
else:
initial_list.append(append_this)
return initial_list
| 32.777778
| 54
| 0.691525
| 41
| 295
| 4.707317
| 0.414634
| 0.341969
| 0.264249
| 0.217617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.237288
| 295
| 8
| 55
| 36.875
| 0.857778
| 0
| 0
| 0
| 0
| 0
| 0.091525
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0
| 0
| 0.375
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d37384f994a6d59d1df9c282ec74f75ce3c7fd71
| 4,047
|
py
|
Python
|
lm_eval/tasks/quac.py
|
konstantinschulz/lm-evaluation-harness
|
b0acb3379d2fa8e15561cea033be422bff144f30
|
[
"MIT"
] | null | null | null |
lm_eval/tasks/quac.py
|
konstantinschulz/lm-evaluation-harness
|
b0acb3379d2fa8e15561cea033be422bff144f30
|
[
"MIT"
] | null | null | null |
lm_eval/tasks/quac.py
|
konstantinschulz/lm-evaluation-harness
|
b0acb3379d2fa8e15561cea033be422bff144f30
|
[
"MIT"
] | null | null | null |
"""
QuAC: Question Answering in Context
https://arxiv.org/abs/1808.07036
Question Answering in Context (QuAC) is a dataset for modeling, understanding, and
participating in information seeking dialog. Data instances consist of an interactive
dialog between two crowd workers: (1) a student who poses a sequence of freeform
questions to learn as much as possible about a hidden Wikipedia text, and (2)
a teacher who answers the questions by providing short excerpts (spans) from the text.
Homepage: https://quac.ai/
"""
import inspect
import lm_eval.datasets.quac.quac
from lm_eval.base import Task
_CITATION = """
@article{choi2018quac,
title={Quac: Question answering in context},
author={Choi, Eunsol and He, He and Iyyer, Mohit and Yatskar, Mark and Yih, Wen-tau and Choi, Yejin and Liang, Percy and Zettlemoyer, Luke},
journal={arXiv preprint arXiv:1808.07036},
year={2018}
}
"""
class QuAC(Task):
VERSION = 0
DATASET_PATH = inspect.getfile(lm_eval.datasets.quac.quac)
DATASET_NAME = None
def has_training_docs(self):
return True
def has_validation_docs(self):
return True
def has_test_docs(self):
return False
def training_docs(self):
if self._training_docs is None:
self._training_docs = list(map(self._process_doc, self.dataset["train"]))
return self._training_docs
def validation_docs(self):
return map(self._process_doc, self.dataset["validation"])
def test_docs(self):
raise NotImplementedError("QuAC has no test docs.")
def _process_doc(self, doc):
doc["title"] = doc["title"] + " - " + doc["section_title"]
return doc
def doc_to_text(self, doc):
return (
"TITLE: "
+ doc["title"]
+ "\n"
+ "PARAGRAPH: "
+ doc["paragraph"]
+ "\n\n"
+ "Q: "
+ doc["question"]
+ "\n\n"
+ "A: "
)
def should_decontaminate(self):
return True
def doc_to_decontamination_query(self, doc):
return doc["paragraph"]
def doc_to_target(self, doc):
return doc["answer"]
def construct_requests(self, doc, ctx):
"""Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM.
:param doc:
The document as returned from training_docs, validation_docs, or test_docs.
:param ctx: str
The context string, generated by fewshot_context. This includes the natural
language description, as well as the few shot examples, and the question
part of the document for `doc`.
"""
# TODO: implement evaluation.
raise NotImplementedError("Evaluation not implemented")
def process_results(self, doc, results):
"""Take a single document and the LM results and evaluates, returning a
dict where keys are the names of submetrics and values are the values of
the metric for that one document
:param doc:
The document as returned from training_docs, validation_docs, or test_docs.
:param results:
The results of the requests created in construct_requests.
"""
# TODO: implement evaluation.
raise NotImplementedError("Evaluation not implemented")
def aggregation(self):
"""
:returns: {str: [float] -> float}
A dictionary where keys are the names of submetrics and values are
functions that aggregate a list of metrics
"""
# TODO: implement evaluation.
raise NotImplementedError("Evaluation not implemented")
def higher_is_better(self):
"""
:returns: {str: bool}
A dictionary where keys are the names of submetrics and values are
whether a higher value of the submetric is better
"""
# TODO: implement evaluation.
raise NotImplementedError("Evaluation not implemented")
| 32.637097
| 144
| 0.642945
| 503
| 4,047
| 5.077535
| 0.375746
| 0.03289
| 0.021926
| 0.043853
| 0.314409
| 0.273688
| 0.232968
| 0.232968
| 0.205168
| 0.118246
| 0
| 0.009881
| 0.274771
| 4,047
| 123
| 145
| 32.902439
| 0.860307
| 0.415369
| 0
| 0.152542
| 0
| 0.016949
| 0.24289
| 0.010256
| 0
| 0
| 0
| 0.03252
| 0
| 1
| 0.254237
| false
| 0
| 0.050847
| 0.135593
| 0.542373
| 0.016949
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
d377db0598548d642b98de0dc4810f306e517333
| 151
|
py
|
Python
|
foo-d-service/api.py
|
diversemix/foo-d
|
0a800a8efdce10e4590307f03615b203bd981c72
|
[
"MIT"
] | null | null | null |
foo-d-service/api.py
|
diversemix/foo-d
|
0a800a8efdce10e4590307f03615b203bd981c72
|
[
"MIT"
] | 1
|
2019-09-16T08:45:31.000Z
|
2019-09-16T08:45:31.000Z
|
foo-d-service/api.py
|
diversemix/foo-d
|
0a800a8efdce10e4590307f03615b203bd981c72
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" This file will contain the webui endpoints for the web Application
Too small so moved for now.
"""
| 18.875
| 70
| 0.675497
| 24
| 151
| 4.25
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00813
| 0.18543
| 151
| 7
| 71
| 21.571429
| 0.821138
| 0.913907
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6c9fccbf43ae31616aa147cde2bcd3468842742f
| 181
|
py
|
Python
|
huey/constants.py
|
vb8448/huey
|
345857dd01293af70a3a72dcb8052e34b38574b1
|
[
"MIT"
] | 3,676
|
2015-01-02T22:43:04.000Z
|
2022-03-31T05:29:02.000Z
|
huey/constants.py
|
vb8448/huey
|
345857dd01293af70a3a72dcb8052e34b38574b1
|
[
"MIT"
] | 542
|
2015-01-15T17:18:52.000Z
|
2022-03-16T19:18:55.000Z
|
huey/constants.py
|
vb8448/huey
|
345857dd01293af70a3a72dcb8052e34b38574b1
|
[
"MIT"
] | 385
|
2015-01-08T05:02:58.000Z
|
2022-03-17T12:27:38.000Z
|
WORKER_THREAD = 'thread'
WORKER_GREENLET = 'greenlet'
WORKER_PROCESS = 'process'
WORKER_TYPES = (WORKER_THREAD, WORKER_GREENLET, WORKER_PROCESS)
class EmptyData(object):
pass
| 20.111111
| 63
| 0.779006
| 21
| 181
| 6.380952
| 0.428571
| 0.179104
| 0.298507
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127072
| 181
| 8
| 64
| 22.625
| 0.848101
| 0
| 0
| 0
| 0
| 0
| 0.116022
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0
| 0
| 0.166667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
6cae0f410ab52a0c8ae7d1a7c920ee3aff401a61
| 46
|
py
|
Python
|
connector/__init__.py
|
BranKein/GIST-EC4206-BE
|
e9f3ccb0e90a991ef158e305b6cb24523d0e8985
|
[
"MIT"
] | null | null | null |
connector/__init__.py
|
BranKein/GIST-EC4206-BE
|
e9f3ccb0e90a991ef158e305b6cb24523d0e8985
|
[
"MIT"
] | null | null | null |
connector/__init__.py
|
BranKein/GIST-EC4206-BE
|
e9f3ccb0e90a991ef158e305b6cb24523d0e8985
|
[
"MIT"
] | null | null | null |
from .mysql import MySQL
__all__ = ['MySQL']
| 11.5
| 24
| 0.695652
| 6
| 46
| 4.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 46
| 3
| 25
| 15.333333
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0.108696
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6cb7eb9dfbc669ed371a53c29f34e39816ccd850
| 340
|
py
|
Python
|
client.py
|
lucasoldaini/w2v_client_server
|
bf197527688cacd877e26a305ac3d59cba24df24
|
[
"Unlicense"
] | null | null | null |
client.py
|
lucasoldaini/w2v_client_server
|
bf197527688cacd877e26a305ac3d59cba24df24
|
[
"Unlicense"
] | null | null | null |
client.py
|
lucasoldaini/w2v_client_server
|
bf197527688cacd877e26a305ac3d59cba24df24
|
[
"Unlicense"
] | null | null | null |
try:
from MinimalServer import MinimalClient
from server import W2VServer
except ImportError:
from .MinimalServer import MinimalClient
from .server import W2VServer
def get_w2v_client(host='localhost', port=7443):
client = MinimalClient(W2VServer,
host=host, port=port, buffersize=4096
)
return client
| 24.285714
| 48
| 0.735294
| 38
| 340
| 6.526316
| 0.526316
| 0.137097
| 0.185484
| 0.290323
| 0.491935
| 0.491935
| 0.491935
| 0.491935
| 0
| 0
| 0
| 0.04428
| 0.202941
| 340
| 13
| 49
| 26.153846
| 0.870849
| 0
| 0
| 0
| 0
| 0
| 0.026471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.090909
| false
| 0
| 0.454545
| 0
| 0.636364
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6cc4ff6c8544f322e8f6700f725f4455537c5676
| 417
|
py
|
Python
|
Waveforms/results/hAsymmetric_3_0.py
|
keefemitman/PostNewtonian
|
853d6577cb0002da5eebe1cb55f0c28fbc114324
|
[
"MIT"
] | 18
|
2015-03-26T01:04:36.000Z
|
2022-02-01T19:26:21.000Z
|
Waveforms/results/hAsymmetric_3_0.py
|
keefemitman/PostNewtonian
|
853d6577cb0002da5eebe1cb55f0c28fbc114324
|
[
"MIT"
] | 4
|
2015-01-08T23:46:29.000Z
|
2017-09-20T19:13:51.000Z
|
Waveforms/results/hAsymmetric_3_0.py
|
keefemitman/PostNewtonian
|
853d6577cb0002da5eebe1cb55f0c28fbc114324
|
[
"MIT"
] | 3
|
2016-05-13T02:36:14.000Z
|
2021-11-23T21:36:32.000Z
|
-sqrt(210)*sqrt(pi)*nu*(101*Gm*S_lambda*delta*nu + 41*Gm*S_lambda*delta - 479*Gm*Sigma_lambda*nu**2 + 20*Gm*Sigma_lambda*nu + 29*Gm*Sigma_lambda - 147*S_lambda*delta*nu*r(0)*v(0)**2 + 33*S_lambda*delta*r(0)*v(0)**2 + 687*Sigma_lambda*nu**2*r(0)*v(0)**2 - 306*Sigma_lambda*nu*r(0)*v(0)**2 + 33*Sigma_lambda*r(0)*v(0)**2 + 18*c**2*(3*S_lambda*delta - 11*Sigma_lambda*nu + 3*Sigma_lambda)*r(0))*r(0)*v(0)**10/(1890*c**5)
| 417
| 417
| 0.657074
| 101
| 417
| 2.584158
| 0.287129
| 0.337165
| 0.068966
| 0.091954
| 0.126437
| 0.068966
| 0.068966
| 0
| 0
| 0
| 0
| 0.157761
| 0.057554
| 417
| 1
| 417
| 417
| 0.506361
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6cd02330d75c5bceba04a69405849995c76c9a97
| 55
|
py
|
Python
|
pyAutoGUI.py
|
FJen180835/Boothcamp2021
|
1cbf7a050aa002c7158450494e5e842ae03d15be
|
[
"MIT"
] | null | null | null |
pyAutoGUI.py
|
FJen180835/Boothcamp2021
|
1cbf7a050aa002c7158450494e5e842ae03d15be
|
[
"MIT"
] | null | null | null |
pyAutoGUI.py
|
FJen180835/Boothcamp2021
|
1cbf7a050aa002c7158450494e5e842ae03d15be
|
[
"MIT"
] | null | null | null |
# pyautogui
import pyautogui
pyautogui.position()
| 11
| 21
| 0.745455
| 5
| 55
| 8.2
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 55
| 4
| 22
| 13.75
| 0.911111
| 0.163636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6cf51db9e938da6469c9bf9f5f5aa83a0ebeed8d
| 1,456
|
py
|
Python
|
app/models/UserModel.py
|
leossoaress/isystems-challenge
|
7caf9181183ec061d385f5333ea018163ea4903a
|
[
"MIT"
] | null | null | null |
app/models/UserModel.py
|
leossoaress/isystems-challenge
|
7caf9181183ec061d385f5333ea018163ea4903a
|
[
"MIT"
] | null | null | null |
app/models/UserModel.py
|
leossoaress/isystems-challenge
|
7caf9181183ec061d385f5333ea018163ea4903a
|
[
"MIT"
] | null | null | null |
import datetime
from app.models import db, bcrypt
class UserModel(db.Model):
__tablename__ = "user"
id = db.Column(db.Integer, primary_key=True)
fullname = db.Column(db.String(256), nullable=False)
email = db.Column(db.String(256), nullable=False, unique=True)
password = db.Column(db.String(1024), nullable=False)
isAdmin = db.Column(db.Boolean, default=False)
createdAt = db.Column(db.DateTime)
updatedAt = db.Column(db.DateTime)
orgUsers = db.relationship("OrgUserModel")
orgs = db.relationship("OrgModel", secondary="orgUser")
def __init__(self, data):
self.fullname = data.get('fullname')
self.email = data.get('email')
self.password = self.generateHash(data.get('password'))
self.isAdmin = data.get('isAdmin')
self.createdAt = datetime.datetime.utcnow()
self.updatedAt = datetime.datetime.utcnow()
def generateHash(self, password):
return bcrypt.generate_password_hash(password, rounds=10).decode("utf-8")
def checkHash(self, password):
return bcrypt.check_password_hash(self.password, password)
def save(self):
db.session.add(self)
db.session.commit()
@staticmethod
def getById(id):
return UserModel.query.get(id)
@staticmethod
def getByEmail(email):
return UserModel.query.filter_by(email=email).first()
@staticmethod
def getAll():
return UserModel.query.all()
def __repr__(self):
return "<User %r>" % self.email
| 29.12
| 77
| 0.699176
| 184
| 1,456
| 5.434783
| 0.38587
| 0.056
| 0.07
| 0.048
| 0.064
| 0.064
| 0.064
| 0
| 0
| 0
| 0
| 0.010691
| 0.164835
| 1,456
| 50
| 78
| 29.12
| 0.811678
| 0
| 0
| 0.078947
| 0
| 0
| 0.050103
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.210526
| false
| 0.157895
| 0.052632
| 0.157895
| 0.710526
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
6cfbbaca36151421b4a1c147e1794ac1845331ed
| 514
|
py
|
Python
|
example/views.py
|
ngalkov/Vial
|
514fd8ad878ae64ed34d5967ab47a08bca584752
|
[
"MIT"
] | null | null | null |
example/views.py
|
ngalkov/Vial
|
514fd8ad878ae64ed34d5967ab47a08bca584752
|
[
"MIT"
] | null | null | null |
example/views.py
|
ngalkov/Vial
|
514fd8ad878ae64ed34d5967ab47a08bca584752
|
[
"MIT"
] | 1
|
2022-02-09T18:54:14.000Z
|
2022-02-09T18:54:14.000Z
|
from vial import Response, Status, render_template
def index(environ):
content = render_template("index.html", {})
return Response(content, Status.OK)
def hello(environ):
content = render_template("hello.html", {})
return Response(content, Status.OK)
def item(environ, item_id):
content = render_template("item.html", {"item_id": item_id})
return Response(content, Status.OK)
def logo(environ):
content = render_template("logo.html", {})
return Response(content, Status.OK)
| 23.363636
| 64
| 0.700389
| 65
| 514
| 5.415385
| 0.276923
| 0.198864
| 0.238636
| 0.306818
| 0.389205
| 0.389205
| 0.204545
| 0
| 0
| 0
| 0
| 0
| 0.163424
| 514
| 21
| 65
| 24.47619
| 0.818605
| 0
| 0
| 0.307692
| 0
| 0
| 0.087549
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.307692
| false
| 0
| 0.076923
| 0
| 0.692308
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9f429477ad491de4a37669df327a5c59ed0e100a
| 207
|
py
|
Python
|
29/09/7.py
|
pylangstudy/201705
|
c69de524faa67fa2d96267d5a51ed9794208f0e4
|
[
"CC0-1.0"
] | null | null | null |
29/09/7.py
|
pylangstudy/201705
|
c69de524faa67fa2d96267d5a51ed9794208f0e4
|
[
"CC0-1.0"
] | 38
|
2017-05-25T07:08:48.000Z
|
2017-05-31T01:42:41.000Z
|
29/09/7.py
|
pylangstudy/201705
|
c69de524faa67fa2d96267d5a51ed9794208f0e4
|
[
"CC0-1.0"
] | null | null | null |
def func(arg, opt=1, *args, **kwargs):
print(arg, opt, args, kwargs)
func(0)
func(0, 10)
func(0, 10, 20)
func(0, 10, 20, 30)
func(0, 10, 20, 30, key='value')
func(0, 10, 20, 30, key='value', key2='v2')
| 20.7
| 43
| 0.584541
| 42
| 207
| 2.880952
| 0.380952
| 0.247934
| 0.289256
| 0.297521
| 0.404959
| 0.31405
| 0.31405
| 0
| 0
| 0
| 0
| 0.19186
| 0.169082
| 207
| 9
| 44
| 23
| 0.511628
| 0
| 0
| 0
| 0
| 0
| 0.057971
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0
| 0
| 0.125
| 0.125
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9f5bb6a75176eaedb1c0a0e19eb7043c49729b4e
| 274
|
py
|
Python
|
tunacell/io/__init__.py
|
HuggyHugMe/tunacell
|
5a7a7a58bbb557098d6638e896aa784ecc37d639
|
[
"MIT"
] | null | null | null |
tunacell/io/__init__.py
|
HuggyHugMe/tunacell
|
5a7a7a58bbb557098d6638e896aa784ecc37d639
|
[
"MIT"
] | 3
|
2017-08-10T11:19:01.000Z
|
2019-08-11T11:11:00.000Z
|
tunacell/io/__init__.py
|
HuggyHugMe/tunacell
|
5a7a7a58bbb557098d6638e896aa784ecc37d639
|
[
"MIT"
] | 5
|
2017-08-08T22:31:24.000Z
|
2021-08-06T04:08:08.000Z
|
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
This module defines input/output functions.
Text
----
.. automodule:: tunacell.io.text
:members:
Sniff
-----
.. automodule:: tunacell.io.sniff
:members:
HDF5
----
.. automodule:: tunacell.io.h5
:members:
"""
| 11.416667
| 43
| 0.613139
| 31
| 274
| 5.419355
| 0.677419
| 0.321429
| 0.357143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017621
| 0.171533
| 274
| 23
| 44
| 11.913043
| 0.722467
| 0.956204
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9f653edd7b0f22c85741462d01c9b907c3f13d44
| 482
|
py
|
Python
|
Workshop 1/Exercises/Drawing Boxes/Step 7.py
|
ATLAS-P/Python-Introduction
|
1baed0ec1fc67a3578b68667cbebbae144bf8450
|
[
"MIT"
] | 2
|
2016-10-26T09:57:05.000Z
|
2018-06-27T11:47:33.000Z
|
Workshop 1/Exercises/Drawing Boxes/Step 7.py
|
ATLAS-P/Introduction
|
1baed0ec1fc67a3578b68667cbebbae144bf8450
|
[
"MIT"
] | null | null | null |
Workshop 1/Exercises/Drawing Boxes/Step 7.py
|
ATLAS-P/Introduction
|
1baed0ec1fc67a3578b68667cbebbae144bf8450
|
[
"MIT"
] | null | null | null |
'''
The function has been made even more general by parameterizing the size of one sub box.
'''
def drawBox(length, cellSize):
for i in range(length):
printBoxLines(length, cellSize, "*", "---", 1)
printBoxLines(length, cellSize, "|", " ", cellSize)
printBoxLines(length, cellSize, "*", "---", 1)
def printBoxLines(length, cellSize, char1, char2, n):
for i in range(n):
print((char1 + (char2 * cellSize)) * length + char1)
drawBox(10, 1)
| 25.368421
| 87
| 0.622407
| 58
| 482
| 5.172414
| 0.517241
| 0.233333
| 0.36
| 0.073333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026596
| 0.219917
| 482
| 18
| 88
| 26.777778
| 0.771277
| 0.180498
| 0
| 0.222222
| 0
| 0
| 0.031008
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0
| 0
| 0.222222
| 0.555556
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
9f9ddc567c25c5efc4d4df330e8defc70458cdb2
| 168
|
py
|
Python
|
src/15/writing_an_extension_function_that_operates_on_arrays/example.py
|
tuanavu/python-gitbook
|
948a05e065b0f40afbfd22f697dff16238163cde
|
[
"MIT"
] | 14
|
2017-05-20T04:06:46.000Z
|
2022-01-23T06:48:45.000Z
|
src/15/writing_an_extension_function_that_operates_on_arrays/example.py
|
tuanavu/python-gitbook
|
948a05e065b0f40afbfd22f697dff16238163cde
|
[
"MIT"
] | 1
|
2021-06-10T20:17:55.000Z
|
2021-06-10T20:17:55.000Z
|
src/15/writing_an_extension_function_that_operates_on_arrays/example.py
|
tuanavu/python-gitbook
|
948a05e065b0f40afbfd22f697dff16238163cde
|
[
"MIT"
] | 15
|
2017-03-29T17:57:33.000Z
|
2021-08-24T02:20:08.000Z
|
import array
from sample import avg
print(avg(array.array('d',[1,2,3])))
try:
import numpy
print(avg(numpy.array([1., 2., 3.])))
except ImportError:
pass
| 15.272727
| 41
| 0.642857
| 27
| 168
| 4
| 0.555556
| 0.148148
| 0.055556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0.178571
| 168
| 10
| 42
| 16.8
| 0.73913
| 0
| 0
| 0
| 0
| 0
| 0.005988
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.125
| 0.5
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
4c9f8f4cd7095a333b9903acf605879b257b9c25
| 591
|
py
|
Python
|
hivemind/compression/__init__.py
|
nunoedgarhubsoftphotoflow/hivemind
|
395af50a337679a66ec21bcb6f70e8c4ce8c0f2b
|
[
"MIT"
] | 6
|
2020-03-11T17:52:24.000Z
|
2020-03-23T07:27:12.000Z
|
hivemind/compression/__init__.py
|
nunoedgarhubsoftphotoflow/hivemind
|
395af50a337679a66ec21bcb6f70e8c4ce8c0f2b
|
[
"MIT"
] | 14
|
2020-03-01T21:07:05.000Z
|
2020-03-28T17:54:50.000Z
|
hivemind/compression/__init__.py
|
learning-at-home/tesseract
|
c6b2b2d84ccfc890314a2bfece8eef238372d410
|
[
"MIT"
] | null | null | null |
"""
Compression strategies that reduce the network communication in .averaging, .optim and .moe
"""
from hivemind.compression.adaptive import PerTensorCompression, RoleAdaptiveCompression, SizeAdaptiveCompression
from hivemind.compression.base import CompressionBase, CompressionInfo, NoCompression, TensorRole
from hivemind.compression.floating import Float16Compression, ScaledFloat16Compression
from hivemind.compression.quantization import Quantile8BitQuantization, Uniform8BitQuantization
from hivemind.compression.serialization import deserialize_torch_tensor, serialize_torch_tensor
| 59.1
| 112
| 0.879865
| 54
| 591
| 9.555556
| 0.648148
| 0.116279
| 0.222868
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010949
| 0.072758
| 591
| 9
| 113
| 65.666667
| 0.930657
| 0.153976
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4cd9481798f4a603b7012e1e4b42649ff8973906
| 111
|
py
|
Python
|
Math/algebra/addition/python/add.py
|
rishiosaur/beginners-only
|
5466f99ccf7f32ba20f911a79d2cc6015a27b6e9
|
[
"MIT"
] | 16
|
2019-10-06T13:31:17.000Z
|
2022-02-17T12:49:05.000Z
|
Math/algebra/addition/python/add.py
|
rishiosaur/beginners-only
|
5466f99ccf7f32ba20f911a79d2cc6015a27b6e9
|
[
"MIT"
] | 26
|
2019-10-05T06:11:35.000Z
|
2020-11-17T13:16:02.000Z
|
Math/algebra/addition/python/add.py
|
rishiosaur/beginners-only
|
5466f99ccf7f32ba20f911a79d2cc6015a27b6e9
|
[
"MIT"
] | 88
|
2019-10-05T08:16:46.000Z
|
2021-10-01T09:24:39.000Z
|
def add(first,second):
"""Adds two numbers"""
return first + second
if __name__ == "__main__":
add(2,3)
| 15.857143
| 26
| 0.63964
| 16
| 111
| 3.9375
| 0.8125
| 0.349206
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022222
| 0.189189
| 111
| 6
| 27
| 18.5
| 0.677778
| 0.144144
| 0
| 0
| 0
| 0
| 0.089888
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4cee1845a1987c68edb177312413b10089f48b7a
| 139
|
py
|
Python
|
math_so/__init__.py
|
OleBo/MathSo
|
1f9fa0492d467c0bb0479768c503eee7723ae777
|
[
"MIT"
] | 1
|
2022-01-08T23:52:57.000Z
|
2022-01-08T23:52:57.000Z
|
math_so/__init__.py
|
OleBo/MathSo
|
1f9fa0492d467c0bb0479768c503eee7723ae777
|
[
"MIT"
] | null | null | null |
math_so/__init__.py
|
OleBo/MathSo
|
1f9fa0492d467c0bb0479768c503eee7723ae777
|
[
"MIT"
] | 1
|
2022-01-02T21:14:30.000Z
|
2022-01-02T21:14:30.000Z
|
"""
some usefull functions
"""
__version__ = '0.1.0'
from .animate_bisection import (animate_bisection)
__all__ = ['animate_bisection']
| 13.9
| 50
| 0.733813
| 16
| 139
| 5.6875
| 0.6875
| 0.527473
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.024793
| 0.129496
| 139
| 9
| 51
| 15.444444
| 0.727273
| 0.158273
| 0
| 0
| 0
| 0
| 0.201835
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e224d0696c1af16e73129442343ada2d4715b48e
| 3,395
|
py
|
Python
|
289_Game-of-Life.py
|
Coalin/Daily-LeetCode-Exercise
|
a064dcdc3a82314be4571d342c4807291a24f69f
|
[
"MIT"
] | 3
|
2018-07-05T05:51:10.000Z
|
2019-05-04T08:35:44.000Z
|
289_Game-of-Life.py
|
Coalin/Daily-LeetCode-Exercise
|
a064dcdc3a82314be4571d342c4807291a24f69f
|
[
"MIT"
] | null | null | null |
289_Game-of-Life.py
|
Coalin/Daily-LeetCode-Exercise
|
a064dcdc3a82314be4571d342c4807291a24f69f
|
[
"MIT"
] | null | null | null |
class Solution:
def gameOfLife(self, board):
"""
:type board: List[List[int]]
:rtype: void Do not return anything, modify board in-place instead.
"""
if not board:
return board
last = copy.deepcopy(board)
for i in range(len(board)):
for j in range(len(board[0])):
cur_count = self.findCount(last, i, j)
print(cur_count)
if board[i][j] == 1:
if cur_count < 2 or cur_count > 3:
board[i][j] = 0
else:
if cur_count == 3:
board[i][j] = 1
def findCount(self, board, i, j):
count = 0
if len(board) == 1 and len(board[0]) == 1:
return 0
if len(board[0]) == 1:
try:
count += board[i][j-1]
except:
pass
try:
count += board[i][j+1]
except:
pass
return count
if len(board) == 1:
try:
count += board[i-1][j]
except:
pass
try:
count += board[i+1][j]
except:
pass
return count
if i > 0 and i < len(board)-1 and j > 0 and j < len(board[0])-1:
count += board[i-1][j]
count += board[i-1][j-1]
count += board[i-1][j+1]
count += board[i][j-1]
count += board[i][j+1]
count += board[i+1][j-1]
count += board[i+1][j]
count += board[i+1][j+1]
return count
if i == 0 and j == 0:
count += board[i][j+1]
count += board[i+1][j]
count += board[i+1][j+1]
return count
if i == 0 and j == len(board[0])-1:
count += board[i][j-1]
count += board[i+1][j]
count += board[i+1][j-1]
return count
if i == len(board)-1 and j == 0:
count += board[i][j+1]
count += board[i-1][j]
count += board[i-1][j+1]
return count
if i == len(board)-1 and j == len(board[0])-1:
count += board[i][j-1]
count += board[i-1][j]
count += board[i-1][j-1]
return count
if i == 0:
count += board[i][j-1]
count += board[i][j+1]
count += board[i+1][j]
count += board[i+1][j-1]
count += board[i+1][j+1]
return count
if i == len(board)-1:
count += board[i][j-1]
count += board[i][j+1]
count += board[i-1][j]
count += board[i-1][j-1]
count += board[i-1][j+1]
return count
if j == 0:
count += board[i-1][j]
count += board[i+1][j]
count += board[i-1][j+1]
count += board[i][j+1]
count += board[i+1][j+1]
return count
if j == len(board[0])-1:
count += board[i-1][j]
count += board[i+1][j]
count += board[i-1][j-1]
count += board[i][j-1]
count += board[i+1][j-1]
return count
| 30.585586
| 75
| 0.377025
| 446
| 3,395
| 2.858744
| 0.09417
| 0.225882
| 0.379608
| 0.282353
| 0.734118
| 0.721569
| 0.682353
| 0.671373
| 0.589804
| 0.589804
| 0
| 0.053311
| 0.47511
| 3,395
| 110
| 76
| 30.863636
| 0.662177
| 0.028277
| 0
| 0.690722
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.020619
| false
| 0.041237
| 0
| 0
| 0.164948
| 0.010309
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e22cd89e13d20fb620ab9fa99f2593ed96d508cb
| 214
|
py
|
Python
|
Chapter 01/Chap01_Example1.70.py
|
bpbpublications/Programming-Techniques-using-Python
|
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
|
[
"MIT"
] | null | null | null |
Chapter 01/Chap01_Example1.70.py
|
bpbpublications/Programming-Techniques-using-Python
|
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
|
[
"MIT"
] | null | null | null |
Chapter 01/Chap01_Example1.70.py
|
bpbpublications/Programming-Techniques-using-Python
|
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
|
[
"MIT"
] | null | null | null |
#less than operator
print(4<10) # --- L1
print(10<4) # --- L2
print(4<4.0) # --- L3
print(4.0<4) # --- L4
print('python'<'Python') #--- L5
print('python'<'python') # --- L6
print('Python'<'python') #--- L7
| 23.777778
| 34
| 0.528037
| 33
| 214
| 3.424242
| 0.454545
| 0.159292
| 0.451327
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107345
| 0.172897
| 214
| 8
| 35
| 26.75
| 0.531073
| 0.303738
| 0
| 0
| 0
| 0
| 0.270677
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
e24971ff980f7ec446e598a55149376c52a4c864
| 133
|
py
|
Python
|
python/testData/optimizeImports/orderByType.after.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/optimizeImports/orderByType.after.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/optimizeImports/orderByType.after.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
from __future__ import with_statement
import datetime
import sys
import foo
from bar import *
sys.path
datetime.datetime
foo.bar()
| 12.090909
| 37
| 0.81203
| 20
| 133
| 5.15
| 0.5
| 0.174757
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 133
| 11
| 38
| 12.090909
| 0.903509
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.625
| 0
| 0.625
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
2c7d20c6867cd77397de2a1ebf6c9cc0dffd8c7b
| 133
|
py
|
Python
|
tests/results/015_simple_hash09.py
|
CowboyTim/python-storable
|
f03cf0eae60eeb9c3345e9ddf3370a49a316e472
|
[
"Zlib"
] | 8
|
2015-04-24T07:27:42.000Z
|
2020-10-30T20:51:40.000Z
|
tests/results/015_simple_hash09.py
|
CowboyTim/python-storable
|
f03cf0eae60eeb9c3345e9ddf3370a49a316e472
|
[
"Zlib"
] | 7
|
2015-09-08T01:40:12.000Z
|
2021-09-29T15:19:46.000Z
|
tests/results/015_simple_hash09.py
|
CowboyTim/python-storable
|
f03cf0eae60eeb9c3345e9ddf3370a49a316e472
|
[
"Zlib"
] | 10
|
2015-07-22T13:57:04.000Z
|
2020-09-03T18:32:39.000Z
|
result = [
[0.6, 0.7],
{'a': 'b'},
None,
[
'uu',
'ii',
[None],
[7, 8, 9, {}]
]
]
| 11.083333
| 21
| 0.203008
| 14
| 133
| 1.928571
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0.526316
| 133
| 11
| 22
| 12.090909
| 0.31746
| 0
| 0
| 0
| 0
| 0
| 0.045113
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2c9cf497f125e2c9d07587e86f42a6d73c994725
| 397
|
py
|
Python
|
chapter_11-Interfaces-FromProtocolsToABCs/sample_11_1.py
|
zixingkong/Fluent-Python
|
6f05ec5f27a1cf582ddc5a09959f446d455b6c4a
|
[
"MIT"
] | null | null | null |
chapter_11-Interfaces-FromProtocolsToABCs/sample_11_1.py
|
zixingkong/Fluent-Python
|
6f05ec5f27a1cf582ddc5a09959f446d455b6c4a
|
[
"MIT"
] | null | null | null |
chapter_11-Interfaces-FromProtocolsToABCs/sample_11_1.py
|
zixingkong/Fluent-Python
|
6f05ec5f27a1cf582ddc5a09959f446d455b6c4a
|
[
"MIT"
] | 1
|
2022-03-14T15:04:58.000Z
|
2022-03-14T15:04:58.000Z
|
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: sample_11.1
Description :
date: 2022/2/18
-------------------------------------------------
"""
class Vector2d:
typecode = 'd'
def __init__(self, x, y):
self.x = float(x)
self.y = float(y)
def __iter__(self):
return (i for i in (self.x, self.y))
| 19.85
| 49
| 0.375315
| 42
| 397
| 3.333333
| 0.666667
| 0.107143
| 0.085714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040678
| 0.256927
| 397
| 19
| 50
| 20.894737
| 0.433898
| 0.496222
| 0
| 0
| 0
| 0
| 0.005208
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.142857
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
e2c3ab4e7e1a7fbc423f0a67578e871c76706c56
| 105
|
py
|
Python
|
update_supply_chain_information/supply_chains/apps.py
|
uktrade/update-supply-chain-information
|
5cdcc795257b8351cf11b57487b194012ee8886d
|
[
"MIT"
] | null | null | null |
update_supply_chain_information/supply_chains/apps.py
|
uktrade/update-supply-chain-information
|
5cdcc795257b8351cf11b57487b194012ee8886d
|
[
"MIT"
] | 204
|
2021-05-26T16:15:04.000Z
|
2022-02-14T05:10:44.000Z
|
update_supply_chain_information/supply_chains/apps.py
|
uktrade/defend-data-capture
|
5cdcc795257b8351cf11b57487b194012ee8886d
|
[
"MIT"
] | 1
|
2021-06-26T10:28:30.000Z
|
2021-06-26T10:28:30.000Z
|
from django.apps import AppConfig
class SupplyChainUpdateConfig(AppConfig):
name = "supply_chains"
| 17.5
| 41
| 0.790476
| 11
| 105
| 7.454545
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 105
| 5
| 42
| 21
| 0.911111
| 0
| 0
| 0
| 0
| 0
| 0.12381
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e2db49207a3d7e41fec922e1563363045e6b20db
| 2,257
|
py
|
Python
|
framework/class_builder.py
|
petrovp/networkx-related
|
ebe7053e032b527ebaa9565f96ba91145de3fd50
|
[
"BSD-3-Clause"
] | null | null | null |
framework/class_builder.py
|
petrovp/networkx-related
|
ebe7053e032b527ebaa9565f96ba91145de3fd50
|
[
"BSD-3-Clause"
] | null | null | null |
framework/class_builder.py
|
petrovp/networkx-related
|
ebe7053e032b527ebaa9565f96ba91145de3fd50
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
# Copyright (C) 2018 by
# Marta Grobelna <marta.grobelna@rwth-aachen.de>
# Petre Petrov <petrepp4@gmail.com>
# Rudi Floren <rudi.floren@gmail.com>
# Tobias Winkler <tobias.winkler1@rwth-aachen.de>
# All rights reserved.
# BSD license.
#
# Authors: Marta Grobelna <marta.grobelna@rwth-aachen.de>
# Petre Petrov <petrepp4@gmail.com>
# Rudi Floren <rudi.floren@gmail.com>
# Tobias Winkler <tobias.winkler1@rwth-aachen.de>
from framework.generic_classes import *
class CombinatorialClassBuilder:
"""
Interface for objects that build combinatorial classes.
# TODO implement size checking mechanism.
"""
def zero_atom(self):
raise NotImplementedError
def l_atom(self):
raise NotImplementedError
def u_atom(self):
raise NotImplementedError
def product(self, lhs, rhs):
"""
Parameters
----------
lhs: CombinatorialClass
rhs: CombinatorialClass
"""
raise NotImplementedError
def set(self, elements):
"""
Parameters
----------
elements: list of CombinatorialClass
"""
raise NotImplementedError
class DefaultBuilder(CombinatorialClassBuilder):
"""
Builds the generic objects.
"""
def zero_atom(self):
return ZeroAtomClass()
def l_atom(self):
return LAtomClass()
def u_atom(self):
return UAtomClass()
def product(self, lhs, rhs):
return ProdClass(lhs, rhs)
def set(self, elements):
return SetClass(elements)
class DummyBuilder(CombinatorialClassBuilder):
"""
Builds dummy objects.
"""
def zero_atom(self):
return DummyClass()
def l_atom(self):
return DummyClass(l_size=1)
def u_atom(self):
return DummyClass(u_size=1)
def product(self, lhs, rhs):
l_size = lhs.l_size + rhs.l_size
u_size = lhs.u_size + rhs.u_size
return DummyClass(l_size, u_size)
def set(self, elements):
l_size = 0
u_size = 0
for dummy in elements:
l_size += dummy.l_size
u_size += dummy.u_size
return DummyClass(l_size, u_size)
| 22.57
| 59
| 0.610102
| 251
| 2,257
| 5.374502
| 0.310757
| 0.053373
| 0.062268
| 0.029652
| 0.456635
| 0.283173
| 0.24166
| 0.24166
| 0.195701
| 0.195701
| 0
| 0.008085
| 0.28755
| 2,257
| 99
| 60
| 22.79798
| 0.830846
| 0.330527
| 0
| 0.536585
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010101
| 0
| 1
| 0.365854
| false
| 0
| 0.02439
| 0.195122
| 0.707317
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
e2ec67a63cf7fb5c047312e7907602f989e9aa7e
| 429
|
py
|
Python
|
src/zad02/NotesService.py
|
TestowanieAutomatyczneUG/laboratorium-10-SzymonWilczewski
|
0ddb3a32cabc4f2a6b395f7b727154bcaf3d19ff
|
[
"MIT"
] | null | null | null |
src/zad02/NotesService.py
|
TestowanieAutomatyczneUG/laboratorium-10-SzymonWilczewski
|
0ddb3a32cabc4f2a6b395f7b727154bcaf3d19ff
|
[
"MIT"
] | null | null | null |
src/zad02/NotesService.py
|
TestowanieAutomatyczneUG/laboratorium-10-SzymonWilczewski
|
0ddb3a32cabc4f2a6b395f7b727154bcaf3d19ff
|
[
"MIT"
] | null | null | null |
from src.zad02.NotesStorage import NotesStorage
class NotesService:
def __init__(self):
self.notesStorage = NotesStorage()
def add(self, note):
return self.notesStorage.add(note)
def averageOf(self, name):
notes = self.notesStorage.getAllNotesOf(name)
return sum(map(lambda note: note.get_note(), notes)) / len(notes)
def clear(self):
return self.notesStorage.clear()
| 25.235294
| 73
| 0.67366
| 50
| 429
| 5.68
| 0.46
| 0.225352
| 0.15493
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00597
| 0.219114
| 429
| 16
| 74
| 26.8125
| 0.841791
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.363636
| false
| 0
| 0.090909
| 0.181818
| 0.818182
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
3945b2fc0df3c7b3738bde77ca6d9e10e5ecb399
| 77
|
py
|
Python
|
run.py
|
m20-sch57/Fejudge
|
3eba1879be608e119b7891a1dbe7c9e450cc3914
|
[
"MIT"
] | 2
|
2019-12-25T14:06:09.000Z
|
2020-04-02T22:06:28.000Z
|
run.py
|
m20-sch57/Fejudge
|
3eba1879be608e119b7891a1dbe7c9e450cc3914
|
[
"MIT"
] | 9
|
2020-05-14T16:15:29.000Z
|
2020-09-01T14:17:19.000Z
|
run.py
|
m20-sch57/Fejudge
|
3eba1879be608e119b7891a1dbe7c9e450cc3914
|
[
"MIT"
] | null | null | null |
from app import app, socketio
socketio.run(app, host='0.0.0.0', port=3113)
| 15.4
| 44
| 0.701299
| 15
| 77
| 3.6
| 0.6
| 0.111111
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119403
| 0.12987
| 77
| 4
| 45
| 19.25
| 0.686567
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
394c077ecd3b3d0ef9f9736e079ba86826d27ce8
| 476
|
py
|
Python
|
src/domain/Submittion/usecase/submittion_repository.py
|
fossabot/daizu-online-judge-backend
|
34e8ad4fe99374056046cf400d038423db12549c
|
[
"MIT"
] | null | null | null |
src/domain/Submittion/usecase/submittion_repository.py
|
fossabot/daizu-online-judge-backend
|
34e8ad4fe99374056046cf400d038423db12549c
|
[
"MIT"
] | null | null | null |
src/domain/Submittion/usecase/submittion_repository.py
|
fossabot/daizu-online-judge-backend
|
34e8ad4fe99374056046cf400d038423db12549c
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
from typing import List
from domain.Submittion.submittion import Submittion
class SubmittionRepository(ABC):
@abstractmethod
def store(self, submittion: Submittion) -> int:
raise NotImplementedError()
@abstractmethod
def find_all(self, problem_id: str) -> List[Submittion]:
raise NotImplementedError()
@abstractmethod
def find(self, submit_id) -> Submittion:
raise NotImplementedError()
| 25.052632
| 60
| 0.72479
| 48
| 476
| 7.125
| 0.458333
| 0.149123
| 0.222222
| 0.239766
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197479
| 476
| 18
| 61
| 26.444444
| 0.895288
| 0
| 0
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.230769
| 0
| 0.538462
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
39514da392f8ab5cdeec8d8ad0c24d8a2808ae5c
| 210
|
py
|
Python
|
get_current.py
|
skullsai/gredailywords
|
5e04af5fd1f9078bf5cd5ea658e1e2e511e5cae8
|
[
"MIT"
] | null | null | null |
get_current.py
|
skullsai/gredailywords
|
5e04af5fd1f9078bf5cd5ea658e1e2e511e5cae8
|
[
"MIT"
] | null | null | null |
get_current.py
|
skullsai/gredailywords
|
5e04af5fd1f9078bf5cd5ea658e1e2e511e5cae8
|
[
"MIT"
] | null | null | null |
from gre420 import get_var,get_sheet
print('CURRENT INDICES :')
print("INDEX :",get_var('index.p'))
print("WORD :",get_var('cur_word.p'))
print("SHEET :",get_sheet())
print("WORD_LIST",get_var('word_list.p'))
| 26.25
| 41
| 0.709524
| 35
| 210
| 4
| 0.4
| 0.171429
| 0.185714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015385
| 0.071429
| 210
| 7
| 42
| 30
| 0.702564
| 0
| 0
| 0
| 0
| 0
| 0.354067
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.166667
| 0
| 0.166667
| 0.833333
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
1a5ecb6c12e8db85c2c8ed41f472685bc122e3d8
| 222
|
py
|
Python
|
dask_sql/physical/rex/core/__init__.py
|
compose2-ankit/dask-sql
|
0818e3f4b5719116e17fec355aafda7d373bebe8
|
[
"MIT"
] | 1
|
2021-11-06T08:19:29.000Z
|
2021-11-06T08:19:29.000Z
|
dask_sql/physical/rex/core/__init__.py
|
ciusji/dask-sql
|
3815a494e1e93558fca86a86d59578ba6696c9c5
|
[
"MIT"
] | 1
|
2021-05-24T21:16:27.000Z
|
2021-05-25T19:12:57.000Z
|
dask_sql/physical/rex/core/__init__.py
|
ciusji/dask-sql
|
3815a494e1e93558fca86a86d59578ba6696c9c5
|
[
"MIT"
] | 1
|
2021-01-24T05:52:50.000Z
|
2021-01-24T05:52:50.000Z
|
from .call import RexCallPlugin
from .input_ref import RexInputRefPlugin
from .literal import RexLiteralPlugin
from .over import RexOverPlugin
__all__ = [RexCallPlugin, RexInputRefPlugin, RexLiteralPlugin, RexOverPlugin]
| 31.714286
| 77
| 0.851351
| 22
| 222
| 8.363636
| 0.545455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103604
| 222
| 6
| 78
| 37
| 0.924623
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1a69f72b714d6cd02b7943fc217e43e81f7d8b6d
| 94
|
py
|
Python
|
order/user_order/apps.py
|
Virusuki/AWS_MSA_service_order
|
5b95fe1c86d06434f46ff2cb6be7add9874120a3
|
[
"Apache-2.0"
] | null | null | null |
order/user_order/apps.py
|
Virusuki/AWS_MSA_service_order
|
5b95fe1c86d06434f46ff2cb6be7add9874120a3
|
[
"Apache-2.0"
] | null | null | null |
order/user_order/apps.py
|
Virusuki/AWS_MSA_service_order
|
5b95fe1c86d06434f46ff2cb6be7add9874120a3
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class UserOrderConfig(AppConfig):
name = 'user_order'
| 15.666667
| 33
| 0.765957
| 11
| 94
| 6.454545
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159574
| 94
| 5
| 34
| 18.8
| 0.898734
| 0
| 0
| 0
| 0
| 0
| 0.106383
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1a8fdaf80cf4aba6d1741b304c2a63706951e504
| 559
|
py
|
Python
|
Python/chapter02_variable.py
|
stayteef/learningpython
|
d4e997a6e6f6a4994f1932a728045f512964725a
|
[
"MIT"
] | null | null | null |
Python/chapter02_variable.py
|
stayteef/learningpython
|
d4e997a6e6f6a4994f1932a728045f512964725a
|
[
"MIT"
] | null | null | null |
Python/chapter02_variable.py
|
stayteef/learningpython
|
d4e997a6e6f6a4994f1932a728045f512964725a
|
[
"MIT"
] | null | null | null |
# this is to learn what 'variable' is.
#i did the followings in termial with a python shell. so this is what a alist is
#a = 15
#print (a)
#a = [1, 2, 3, 4]
#a [2]
#type (a) - to show a is a int
#10 ==10 is to ask if 10 equals to 10, so it will return 'true"
#10 != 11 is asking if 11 equals to 10 and of course it will print false
# python does not let us mix between strings and integers. so we can convert interger into a string by typing 'str(1)' and 1 is now a string
# lists work as well.
# questions above works for strings too
import turtle
| 29.421053
| 141
| 0.68873
| 114
| 559
| 3.377193
| 0.614035
| 0.031169
| 0.051948
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058411
| 0.234347
| 559
| 18
| 142
| 31.055556
| 0.841122
| 0.921288
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
46cc916808467654370dbb5682ce10c4334d11d1
| 57
|
py
|
Python
|
tests/tc6.py
|
crackaf/PythonInterpreter
|
690b3ee8cff8c13dd834788a410a69d9ea923fc1
|
[
"MIT"
] | 1
|
2021-07-28T13:25:20.000Z
|
2021-07-28T13:25:20.000Z
|
tests/tc6.py
|
crackaf/PythonInterpreter
|
690b3ee8cff8c13dd834788a410a69d9ea923fc1
|
[
"MIT"
] | null | null | null |
tests/tc6.py
|
crackaf/PythonInterpreter
|
690b3ee8cff8c13dd834788a410a69d9ea923fc1
|
[
"MIT"
] | null | null | null |
a=5
b=50
if a>=b:
c=a-b
else:
c=a-b
print(c)
| 4.75
| 9
| 0.438596
| 16
| 57
| 1.5625
| 0.5
| 0.24
| 0.24
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 0.350877
| 57
| 11
| 10
| 5.181818
| 0.594595
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.142857
| 1
| 0
| 1
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
46cf5c402bcc09ca53f5840cff174597c09f89a5
| 3,175
|
py
|
Python
|
src/crawlers/nike.py
|
Brunopaes/python-sandbox
|
c51f716785bf11789b13f9bb24bfd76108eaec08
|
[
"MIT"
] | 5
|
2020-08-04T00:13:06.000Z
|
2022-03-18T09:18:29.000Z
|
src/crawlers/nike.py
|
Brunopaes/python-sandbox
|
c51f716785bf11789b13f9bb24bfd76108eaec08
|
[
"MIT"
] | null | null | null |
src/crawlers/nike.py
|
Brunopaes/python-sandbox
|
c51f716785bf11789b13f9bb24bfd76108eaec08
|
[
"MIT"
] | 2
|
2020-06-26T13:42:17.000Z
|
2020-08-04T00:13:10.000Z
|
# -*- coding: utf-8 -*-
from selenium import webdriver
import time
url = 'https://www.nike.com.br/'
driver = webdriver.Chrome('../../drivers/chromedriver.exe')
js = """fetch("https://www.nike.com.br/Cliente/LogarNike", {
"credentials": "include",
"headers": {
"accept": "application/json, text/javascript, /; q=0.01",
"accept-language": "en-US,en;q=0.9,pt;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
"referrer": "https://www.nike.com.br/Pedido/Acompanhamento/todos",
"referrerPolicy": "no-referrer-when-downgrade",
"body": "user%5Bcontact%5D%5Bemail%5D%5Baddress%5D=pedronegri%40me.com&user%5Bdob%5D%5Bdate%5D=-2198707200000&user%5Bdob%5D%5Bday%5D=30&user%5Bdob%5D%5Bmonth%5D=4&user%5Bdob%5D%5Byear%5D=1900&user%5Bgender%5D=M&user%5Bmarketing%5D%5Bdatashare%5D%5B00001%5D%5Bid%5D=00001&user%5Bmarketing%5D%5Bdatashare%5D%5B00001%5D%5Bactive%5D=true&user%5Bmarketing%5D%5Bemail%5D=true&user%5Bmarketing%5D%5Bsms%5D=true&user%5Bname%5D%5Blatin%5D%5Bfamily%5D=Arenas&user%5Bname%5D%5Blatin%5D%5Bgiven%5D=Pedro&user%5BnuId%5D=10032C8967D32ED0E0534C1C070A6370&user%5BupmId%5D=12774933647&user%5BdaysSinceLastVisit%5D=0&address%5Bshipping%5D%5Bcode%5D=09090-000&address%5Bshipping%5D%5Bcountry%5D=BR&address%5Bshipping%5D%5Bguid%5D=6406ee0d-416f-41ad-94c1-4e9387b65e13&address%5Bshipping%5D%5Blabel%5D=Principal&address%5Bshipping%5D%5Bline1%5D=Rua+das+Aroeiras%2C+900&address%5Bshipping%5D%5Bline2%5D=161&address%5Bshipping%5D%5Blocality%5D=Santo+Andr%C3%A9&address%5Bshipping%5D%5Bpreferred%5D=true&address%5Bshipping%5D%5Bprovince%5D=SP&address%5Bshipping%5D%5Bregion%5D=Jardim&address%5Bshipping%5D%5Btype%5D=SHIPPING&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bcode%5D=09090-000&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bcountry%5D=BR&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bguid%5D=7964b9c1-c53f-4361-b720-9fc16d47a192&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Blabel%5D=Rua+das+Aroeiras&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bline1%5D=Rua+das+Aroeiras%2C+900&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bline2%5D=Apt+161&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Blocality%5D=Santo+Andr%C3%A9&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bpreferred%5D=false&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bprovince%5D=SP&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bregion%5D=Jardim&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Btype%5D=SHIPPING",
"method": "POST",
"mode": "cors"
})"""
driver.get(url)
driver.execute_script(js)
products = (
'https://www.nike.com.br/chuteira-nike-phantom-gt-elite-3d-unissex-153-169-171-316414?gridPosition=A1',
'https://www.nike.com.br/tenis-nike-zoomx-vaporfly-next-2-feminino-1-16-214-311846?gridPosition=A2',
'https://www.nike.com.br/tenis-nike-zoom-fly-3-feminino-1-16-214-305856?gridPosition=A3',
)
for product in products:
driver.get(product)
driver.implicitly_wait(1)
| 79.375
| 1,928
| 0.763465
| 472
| 3,175
| 5.131356
| 0.387712
| 0.039637
| 0.059455
| 0.11891
| 0.428159
| 0.317093
| 0.300165
| 0.058629
| 0.030553
| 0
| 0
| 0.206689
| 0.058268
| 3,175
| 39
| 1,929
| 81.410256
| 0.603344
| 0.006614
| 0
| 0
| 0
| 0.193548
| 0.916878
| 0.645939
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.064516
| 0
| 0.064516
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
46d86e206dd5926bdc0a0885814ea377dc5ba997
| 112
|
py
|
Python
|
autocord/error.py
|
qweme32/autocord
|
7bf141acf9bc9e3f9ef5a5c90a2ed24c28b3e045
|
[
"MIT"
] | null | null | null |
autocord/error.py
|
qweme32/autocord
|
7bf141acf9bc9e3f9ef5a5c90a2ed24c28b3e045
|
[
"MIT"
] | null | null | null |
autocord/error.py
|
qweme32/autocord
|
7bf141acf9bc9e3f9ef5a5c90a2ed24c28b3e045
|
[
"MIT"
] | null | null | null |
# autocord
# package for simple automation with discord client
#
# m: error
class ApiError(Exception):
pass
| 16
| 51
| 0.741071
| 14
| 112
| 5.928571
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 112
| 7
| 52
| 16
| 0.912088
| 0.598214
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
46f8484ab799b8075dca61d004ee86c6b5ed3ab5
| 397
|
py
|
Python
|
config.py
|
vekkt0r/harmenubar
|
6019a76f85e0b4ddacf4159f88ee31514ed338c8
|
[
"MIT"
] | 5
|
2015-04-18T16:57:53.000Z
|
2020-12-28T08:50:52.000Z
|
config.py
|
vekkt0r/harmenubar
|
6019a76f85e0b4ddacf4159f88ee31514ed338c8
|
[
"MIT"
] | null | null | null |
config.py
|
vekkt0r/harmenubar
|
6019a76f85e0b4ddacf4159f88ee31514ed338c8
|
[
"MIT"
] | null | null | null |
class HarmonyConfig(object):
def __init__(self, config):
self.json = config
def get_activities(self):
return self._build_kv_menu('activity')
def get_devices(self):
return self._build_kv_menu('device')
def _build_kv_menu(self, key):
menu = {}
for d in self.json[key]:
menu.update({int(d['id']): d['label']})
return menu
| 26.466667
| 51
| 0.596977
| 52
| 397
| 4.269231
| 0.480769
| 0.094595
| 0.148649
| 0.171171
| 0.225225
| 0.225225
| 0
| 0
| 0
| 0
| 0
| 0
| 0.27204
| 397
| 15
| 52
| 26.466667
| 0.768166
| 0
| 0
| 0
| 0
| 0
| 0.052764
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.166667
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
20237e3666124ff093bac66dcec326277d49ee0e
| 53
|
py
|
Python
|
modules/2.79/bpy/types/LineStyleGeometryModifier_GuidingLines.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
modules/2.79/bpy/types/LineStyleGeometryModifier_GuidingLines.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
modules/2.79/bpy/types/LineStyleGeometryModifier_GuidingLines.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
LineStyleGeometryModifier_GuidingLines.type = None
| 13.25
| 50
| 0.867925
| 4
| 53
| 11.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09434
| 53
| 3
| 51
| 17.666667
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
644cbf5b25f45ac5b2df4618eb7cb5695df577c7
| 112
|
py
|
Python
|
qiskit_sliqsim_provider/__init__.py
|
NTU-ALComLab/Qiskit-SliQSim-Provider
|
f27103d2bc195356705bdc86d9f23ada6b92ca7b
|
[
"MIT"
] | 1
|
2021-06-23T15:22:21.000Z
|
2021-06-23T15:22:21.000Z
|
qiskit_sliqsim_provider/__init__.py
|
NTU-ALComLab/SliQSim-Qiskit-Interface
|
f27103d2bc195356705bdc86d9f23ada6b92ca7b
|
[
"MIT"
] | null | null | null |
qiskit_sliqsim_provider/__init__.py
|
NTU-ALComLab/SliQSim-Qiskit-Interface
|
f27103d2bc195356705bdc86d9f23ada6b92ca7b
|
[
"MIT"
] | null | null | null |
from .simulator_sliqsim import StatevectorSimulator, QasmSimulator
from .sliqsimprovider import SliQSimProvider
| 37.333333
| 66
| 0.892857
| 10
| 112
| 9.9
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080357
| 112
| 2
| 67
| 56
| 0.961165
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
64718195ece0aacb9142e123107f89541ad2b15d
| 2,155
|
py
|
Python
|
pynasqm/trajectories/initialexcitedstates.py
|
PotentialParadox/pynasqm
|
1bd51299b6ca7f8229d8a15428515d53a358903c
|
[
"MIT"
] | 1
|
2020-03-13T22:34:03.000Z
|
2020-03-13T22:34:03.000Z
|
pynasqm/trajectories/initialexcitedstates.py
|
PotentialParadox/pynasqm
|
1bd51299b6ca7f8229d8a15428515d53a358903c
|
[
"MIT"
] | null | null | null |
pynasqm/trajectories/initialexcitedstates.py
|
PotentialParadox/pynasqm
|
1bd51299b6ca7f8229d8a15428515d53a358903c
|
[
"MIT"
] | null | null | null |
'''
get_n_initial_states_w_laser_energy_and_fwhm generates a list of initial excited states
using information supplied by abs_spectra, which is a file in the format with each line [e1 f1 e2 f2].
'''
import numpy as np
import math
import random
from pynasqm.conversions import fs_to_ev
def get_n_initial_states_w_laser_energy_and_fwhm(n, abs_spectra, laser_energy, fwhm):
probabilities = get_probabilities_from(abs_spectra, laser_energy, fwhm)
return [choose(probabilities) + 1 for _ in range(n)]
def get_probabilities_from(abs_spectra, laser_energy, fwhm):
energies, strengths = get_energies_and_strenghts(abs_spectra)
return calc_probabilities(laser_energy, fwhm, energies, strengths)
def calc_probabilities(laser_energy, fwhm, energies, strengths):
return normalize(calc_raw_probabilities(laser_energy, fwhm, energies, strengths))
def normalize(v):
norm = np.sum(v)
return 0 if norm == 0 else v / norm
def calc_raw_probabilities(laser_energy, fwhm, energies, strenghts):
return [calc_raw_probability(laser_energy, fwhm, e, s) for e, s in zip(energies, strenghts)]
def convert_laserfwhm_to_sigma2(fwhm):
alpha = 2.35482 # fwhm = alpha * sigma
fc_fwhm = pow(alpha,2) * fs_to_ev(fwhm) / math.sqrt(2)
return pow(alpha*fs_to_ev(fwhm),2)/2
def calc_raw_probability(laser_energy, fwhm, energy, strength):
f = strength
pi = math.pi
s2 = convert_laserfwhm_to_sigma2(fwhm)
w = laser_energy
e = energy
return f * 1.0 / math.sqrt(2.0 * pi * s2) * math.exp(-pow(e-w,2) / (2*s2))
def get_energies_and_strenghts(abs_spectra):
return split_energies_and_strengths(get_averages(abs_spectra))
def get_averages(abs_spectra):
return np.average(np.loadtxt(abs_spectra), axis=0)
def split_energies_and_strengths(average_values):
return average_values[::2], average_values[1::2]
def create_choice_list(probabilities, start=0):
if probabilities != []:
return [start] + create_choice_list(probabilities[1:], start + probabilities[0])
return [start]
def choose(probabilities):
return len([x for x in create_choice_list(probabilities) if x < random.uniform(0,1)]) - 1
| 37.807018
| 102
| 0.750348
| 329
| 2,155
| 4.653495
| 0.288754
| 0.086218
| 0.088178
| 0.075114
| 0.39386
| 0.32985
| 0.286741
| 0.105813
| 0.047028
| 0
| 0
| 0.020754
| 0.150348
| 2,155
| 56
| 103
| 38.482143
| 0.815401
| 0.098376
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.1
| 0.15
| 0.725
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b3a43f8a42beb81171c01796baca46a01c8d973a
| 376
|
py
|
Python
|
recursive/joseph_ring_last.py
|
dyc-it/algorithm
|
68b866c9bf5ee2b479be124d70d2362144d568bb
|
[
"Apache-2.0"
] | null | null | null |
recursive/joseph_ring_last.py
|
dyc-it/algorithm
|
68b866c9bf5ee2b479be124d70d2362144d568bb
|
[
"Apache-2.0"
] | null | null | null |
recursive/joseph_ring_last.py
|
dyc-it/algorithm
|
68b866c9bf5ee2b479be124d70d2362144d568bb
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/env python
#只求出最后一个出环的编好,不要求中间过程
#i个人最后一个出环的编号=(i-1个人最后一个出环的编号+k)%i
#m表示初始情况下环的总人数,k表示报数的值
def joseph_ring_last(m, k):
last = 0
for i in range(2, m+1):
last = (last + k)%i
return last + 1
if __name__ == '__main__':
print joseph_ring_last(1, 3)
print joseph_ring_last(2, 3)
print joseph_ring_last(3, 3)
print joseph_ring_last(4, 3)
| 23.5
| 34
| 0.662234
| 62
| 376
| 3.741935
| 0.483871
| 0.215517
| 0.301724
| 0.327586
| 0.258621
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043624
| 0.207447
| 376
| 16
| 35
| 23.5
| 0.731544
| 0.239362
| 0
| 0
| 0
| 0
| 0.028369
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.4
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b3a47dc66dee7fe7bee450b96680cb223d494251
| 396
|
py
|
Python
|
python/api/serializers.py
|
kellenschmidt/yelp-for-hair-stylists
|
778cc39715cfd6eb7801925858a2c581fb492198
|
[
"Apache-2.0"
] | null | null | null |
python/api/serializers.py
|
kellenschmidt/yelp-for-hair-stylists
|
778cc39715cfd6eb7801925858a2c581fb492198
|
[
"Apache-2.0"
] | null | null | null |
python/api/serializers.py
|
kellenschmidt/yelp-for-hair-stylists
|
778cc39715cfd6eb7801925858a2c581fb492198
|
[
"Apache-2.0"
] | null | null | null |
from rest_framework import serializers
from .models import Review, Store, Worker
class StoreSerializer(serializers.ModelSerializer):
class Meta:
model = Store
fields = '__all__'
class ReviewSerializer(serializers.ModelSerializer):
class Meta:
model = Review
fields = '__all__'
class WorkerSerializer(serializers.ModelSerializer):
class Meta:
model = Worker
fields = '__all__'
| 19.8
| 52
| 0.772727
| 41
| 396
| 7.146341
| 0.439024
| 0.266212
| 0.317406
| 0.358362
| 0.409556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151515
| 396
| 20
| 53
| 19.8
| 0.872024
| 0
| 0
| 0.428571
| 0
| 0
| 0.052897
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
373a980f8a6ed8accd44bef32628337aaf54aa25
| 44
|
py
|
Python
|
p1_basic/day27_31netpro/day30/09_uuid.py
|
dong-pro/fullStackPython
|
5ad8662f7b57f14c8529e7eaf64290eeda773557
|
[
"Apache-2.0"
] | 1
|
2020-04-03T01:32:05.000Z
|
2020-04-03T01:32:05.000Z
|
p1_basic/day27_31netpro/day30/09_uuid.py
|
dong-pro/fullStackPython
|
5ad8662f7b57f14c8529e7eaf64290eeda773557
|
[
"Apache-2.0"
] | null | null | null |
p1_basic/day27_31netpro/day30/09_uuid.py
|
dong-pro/fullStackPython
|
5ad8662f7b57f14c8529e7eaf64290eeda773557
|
[
"Apache-2.0"
] | null | null | null |
import uuid
v = str(uuid.uuid4())
print(v)
| 8.8
| 21
| 0.659091
| 8
| 44
| 3.625
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0.159091
| 44
| 4
| 22
| 11
| 0.756757
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
37b8cfc2ef26e2bd4cedd583789737df0f937cbf
| 79
|
py
|
Python
|
wagtail_honeypot/test/__init__.py
|
tomdyson/wagtail-honeypot
|
99cc00f5eac3153fedebaf97cb0eb060847c948c
|
[
"MIT"
] | 2
|
2022-02-25T10:23:59.000Z
|
2022-02-26T21:18:11.000Z
|
wagtail_honeypot/test/__init__.py
|
tomdyson/wagtail-honeypot
|
99cc00f5eac3153fedebaf97cb0eb060847c948c
|
[
"MIT"
] | 2
|
2022-03-03T21:44:42.000Z
|
2022-03-04T12:28:27.000Z
|
wagtail_honeypot/test/__init__.py
|
tomdyson/wagtail-honeypot
|
99cc00f5eac3153fedebaf97cb0eb060847c948c
|
[
"MIT"
] | 1
|
2022-03-04T10:28:04.000Z
|
2022-03-04T10:28:04.000Z
|
default_app_config = "wagtail_honeypot.test.apps.WagtailHoneypotTestAppConfig"
| 39.5
| 78
| 0.886076
| 8
| 79
| 8.375
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037975
| 79
| 1
| 79
| 79
| 0.881579
| 0
| 0
| 0
| 0
| 0
| 0.696203
| 0.696203
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
809316c23eb3091d910f2677340769be254380e0
| 85
|
py
|
Python
|
korea/apps.py
|
vghjm/Django_Crwaling_Server
|
ae263e7a2c74ebb15e7bb4192467bd81f0a73da6
|
[
"MIT"
] | null | null | null |
korea/apps.py
|
vghjm/Django_Crwaling_Server
|
ae263e7a2c74ebb15e7bb4192467bd81f0a73da6
|
[
"MIT"
] | null | null | null |
korea/apps.py
|
vghjm/Django_Crwaling_Server
|
ae263e7a2c74ebb15e7bb4192467bd81f0a73da6
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class KoreaConfig(AppConfig):
name = 'korea'
| 14.166667
| 33
| 0.741176
| 10
| 85
| 6.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 5
| 34
| 17
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
03805760c536fc223af224ab7d0a15d50ffbd155
| 29
|
py
|
Python
|
homeassistant/components/traccar/__init__.py
|
alindeman/home-assistant
|
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
|
[
"Apache-2.0"
] | 4
|
2019-07-03T22:36:57.000Z
|
2019-08-10T15:33:25.000Z
|
homeassistant/components/traccar/__init__.py
|
alindeman/home-assistant
|
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
|
[
"Apache-2.0"
] | 7
|
2019-08-23T05:26:02.000Z
|
2022-03-11T23:57:18.000Z
|
homeassistant/components/traccar/__init__.py
|
alindeman/home-assistant
|
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
|
[
"Apache-2.0"
] | 3
|
2019-04-28T16:35:45.000Z
|
2020-05-28T15:21:59.000Z
|
"""The traccar component."""
| 14.5
| 28
| 0.655172
| 3
| 29
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 29
| 1
| 29
| 29
| 0.730769
| 0.758621
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
038b117f70a09479ac7dd79438c8413602459d73
| 62
|
py
|
Python
|
src/chapter 2/exercise2.py
|
group4BSE1/BSE-2021
|
bea904fce079b856c26f8c06bd734176bdc4d70d
|
[
"MIT"
] | 1
|
2021-03-15T23:25:13.000Z
|
2021-03-15T23:25:13.000Z
|
src/chapter 2/exercise2.py
|
group9BSE1/BSE-2021
|
bea904fce079b856c26f8c06bd734176bdc4d70d
|
[
"MIT"
] | null | null | null |
src/chapter 2/exercise2.py
|
group9BSE1/BSE-2021
|
bea904fce079b856c26f8c06bd734176bdc4d70d
|
[
"MIT"
] | null | null | null |
user_name = input("enter the name:")
print("hello", user_name)
| 31
| 36
| 0.725806
| 10
| 62
| 4.3
| 0.7
| 0.372093
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 62
| 2
| 37
| 31
| 0.767857
| 0
| 0
| 0
| 0
| 0
| 0.31746
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
03f50434aa1ea5d8114fd155ca261bd0c48869da
| 7,021
|
py
|
Python
|
ngraph/python/src/ngraph/__init__.py
|
aisnote/openvino
|
d901bbfce3d195469339cfcdfd8fbdc619ef7050
|
[
"Apache-2.0"
] | null | null | null |
ngraph/python/src/ngraph/__init__.py
|
aisnote/openvino
|
d901bbfce3d195469339cfcdfd8fbdc619ef7050
|
[
"Apache-2.0"
] | null | null | null |
ngraph/python/src/ngraph/__init__.py
|
aisnote/openvino
|
d901bbfce3d195469339cfcdfd8fbdc619ef7050
|
[
"Apache-2.0"
] | null | null | null |
# ******************************************************************************
# Copyright 2017-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ******************************************************************************
"""ngraph module namespace, exposing factory functions for all ops and other classes."""
# noqa: F401
from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution("ngraph-core").version
except DistributionNotFound:
__version__ = "0.0.0.dev0"
from ngraph.impl import Node
from ngraph.impl import Function
from ngraph.helpers import function_from_cnn
from ngraph.helpers import function_to_cnn
from ngraph.opset5 import absolute
from ngraph.opset5 import absolute as abs
from ngraph.opset5 import acos
from ngraph.opset5 import acosh
from ngraph.opset5 import add
from ngraph.opset5 import asin
from ngraph.opset5 import asinh
from ngraph.opset5 import assign
from ngraph.opset5 import atan
from ngraph.opset5 import atanh
from ngraph.opset5 import avg_pool
from ngraph.opset5 import batch_norm_inference
from ngraph.opset5 import batch_to_space
from ngraph.opset5 import binary_convolution
from ngraph.opset5 import broadcast
from ngraph.opset5 import bucketize
from ngraph.opset5 import ceiling
from ngraph.opset5 import ceiling as ceil
from ngraph.opset5 import clamp
from ngraph.opset5 import concat
from ngraph.opset5 import constant
from ngraph.opset5 import convert
from ngraph.opset5 import convert_like
from ngraph.opset5 import convolution
from ngraph.opset5 import convolution_backprop_data
from ngraph.opset5 import cos
from ngraph.opset5 import cosh
from ngraph.opset5 import ctc_greedy_decoder
from ngraph.opset5 import ctc_loss
from ngraph.opset5 import cum_sum
from ngraph.opset5 import cum_sum as cumsum
from ngraph.opset5 import deformable_convolution
from ngraph.opset5 import deformable_psroi_pooling
from ngraph.opset5 import depth_to_space
from ngraph.opset5 import detection_output
from ngraph.opset5 import divide
from ngraph.opset5 import elu
from ngraph.opset5 import embedding_bag_offsets_sum
from ngraph.opset5 import embedding_bag_packed_sum
from ngraph.opset5 import embedding_segments_sum
from ngraph.opset5 import extract_image_patches
from ngraph.opset5 import equal
from ngraph.opset5 import erf
from ngraph.opset5 import exp
from ngraph.opset5 import fake_quantize
from ngraph.opset5 import floor
from ngraph.opset5 import floor_mod
from ngraph.opset5 import gather
from ngraph.opset5 import gather_nd
from ngraph.opset5 import gather_tree
from ngraph.opset5 import gelu
from ngraph.opset5 import greater
from ngraph.opset5 import greater_equal
from ngraph.opset5 import grn
from ngraph.opset5 import group_convolution
from ngraph.opset5 import group_convolution_backprop_data
from ngraph.opset5 import gru_cell
from ngraph.opset5 import hard_sigmoid
from ngraph.opset5 import hswish
from ngraph.opset5 import interpolate
from ngraph.opset5 import less
from ngraph.opset5 import less_equal
from ngraph.opset5 import log
from ngraph.opset5 import logical_and
from ngraph.opset5 import logical_not
from ngraph.opset5 import logical_or
from ngraph.opset5 import logical_xor
from ngraph.opset5 import log_softmax
from ngraph.opset5 import lrn
from ngraph.opset5 import lstm_cell
from ngraph.opset5 import lstm_sequence
from ngraph.opset5 import matmul
from ngraph.opset5 import max_pool
from ngraph.opset5 import maximum
from ngraph.opset5 import minimum
from ngraph.opset5 import mish
from ngraph.opset5 import mod
from ngraph.opset5 import multiply
from ngraph.opset5 import mvn
from ngraph.opset5 import negative
from ngraph.opset5 import non_max_suppression
from ngraph.opset5 import non_zero
from ngraph.opset5 import normalize_l2
from ngraph.opset5 import not_equal
from ngraph.opset5 import one_hot
from ngraph.opset5 import pad
from ngraph.opset5 import parameter
from ngraph.opset5 import power
from ngraph.opset5 import prelu
from ngraph.opset5 import prior_box
from ngraph.opset5 import prior_box_clustered
from ngraph.opset5 import psroi_pooling
from ngraph.opset5 import proposal
from ngraph.opset5 import range
from ngraph.opset5 import read_value
from ngraph.opset5 import reduce_l1
from ngraph.opset5 import reduce_l2
from ngraph.opset5 import reduce_logical_and
from ngraph.opset5 import reduce_logical_or
from ngraph.opset5 import reduce_max
from ngraph.opset5 import reduce_mean
from ngraph.opset5 import reduce_min
from ngraph.opset5 import reduce_prod
from ngraph.opset5 import reduce_sum
from ngraph.opset5 import region_yolo
from ngraph.opset5 import reorg_yolo
from ngraph.opset5 import relu
from ngraph.opset5 import reshape
from ngraph.opset5 import result
from ngraph.opset5 import reverse_sequence
from ngraph.opset5 import rnn_cell
from ngraph.opset5 import roi_align
from ngraph.opset5 import roi_pooling
from ngraph.opset5 import round
from ngraph.opset5 import scatter_elements_update
from ngraph.opset5 import scatter_update
from ngraph.opset5 import select
from ngraph.opset5 import selu
from ngraph.opset5 import shape_of
from ngraph.opset5 import shuffle_channels
from ngraph.opset5 import sigmoid
from ngraph.opset5 import sign
from ngraph.opset5 import sin
from ngraph.opset5 import sinh
from ngraph.opset5 import softmax
from ngraph.opset5 import softplus
from ngraph.opset5 import space_to_batch
from ngraph.opset5 import space_to_depth
from ngraph.opset5 import split
from ngraph.opset5 import sqrt
from ngraph.opset5 import squared_difference
from ngraph.opset5 import squeeze
from ngraph.opset5 import strided_slice
from ngraph.opset5 import subtract
from ngraph.opset5 import swish
from ngraph.opset5 import tan
from ngraph.opset5 import tanh
from ngraph.opset5 import tensor_iterator
from ngraph.opset5 import tile
from ngraph.opset5 import topk
from ngraph.opset5 import transpose
from ngraph.opset5 import unsqueeze
from ngraph.opset5 import variadic_split
# Extend Node class to support binary operators
Node.__add__ = add
Node.__sub__ = subtract
Node.__mul__ = multiply
Node.__div__ = divide
Node.__truediv__ = divide
Node.__radd__ = lambda left, right: add(right, left)
Node.__rsub__ = lambda left, right: subtract(right, left)
Node.__rmul__ = lambda left, right: multiply(right, left)
Node.__rdiv__ = lambda left, right: divide(right, left)
Node.__rtruediv__ = lambda left, right: divide(right, left)
Node.__eq__ = equal
Node.__ne__ = not_equal
Node.__lt__ = less
Node.__le__ = less_equal
Node.__gt__ = greater
Node.__ge__ = greater_equal
| 36.378238
| 88
| 0.82296
| 1,045
| 7,021
| 5.363636
| 0.256459
| 0.262266
| 0.408207
| 0.561285
| 0.459946
| 0.140589
| 0.028189
| 0
| 0
| 0
| 0
| 0.026591
| 0.116223
| 7,021
| 192
| 89
| 36.567708
| 0.876712
| 0.122205
| 0
| 0
| 0
| 0
| 0.00342
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.880952
| 0
| 0.880952
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ff0ea7cc589a75a21b7cf3c09990a00b55193ad9
| 186
|
py
|
Python
|
jekyllnb/__init__.py
|
horaceg/jekyllnb
|
2ae5ff13ffc799c9ff88ddb60d8c8a9ed415d3cc
|
[
"MIT"
] | 12
|
2019-06-20T13:53:54.000Z
|
2022-01-24T09:05:44.000Z
|
jekyllnb/__init__.py
|
horaceg/jekyllnb
|
2ae5ff13ffc799c9ff88ddb60d8c8a9ed415d3cc
|
[
"MIT"
] | 201
|
2018-10-26T06:29:57.000Z
|
2022-03-01T08:08:32.000Z
|
jekyllnb/__init__.py
|
horaceg/jekyllnb
|
2ae5ff13ffc799c9ff88ddb60d8c8a9ed415d3cc
|
[
"MIT"
] | 1
|
2021-05-03T09:22:03.000Z
|
2021-05-03T09:22:03.000Z
|
from .__version__ import __version__
from .exporter import JekyllExporter
from .preprocessor import JekyllPreprocessor
__all__ = ["__version__", "JekyllExporter", "JekyllPreprocessor"]
| 31
| 65
| 0.827957
| 16
| 186
| 8.625
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 186
| 5
| 66
| 37.2
| 0.821429
| 0
| 0
| 0
| 0
| 0
| 0.231183
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ff0f4314151a1592794563ee7df2a95b8ccc71bf
| 850
|
py
|
Python
|
tests/test_deprecation.py
|
ghettorce/pyspnego
|
5376adb1b3fb7cfccd00be2317e85b7150f177a0
|
[
"MIT"
] | 25
|
2020-05-23T10:17:46.000Z
|
2022-02-21T16:52:02.000Z
|
tests/test_deprecation.py
|
ghettorce/pyspnego
|
5376adb1b3fb7cfccd00be2317e85b7150f177a0
|
[
"MIT"
] | 33
|
2020-07-04T00:05:55.000Z
|
2022-03-15T23:20:29.000Z
|
tests/test_deprecation.py
|
ghettorce/pyspnego
|
5376adb1b3fb7cfccd00be2317e85b7150f177a0
|
[
"MIT"
] | 7
|
2020-08-27T03:44:46.000Z
|
2022-01-21T04:50:05.000Z
|
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
import pytest
def test_gss_import_dep():
with pytest.deprecated_call(match="spnego.gss is deprecated and will be removed in a future release"):
import spnego.gss
def test_negotiate_import_dep():
with pytest.deprecated_call(match="spnego.negotiate is deprecated and will be removed in a future release"):
import spnego.negotiate
def test_ntlm_import_dep():
with pytest.deprecated_call(match="spnego.ntlm is deprecated and will be removed in a future release"):
import spnego.ntlm
def test_sspi_import_dep():
with pytest.deprecated_call(match="spnego.sspi is deprecated and will be removed in a future release"):
import spnego.sspi
| 32.692308
| 112
| 0.74
| 124
| 850
| 4.943548
| 0.33871
| 0.045677
| 0.084829
| 0.12398
| 0.652529
| 0.652529
| 0.652529
| 0.652529
| 0.365416
| 0.365416
| 0
| 0.01273
| 0.168235
| 850
| 25
| 113
| 34
| 0.854314
| 0.183529
| 0
| 0
| 0
| 0
| 0.382609
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.307692
| true
| 0
| 0.692308
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.