hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b454081b3c30e207e45cbbb66acfd228c73798ef | 3,857 | py | Python | keystone/openstack/common/fileutils.py | raildo/keystone-1 | 2b26e45b72e03e64d18dc55cff7db24b7d1b4d5f | [
"Apache-2.0"
] | null | null | null | keystone/openstack/common/fileutils.py | raildo/keystone-1 | 2b26e45b72e03e64d18dc55cff7db24b7d1b4d5f | [
"Apache-2.0"
] | null | null | null | keystone/openstack/common/fileutils.py | raildo/keystone-1 | 2b26e45b72e03e64d18dc55cff7db24b7d1b4d5f | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# 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 req... | 28.360294 | 78 | 0.674099 |
151ac164815b8341fbdb1564121f06d6c3f8f1bc | 461 | py | Python | plotly/validators/contour/colorbar/_bordercolor.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/contour/colorbar/_bordercolor.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/contour/colorbar/_bordercolor.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name='bordercolor',
parent_name='contour.colorbar',
**kwargs
):
super(BordercolorValidator, self).__init__(
plotly_name=p... | 24.263158 | 72 | 0.611714 |
dc4c31288c0c843d3ed9145c591f9e57c4489c1b | 1,214 | py | Python | examples/exploratory_scripts/001_fft_pyocl_cupy_exploration/005_2p5D_ocl_with_platform.py | xbuffat/xfields | 2b51a544d0b15d98789fe4b14cf0104998607377 | [
"MIT"
] | null | null | null | examples/exploratory_scripts/001_fft_pyocl_cupy_exploration/005_2p5D_ocl_with_platform.py | xbuffat/xfields | 2b51a544d0b15d98789fe4b14cf0104998607377 | [
"MIT"
] | null | null | null | examples/exploratory_scripts/001_fft_pyocl_cupy_exploration/005_2p5D_ocl_with_platform.py | xbuffat/xfields | 2b51a544d0b15d98789fe4b14cf0104998607377 | [
"MIT"
] | null | null | null | import time
import numpy as np
# Pyopencl context
from xfields.contexts import XfPyopenclContext
context = XfPyopenclContext()
# # CPU contextr
# from xfields.contexts.cpu import XfCpuContext
# context = XfCpuContext()
np2dev = context.nparray_to_context_array
dev2np = context.nparray_from_context_array
n_time = 1... | 22.481481 | 74 | 0.715815 |
a6509185d41f1a1a0b6834fa2d5e99c26d430ff4 | 2,976 | py | Python | src/mbed_cloud/exceptions.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 12 | 2017-12-28T11:18:43.000Z | 2020-10-04T12:11:15.000Z | src/mbed_cloud/exceptions.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 50 | 2017-12-21T12:50:41.000Z | 2020-01-13T16:07:08.000Z | src/mbed_cloud/exceptions.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 8 | 2018-04-25T17:47:29.000Z | 2019-08-29T06:38:27.000Z | # ---------------------------------------------------------------------------
# Pelion Device Management SDK
# (C) COPYRIGHT 2017 Arm Limited
#
# 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
#... | 32.347826 | 87 | 0.674395 |
dc800bbdac3f9762cf3d6036696c0486a729dd73 | 70 | py | Python | example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/K/kilogram-atomic mass unit relationship.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/K/kilogram-atomic mass unit relationship.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/K/kilogram-atomic mass unit relationship.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | 1 | 2021-02-04T04:51:48.000Z | 2021-02-04T04:51:48.000Z | constants.physical_constants["kilogram-atomic mass unit relationship"] | 70 | 70 | 0.871429 |
685653b976d19a5e962bc6734bcdf7c28cecbd62 | 2,585 | py | Python | data/p4VQE/R1/benchmark/startQiskit_QC196.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R1/benchmark/startQiskit_QC196.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R1/benchmark/startQiskit_QC196.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=12
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 27.5 | 118 | 0.634429 |
edcdcf748518c91f5923809f4f7ab5dacec0d0e7 | 36,682 | py | Python | datagun/datagun.py | pavelmaksimov/python-data-transformer | f2aa0c0151c896481da947ff9dc1ab9ab4215953 | [
"MIT"
] | 1 | 2021-06-21T18:40:21.000Z | 2021-06-21T18:40:21.000Z | datagun/datagun.py | pavelmaksimov/python-data-transformer | f2aa0c0151c896481da947ff9dc1ab9ab4215953 | [
"MIT"
] | null | null | null | datagun/datagun.py | pavelmaksimov/python-data-transformer | f2aa0c0151c896481da947ff9dc1ab9ab4215953 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import ast
import datetime as dt
import logging
import re
import sys
from collections.abc import Iterable
import pytz
from dateutil import parser as dt_parser
logging.basicConfig(level=logging.INFO)
ONLY_SERIES_ERROR = "Only Accepts Series"
NULL_VALUES = {None, "", "NULL", "none", "None", "nu... | 33.560842 | 126 | 0.551551 |
c925da17ee4b44f9a37eca09400e92c17d26165f | 160 | py | Python | data/urls.py | gokul1630/Truecaller-APIs | d8ae0b08e60e470577931a81526c47a672b8dfe5 | [
"MIT"
] | 7 | 2020-12-19T07:23:32.000Z | 2022-03-10T20:03:15.000Z | data/urls.py | gokul1630/Truecaller-APIs | d8ae0b08e60e470577931a81526c47a672b8dfe5 | [
"MIT"
] | 6 | 2020-06-06T11:35:39.000Z | 2022-03-12T19:12:21.000Z | data/urls.py | gokul1630/Truecaller-APIs | d8ae0b08e60e470577931a81526c47a672b8dfe5 | [
"MIT"
] | 8 | 2020-08-14T00:08:11.000Z | 2021-11-18T10:20:57.000Z | from django.urls import path, include
from .views import home_view
urlpatterns = [
path('', home_view),
path('api/data/', include("data.api.urls")),
]
| 20 | 48 | 0.675 |
e5652e35f5bddc51a76105fe999ecf2d5387ad75 | 4,049 | py | Python | modules/startup/last.py | flavour/lacity | fd1f1cccdcea64d07143b29d4f88996e3af35c4b | [
"MIT"
] | null | null | null | modules/startup/last.py | flavour/lacity | fd1f1cccdcea64d07143b29d4f88996e3af35c4b | [
"MIT"
] | null | null | null | modules/startup/last.py | flavour/lacity | fd1f1cccdcea64d07143b29d4f88996e3af35c4b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# File needs to be last in order to be able to have all Tables defined
# -----------------------------------------------------------------------------
# GIS config
# -----------------------------------------------------------------------------
from gluon import *
request = current.request
rep... | 38.198113 | 79 | 0.520622 |
301489939afd68c995c61bc7928aebcbff0f06a9 | 3,375 | py | Python | tensorpac/methods/meth_switch.py | tylerbrunette/tensorpac | afae9557db417a54b001c0837dbc8638f6fe20f0 | [
"BSD-3-Clause"
] | null | null | null | tensorpac/methods/meth_switch.py | tylerbrunette/tensorpac | afae9557db417a54b001c0837dbc8638f6fe20f0 | [
"BSD-3-Clause"
] | null | null | null | tensorpac/methods/meth_switch.py | tylerbrunette/tensorpac | afae9557db417a54b001c0837dbc8638f6fe20f0 | [
"BSD-3-Clause"
] | null | null | null | """Switch and utility functions for PAC methods."""
import numpy as np
from functools import partial
def get_pac_fcn(idp, n_bins, p, implementation="tensor", full=False):
"""Get the function for computing Phase-Amplitude coupling.
This function also allow to switch between Tensor / Numba implementations
... | 36.684783 | 77 | 0.622519 |
05535320dc39fdc058839bd8e95adb6e4ec64c4f | 3,278 | py | Python | model-experiments/token-based-similarity-classification/src/BagOfTokens/BagOfTokensClassifier.py | yingkitw/Project_CodeNet | 565ac79043d240c70e5bb9fdfbf5eccdec4e0bc3 | [
"Apache-2.0"
] | 1,156 | 2021-05-11T08:37:00.000Z | 2022-03-31T11:28:51.000Z | model-experiments/token-based-similarity-classification/src/BagOfTokens/BagOfTokensClassifier.py | yingkitw/Project_CodeNet | 565ac79043d240c70e5bb9fdfbf5eccdec4e0bc3 | [
"Apache-2.0"
] | 29 | 2021-05-11T18:54:49.000Z | 2022-03-11T15:26:35.000Z | model-experiments/token-based-similarity-classification/src/BagOfTokens/BagOfTokensClassifier.py | yingkitw/Project_CodeNet | 565ac79043d240c70e5bb9fdfbf5eccdec4e0bc3 | [
"Apache-2.0"
] | 149 | 2021-05-11T10:38:24.000Z | 2022-03-21T04:52:28.000Z | """
Program for code classification by Bag or Tokens technique
History of traing is pickled to be plotted with other application
Implements several simple classifiers of sorce code:
- Linear (1 layer neural network)
- 2 layer neural network giving ~97% accuracy for 5 classes
- General N layer network
The programm pr... | 35.247312 | 75 | 0.64277 |
df9dc5e26be5dbb8531a1dad2c10cb9ca4d3a32b | 24,841 | py | Python | fst/loanwords.py | ytsvetko/loanwords | dfe83ef9ccc5b6d70b87a9da0414e6737b922ab3 | [
"Apache-2.0"
] | null | null | null | fst/loanwords.py | ytsvetko/loanwords | dfe83ef9ccc5b6d70b87a9da0414e6737b922ab3 | [
"Apache-2.0"
] | null | null | null | fst/loanwords.py | ytsvetko/loanwords | dfe83ef9ccc5b6d70b87a9da0414e6737b922ab3 | [
"Apache-2.0"
] | 1 | 2019-01-15T03:34:27.000Z | 2019-01-15T03:34:27.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import phone_transducer as pt
import syllabification, morphology
import operations, ot_constraints
import collections
import hashlib
import math
import argparse
import sys, os, glob
import time
import operator
from functools import reduce
parser = argparse.ArgumentParser... | 38.75351 | 126 | 0.7044 |
61f5bb491d2e3efc699270821fe4eb79bb016dd1 | 2,701 | py | Python | tools/ci_build/gen_def.py | dennyac/onnxruntime | d5175795d2b7f2db18b0390f394a49238f814668 | [
"MIT"
] | 18 | 2020-05-19T12:48:07.000Z | 2021-04-28T06:41:57.000Z | tools/ci_build/gen_def.py | dennyac/onnxruntime | d5175795d2b7f2db18b0390f394a49238f814668 | [
"MIT"
] | 61 | 2021-05-31T05:15:41.000Z | 2022-03-29T22:34:33.000Z | tools/ci_build/gen_def.py | dennyac/onnxruntime | d5175795d2b7f2db18b0390f394a49238f814668 | [
"MIT"
] | 9 | 2021-05-14T20:17:26.000Z | 2022-03-20T11:44:29.000Z | #!/usr/bin/python3
import argparse
import os
def parse_arguments():
parser = argparse.ArgumentParser()
parser.add_argument("--src_root", required=True, help="input symbol file")
parser.add_argument("--output", required=True, help="output file")
parser.add_argument("--output_source", required=True, hel... | 36.013333 | 108 | 0.610885 |
67bfd425e062627631dba4953b4f92902ed52330 | 19,300 | py | Python | src/rich_click/rich_click.py | Jorricks/rich-click | daf037aa4fa45550175dc714fec4cec0bcf4b24d | [
"MIT"
] | null | null | null | src/rich_click/rich_click.py | Jorricks/rich-click | daf037aa4fa45550175dc714fec4cec0bcf4b24d | [
"MIT"
] | null | null | null | src/rich_click/rich_click.py | Jorricks/rich-click | daf037aa4fa45550175dc714fec4cec0bcf4b24d | [
"MIT"
] | null | null | null | import click
from rich.align import Align
from rich.columns import Columns
from rich.console import Console
from rich.highlighter import RegexHighlighter
from rich.markdown import Markdown
from rich.padding import Padding
from rich.panel import Panel
from rich.table import Table
from rich.text import Text
from rich.the... | 36.210131 | 135 | 0.617772 |
2fcfd48d4aa3fe0fa8816c30e6bd666b3d992a4c | 3,346 | py | Python | gdsfactory/samples/mask_custom/test_mask.py | gdsfactory/gdsfactory | e53b1f3415a81862d465e0443fc09fb35d14d1e0 | [
"MIT"
] | 42 | 2020-05-25T09:33:45.000Z | 2022-03-29T03:41:19.000Z | gdsfactory/samples/mask_custom/test_mask.py | gdsfactory/gdsfactory | e53b1f3415a81862d465e0443fc09fb35d14d1e0 | [
"MIT"
] | 133 | 2020-05-28T18:29:04.000Z | 2022-03-31T22:21:42.000Z | gdsfactory/samples/mask_custom/test_mask.py | gdsfactory/gdsfactory | e53b1f3415a81862d465e0443fc09fb35d14d1e0 | [
"MIT"
] | 17 | 2020-06-30T07:07:50.000Z | 2022-03-17T15:45:27.000Z | """This is a sample on how to define custom components."""
import shutil
from pathlib import Path
import gdsfactory as gf
from gdsfactory.add_grating_couplers import (
add_grating_couplers_with_loopback_fiber_array,
)
from gdsfactory.component import Component
from gdsfactory.components.spiral_inner_io import spir... | 27.42623 | 87 | 0.701136 |
c6c45abb92b9f84ae1fd9a48a774ef0b39c859f9 | 13,379 | py | Python | src/sage/databases/stein_watkins.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | 2 | 2021-08-20T00:30:35.000Z | 2021-11-17T10:54:00.000Z | src/sage/databases/stein_watkins.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | null | null | null | src/sage/databases/stein_watkins.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | null | null | null | r"""
The Stein-Watkins table of elliptic curves
Sage gives access to the Stein-Watkins table of elliptic curves, via an
optional package that you must install. This is a huge database of elliptic
curves. You can download the database as a 2.6GB Sage package from
http://modular.math.washington.edu/sagedb/, which you in... | 36.654795 | 99 | 0.527767 |
6e6bc95cc1e5f5e93855d1ce947439e38031735d | 290 | py | Python | EstruturaSequencial/ex4.py | HellDonXXl/python | cd33dd879fb1cc640e1e0171a590cf2d3e89c96b | [
"MIT"
] | null | null | null | EstruturaSequencial/ex4.py | HellDonXXl/python | cd33dd879fb1cc640e1e0171a590cf2d3e89c96b | [
"MIT"
] | null | null | null | EstruturaSequencial/ex4.py | HellDonXXl/python | cd33dd879fb1cc640e1e0171a590cf2d3e89c96b | [
"MIT"
] | null | null | null | n1 = float(input("Qual foi sua note no 1 bimestre: "))
n2 = float(input("Qual foi sua note no 2 bimestre: "))
n3 = float(input("Qual foi sua note no 3 bimestre: "))
n4 = float(input("Qual foi sua note no 4 bimestre: "))
m = (n1+ n2 + n3 + n4) / 4
print("sua nota final foi {}".format(m)) | 36.25 | 54 | 0.637931 |
41e0dbe358fc70cfa439e64e92b208e0f2bb0123 | 3,883 | py | Python | tests/kafkatest/tests/streams/streams_broker_compatibility_test.py | exfly/kafka | e62c1433623a53a9fb7898199117c6c791f5fe65 | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/tests/streams/streams_broker_compatibility_test.py | exfly/kafka | e62c1433623a53a9fb7898199117c6c791f5fe65 | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/tests/streams/streams_broker_compatibility_test.py | exfly/kafka | e62c1433623a53a9fb7898199117c6c791f5fe65 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 44.125 | 168 | 0.669328 |
b5a4bad84f34b6e94a2e1176c7459a435b2a232d | 6,673 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/netapp/aws/tests/unit/plugins/modules/test_aws_netapp_cvs_filesystems.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/netapp/aws/tests/unit/plugins/modules/test_aws_netapp_cvs_filesystems.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/netapp/aws/tests/unit/plugins/modules/test_aws_netapp_cvs_filesystems.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | # (c) 2019, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
''' unit tests AWS CVS FileSystems Ansible module: aws_netapp_cvs_filesystems'''
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import pytest
impor... | 42.775641 | 128 | 0.681553 |
e9fb567c247d57095622c10083f0cb87b8ed1686 | 337 | py | Python | graph_util/__init__.py | embedded-machine-learning/mmdnn-graph-utils | 704bf40ae715305abd42bef581f9f23cfbbda331 | [
"Apache-2.0"
] | null | null | null | graph_util/__init__.py | embedded-machine-learning/mmdnn-graph-utils | 704bf40ae715305abd42bef581f9f23cfbbda331 | [
"Apache-2.0"
] | null | null | null | graph_util/__init__.py | embedded-machine-learning/mmdnn-graph-utils | 704bf40ae715305abd42bef581f9f23cfbbda331 | [
"Apache-2.0"
] | 2 | 2021-04-27T12:14:29.000Z | 2021-12-30T11:37:13.000Z | import logging
from .annette_graph import *
try:
from .mmdnn_graph import *
except ModuleNotFoundError:
logging.error("Warning: MMDnnmodule could not be imported! To use, install mmdnn!")
try:
from .onnx_graph import *
except ModuleNotFoundError:
logging.error("ONNX module could not be imported! To use... | 30.636364 | 87 | 0.753709 |
db0678fd518608e11d5ab6a45366fb1074c21be2 | 68 | py | Python | Iniciante/1959.py | jeconiassantos/uriissues | f6c32f8632b9940a4886240ea5d22300922dc79a | [
"MIT"
] | null | null | null | Iniciante/1959.py | jeconiassantos/uriissues | f6c32f8632b9940a4886240ea5d22300922dc79a | [
"MIT"
] | null | null | null | Iniciante/1959.py | jeconiassantos/uriissues | f6c32f8632b9940a4886240ea5d22300922dc79a | [
"MIT"
] | null | null | null | v1,v2 = input().split(' ')
v1 = int(v1)
v2 = int(v2)
print(v1 * v2)
| 13.6 | 26 | 0.544118 |
0ce1ae4a84eb5bf2deeb7684a82447a4a9ad88b4 | 2,706 | py | Python | tests/modules/folder/test_plan.py | jpl2020/cloud-foundation-fabric | 024e828a9d3dc94b5c7f86a2fb33585c29d87613 | [
"Apache-2.0"
] | 84 | 2022-01-12T21:25:12.000Z | 2022-03-31T05:40:02.000Z | tests/modules/folder/test_plan.py | jpl2020/cloud-foundation-fabric | 024e828a9d3dc94b5c7f86a2fb33585c29d87613 | [
"Apache-2.0"
] | 77 | 2022-01-12T18:49:05.000Z | 2022-03-29T13:05:17.000Z | tests/modules/folder/test_plan.py | jpl2020/cloud-foundation-fabric | 024e828a9d3dc94b5c7f86a2fb33585c29d87613 | [
"Apache-2.0"
] | 55 | 2022-01-15T13:47:30.000Z | 2022-03-31T17:35:48.000Z | # Copyright 2022 Google LLC
#
# 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, ... | 37.068493 | 84 | 0.624169 |
572a3d39f4bd141208200cb1e318837853b7ed8b | 5,906 | py | Python | src/utils/misc/solver.py | rahlk/MOOSE | e45b64cf625bb90aa8c1c24ab1c8f52ab485a316 | [
"MIT"
] | null | null | null | src/utils/misc/solver.py | rahlk/MOOSE | e45b64cf625bb90aa8c1c24ab1c8f52ab485a316 | [
"MIT"
] | 1 | 2016-11-27T20:18:00.000Z | 2016-11-27T20:18:00.000Z | src/utils/misc/solver.py | rahlk/MAPGen | 25bc1a84f07e30ab0dbb638cd2aa1ce416c510ff | [
"MIT"
] | null | null | null | from __future__ import print_function, division
import sys
# Update path
sys.path.append('..')
import pycosat as ps
from os import walk
from pdb import set_trace
import csv
import pandas as pd
import numpy as np
from time import time
from sugar.ascii import progress_bar
class SATsolver:
"SAT Solver"
def __ini... | 30.760417 | 82 | 0.520488 |
1e3d47db37261dde18ed8b7e301a7e9ade305224 | 4,647 | py | Python | tests/i2b2modeltests/sharedtests/test_i2b2_core.py | BD2KOnFHIR/i2b2model | 566be446f4b8691f8d82d5d04b7635248aba6041 | [
"Apache-2.0"
] | 1 | 2019-12-05T18:25:00.000Z | 2019-12-05T18:25:00.000Z | tests/i2b2modeltests/sharedtests/test_i2b2_core.py | BD2KOnFHIR/i2b2model | 566be446f4b8691f8d82d5d04b7635248aba6041 | [
"Apache-2.0"
] | 3 | 2020-04-13T14:37:47.000Z | 2020-04-14T16:58:09.000Z | tests/i2b2modeltests/sharedtests/test_i2b2_core.py | BD2KOnFHIR/i2b2model | 566be446f4b8691f8d82d5d04b7635248aba6041 | [
"Apache-2.0"
] | null | null | null |
import unittest
from datetime import datetime, timedelta
from dynprops import as_dict, heading, clear
from i2b2model.data.i2b2patientdimension import VitalStatusCd
from i2b2model.shared.i2b2core import I2B2Core, I2B2CoreWithUploadId
from i2b2model.testingutils.base_test_case import BaseTestCase
class I2B2CoreTestC... | 39.717949 | 111 | 0.682591 |
af09097e4ca214a730f08dcdbaac7dc8fbba78cd | 2,078 | py | Python | Inverted_Pendulum/fuzzy/doc/structure/dot/dot.py | ghazaleh-mahmoodi/-Preceptron-Implementation-without-framework | 22bd8bbdc7d5a55915b9227ee3d142ab7a498028 | [
"MIT"
] | 1 | 2021-11-29T03:07:26.000Z | 2021-11-29T03:07:26.000Z | Inverted_Pendulum/fuzzy/doc/structure/dot/dot.py | ghazaleh-mahmoodi/-Preceptron-Implementation-without-framework | 22bd8bbdc7d5a55915b9227ee3d142ab7a498028 | [
"MIT"
] | null | null | null | Inverted_Pendulum/fuzzy/doc/structure/dot/dot.py | ghazaleh-mahmoodi/-Preceptron-Implementation-without-framework | 22bd8bbdc7d5a55915b9227ee3d142ab7a498028 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Rene Liebscher
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option) any
# later version.... | 31.969231 | 79 | 0.708373 |
813b4713b52b1348fb3918d6536733bb7a2361df | 9,957 | py | Python | electrum_xazab/plugins/email_requests/qt.py | nunumichael/electrum-xazab | f128c765f451b418a418f9cd8b8e24fd8f66df74 | [
"MIT"
] | null | null | null | electrum_xazab/plugins/email_requests/qt.py | nunumichael/electrum-xazab | f128c765f451b418a418f9cd8b8e24fd8f66df74 | [
"MIT"
] | null | null | null | electrum_xazab/plugins/email_requests/qt.py | nunumichael/electrum-xazab | f128c765f451b418a418f9cd8b8e24fd8f66df74 | [
"MIT"
] | 2 | 2021-05-23T23:38:56.000Z | 2021-05-24T19:01:07.000Z | #!/usr/bin/env python
#
# Electrum - Lightweight Bitcoin Client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without... | 35.560714 | 103 | 0.643266 |
214c69d414c1509f7d8700b3a669fba6c7fdd5bd | 15,103 | py | Python | python2/ltk/watch.py | logse34/survivor | 44dd7f8e157bc12768bd535b3a28627029703741 | [
"MIT"
] | null | null | null | python2/ltk/watch.py | logse34/survivor | 44dd7f8e157bc12768bd535b3a28627029703741 | [
"MIT"
] | null | null | null | python2/ltk/watch.py | logse34/survivor | 44dd7f8e157bc12768bd535b3a28627029703741 | [
"MIT"
] | null | null | null | import ctypes
from ltk.actions import Action
from ltk.logger import logger
from ltk.utils import map_locale, restart
import time
import requests
from requests.exceptions import ConnectionError
import os
import sys
from watchdog.observers import Observer
from watchdog.events import FileSystemEvent
from ltk.watchhandler ... | 45.354354 | 131 | 0.582864 |
1e1f536b74a5591191a5c23a29e6b4586896cf24 | 1,066 | py | Python | localstack/utils/http_utils.py | jorges119/localstack | a8a78cda6c13b2e42bc46301b23c7143580132fb | [
"Apache-2.0"
] | 1 | 2021-07-20T16:21:34.000Z | 2021-07-20T16:21:34.000Z | localstack/utils/http_utils.py | jorges119/localstack | a8a78cda6c13b2e42bc46301b23c7143580132fb | [
"Apache-2.0"
] | null | null | null | localstack/utils/http_utils.py | jorges119/localstack | a8a78cda6c13b2e42bc46301b23c7143580132fb | [
"Apache-2.0"
] | null | null | null | import re
def uses_chunked_encoding(response):
return response.headers.get("Transfer-Encoding", "").lower() == "chunked"
def parse_chunked_data(data):
"""Parse the body of an HTTP message transmitted with chunked transfer encoding."""
data = (data or "").strip()
chunks = []
while data:
l... | 28.810811 | 87 | 0.553471 |
c3bfe145f6b5f1a4cc25337d3a4948de92b8bd20 | 50 | py | Python | greencode_hub/greenhub_kernels/greenhub_measurement_magic/measure_cell/user_code.py | TrevorVillwock/greencode_ext8_server | b1fbacb3b76dd55e3e113663e6b24d6227f06b71 | [
"BSD-3-Clause"
] | null | null | null | greencode_hub/greenhub_kernels/greenhub_measurement_magic/measure_cell/user_code.py | TrevorVillwock/greencode_ext8_server | b1fbacb3b76dd55e3e113663e6b24d6227f06b71 | [
"BSD-3-Clause"
] | null | null | null | greencode_hub/greenhub_kernels/greenhub_measurement_magic/measure_cell/user_code.py | TrevorVillwock/greencode_ext8_server | b1fbacb3b76dd55e3e113663e6b24d6227f06b71 | [
"BSD-3-Clause"
] | null | null | null | for i in range(1, 10):
print(" "*i + str(i))
| 12.5 | 25 | 0.48 |
429284cea434246c75a18dc0d79c79b7f432b940 | 1,206 | py | Python | Data-CSV/rng.py | GabrielCiolac/SYSC-4005-Simulation | bd68760aa09b7297a4dbca89f65682e635b79f70 | [
"MIT"
] | null | null | null | Data-CSV/rng.py | GabrielCiolac/SYSC-4005-Simulation | bd68760aa09b7297a4dbca89f65682e635b79f70 | [
"MIT"
] | 1 | 2021-03-12T22:53:27.000Z | 2021-07-14T15:32:18.000Z | Data-CSV/rng.py | GabrielCiolac/SYSC-4005-Simulation | bd68760aa09b7297a4dbca89f65682e635b79f70 | [
"MIT"
] | null | null | null | import math
from random import random
import numpy as np
'''
cdf log normal
'''
def log_normal(x:float,mu=0,sigma=1):
if(x == 0):
return 0
sigma = math.sqrt(sigma)
a = (math.log(x) - mu)/math.sqrt(2*sigma**2)
p = 0.5 + 0.5*math.erf(a)
return p
def write_to_csv(num):
with open('test.c... | 21.535714 | 81 | 0.620232 |
eef0fc982a61f3135b2eb786b78ae9cfc9f385fe | 1,110 | py | Python | setup.py | mitodl/open-discussions-client | e2da9b751eebcfbfb20d081baf46299fbfea38b9 | [
"BSD-3-Clause"
] | null | null | null | setup.py | mitodl/open-discussions-client | e2da9b751eebcfbfb20d081baf46299fbfea38b9 | [
"BSD-3-Clause"
] | 20 | 2017-08-28T18:12:33.000Z | 2018-07-30T17:26:27.000Z | setup.py | mitodl/open-discussions-client | e2da9b751eebcfbfb20d081baf46299fbfea38b9 | [
"BSD-3-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Python setup file for the open_discussions_client app.
"""
from __future__ import unicode_literals
import os
from setuptools import setup, find_packages
import open_discussions_api
# pylint: disable=invalid-name
dev_requires = [
'flake8',
]
install_requires = open('requirements.txt'... | 25.227273 | 77 | 0.7 |
19eb40f77b524d7be4d830b66de628725e02d4b1 | 11,417 | py | Python | mridc/collections/reconstruction/metrics/evaluate.py | jerke123/mridc | 7e22ac50f8df73f2305d61979da2a5d59874546e | [
"Apache-2.0"
] | null | null | null | mridc/collections/reconstruction/metrics/evaluate.py | jerke123/mridc | 7e22ac50f8df73f2305d61979da2a5d59874546e | [
"Apache-2.0"
] | null | null | null | mridc/collections/reconstruction/metrics/evaluate.py | jerke123/mridc | 7e22ac50f8df73f2305d61979da2a5d59874546e | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
__author__ = "Dimitrios Karkalousos"
# Parts of the code have been taken from https://github.com/facebookresearch/fastMRI
import os
import pathlib
from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
from os.path import exists
import h5py
import numpy as np
import pandas as pd
import t... | 37.555921 | 118 | 0.578173 |
c211641a75a6c2c86128eb89063087464b2c5dc7 | 50,234 | py | Python | taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/marshalbrill.py | hectormartinez/rougexstem | 32da9eab253cb88fc1882e59026e8b5b40900a25 | [
"Apache-2.0"
] | null | null | null | taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/marshalbrill.py | hectormartinez/rougexstem | 32da9eab253cb88fc1882e59026e8b5b40900a25 | [
"Apache-2.0"
] | null | null | null | taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/marshalbrill.py | hectormartinez/rougexstem | 32da9eab253cb88fc1882e59026e8b5b40900a25 | [
"Apache-2.0"
] | null | null | null | # Natural Language Toolkit: Brill Tagger
#
# Copyright (C) 2001-2005 University of Pennsylvania
# Authors: Christopher Maloof <cjmaloof@gradient.cis.upenn.edu>
# Edward Loper <edloper@gradient.cis.upenn.edu>
# Steven Bird <sb@ldc.upenn.edu>
# URL: <http://nltk.sf.net>
# For license information, see LI... | 40.774351 | 113 | 0.577119 |
c896879a41e4e259601a6e771265c88a54909b03 | 2,576 | py | Python | setup.py | LaudateCorpus1/python-data-fusion | d57bee22c85867dfe7062dc391524cf5750b9474 | [
"Apache-2.0"
] | null | null | null | setup.py | LaudateCorpus1/python-data-fusion | d57bee22c85867dfe7062dc391524cf5750b9474 | [
"Apache-2.0"
] | null | null | null | setup.py | LaudateCorpus1/python-data-fusion | d57bee22c85867dfe7062dc391524cf5750b9474 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 30.666667 | 74 | 0.685171 |
34e5e7029ce653d71e270c0e00a8a7219bc48885 | 1,757 | py | Python | rycsv_pkg/scripts/controller_node.py | camilodelvalle/human-tracking-mobile-robot | 92d3d9fdfae0b40f17f42d4d549ca46ac4911baf | [
"MIT"
] | null | null | null | rycsv_pkg/scripts/controller_node.py | camilodelvalle/human-tracking-mobile-robot | 92d3d9fdfae0b40f17f42d4d549ca46ac4911baf | [
"MIT"
] | null | null | null | rycsv_pkg/scripts/controller_node.py | camilodelvalle/human-tracking-mobile-robot | 92d3d9fdfae0b40f17f42d4d549ca46ac4911baf | [
"MIT"
] | null | null | null | #!/usr/bin/python
import rospy
import os
import sys
import numpy as np
from geometry_msgs.msg import Twist
from controller_model import Controller
from communication_model import Communication
if __name__ == '__main__':
com = Communication()
ctr = Controller()
# Initial Pose (for lab2 and lab... | 25.838235 | 79 | 0.560046 |
8361058bbc406d04677b35e3a2bd565abf41be1d | 312 | py | Python | starters/starter/config/api_router.py | Thembahank/django_tutorials | c6f16ecb0bb23d19dbf059d920d9f9d1adb1fbf2 | [
"MIT"
] | null | null | null | starters/starter/config/api_router.py | Thembahank/django_tutorials | c6f16ecb0bb23d19dbf059d920d9f9d1adb1fbf2 | [
"MIT"
] | null | null | null | starters/starter/config/api_router.py | Thembahank/django_tutorials | c6f16ecb0bb23d19dbf059d920d9f9d1adb1fbf2 | [
"MIT"
] | null | null | null | from django.conf import settings
from rest_framework.routers import DefaultRouter, SimpleRouter
from starter.users.api.views import UserViewSet
if settings.DEBUG:
router = DefaultRouter()
else:
router = SimpleRouter()
router.register("users", UserViewSet)
app_name = "api"
urlpatterns = router.urls
| 19.5 | 62 | 0.778846 |
d85e2dbc6211eda118c2f19a06d696a251c4863e | 97 | py | Python | tests/test_liquid_app_flask.py | redxzeta/liquid-flask-app | 1ec30225fa3f3ad9378f886730a1ccddb47b5147 | [
"MIT"
] | null | null | null | tests/test_liquid_app_flask.py | redxzeta/liquid-flask-app | 1ec30225fa3f3ad9378f886730a1ccddb47b5147 | [
"MIT"
] | null | null | null | tests/test_liquid_app_flask.py | redxzeta/liquid-flask-app | 1ec30225fa3f3ad9378f886730a1ccddb47b5147 | [
"MIT"
] | null | null | null | from liquid_app_flask import __version__
def test_version():
assert __version__ == '0.1.0'
| 16.166667 | 40 | 0.742268 |
a64d079774dbde56aa617960e66e9374d2e0b7dd | 5,373 | py | Python | ArtifactClass.py | Gatuno7000/genshin-artifact-simulator | 548eab99d9f28cb899698ae54772061cea6150e5 | [
"MIT"
] | 1 | 2022-03-20T21:24:11.000Z | 2022-03-20T21:24:11.000Z | ArtifactClass.py | Gatuno7000/genshin-artifact-simulator | 548eab99d9f28cb899698ae54772061cea6150e5 | [
"MIT"
] | null | null | null | ArtifactClass.py | Gatuno7000/genshin-artifact-simulator | 548eab99d9f28cb899698ae54772061cea6150e5 | [
"MIT"
] | 1 | 2022-03-14T02:01:18.000Z | 2022-03-14T02:01:18.000Z | import math
import random
class Artifact:
#pre-determined stat probabilities obtained from the wiki
TYPES = [
"Flower",
"Plume",
"Sands",
"Goblet",
"Circlet"
]
ARTIFACT_MAIN_STATS = {
"Flower":{"HP":100},
"Plume":{"ATK":100},
"Sands":{... | 47.548673 | 503 | 0.569328 |
a6a6c02f4acff3827255c99c1ca3a1490a7e8e01 | 1,082 | py | Python | google-cloud-recaptcha_enterprise-v1/synth.py | teamapp/google-cloud-ruby | 4687c69c70782661a9be1f418693780fd95ddff1 | [
"Apache-2.0"
] | null | null | null | google-cloud-recaptcha_enterprise-v1/synth.py | teamapp/google-cloud-ruby | 4687c69c70782661a9be1f418693780fd95ddff1 | [
"Apache-2.0"
] | null | null | null | google-cloud-recaptcha_enterprise-v1/synth.py | teamapp/google-cloud-ruby | 4687c69c70782661a9be1f418693780fd95ddff1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# 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, s... | 33.8125 | 98 | 0.770795 |
72c7334c0800a8f640d2286acbca8c7f6574b52f | 760 | py | Python | databricksapi/InstanceProfile.py | douglasfraser-cloudreach/databricks_api | 2226017f86b34d02d485957d6949cce8186ccf73 | [
"MIT"
] | null | null | null | databricksapi/InstanceProfile.py | douglasfraser-cloudreach/databricks_api | 2226017f86b34d02d485957d6949cce8186ccf73 | [
"MIT"
] | null | null | null | databricksapi/InstanceProfile.py | douglasfraser-cloudreach/databricks_api | 2226017f86b34d02d485957d6949cce8186ccf73 | [
"MIT"
] | null | null | null | from . import Databricks
class InstanceProfile(Databricks.Databricks):
def __init__(self, url):
super().__init__()
self._url = url
self._api_type = 'instance-profiles'
def addProfile(self, profile_arn, skip_validation=None):
endpoint = 'add'
url = self._set_url(self._url, self._api_type, endpoint)
payl... | 21.714286 | 58 | 0.721053 |
e4db816fc85328c2aa232a7fc8836a95b8102ae4 | 1,780 | py | Python | v2.5.7/toontown/ai/DistributedSillyMeterMgr.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v2.5.7/toontown/ai/DistributedSillyMeterMgr.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v2.5.7/toontown/ai/DistributedSillyMeterMgr.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject
import time
class DistributedSillyMeterMgr(DistributedObject.DistributedObject):
neverDisable = 1
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSillyMeterMgr')
def __init__(self, cr):
... | 35.6 | 84 | 0.70618 |
5451f7b81b01ffe3b3038b9403c91c004380f8b4 | 17,753 | py | Python | pineboolib/fllegacy/bad/FLManager_old.py | Miguel-J/pineboo-prueba-antigua | 4e6288fed078b8b9e9efcd58a54129770c937db8 | [
"MIT"
] | null | null | null | pineboolib/fllegacy/bad/FLManager_old.py | Miguel-J/pineboo-prueba-antigua | 4e6288fed078b8b9e9efcd58a54129770c937db8 | [
"MIT"
] | null | null | null | pineboolib/fllegacy/bad/FLManager_old.py | Miguel-J/pineboo-prueba-antigua | 4e6288fed078b8b9e9efcd58a54129770c937db8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sip
from pineboolib.fllegacy.FLUtil import FLUtil
from pineboolib.fllegacy.FLTableMetaData import FLTableMetaData
# switch on QVariant in Python3
sip.setapi('QVariant', 2)
sip.setapi('QString', 1)
"""
Esta clase sirve como administrador de la base de datos.
Encargada de abrir los form... | 40.71789 | 190 | 0.692503 |
78d022d8fbf8599d18835ad66902d154ce4ef497 | 4,959 | py | Python | src/test.py | hatake77/MWP-stackLSTM | 20e58c9f9635c526d2bcf000a74086229cfc9489 | [
"MIT"
] | 15 | 2019-08-11T07:08:40.000Z | 2021-07-15T02:42:42.000Z | src/test.py | hatake77/MWP-stackLSTM | 20e58c9f9635c526d2bcf000a74086229cfc9489 | [
"MIT"
] | 1 | 2019-10-22T08:18:36.000Z | 2020-09-22T17:12:37.000Z | src/test.py | hatake77/MWP-stackLSTM | 20e58c9f9635c526d2bcf000a74086229cfc9489 | [
"MIT"
] | 7 | 2019-08-05T06:46:51.000Z | 2021-11-11T06:52:51.000Z | import numpy as np
import torch
from torch import nn
import torch.nn.functional as F
from utils import DataLoader
from config import *
args = get_args()
data_loader = DataLoader(args)
def src_to_mask(src):
src = src.cpu().numpy()
batch_data_mask_tok = []
for encode_sen_idx in src:
token = 1
... | 34.4375 | 123 | 0.511393 |
fcb28767956f3ca531190a738403e54ec82a9520 | 2,087 | py | Python | Student Registration Project Files/add_student_gui.py | mastadict/automated-student-register | 43ea2f9cced1129a0a6cec88d791894d0a0c9a20 | [
"MIT"
] | 1 | 2020-12-09T15:12:24.000Z | 2020-12-09T15:12:24.000Z | Student Registration Project Files/add_student_gui.py | mastadict/automated-student-register | 43ea2f9cced1129a0a6cec88d791894d0a0c9a20 | [
"MIT"
] | 4 | 2021-06-08T19:44:04.000Z | 2022-03-11T23:44:05.000Z | Student Registration Project Files/add_student_gui.py | khoisan25/automated-student-register | 43ea2f9cced1129a0a6cec88d791894d0a0c9a20 | [
"MIT"
] | null | null | null | from easygui import *
import subprocess
import time
msg = "Enter Students information"
title = "Student registration portal"
fieldNames = ["Name","Student ID","Form","House"]
fieldValues = [] # we start with blanks for the values
fieldValues = multenterbox(msg,title, fieldNames)
# make sure that none of the fields w... | 25.45122 | 119 | 0.6138 |
e15ce2e7d173d9e3b32d242da4d4447f78aec410 | 1,403 | py | Python | django/sqls/migrations/0001_initial.py | synw/sqlite-speed | 1b5da551c6518d5d1a30914fa712bb9879083a85 | [
"MIT"
] | 1 | 2019-11-14T03:11:37.000Z | 2019-11-14T03:11:37.000Z | django/sqls/migrations/0001_initial.py | synw/sqlite-speed | 1b5da551c6518d5d1a30914fa712bb9879083a85 | [
"MIT"
] | null | null | null | django/sqls/migrations/0001_initial.py | synw/sqlite-speed | 1b5da551c6518d5d1a30914fa712bb9879083a85 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-05-03 13:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Rec',... | 36.921053 | 114 | 0.562366 |
550df7197766a5c0df5520a176d44431cde226a1 | 211 | py | Python | hr-temp-check.py | turkishmaid/dwd-cdc | 6610246b57c1a8ed4544e1954a67b96c1d1068d6 | [
"MIT"
] | null | null | null | hr-temp-check.py | turkishmaid/dwd-cdc | 6610246b57c1a8ed4544e1954a67b96c1d1068d6 | [
"MIT"
] | null | null | null | hr-temp-check.py | turkishmaid/dwd-cdc | 6610246b57c1a8ed4544e1954a67b96c1d1068d6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
"""
Develop check module standalone and see whether it makes sense to include in
main script later.
Created: 25.08.20
"""
import json
if __name__ == "__main__":
pass | 15.071429 | 76 | 0.706161 |
da376ff531d8b9845586f4bdf63299ebbd293394 | 12,252 | py | Python | tests/test_modeling_tf_xlm.py | timpal0l/transformers | d86d57faa3b6511c6e4d9139535d77b695b9af8a | [
"Apache-2.0"
] | 2 | 2020-11-28T12:51:07.000Z | 2020-11-28T12:52:14.000Z | tests/test_modeling_tf_xlm.py | timpal0l/transformers | d86d57faa3b6511c6e4d9139535d77b695b9af8a | [
"Apache-2.0"
] | 3 | 2021-06-08T23:15:29.000Z | 2022-01-13T03:40:10.000Z | tests/test_modeling_tf_xlm.py | timpal0l/transformers | d86d57faa3b6511c6e4d9139535d77b695b9af8a | [
"Apache-2.0"
] | 1 | 2020-11-17T02:48:00.000Z | 2020-11-17T02:48:00.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 ... | 33.47541 | 166 | 0.651649 |
fb260c5a90dbe20cacda74d12aa993a81292853b | 2,105 | py | Python | tests/test_property_description_validator.py | LandRegistry/datatypes-alpha | b7ec20c9aec84697aa49aaf6bff52fac3770a942 | [
"MIT"
] | null | null | null | tests/test_property_description_validator.py | LandRegistry/datatypes-alpha | b7ec20c9aec84697aa49aaf6bff52fac3770a942 | [
"MIT"
] | null | null | null | tests/test_property_description_validator.py | LandRegistry/datatypes-alpha | b7ec20c9aec84697aa49aaf6bff52fac3770a942 | [
"MIT"
] | 1 | 2021-04-11T06:07:21.000Z | 2021-04-11T06:07:21.000Z | import unittest
from copy import deepcopy
from datatypes.exceptions import DataDoesNotMatchSchemaException
from datatypes import property_description_validator
from datatypes.core import unicoded
property_description = unicoded({
"template" : "example text",
"full_text" : "example text",
"fie... | 40.480769 | 129 | 0.652732 |
8f41b5c0af8720f5350a631cdd3c3f0408e4738a | 5,528 | py | Python | userbot/plugins/afk.py | udhay018777/ReaperUserbot | e69913dfde4e208352c12fe4ba23e01b2dbd7e32 | [
"MIT"
] | null | null | null | userbot/plugins/afk.py | udhay018777/ReaperUserbot | e69913dfde4e208352c12fe4ba23e01b2dbd7e32 | [
"MIT"
] | null | null | null | userbot/plugins/afk.py | udhay018777/ReaperUserbot | e69913dfde4e208352c12fe4ba23e01b2dbd7e32 | [
"MIT"
] | 2 | 2020-04-28T13:06:10.000Z | 2020-07-01T13:48:28.000Z | """AFK Plugin for @UniBorg
Syntax: .afk REASON"""
import asyncio
import datetime
from telethon import events
from telethon.tl import functions, types
from userbot.utils import admin_cmd
global USER_AFK # pylint:disable=E0602
global afk_time # pylint:disable=E0602
global last_afk_message # pylint:disable=E0602
USER_... | 41.56391 | 216 | 0.602026 |
410569c5c2ce7878fa7b176a7ec25abf4cebabf5 | 2,435 | py | Python | distance_to_camera.py | Karobben/Hand-Detection-and-Distance-Estimation | 401d642f41637c033bd42df6b8b0f0fe9b142605 | [
"MIT"
] | 5,245 | 2019-04-19T06:03:37.000Z | 2022-03-31T07:46:20.000Z | distance_to_camera.py | Karobben/Hand-Detection-and-Distance-Estimation | 401d642f41637c033bd42df6b8b0f0fe9b142605 | [
"MIT"
] | 201 | 2019-04-19T07:40:30.000Z | 2022-03-29T02:48:20.000Z | distance_to_camera.py | Karobben/Hand-Detection-and-Distance-Estimation | 401d642f41637c033bd42df6b8b0f0fe9b142605 | [
"MIT"
] | 788 | 2019-04-20T19:01:20.000Z | 2022-03-27T07:11:33.000Z | # Most of this was from Adrian Rosebrocks post on pyimagesearch to figure out
# the focal distance of my MacBook Pro's camera https://bit.ly/2KJVoKC
# import the necessary packages
from imutils import paths
import numpy as np
import imutils
import cv2
def find_marker(image):
# convert the image to grayscale, blur... | 37.461538 | 82 | 0.717864 |
ac801f597a15421913ee56b60cbcd1b893747605 | 5,316 | py | Python | djobberbase/migrations/0003_auto__chg_field_jobstat_job.py | wtrevino/django-djobberbase | d2712b15445b5cdf6871ec5cc9df7cad3dfc0a4e | [
"MIT"
] | 25 | 2015-09-03T18:38:34.000Z | 2022-01-25T13:25:14.000Z | djobberbase/migrations/0003_auto__chg_field_jobstat_job.py | krashman/django-djobberbase | d2712b15445b5cdf6871ec5cc9df7cad3dfc0a4e | [
"MIT"
] | 3 | 2015-08-21T23:11:08.000Z | 2018-10-14T18:28:20.000Z | djobberbase/migrations/0003_auto__chg_field_jobstat_job.py | krashman/django-djobberbase | d2712b15445b5cdf6871ec5cc9df7cad3dfc0a4e | [
"MIT"
] | 12 | 2015-08-28T20:15:16.000Z | 2020-09-08T11:14:58.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'JobStat.job'
db.alter_column('djobberbase_jobstat', 'job_id', self.gf('django.db.models.f... | 65.62963 | 176 | 0.564522 |
fe9a23b25ed612a6ca729a1a8b913349f1176f66 | 3,287 | py | Python | python/nano/test/tf/keras/test_fit.py | Forest216/BigDL | 840da9a2eaf395978dd83730b02aa5e5dfbd7989 | [
"Apache-2.0"
] | null | null | null | python/nano/test/tf/keras/test_fit.py | Forest216/BigDL | 840da9a2eaf395978dd83730b02aa5e5dfbd7989 | [
"Apache-2.0"
] | null | null | null | python/nano/test/tf/keras/test_fit.py | Forest216/BigDL | 840da9a2eaf395978dd83730b02aa5e5dfbd7989 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The BigDL Authors.
#
# 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 wr... | 33.886598 | 93 | 0.67265 |
f5ab45278db3bf115cce6ea91bcbce66af1316be | 8,802 | py | Python | src/search.py | ClinGen/python_react_programming_starter | d3e5eeae681e2419a9bdcff22050f4b69be59f39 | [
"MIT"
] | 1 | 2020-01-03T17:07:05.000Z | 2020-01-03T17:07:05.000Z | src/search.py | ClinGen/python_react_programming_starter | d3e5eeae681e2419a9bdcff22050f4b69be59f39 | [
"MIT"
] | 7 | 2018-03-20T04:31:34.000Z | 2020-02-28T00:11:11.000Z | src/search.py | ClinGen/python_react_programming_starter | d3e5eeae681e2419a9bdcff22050f4b69be59f39 | [
"MIT"
] | 6 | 2018-03-22T04:42:45.000Z | 2020-02-25T05:18:19.000Z | def build_es_aggregation_body_request(es_query, category, category_filters):
agg_query_body = {
'query': es_query,
'size': 0,
'aggs': {}
}
if category == '':
agg_query_body['aggs'] = {
'categories': {
'terms': {'field': 'category', 'size': 50}
... | 28.302251 | 106 | 0.46728 |
77679face7ac03c930d78fb9d87ef16d35a5a7ec | 9,687 | py | Python | venv/lib/python3.5/site-packages/ebcli/operations/createops.py | meetynasu/server | e78e175d15cf684cb8b85fbb226ea2bc464c58ed | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/ebcli/operations/createops.py | meetynasu/server | e78e175d15cf684cb8b85fbb226ea2bc464c58ed | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/ebcli/operations/createops.py | meetynasu/server | e78e175d15cf684cb8b85fbb226ea2bc464c58ed | [
"MIT"
] | 1 | 2019-11-27T22:10:49.000Z | 2019-11-27T22:10:49.000Z | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 36.280899 | 92 | 0.630329 |
d028df5f69faf8299b1817a9833d9a6163854b8f | 3,117 | py | Python | preprocessing/outlier_handling.py | Vasanthengineer4949/OPTIMUS | 1b25294a4f3b2e505d00696c18127df1a549b175 | [
"MIT"
] | 1 | 2021-05-21T06:06:20.000Z | 2021-05-21T06:06:20.000Z | preprocessing/outlier_handling.py | Vasanthengineer4949/OPTIMUS | 1b25294a4f3b2e505d00696c18127df1a549b175 | [
"MIT"
] | null | null | null | preprocessing/outlier_handling.py | Vasanthengineer4949/OPTIMUS | 1b25294a4f3b2e505d00696c18127df1a549b175 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# Finding Outliers for all features using BoxPlot
def plotAllFeatureOutliers(df):
numerical_feature = [feature for feature in df.columns if df[feature].dtypes != 'O']
continuous_feature = [feature for feature i... | 46.522388 | 139 | 0.67982 |
a1572326e85d8743da28c06a03c0b55274260410 | 3,889 | py | Python | parlai/mutators/context_add.py | NordAxon/ParlAI | 09c334358d2d04ce6bb80b4c0d085309e21d34b8 | [
"MIT"
] | null | null | null | parlai/mutators/context_add.py | NordAxon/ParlAI | 09c334358d2d04ce6bb80b4c0d085309e21d34b8 | [
"MIT"
] | null | null | null | parlai/mutators/context_add.py | NordAxon/ParlAI | 09c334358d2d04ce6bb80b4c0d085309e21d34b8 | [
"MIT"
] | null | null | null | import random
from typing import List, Optional
from parlai.core.opt import Opt
from parlai.core.message import Message
from parlai.core.mutators import register_mutator, EpisodeMutator
from pathlib import Path
from parlai.core.params import ParlaiParser
@register_mutator("interview_context_add")
class InterviewConte... | 35.354545 | 88 | 0.599126 |
2113316c6b15dd020750d73bd27b634003b243d0 | 605 | py | Python | examples/interactive/interactive_1d/1d_interactive.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 150 | 2015-01-16T12:24:13.000Z | 2022-03-03T18:01:18.000Z | examples/interactive/interactive_1d/1d_interactive.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 129 | 2015-01-13T04:58:56.000Z | 2022-03-02T13:39:16.000Z | examples/interactive/interactive_1d/1d_interactive.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 88 | 2015-02-16T20:04:12.000Z | 2022-03-10T06:50:30.000Z | #! /usr/bin/env python
# Create a 1D interactive plot from NMRPipe data
import nmrglue as ng
import matplotlib.pyplot as plt
# read in the data from a NMRPipe file
dic, data = ng.pipe.read("nmrpipe_1d/test.ft")
# create a unit conversion object
uc = ng.pipe.make_uc(dic, data)
# plot the spectrum
fig = plt.figure()
... | 22.407407 | 60 | 0.735537 |
fa3102b9143b57105152043a99434a4fb1e0dbe3 | 1,690 | py | Python | third_party/rosservice/rosservice_app.py | mvukov/rules_ros | 0919c94fae4c84f40c9ec23164345f6db8aef853 | [
"Apache-2.0"
] | 14 | 2021-05-02T00:58:45.000Z | 2022-01-11T07:01:27.000Z | third_party/rosservice/rosservice_app.py | mvukov/rules_ros | 0919c94fae4c84f40c9ec23164345f6db8aef853 | [
"Apache-2.0"
] | null | null | null | third_party/rosservice/rosservice_app.py | mvukov/rules_ros | 0919c94fae4c84f40c9ec23164345f6db8aef853 | [
"Apache-2.0"
] | 1 | 2022-02-07T00:17:23.000Z | 2022-02-07T00:17:23.000Z | #!/usr/bin/env python
# Software License Agreement (BSD License)
#
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code... | 46.944444 | 70 | 0.776923 |
abd07295697524813c7a8816a5499dbac8e87a26 | 543 | py | Python | aoc_cqkh42/year_2020/tests/test_day_06.py | cqkh42/advent-of-code | bcf31cf8973a5b6d67492c412dce10df742e04d1 | [
"MIT"
] | null | null | null | aoc_cqkh42/year_2020/tests/test_day_06.py | cqkh42/advent-of-code | bcf31cf8973a5b6d67492c412dce10df742e04d1 | [
"MIT"
] | null | null | null | aoc_cqkh42/year_2020/tests/test_day_06.py | cqkh42/advent-of-code | bcf31cf8973a5b6d67492c412dce10df742e04d1 | [
"MIT"
] | null | null | null | """
Tests for day 6 of 2020's Advent of Code
"""
import pytest
from aoc_cqkh42.year_2020 import day_06
@pytest.fixture
def data() -> str:
"""
Test data for day_01.
Returns
-------
data: str
"""
data = (
'abc\n'
'\n'
'a\nb\nc\n'
'\n'
'ab\nac\n'
... | 13.923077 | 40 | 0.489871 |
2ba1caffb80e4bd3ce6bd5d566084168669a6744 | 838 | py | Python | src/trusted/validator_mips/dgen/optimize-table.py | kapkic/native_client | 51c8bc8c249d55606232ae011bdfc8b4cab3d794 | [
"BSD-3-Clause"
] | 1 | 2021-12-23T00:36:43.000Z | 2021-12-23T00:36:43.000Z | src/trusted/validator_mips/dgen/optimize-table.py | kapkic/native_client | 51c8bc8c249d55606232ae011bdfc8b4cab3d794 | [
"BSD-3-Clause"
] | null | null | null | src/trusted/validator_mips/dgen/optimize-table.py | kapkic/native_client | 51c8bc8c249d55606232ae011bdfc8b4cab3d794 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python2
#
# Copyright 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can
# be found in the LICENSE file.
# Copyright 2012, Google Inc.
#
"""Table optimizer script.
Usage: optimize_table.py <input-table> <output-table>
"""
import sys
... | 22.052632 | 69 | 0.682578 |
20eca7d00920dfa9a0ddca6f224abed694071811 | 4,476 | py | Python | lib/services/autoscaling/ncloud_autoscaling/model/delete_policy_response.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 12 | 2018-11-20T04:30:49.000Z | 2021-11-09T12:34:26.000Z | lib/services/autoscaling/ncloud_autoscaling/model/delete_policy_response.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 1 | 2019-01-24T15:56:15.000Z | 2019-05-31T07:56:55.000Z | lib/services/autoscaling/ncloud_autoscaling/model/delete_policy_response.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 6 | 2018-06-29T03:45:50.000Z | 2022-03-18T01:51:45.000Z | # coding: utf-8
"""
autoscaling
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class DeletePolicyResponse(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manual... | 27.62963 | 93 | 0.590036 |
618c3a07ee2452b9be95015739d6cb2efcb62c8e | 2,519 | py | Python | tools/accuracy_checker/accuracy_checker/annotation_converters/sound_classification_converter.py | APrigarina/open_model_zoo | b1ff98b64a6222cf6b5f3838dc0271422250de95 | [
"Apache-2.0"
] | 1,031 | 2020-07-16T08:30:57.000Z | 2022-03-30T19:42:52.000Z | tools/accuracy_checker/accuracy_checker/annotation_converters/sound_classification_converter.py | APrigarina/open_model_zoo | b1ff98b64a6222cf6b5f3838dc0271422250de95 | [
"Apache-2.0"
] | 966 | 2020-07-16T08:13:00.000Z | 2022-03-31T18:09:18.000Z | tools/accuracy_checker/accuracy_checker/annotation_converters/sound_classification_converter.py | APrigarina/open_model_zoo | b1ff98b64a6222cf6b5f3838dc0271422250de95 | [
"Apache-2.0"
] | 440 | 2020-07-16T12:52:50.000Z | 2022-03-31T14:21:41.000Z | """
Copyright (c) 2018-2021 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 wri... | 41.983333 | 106 | 0.709805 |
d8eb3f3f0f80b77bd9a8cc6e9e53ede97a086ce7 | 11,248 | py | Python | vmraid/boot.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | vmraid/boot.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | vmraid/boot.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, VMRaid Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
from six import iteritems, text_type
"""
bootstrap client session
"""
import vmraid
import vmraid.defaults
import vmraid.desk.desk_page
from vmraid.desk.form.load import get_me... | 33.879518 | 117 | 0.7516 |
68d547d3f5d1c843cc426a3b4358d631bbdb5127 | 350 | py | Python | server/api/plugins/igit_plugin.py | JBris/vue-python-graphql | ba208130f572f29c7f427784c1e6997f4168ee01 | [
"MIT"
] | 7 | 2020-06-08T02:57:33.000Z | 2021-05-06T12:03:29.000Z | server/api/plugins/igit_plugin.py | JBris/vue-aiohttp-graphql | ba208130f572f29c7f427784c1e6997f4168ee01 | [
"MIT"
] | 2 | 2021-03-10T14:11:41.000Z | 2022-02-13T10:30:37.000Z | server/api/plugins/igit_plugin.py | JBris/vue-aiohttp-graphql | ba208130f572f29c7f427784c1e6997f4168ee01 | [
"MIT"
] | 2 | 2020-06-21T09:38:28.000Z | 2020-07-15T03:29:19.000Z | from api.models.git_collection import GitCollection
from yapsy.IPlugin import IPlugin
class IGitPlugin(IPlugin):
def get_id(self):
raise NotImplementedError("Git Plugin must have an ID.")
async def search(self, project, quantity) -> GitCollection:
raise NotImplementedError("Git Plugin mus... | 35 | 79 | 0.742857 |
f452e761c58be6f5759d87793d44a82922705171 | 4,712 | py | Python | lingvo/core/multitask_model.py | Singed-jj/lingvo | a2a4ac8bd835ffc2f95fc38ee3e9bc17c30fcc56 | [
"Apache-2.0"
] | 1 | 2020-08-04T08:39:35.000Z | 2020-08-04T08:39:35.000Z | lingvo/core/multitask_model.py | Singed-jj/lingvo | a2a4ac8bd835ffc2f95fc38ee3e9bc17c30fcc56 | [
"Apache-2.0"
] | null | null | null | lingvo/core/multitask_model.py | Singed-jj/lingvo | a2a4ac8bd835ffc2f95fc38ee3e9bc17c30fcc56 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# 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 applica... | 38 | 80 | 0.717954 |
15a092b03e2a59e3f4eac33350ab1cda8caf84d9 | 2,024 | py | Python | torchbenchmark/models/hf_Bert/__init__.py | LaudateCorpus1/benchmark | 2a8528f91dfbbd880e514b4deefa692a48c32af8 | [
"BSD-3-Clause"
] | null | null | null | torchbenchmark/models/hf_Bert/__init__.py | LaudateCorpus1/benchmark | 2a8528f91dfbbd880e514b4deefa692a48c32af8 | [
"BSD-3-Clause"
] | null | null | null | torchbenchmark/models/hf_Bert/__init__.py | LaudateCorpus1/benchmark | 2a8528f91dfbbd880e514b4deefa692a48c32af8 | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.optim as optim
from ...util.model import BenchmarkModel
from torchbenchmark.tasks import NLP
from typing import Tuple
from transformers import *
class Model(BenchmarkModel):
task = NLP.LANGUAGE_MODELING
HF_MODEL = True
DEFAULT_TRAIN_BSIZE = 4
DEFAULT_EVAL_BSIZE = 1
def __... | 36.142857 | 109 | 0.62747 |
79f673d6734652acfd090bf04e446adc5e117308 | 19,245 | py | Python | test/parser_test.py | xyzdev/grama | f9ef5ccea28a5ca10aedfde21fbce613ce78092e | [
"MIT"
] | 3 | 2017-08-23T02:01:58.000Z | 2019-06-05T11:55:24.000Z | test/parser_test.py | xyzdev/grama | f9ef5ccea28a5ca10aedfde21fbce613ce78092e | [
"MIT"
] | null | null | null | test/parser_test.py | xyzdev/grama | f9ef5ccea28a5ca10aedfde21fbce613ce78092e | [
"MIT"
] | null | null | null | from nose.tools import assert_equal, assert_raises_regexp
from grama.grama import Instruction, Address, Parser
class Test(object):
@staticmethod
def assert_instruction(expected_action, expected_addr1, expected_addr2, expected_addr3, expected_ofs, actual):
assert_equal(expected_action, actual.action)
... | 44.139908 | 116 | 0.584671 |
087fb1773644565ed5aec340e2998d12c7c1647d | 71 | py | Python | snippets/05 - Time series data54.py | joshuagottardogalvani/pandas-tutorial | 8308a6eb7d144fff95a6853930e3be4e8ddb2e0f | [
"BSD-2-Clause"
] | 183 | 2016-08-24T12:32:07.000Z | 2022-03-26T14:05:04.000Z | snippets/05 - Time series data54.py | sugurushivakumar10/pandas-tutorial | 8308a6eb7d144fff95a6853930e3be4e8ddb2e0f | [
"BSD-2-Clause"
] | 1 | 2017-08-28T14:22:40.000Z | 2017-08-28T14:22:40.000Z | snippets/05 - Time series data54.py | sugurushivakumar10/pandas-tutorial | 8308a6eb7d144fff95a6853930e3be4e8ddb2e0f | [
"BSD-2-Clause"
] | 204 | 2016-08-24T14:22:58.000Z | 2022-03-29T15:09:03.000Z | data[['BETR801', 'BETN029', 'FR04037', 'FR04012']].resample('D').corr() | 71 | 71 | 0.633803 |
a2feda7ced75a32d7023b687ad087aa7b6d1feda | 1,533 | py | Python | kingbirdclient/tests/base_shell_test.py | starlingx-staging/stx-python-kingbirdclient | 3ec81b852ee9a2adb95fe0445957a08a049a37e2 | [
"Apache-2.0"
] | null | null | null | kingbirdclient/tests/base_shell_test.py | starlingx-staging/stx-python-kingbirdclient | 3ec81b852ee9a2adb95fe0445957a08a049a37e2 | [
"Apache-2.0"
] | null | null | null | kingbirdclient/tests/base_shell_test.py | starlingx-staging/stx-python-kingbirdclient | 3ec81b852ee9a2adb95fe0445957a08a049a37e2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Huawei Technologies Co., Ltd.
# Copyright 2016 Ericsson AB.
#
# 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
#
#... | 31.285714 | 77 | 0.647097 |
5cec1165fe1bdd9d40073bfbc83206c165143a08 | 29,994 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_virtual_machine_scale_set_extensions_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 1 | 2021-09-07T18:35:49.000Z | 2021-09-07T18:35:49.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_virtual_machine_scale_set_extensions_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_virtual_machine_scale_set_extensions_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 52.437063 | 234 | 0.684337 |
4dbbe9ccd96f5794685986b91ec58ca1c71328cb | 7,933 | py | Python | src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_public_maintenance_configurations_operations.py | wwendyc/azure-cli-extensions | 6b4099676bb5d43fdb57bc69f9c0281cca510a0a | [
"MIT"
] | 1 | 2021-08-03T18:32:54.000Z | 2021-08-03T18:32:54.000Z | src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_public_maintenance_configurations_operations.py | wwendyc/azure-cli-extensions | 6b4099676bb5d43fdb57bc69f9c0281cca510a0a | [
"MIT"
] | 4 | 2020-09-07T12:56:24.000Z | 2021-02-04T12:19:20.000Z | src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_public_maintenance_configurations_operations.py | wwendyc/azure-cli-extensions | 6b4099676bb5d43fdb57bc69f9c0281cca510a0a | [
"MIT"
] | 5 | 2020-09-08T22:46:48.000Z | 2020-11-08T14:54:35.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.331429 | 156 | 0.665574 |
379f521cff7745cebd704e0a8f9acd3fe5e0e79f | 2,213 | py | Python | Dragon/python/dragon/vm/caffe/misc.py | awesome-archive/Dragon | b35f9320909d07d138c2f6b345a4c24911f7c521 | [
"BSD-2-Clause"
] | null | null | null | Dragon/python/dragon/vm/caffe/misc.py | awesome-archive/Dragon | b35f9320909d07d138c2f6b345a4c24911f7c521 | [
"BSD-2-Clause"
] | null | null | null | Dragon/python/dragon/vm/caffe/misc.py | awesome-archive/Dragon | b35f9320909d07d138c2f6b345a4c24911f7c521 | [
"BSD-2-Clause"
] | null | null | null | # ------------------------------------------------------------
# Copyright (c) 2017-present, SeetaTech, Co.,Ltd.
#
# Licensed under the BSD 2-Clause License.
# You should have received a copy of the BSD 2-Clause License
# along with the software. If not, See,
#
# <https://opensource.org/licenses/BSD-2-Clause>
#
# ... | 18.596639 | 63 | 0.578852 |
7598fc917307d2e7ad15d4ee1bd9d2cd17a7e390 | 11,275 | py | Python | src/fvm/test/STRUCTURAL/testPlateTransient.py | drm42/fvm-drm | c9b940e593034f1aa3020d63ff1e09ebef9c182a | [
"MIT"
] | null | null | null | src/fvm/test/STRUCTURAL/testPlateTransient.py | drm42/fvm-drm | c9b940e593034f1aa3020d63ff1e09ebef9c182a | [
"MIT"
] | null | null | null | src/fvm/test/STRUCTURAL/testPlateTransient.py | drm42/fvm-drm | c9b940e593034f1aa3020d63ff1e09ebef9c182a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
sys.setdlopenflags(0x100|0x2)
import fvm
import fvm.fvmbaseExt as fvmbaseExt
import fvm.importers as importers
import numpy
from mpi4py import MPI
fvm.set_atype('double')
import math
if fvm.atype == 'double':
import fvm.models_atyped_double as models
import fvm.exporters_at... | 29.134367 | 140 | 0.565588 |
3ec963e896527b6e52e750dab208e77789d81b51 | 116,575 | py | Python | PyOS.py | SimLoads/PyOS | 4609ca0679586afe8b38ec54efa71a30fb0c7d3c | [
"MIT"
] | 1 | 2021-03-15T15:20:08.000Z | 2021-03-15T15:20:08.000Z | PyOS.py | Geir-tools/PyOS | 6423981ad6907f083cdc456b77aac70b636942b8 | [
"MIT"
] | null | null | null | PyOS.py | Geir-tools/PyOS | 6423981ad6907f083cdc456b77aac70b636942b8 | [
"MIT"
] | 1 | 2021-03-08T13:41:29.000Z | 2021-03-08T13:41:29.000Z | ###.PyOS.0.1.2.6.### #
# TO DO LIST
# Update to > Python 3.4, maybe one day :)
#
#
#
#
#
#
#
lisence = '''
MIT License
Copyright (c) 2018 - 20xx Sam Forrester
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Softw... | 39.950308 | 219 | 0.483697 |
5b1527e0fffea0b56f1a01bd62b44c2432e083ad | 2,902 | py | Python | server/queue/scan.py | dtwest/Porthole | 743757bb13c21d69dab5ec7dccd6736b01c4fbc4 | [
"MIT"
] | 1 | 2021-07-08T03:05:23.000Z | 2021-07-08T03:05:23.000Z | server/queue/scan.py | dtwest/Porthole | 743757bb13c21d69dab5ec7dccd6736b01c4fbc4 | [
"MIT"
] | null | null | null | server/queue/scan.py | dtwest/Porthole | 743757bb13c21d69dab5ec7dccd6736b01c4fbc4 | [
"MIT"
] | null | null | null | import logging
import nmap3
import sqlalchemy
import concurrent.futures
from datetime import datetime
from typing import Set
from sqlalchemy.orm import sessionmaker, scoped_session
from server.database.scan import Scan, database
from server.database.constants import database_connection_uri
log = logging.getLogger("gun... | 37.205128 | 111 | 0.671606 |
9bac5a1687354ec44fc51f13c20cc4c33a32bc8e | 1,346 | py | Python | pontoon/sites/views.py | sudheesh001/pontoon | 046bb50113a76ff278de73036db395ea726cab43 | [
"BSD-3-Clause"
] | 1 | 2017-04-04T06:55:46.000Z | 2017-04-04T06:55:46.000Z | pontoon/sites/views.py | zbraniecki/pontoon | d559316783938bc66d5d9a52dcdb01137475c259 | [
"BSD-3-Clause"
] | null | null | null | pontoon/sites/views.py | zbraniecki/pontoon | d559316783938bc66d5d9a52dcdb01137475c259 | [
"BSD-3-Clause"
] | null | null | null | import logging
from urlparse import urljoin
import urllib2
from django.shortcuts import render
from django.http import HttpResponseBadRequest
from django.views.decorators.clickjacking import xframe_options_sameorigin
log = logging.getLogger('pontoon')
@xframe_options_sameorigin
def sites_snippet_page(request, temp... | 42.0625 | 116 | 0.73997 |
0804191654b7db0b831a403ed02fe9cadbc296c5 | 3,865 | py | Python | pySDC/playgrounds/deprecated/pmesh/AllenCahn_dump.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 20 | 2015-03-21T09:02:55.000Z | 2022-02-26T20:22:21.000Z | pySDC/playgrounds/deprecated/pmesh/AllenCahn_dump.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 61 | 2015-03-02T09:35:55.000Z | 2022-03-17T12:42:48.000Z | pySDC/playgrounds/deprecated/pmesh/AllenCahn_dump.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 19 | 2015-02-20T11:52:33.000Z | 2022-02-02T10:46:27.000Z | import numpy as np
import json
from mpi4py import MPI
from pySDC.core.Hooks import hooks
class dump(hooks):
def __init__(self):
"""
Initialization of Allen-Cahn monitoring
"""
super(dump, self).__init__()
self.init_radius = None
self.ndim = None
self.comm... | 32.208333 | 86 | 0.566365 |
ef01c94e9f4f04daf19493724ff5ea9938db49a7 | 262 | py | Python | Q18.py | devasheeshG/Project-file-XII_21-22 | 9ef06a09c36197a2a1a13305a745578c8cbf3578 | [
"MIT"
] | null | null | null | Q18.py | devasheeshG/Project-file-XII_21-22 | 9ef06a09c36197a2a1a13305a745578c8cbf3578 | [
"MIT"
] | null | null | null | Q18.py | devasheeshG/Project-file-XII_21-22 | 9ef06a09c36197a2a1a13305a745578c8cbf3578 | [
"MIT"
] | null | null | null | # Q18. Difference between with example:
a)break and continue
b)while loop and for loop
c)Implicit type conversion and explicit type conversion
d)Global variable and local variable
e)Actual parameters and formal parameters | 43.666667 | 63 | 0.698473 |
4c8a8b6a64aedc27e0735aeb61a0f86c91a67a04 | 120 | py | Python | 05_lists/022_looping.py | selimmh/Python_Basics | 9e16de82306261f3acd44d88b862bcc14d1a71a1 | [
"CNRI-Python"
] | 1 | 2020-04-17T20:12:55.000Z | 2020-04-17T20:12:55.000Z | 05_lists/022_looping.py | selimmh/Python_Basics | 9e16de82306261f3acd44d88b862bcc14d1a71a1 | [
"CNRI-Python"
] | null | null | null | 05_lists/022_looping.py | selimmh/Python_Basics | 9e16de82306261f3acd44d88b862bcc14d1a71a1 | [
"CNRI-Python"
] | null | null | null | # looping through list
months = ['january', 'february', 'march', 'april', 'may']
for i in months:
print(i.title()) | 20 | 57 | 0.625 |
4104b46d4a23a005f4ca45d1d08dacdf4dd59934 | 322 | py | Python | thefuck/rules/pacman_invalid_option.py | DragonGhost7/thefuck | 2e0be13703c4a360e6af6f14b4b59b4643363b60 | [
"MIT"
] | null | null | null | thefuck/rules/pacman_invalid_option.py | DragonGhost7/thefuck | 2e0be13703c4a360e6af6f14b4b59b4643363b60 | [
"MIT"
] | null | null | null | thefuck/rules/pacman_invalid_option.py | DragonGhost7/thefuck | 2e0be13703c4a360e6af6f14b4b59b4643363b60 | [
"MIT"
] | 1 | 2021-07-09T04:00:02.000Z | 2021-07-09T04:00:02.000Z | from thefuck.specific.archlinux import archlinux_env
import re
def match(command):
return "error: invalid option '-s'" in command.output
def get_new_command(command):
opt = re.findall(r" -[dqrstuf]", command.script)[0]
return re.sub(opt, opt.upper(), command.script)
enabled_by_default = archlinux_env(... | 21.466667 | 57 | 0.729814 |
3d0848865dd537ae26880f928cfd74878ab18ed2 | 1,622 | py | Python | aliyun-python-sdk-retailcloud/aliyunsdkretailcloud/request/v20180313/DeleteDatabaseRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-retailcloud/aliyunsdkretailcloud/request/v20180313/DeleteDatabaseRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-retailcloud/aliyunsdkretailcloud/request/v20180313/DeleteDatabaseRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.863636 | 89 | 0.766954 |
cbee774c1ea0d06607a69fe2649647ca500cedfc | 2,937 | py | Python | ForensicsTool/ForensicsTool/module4.py | deepak7mahto/ForensicsTool | 17ae45a5a12093f38eaeb309745588464b694fa4 | [
"MIT"
] | null | null | null | ForensicsTool/ForensicsTool/module4.py | deepak7mahto/ForensicsTool | 17ae45a5a12093f38eaeb309745588464b694fa4 | [
"MIT"
] | null | null | null | ForensicsTool/ForensicsTool/module4.py | deepak7mahto/ForensicsTool | 17ae45a5a12093f38eaeb309745588464b694fa4 | [
"MIT"
] | null | null | null | import random_functions, os, exifread, Forensics_tool_redesigned_using_oops
from PIL import Image
from PIL.ExifTags import TAGS
#module 4 - JPEG Forensics
class Jpeg_forensics_class( random_functions.random_functions_class):
def module4(self):
data_list = list()
try:
... | 38.142857 | 126 | 0.473613 |
8f4e5d91165c67c5db9f98767e4437e8f0f58762 | 3,504 | py | Python | carangle.py | Hitesh-Valecha/Car_Opencv | d1298475b92cd58848096222fc1c4c3146efd125 | [
"MIT"
] | 14 | 2020-07-04T13:35:47.000Z | 2022-03-31T14:38:03.000Z | carangle.py | Hitesh-Valecha/Car_Opencv | d1298475b92cd58848096222fc1c4c3146efd125 | [
"MIT"
] | null | null | null | carangle.py | Hitesh-Valecha/Car_Opencv | d1298475b92cd58848096222fc1c4c3146efd125 | [
"MIT"
] | 9 | 2020-11-26T23:45:01.000Z | 2022-02-02T07:18:46.000Z | from __future__ import print_function
import cv2
import numpy as np
import time
cascade_src = 'cascade/cars.xml'
video_src = 'dataset/cars.mp4'
cap = cv2.VideoCapture(video_src)
car_cascade = cv2.CascadeClassifier(cascade_src)
deltatsum = 0
n = 0
last_time = time.time()
while(1):
# Take each frame
_, frame ... | 31.854545 | 112 | 0.609304 |
566b6caef237f48bef5eff181a6d2a1a17ed799d | 8,460 | py | Python | banner.py | mh-Earth/instaploit | fb871b3c0d7d74df828826314da3893945ee71ad | [
"MIT"
] | 7 | 2021-02-25T17:37:32.000Z | 2022-01-13T15:49:45.000Z | banner.py | mh-Earth/instaploit | fb871b3c0d7d74df828826314da3893945ee71ad | [
"MIT"
] | 1 | 2021-02-25T20:13:18.000Z | 2021-02-27T06:22:12.000Z | banner.py | mh-Earth/instaploit | fb871b3c0d7d74df828826314da3893945ee71ad | [
"MIT"
] | null | null | null | from random import choice
banner1=('''
██
██████ ████ ██
██████ ██ ████ ██ ██
... | 60.863309 | 298 | 0.089362 |
f80a7991b7fb1c3ef1e9249a42766494dacff883 | 2,667 | py | Python | server/auvsi_suas/models/gps_position_test.py | dcat52/interop | b016b2c25e468e21649bdb7475d828198b5e6958 | [
"Apache-2.0"
] | null | null | null | server/auvsi_suas/models/gps_position_test.py | dcat52/interop | b016b2c25e468e21649bdb7475d828198b5e6958 | [
"Apache-2.0"
] | null | null | null | server/auvsi_suas/models/gps_position_test.py | dcat52/interop | b016b2c25e468e21649bdb7475d828198b5e6958 | [
"Apache-2.0"
] | null | null | null | """Tests for the gps_position model."""
from auvsi_suas.models.gps_position import GpsPosition
from django.test import TestCase
class TestGpsPositionModel(TestCase):
"""Tests the GpsPosition model."""
def test_unicode(self):
"""Tests the unicode method executes."""
pos = GpsPosition(latitude... | 38.1 | 77 | 0.587552 |
1b3d3f2a18110edfe371d928254f2cac4464c574 | 796 | py | Python | app/core/admin.py | peertosir/tourn-handler-app | 43da29a244f78597af3f2e19366cc633a4cc3e0d | [
"MIT"
] | null | null | null | app/core/admin.py | peertosir/tourn-handler-app | 43da29a244f78597af3f2e19366cc633a4cc3e0d | [
"MIT"
] | 3 | 2021-07-04T16:43:51.000Z | 2021-07-04T19:16:16.000Z | app/core/admin.py | peertosir/tourn-handler-app | 43da29a244f78597af3f2e19366cc633a4cc3e0d | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
from . import models
@admin.register(models.User)
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
(N... | 25.677419 | 65 | 0.518844 |
958862af3b09a829a67db36bf2e493811d9a05b6 | 2,668 | py | Python | bsbetl/results/_1St_conditions.py | t0rus1/bsbetl | 670e39e619c43a8cb89729f0bfcb66213438af27 | [
"MIT"
] | null | null | null | bsbetl/results/_1St_conditions.py | t0rus1/bsbetl | 670e39e619c43a8cb89729f0bfcb66213438af27 | [
"MIT"
] | null | null | null | bsbetl/results/_1St_conditions.py | t0rus1/bsbetl | 670e39e619c43a8cb89729f0bfcb66213438af27 | [
"MIT"
] | null | null | null | ''' 1 St.: Conditions to enter the 2. Stage: '''
from bsbetl import g
from bsbetl.g_helpers import load_prepare_1_conditions, sync_1_conditions_audit_structure
_1St_cond_a = {
"name": "Con_a",
"group": "Con_a",
"description": "SDHPGr1.shoD > {1.005} AND ((SDT1.fD > {10000}) OR (SDT1.slD > {5000}))",
... | 23 | 111 | 0.542354 |
639934a5dcf9bc8e39e3c53bbf85ec5a6bc213ac | 1,438 | py | Python | stanCode_Projects/Hangman_Game/caesar.py | yjliu1214/stanCode_Projects | 5ddbc262d994f3956973e93ded7cd51a02730bf5 | [
"MIT"
] | null | null | null | stanCode_Projects/Hangman_Game/caesar.py | yjliu1214/stanCode_Projects | 5ddbc262d994f3956973e93ded7cd51a02730bf5 | [
"MIT"
] | null | null | null | stanCode_Projects/Hangman_Game/caesar.py | yjliu1214/stanCode_Projects | 5ddbc262d994f3956973e93ded7cd51a02730bf5 | [
"MIT"
] | null | null | null | """
File: caesar.py
Name: Serena Liu
------------------------------
This program demonstrates the idea of caesar cipher.
Users will be asked to input a number to produce shifted
ALPHABET as the cipher table. After that, any strings typed
in will be encrypted.
"""
# This constant shows the original order of alphabetic... | 23.193548 | 69 | 0.600139 |
735d05e92dd3ef07ee47b21de2fce09b69bfd36b | 4,712 | py | Python | yt_treefiles/load_bricks.py | cphyc/yt_treefiles | 42493ff300172ff3f2e37bcd2ad37d13115dfa37 | [
"BSD-3-Clause"
] | null | null | null | yt_treefiles/load_bricks.py | cphyc/yt_treefiles | 42493ff300172ff3f2e37bcd2ad37d13115dfa37 | [
"BSD-3-Clause"
] | null | null | null | yt_treefiles/load_bricks.py | cphyc/yt_treefiles | 42493ff300172ff3f2e37bcd2ad37d13115dfa37 | [
"BSD-3-Clause"
] | null | null | null | import yt.utilities.fortran_utils as fpu
import yt
import yt.units as U
import numpy as np
def load_brick(filename, bbox=None, center=None, return_ds=True):
"""Load a brick file as outputed by HaloFinder.
You can pass a bbox (in Mpc) to force the box size."""
with open(filename, "rb") as f:
# Loa... | 32.951049 | 79 | 0.539474 |
5bebe0b0327f5cb8f4e3c53e184fd47e61074a73 | 952 | py | Python | grr/endtoend_tests/collectors.py | theGreenJedi/grr | d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39 | [
"Apache-2.0"
] | null | null | null | grr/endtoend_tests/collectors.py | theGreenJedi/grr | d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39 | [
"Apache-2.0"
] | null | null | null | grr/endtoend_tests/collectors.py | theGreenJedi/grr | d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""End to end tests for lib.flows.general.collectors."""
from grr.endtoend_tests import base
from grr.lib import aff4
from grr.lib.aff4_objects import collects
from grr.lib.rdfvalues import client as rdf_client
class TestCollector(base.AutomatedTest):
"""Test ArtifactCollectorFlow."""
plat... | 31.733333 | 66 | 0.731092 |
c2bf5b899c21428537086bccb9a6c59e5fc87fa9 | 14,889 | py | Python | scipy/stats/tests/test_continuous_basic.py | seberg/scipy | d8081cdd40ed8cbebd5905c0ad6c323c57d5da6e | [
"BSD-3-Clause"
] | 1 | 2016-02-20T13:49:40.000Z | 2016-02-20T13:49:40.000Z | scipy/stats/tests/test_continuous_basic.py | seberg/scipy | d8081cdd40ed8cbebd5905c0ad6c323c57d5da6e | [
"BSD-3-Clause"
] | null | null | null | scipy/stats/tests/test_continuous_basic.py | seberg/scipy | d8081cdd40ed8cbebd5905c0ad6c323c57d5da6e | [
"BSD-3-Clause"
] | null | null | null | import warnings
import numpy.testing as npt
import numpy as np
import nose
from scipy import stats
"""
Test all continuous distributions.
Parameters were chosen for those distributions that pass the
Kolmogorov-Smirnov test. This provides safe parameters for each
distributions so that we can perform further testing... | 38.373711 | 108 | 0.604204 |
adb179b9cd060e895a7385f86bed5ba8e62cadcc | 4,470 | py | Python | dae/dae/backends/tests/test_cnv_variants.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | dae/dae/backends/tests/test_cnv_variants.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | 82 | 2019-07-22T11:44:23.000Z | 2022-01-13T15:27:33.000Z | dae/dae/backends/tests/test_cnv_variants.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | import pytest
import numpy as np
from dae.variants.attributes import VariantType
from dae.backends.cnv.loader import CNVLoader
from dae.pedigrees.loader import FamiliesLoader
from dae.backends.raw.loader import AnnotationPipelineDecorator
from dae.backends.raw.raw_variants import RawMemoryVariants
from dae.configura... | 26.294118 | 74 | 0.63132 |
d9b771ad74a980a49f9fc49f1c611376b8913962 | 9,655 | py | Python | check_memfreetotal.py | koemu/nagios_plugin_check_memfreetotal | f4e685610517eb58bde93e123b8961e9916cf764 | [
"MIT"
] | null | null | null | check_memfreetotal.py | koemu/nagios_plugin_check_memfreetotal | f4e685610517eb58bde93e123b8961e9916cf764 | [
"MIT"
] | null | null | null | check_memfreetotal.py | koemu/nagios_plugin_check_memfreetotal | f4e685610517eb58bde93e123b8961e9916cf764 | [
"MIT"
] | 1 | 2019-07-11T00:57:53.000Z | 2019-07-11T00:57:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ----------------------------------------------
# check_memfreetotal
# 物理メモリとスワップメモリを合計した空き容量を
# チェックします
#
# Copyright(C) 2014 Yuichiro SAITO
# This software is released under the MIT License, see LICENSE.txt.
# ----------------------------------------------
import sys
i... | 29.707692 | 142 | 0.504402 |
e048d36fac4d860c41ee43b569877af69e0b5830 | 29,628 | py | Python | detector.py | starcraftorz/hent-AI | 698d53789245f8d51a015e711b2d0bb244e8f28f | [
"MIT"
] | 1 | 2020-06-01T11:53:05.000Z | 2020-06-01T11:53:05.000Z | detector.py | starcraftorz/hent-AI | 698d53789245f8d51a015e711b2d0bb244e8f28f | [
"MIT"
] | null | null | null | detector.py | starcraftorz/hent-AI | 698d53789245f8d51a015e711b2d0bb244e8f28f | [
"MIT"
] | null | null | null | """
detector
Copyright (c) 2020 Nathan Cueto
Licensed under the MIT License (see LICENSE for details)
Written by Nathan Cueto
"""
import os
import sys
import json
# import datetime # not really useful so remove soon pls
import numpy as np
import skimage.draw
from skimage.filters import unsharp_mask
import imgaug # sho... | 48.650246 | 284 | 0.57476 |
fd28eb9d5a0e10dee4680b8205775e870bb3528e | 1,880 | py | Python | tests/unit/test_index_unittests.py | griggheo/cheesecake | 2b7aa5c980e8becb163cbcb801b202b17f715054 | [
"CNRI-Python-GPL-Compatible"
] | 12 | 2015-01-15T01:13:42.000Z | 2022-03-04T21:14:27.000Z | tests/unit/test_index_unittests.py | griggheo/cheesecake | 2b7aa5c980e8becb163cbcb801b202b17f715054 | [
"CNRI-Python-GPL-Compatible"
] | 6 | 2015-01-19T19:46:51.000Z | 2019-02-05T20:20:26.000Z | tests/unit/test_index_unittests.py | griggheo/cheesecake | 2b7aa5c980e8becb163cbcb801b202b17f715054 | [
"CNRI-Python-GPL-Compatible"
] | 3 | 2015-10-24T20:08:09.000Z | 2019-02-04T20:53:21.000Z | import os
import shutil
import tempfile
from math import ceil
import _path_cheesecake
from _helper_cheesecake import dump_str_to_file
from cheesecake.cheesecake_index import IndexUnitTests
from cheesecake import logger
from cheesecake.util import rmtree
test_contents = """
import some_module
import different_modul... | 28.484848 | 71 | 0.672872 |
6242ae31bef59b0fe7c8fe12c35f42a68af38e0f | 7,954 | py | Python | core/rdf.py | johnscancella/open-oni | fe6eeee437b8701cf9d54a5f5dc62fc4bbeb3999 | [
"Apache-2.0"
] | null | null | null | core/rdf.py | johnscancella/open-oni | fe6eeee437b8701cf9d54a5f5dc62fc4bbeb3999 | [
"Apache-2.0"
] | null | null | null | core/rdf.py | johnscancella/open-oni | fe6eeee437b8701cf9d54a5f5dc62fc4bbeb3999 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from rdflib import ConjunctiveGraph, Namespace, Literal, URIRef, RDF, RDFS
from rfc3339 import rfc3339
from core.utils import image_urls
DC = Namespace('http://purl.org/dc/elements/1.1/')
ORE = Namespace('http://www.openarchives.org/ore/terms/')
OWL = Namespace('http://www.w3.org/2002/0... | 36.154545 | 104 | 0.614031 |
4f0374a6178401d76cd6485599b2fd0de8ec4e4b | 3,727 | py | Python | kme/models/te_featurenets.py | phineasng/FLAN | 84c0fb7ea57d5730eb19fdaa25d705a4ec7490c9 | [
"Apache-2.0"
] | null | null | null | kme/models/te_featurenets.py | phineasng/FLAN | 84c0fb7ea57d5730eb19fdaa25d705a4ec7490c9 | [
"Apache-2.0"
] | null | null | null | kme/models/te_featurenets.py | phineasng/FLAN | 84c0fb7ea57d5730eb19fdaa25d705a4ec7490c9 | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
from kme.models.base import create_sinusoidal_positional_embeddings
from kme.models.base import FeatureNetBase
import json
class TE_FeatureNet1(FeatureNetBase):
def __init__(self, emb_dim, latent_dim, dataset, device='cpu'):
super(TE_FeatureNet1, self).__init__()
... | 36.184466 | 176 | 0.597532 |
feeb4a301a183a7e563ebb04d59b0b54340c9e89 | 40,488 | py | Python | MDI_Library/mdi.py | SinaMostafanejad/MDI_Library | b4231f994a051271316e554feb89898eae09aee7 | [
"BSD-3-Clause"
] | null | null | null | MDI_Library/mdi.py | SinaMostafanejad/MDI_Library | b4231f994a051271316e554feb89898eae09aee7 | [
"BSD-3-Clause"
] | null | null | null | MDI_Library/mdi.py | SinaMostafanejad/MDI_Library | b4231f994a051271316e554feb89898eae09aee7 | [
"BSD-3-Clause"
] | null | null | null | """ Python wrapper for MDI. """
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
import ctypes
import sys
# attempt to import numpy
try:
import numpy as np
found_numpy = True
except ImportError:
found_numpy = False
use_mpi4py = False
MPI = None
# get the path to the MDI Library
mdi_name... | 37.24747 | 147 | 0.685709 |
a26eb3d1f0ced5033f5d9aaccc37bf3880cfd09b | 5,993 | py | Python | bioparser/networkx_ontology.py | dhimmel/serg-pycode | 075de0ba470e4fbda5e33dfc23cb9ecd86ec53b7 | [
"BSD-2-Clause-Patent"
] | null | null | null | bioparser/networkx_ontology.py | dhimmel/serg-pycode | 075de0ba470e4fbda5e33dfc23cb9ecd86ec53b7 | [
"BSD-2-Clause-Patent"
] | null | null | null | bioparser/networkx_ontology.py | dhimmel/serg-pycode | 075de0ba470e4fbda5e33dfc23cb9ecd86ec53b7 | [
"BSD-2-Clause-Patent"
] | null | null | null | import os
import csv
import json
import math
import itertools
import networkx
import networkx.readwrite.json_graph
import obo
class NXOntology(object):
def __init__(self, graph):
assert networkx.is_directed_acyclic_graph(graph)
self.graph = graph
def get_id_to_name(self):
id_to_... | 38.171975 | 96 | 0.604205 |
e200d3102b7e41037e3ec2ed406017777f4e2d7c | 5,455 | py | Python | scanf.py | eendebakpt/scanf | 1b7c089a84ec9e294cd014ca45a34e8596c1c39d | [
"MIT"
] | null | null | null | scanf.py | eendebakpt/scanf | 1b7c089a84ec9e294cd014ca45a34e8596c1c39d | [
"MIT"
] | null | null | null | scanf.py | eendebakpt/scanf | 1b7c089a84ec9e294cd014ca45a34e8596c1c39d | [
"MIT"
] | null | null | null | """
Small scanf implementation.
Python has powerful regular expressions but sometimes they are totally overkill
when you just want to parse a simple-formatted string.
C programmers use the scanf-function for these tasks (see link below).
This implementation of scanf translates the simple scanf-format into
regular exp... | 28.710526 | 109 | 0.552337 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.