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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d16591a63a4e5172bba80d3831f315475a0f9651 | 1,646 | py | Python | app/main/forms.py | Celinemmbonekerrine4/pitch-perfect | 818c2415325e689b75e1d19b5940211229a44704 | [
"MIT"
] | null | null | null | app/main/forms.py | Celinemmbonekerrine4/pitch-perfect | 818c2415325e689b75e1d19b5940211229a44704 | [
"MIT"
] | null | null | null | app/main/forms.py | Celinemmbonekerrine4/pitch-perfect | 818c2415325e689b75e1d19b5940211229a44704 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField,PasswordField,BooleanField,SubmitField,TextAreaField
from wtforms.validators import Required,Email,EqualTo
from ..models import User
class LoginForm(FlaskForm):
email = StringField('Your Email Address',validators=[Required(),Email()])
password ... | 34.291667 | 84 | 0.72661 |
08168ef56f97660641adb233b1d298391852678b | 6,686 | py | Python | ding/entry/main.py | LuciusMos/DI-engine | b040b1c36afce038effec9eb483f625131573824 | [
"Apache-2.0"
] | 464 | 2021-07-08T07:26:33.000Z | 2022-03-31T12:35:16.000Z | ding/entry/main.py | LuciusMos/DI-engine | b040b1c36afce038effec9eb483f625131573824 | [
"Apache-2.0"
] | 177 | 2021-07-09T08:22:55.000Z | 2022-03-31T07:35:22.000Z | ding/entry/main.py | LuciusMos/DI-engine | b040b1c36afce038effec9eb483f625131573824 | [
"Apache-2.0"
] | 92 | 2021-07-08T12:16:37.000Z | 2022-03-31T09:24:41.000Z | """
Main entry
"""
from collections import deque
import torch
import numpy as np
import time
from rich import print
from functools import partial
from ding.model import QAC
from ding.utils import set_pkg_seed
from ding.envs import BaseEnvManager, get_vec_env_setting
from ding.config import compile_config
from ding.poli... | 38.647399 | 119 | 0.618756 |
04c933c7f8b10fb1ade3039bd32f815960ab3cc8 | 12,534 | py | Python | src/pyatmo/thermostat.py | chpego/pyatmo | 54cd02c0cd27d1b3a0faf78e6931e53d8e587ea3 | [
"MIT"
] | 2 | 2020-12-03T20:46:23.000Z | 2022-01-05T11:42:56.000Z | src/pyatmo/thermostat.py | chpego/pyatmo | 54cd02c0cd27d1b3a0faf78e6931e53d8e587ea3 | [
"MIT"
] | 1 | 2021-07-21T13:13:48.000Z | 2021-07-23T18:40:36.000Z | src/pyatmo/thermostat.py | chpego/pyatmo | 54cd02c0cd27d1b3a0faf78e6931e53d8e587ea3 | [
"MIT"
] | 1 | 2021-07-21T12:52:04.000Z | 2021-07-21T12:52:04.000Z | """Support for Netatmo energy devices (relays, thermostats and valves)."""
from __future__ import annotations
import logging
from abc import ABC
from collections import defaultdict
from typing import Any
from .auth import AbstractAsyncAuth, NetatmoOAuth2
from .exceptions import InvalidRoom, NoSchedule
from .helpers i... | 34.624309 | 92 | 0.608106 |
e62344877dd8fa9a57aea577d61fe01ae0cda495 | 1,041 | py | Python | symposion/proposals/forms.py | theofanislekkas/updated-symp | 2bf5fa85ef2adb71325cbdd2bdfef2b0742b614a | [
"BSD-3-Clause"
] | null | null | null | symposion/proposals/forms.py | theofanislekkas/updated-symp | 2bf5fa85ef2adb71325cbdd2bdfef2b0742b614a | [
"BSD-3-Clause"
] | null | null | null | symposion/proposals/forms.py | theofanislekkas/updated-symp | 2bf5fa85ef2adb71325cbdd2bdfef2b0742b614a | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from django.db.models import Q
from symposion.proposals.models import SupportingDocument
# @@@ generic proposal form
class AddSpeakerForm(forms.Form):
email = forms.EmailField(
label="Email address of new speaker (use their email address, not yours)"
)
def __init__(sel... | 26.025 | 83 | 0.626321 |
a416cf5b7fa3bc265bd1997155c3d980b56d5de0 | 1,842 | py | Python | src/application/command/user/update_role.py | jagoPG/-restaurant-ml-inspector | 4efc7855401cc8cfa9d5e470c14685158a607448 | [
"Apache-2.0"
] | 1 | 2018-07-10T12:53:35.000Z | 2018-07-10T12:53:35.000Z | src/application/command/user/update_role.py | jagoPG/-restaurant-ml-inspector | 4efc7855401cc8cfa9d5e470c14685158a607448 | [
"Apache-2.0"
] | null | null | null | src/application/command/user/update_role.py | jagoPG/-restaurant-ml-inspector | 4efc7855401cc8cfa9d5e470c14685158a607448 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env
# -*- coding: utf-8 -*-
"""
Copyright 2017-2018 Jagoba Pérez-Gómez
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 ... | 29.238095 | 72 | 0.688382 |
5cfd8e90804b3fbaf43beeb1113203bac5bcaf37 | 7,844 | py | Python | test/x509Validation/ValidationTest.py | river2sea/X509Validation | 878584cc59a26cdad7ffc719ea94d87ad303433a | [
"MIT"
] | 7 | 2015-11-05T14:14:53.000Z | 2020-10-24T11:51:48.000Z | test/x509Validation/ValidationTest.py | river2sea/X509Validation | 878584cc59a26cdad7ffc719ea94d87ad303433a | [
"MIT"
] | 5 | 2015-11-02T04:39:05.000Z | 2015-12-08T02:49:42.000Z | test/x509Validation/ValidationTest.py | river2sea/X509Validation | 878584cc59a26cdad7ffc719ea94d87ad303433a | [
"MIT"
] | 1 | 2022-03-13T02:06:23.000Z | 2022-03-13T02:06:23.000Z | import datetime
import sys
import traceback
import unittest
from cryptography import *
from cryptography import x509
from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymme... | 41.068063 | 166 | 0.706272 |
dee2528687e98f4906ca3c080c5262e52a26e943 | 38,768 | py | Python | proxy/proxy.py | Eeyhan/get_jobs | d80d577f8ba4fc1498ef251c4fffb66585f89040 | [
"MIT"
] | 31 | 2019-09-08T14:35:04.000Z | 2022-01-10T06:39:08.000Z | proxy/proxy.py | Eeyhan/get_jobs | d80d577f8ba4fc1498ef251c4fffb66585f89040 | [
"MIT"
] | 3 | 2021-06-18T03:04:14.000Z | 2022-02-28T06:17:46.000Z | proxy/proxy.py | Eeyhan/get_jobs | d80d577f8ba4fc1498ef251c4fffb66585f89040 | [
"MIT"
] | 17 | 2019-09-09T07:26:59.000Z | 2022-03-03T11:41:51.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Author : Eeyhan
# @File : proxy.py
import gevent
from gevent import monkey
monkey.patch_all() # 如果是要开启进程池需要把这个注释掉
import json
import re
import asyncio
import requests
from lxml import etree
from bs4 import BeautifulSoup
import random
from functools import reduce
fr... | 30.052713 | 118 | 0.539104 |
b8b9b99b70f6abeabb047b4eff8183e5a36c88d8 | 7,521 | py | Python | streamlit_recommender.py | yahoyoungho/Recipy_Recommender | d74b26cc654ee79f60420daa85bdeed0c6777fa0 | [
"MIT"
] | null | null | null | streamlit_recommender.py | yahoyoungho/Recipy_Recommender | d74b26cc654ee79f60420daa85bdeed0c6777fa0 | [
"MIT"
] | null | null | null | streamlit_recommender.py | yahoyoungho/Recipy_Recommender | d74b26cc654ee79f60420daa85bdeed0c6777fa0 | [
"MIT"
] | null | null | null | import streamlit as st
import numpy as np
import pandas as pd
import pickle
import sklearn as skl
import os
from gensim import similarities
import spacy
import os
import surprise
from surprise import SVD
from surprise import Dataset, Reader
######### intializing variables ###############
pp_recipes = pickle.load(ope... | 35.476415 | 144 | 0.702965 |
14bed9107960c8aa94906271baa7011bab6c80e1 | 3,658 | py | Python | alipay/aop/api/domain/AlipaySocialGiftVoucherUseModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipaySocialGiftVoucherUseModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipaySocialGiftVoucherUseModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipaySocialGiftVoucherUseModel(object):
def __init__(self):
self._end_date = None
self._mid = None
self._order_id = None
self._price = None
self._start_da... | 27.923664 | 71 | 0.559869 |
7856c5dfe3d05b1e7d05bb919e67947b5067b156 | 2,210 | py | Python | tutorials/Behavior Cloning/network/CriticNetwork.py | namjiwon1023/Code_With_RL | 37beec975b1685e9f6cf991abed491b854b78173 | [
"MIT"
] | 3 | 2021-08-12T15:11:28.000Z | 2021-09-27T16:04:16.000Z | tutorials/Behavior Cloning/network/CriticNetwork.py | namjiwon1023/Code_With_RL | 37beec975b1685e9f6cf991abed491b854b78173 | [
"MIT"
] | null | null | null | tutorials/Behavior Cloning/network/CriticNetwork.py | namjiwon1023/Code_With_RL | 37beec975b1685e9f6cf991abed491b854b78173 | [
"MIT"
] | 1 | 2021-08-05T07:20:57.000Z | 2021-08-05T07:20:57.000Z | # Copyright (c) 2021: Zhiyuan Nan (namjw@hanyang.ac.kr).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
import torch as T
import torch.nn as nn
import torch.optim as optim
import os
import random
import torch.nn.functional as F
import torch.optim ... | 35.079365 | 93 | 0.566063 |
0067b07c33f6b23c9bde23ea1aa184696cf9b832 | 875 | py | Python | tests/v1/test_logs_exclusion_filter.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | tests/v1/test_logs_exclusion_filter.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | tests/v1/test_logs_exclusion_filter.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import absolute_import
import sys
import unittest
im... | 25.735294 | 108 | 0.734857 |
33176df708ff4d5237e753df4b7047128bb0a72a | 3,718 | py | Python | tensorpack/dataflow/imgaug/deform.py | zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | [
"Apache-2.0"
] | 2 | 2018-10-23T22:02:59.000Z | 2021-06-19T15:14:02.000Z | tensorpack/dataflow/imgaug/deform.py | zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | [
"Apache-2.0"
] | null | null | null | tensorpack/dataflow/imgaug/deform.py | zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | [
"Apache-2.0"
] | 1 | 2018-11-14T05:50:57.000Z | 2018-11-14T05:50:57.000Z | # -*- coding: utf-8 -*-
# File: deform.py
from .base import ImageAugmentor
from ...utils import logger
import numpy as np
__all__ = []
# Code was temporarily kept here for a future reference in case someone needs it
# But it was already deprecated,
# because this augmentation is not a general one that people will o... | 33.8 | 102 | 0.594406 |
1f9c45e6b95eda57814d5b8eed9398606140c107 | 5,540 | py | Python | data_process/netcdf/.ipynb_checkpoints/npy_to_nc-checkpoint.py | Fifi-Huo/Digital_Appendix_C | 76aa286a6c3756e98e18d6064826689511e3e8cc | [
"MIT"
] | null | null | null | data_process/netcdf/.ipynb_checkpoints/npy_to_nc-checkpoint.py | Fifi-Huo/Digital_Appendix_C | 76aa286a6c3756e98e18d6064826689511e3e8cc | [
"MIT"
] | null | null | null | data_process/netcdf/.ipynb_checkpoints/npy_to_nc-checkpoint.py | Fifi-Huo/Digital_Appendix_C | 76aa286a6c3756e98e18d6064826689511e3e8cc | [
"MIT"
] | null | null | null | import numpy as np
import os
import sys
import netCDF4 as nc4
from src.track_alignment import map_and_reduce
from src.utils import get_datetime, get_file_time_info, minutes_since
swath_channels = ['ev_250_aggr1km_refsb_1', 'ev_250_aggr1km_refsb_2', 'ev_500_aggr1km_refsb_3', 'ev_500_aggr1km_refsb_4', 'ev_500_aggr... | 36.933333 | 899 | 0.669675 |
baf1d11766cd1167f8409170e12e881e27477c43 | 13,260 | py | Python | analysis/analysis_helpers.py | rahulvenkk/physics-benchmarking-neurips2021 | 9137a3f3a29fa1646a2d7dcf45daf9b22b4241c2 | [
"MIT"
] | 25 | 2021-06-19T02:48:19.000Z | 2022-03-05T14:16:13.000Z | analysis/analysis_helpers.py | rahulvenkk/physics-benchmarking-neurips2021 | 9137a3f3a29fa1646a2d7dcf45daf9b22b4241c2 | [
"MIT"
] | 18 | 2021-06-24T16:39:24.000Z | 2022-01-19T18:34:16.000Z | analysis/analysis_helpers.py | rahulvenkk/physics-benchmarking-neurips2021 | 9137a3f3a29fa1646a2d7dcf45daf9b22b4241c2 | [
"MIT"
] | 2 | 2021-08-12T22:59:47.000Z | 2022-02-24T23:30:58.000Z | import numpy as np
from itertools import groupby
import numpy as np
import scipy.stats as stats
import pandas as pd
# which columns identify a model?
MODEL_COLS = [
'Model',
'Readout Train Data',
'Readout Type',
'Encoder Type',
'Dynamics Type',
'Encoder Pre-training Task',
'Encoder P... | 40.8 | 411 | 0.652489 |
a35875399ef0be82b78d3aaa24c9131cf299d797 | 11,619 | py | Python | xarrayutils/test/test_xgcm_utils.py | cspencerjones/xarrayutils | 6c33e83b830b7586693366c520a54c1122194d50 | [
"MIT"
] | 40 | 2019-02-05T17:06:47.000Z | 2021-11-05T17:52:28.000Z | xarrayutils/test/test_xgcm_utils.py | cspencerjones/xarrayutils | 6c33e83b830b7586693366c520a54c1122194d50 | [
"MIT"
] | 88 | 2017-03-20T15:53:06.000Z | 2022-03-16T02:31:10.000Z | xarrayutils/test/test_xgcm_utils.py | cspencerjones/xarrayutils | 6c33e83b830b7586693366c520a54c1122194d50 | [
"MIT"
] | 14 | 2017-04-24T18:58:12.000Z | 2021-12-02T18:38:42.000Z | import pytest
Grid = pytest.importorskip("xgcm.Grid")
import xarray as xr
import numpy as np
from xarray.testing import assert_allclose
from xarrayutils.weighted_operations import weighted_mean
from xarrayutils.xgcm_utils import (
_infer_gridtype,
_get_name,
_get_axis_pos,
_check_dims,
_find_metri... | 30.101036 | 85 | 0.545056 |
143d73863421fa15ad7e90eff6c07f6112b24793 | 3,596 | py | Python | customer/views.py | rishav142k/deliver-app | 89905c7341fdf17d124aec5042e2ff90ddd455e8 | [
"Unlicense",
"MIT"
] | null | null | null | customer/views.py | rishav142k/deliver-app | 89905c7341fdf17d124aec5042e2ff90ddd455e8 | [
"Unlicense",
"MIT"
] | null | null | null | customer/views.py | rishav142k/deliver-app | 89905c7341fdf17d124aec5042e2ff90ddd455e8 | [
"Unlicense",
"MIT"
] | null | null | null | import json
from django.shortcuts import render, redirect
from django.views import View
from django.core.mail import send_mail
from .models import MenuItem, Category, OrderModel
from django.http import JsonResponse
class Index(View):
def get(self, request, *args, **kwargs):
return render(request, 'custome... | 27.875969 | 86 | 0.574805 |
0c8e9030eaba66b6453044714527016615b723ff | 457 | py | Python | stravaviz/tracks_drawer.py | matoous/stravaviz | 350f8b7ac086d3bd84dfd66a6165b5407f562a32 | [
"MIT"
] | null | null | null | stravaviz/tracks_drawer.py | matoous/stravaviz | 350f8b7ac086d3bd84dfd66a6165b5407f562a32 | [
"MIT"
] | null | null | null | stravaviz/tracks_drawer.py | matoous/stravaviz | 350f8b7ac086d3bd84dfd66a6165b5407f562a32 | [
"MIT"
] | null | null | null | import argparse
import typing
import pint # type: ignore
import svgwrite # type: ignore
from stravaviz.track import Track
from stravaviz.xy import XY
class TracksDrawer:
"""Base class that other drawer classes inherit from."""
def __init__(self, tracks: typing.List[Track], _: argparse.Namespace):
... | 24.052632 | 100 | 0.708972 |
c573de493c228519f92f57649f7b590d382b2740 | 58,111 | py | Python | sdk/storage/azure-storage-blob/azure/storage/blob/_models.py | rlfagan/azure-sdk-for-python | cc2e21d273e8fccfe1cfe020dc456b24cbddc23d | [
"MIT"
] | null | null | null | sdk/storage/azure-storage-blob/azure/storage/blob/_models.py | rlfagan/azure-sdk-for-python | cc2e21d273e8fccfe1cfe020dc456b24cbddc23d | [
"MIT"
] | null | null | null | sdk/storage/azure-storage-blob/azure/storage/blob/_models.py | rlfagan/azure-sdk-for-python | cc2e21d273e8fccfe1cfe020dc456b24cbddc23d | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
# pylint: ... | 44.190875 | 153 | 0.690936 |
4067a363f6f11f05bbac72af5870ff4d364e7b62 | 9,678 | py | Python | python/dnsspec.py | burakbudanur/dnsbox | 13ae8b76c54bd45a7bd7902aa88097be783415d4 | [
"MIT"
] | 1 | 2022-02-18T08:11:15.000Z | 2022-02-18T08:11:15.000Z | python/dnsspec.py | burakbudanur/dnsbox | 13ae8b76c54bd45a7bd7902aa88097be783415d4 | [
"MIT"
] | 2 | 2021-07-20T12:19:11.000Z | 2021-07-21T20:29:59.000Z | python/dnsspec.py | burakbudanur/dnsbox | 13ae8b76c54bd45a7bd7902aa88097be783415d4 | [
"MIT"
] | 4 | 2020-12-12T08:18:37.000Z | 2022-03-03T14:52:53.000Z | #!/usr/bin/env python3
import argparse
from pathlib import Path
import numpy as np
from matplotlib import pyplot as plt
from tqdm import tqdm
import dns
def main():
parser = argparse.ArgumentParser("Computes direction-dependent spectra.")
parser.add_argument(
"statePath",
type=str,
h... | 29.416413 | 89 | 0.516326 |
bb7ffd291218ad571bbec1ac891eab48d07abb52 | 4,103 | py | Python | packages/python/plotly/plotly/graph_objs/histogram2d/_stream.py | eranws/plotly.py | 5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/histogram2d/_stream.py | eranws/plotly.py | 5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/histogram2d/_stream.py | eranws/plotly.py | 5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Stream(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram2d"
_path_str = "histogram2d.stream"
_valid_props = {"maxpoints", "token"}
# m... | 29.099291 | 82 | 0.539605 |
aa0a8e9b66ea38f871f15be0cb51d0f056ab7c9a | 4,907 | py | Python | camp/commands.py | pedrovelho/camp | 98105c9054b8db3377cb6a06e7b5451b97c6c285 | [
"MIT"
] | null | null | null | camp/commands.py | pedrovelho/camp | 98105c9054b8db3377cb6a06e7b5451b97c6c285 | [
"MIT"
] | null | null | null | camp/commands.py | pedrovelho/camp | 98105c9054b8db3377cb6a06e7b5451b97c6c285 | [
"MIT"
] | 1 | 2019-02-05T08:49:41.000Z | 2019-02-05T08:49:41.000Z | #
# CAMP
#
# Copyright (C) 2017, 2018 SINTEF Digital
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
#
from argparse import ArgumentParser
from camp import About
class Command(object):
@staticmethod
def ext... | 26.668478 | 88 | 0.605258 |
d6d862db21946143c1c3d446b2ddce12f44636f1 | 99 | py | Python | utils/__init__.py | jdstmporter/wav2mp3 | 9b41620b24c53f4d4941c32d074b33a5b594f033 | [
"BSD-3-Clause"
] | 1 | 2021-08-14T07:01:15.000Z | 2021-08-14T07:01:15.000Z | utils/__init__.py | jdstmporter/pcm2mp3 | 1d99558578fdea7dcf2c7db4afe6ad7704a9f140 | [
"BSD-3-Clause"
] | null | null | null | utils/__init__.py | jdstmporter/pcm2mp3 | 1d99558578fdea7dcf2c7db4afe6ad7704a9f140 | [
"BSD-3-Clause"
] | null | null | null | from .checkForLibs import libs, gcc, CheckLibrary, CheckCompiler
from .clean import Cleaner
| 16.5 | 64 | 0.767677 |
bae5bc3947a5fe116736893d8379abceb03aa5d3 | 3,969 | py | Python | src/conv.py | toomanyjoes/mrperfcs386m | 0f04649a31cc658ef0947945211a65f7b23b6f5e | [
"MIT"
] | null | null | null | src/conv.py | toomanyjoes/mrperfcs386m | 0f04649a31cc658ef0947945211a65f7b23b6f5e | [
"MIT"
] | 1 | 2015-11-16T16:53:10.000Z | 2015-11-16T16:53:10.000Z | test/conv.py | toomanyjoes/mrperfcs386m | 0f04649a31cc658ef0947945211a65f7b23b6f5e | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""Hadoop Simulator
This simulator takes three configuration files, topology.xml, metadata.xml,
and job.xml, describing a Hadoop job and the topology it will run on.
Two tcl files, topology.tcl and events.tcl, will be generated as input
for ns-2 for further simulation.
"""
#import xml.dom
import x... | 33.923077 | 143 | 0.689342 |
aeb2a2f2f18200c7e07a9116b509ef6cf62f73f4 | 2,979 | py | Python | lib/tests/streamlit/show_test.py | sourcery-ai-bot/streamlit | cbfa69c8ec310a839148cfa4bac5697e6f392a79 | [
"Apache-2.0"
] | null | null | null | lib/tests/streamlit/show_test.py | sourcery-ai-bot/streamlit | cbfa69c8ec310a839148cfa4bac5697e6f392a79 | [
"Apache-2.0"
] | null | null | null | lib/tests/streamlit/show_test.py | sourcery-ai-bot/streamlit | cbfa69c8ec310a839148cfa4bac5697e6f392a79 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2022 Streamlit Inc.
#
# 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... | 37.2375 | 197 | 0.63377 |
449be7ee4852a4cada910a7046a8f5d95851163f | 1,015 | py | Python | Modules/reid/default_config.py | NikAbba/video_tracking | c624a9d3596befa4a941e4ff4092b9545bfdd28d | [
"Apache-2.0"
] | null | null | null | Modules/reid/default_config.py | NikAbba/video_tracking | c624a9d3596befa4a941e4ff4092b9545bfdd28d | [
"Apache-2.0"
] | null | null | null | Modules/reid/default_config.py | NikAbba/video_tracking | c624a9d3596befa4a941e4ff4092b9545bfdd28d | [
"Apache-2.0"
] | 1 | 2021-04-23T19:12:44.000Z | 2021-04-23T19:12:44.000Z | from yacs.config import CfgNode
def get_default_config():
cfg = CfgNode()
# reid model
cfg.model = CfgNode()
cfg.model.name = 'osnet_x1_0'
cfg.model.pretrained = True # automatically load pretrained model weights if available
# cfg.model.load_weights = './torchreid/trained_models/osnet_x0_25... | 44.130435 | 177 | 0.75665 |
f462196c4f678dc61a70a620edab19fd959b1f2c | 7,337 | py | Python | external/netdef_models/lmbspecialops/test/test_FlowToDepth2.py | zhuhu00/MOTSFusion_modify | 190224a7c3fbded69fedf9645a0ebbf08227fb6d | [
"MIT"
] | null | null | null | external/netdef_models/lmbspecialops/test/test_FlowToDepth2.py | zhuhu00/MOTSFusion_modify | 190224a7c3fbded69fedf9645a0ebbf08227fb6d | [
"MIT"
] | null | null | null | external/netdef_models/lmbspecialops/test/test_FlowToDepth2.py | zhuhu00/MOTSFusion_modify | 190224a7c3fbded69fedf9645a0ebbf08227fb6d | [
"MIT"
] | null | null | null | #
# lmbspecialops - a collection of tensorflow ops
# Copyright (C) 2017 Benjamin Ummenhofer, Huizhong Zhou
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... | 35.274038 | 94 | 0.611967 |
5d1abb06264521cd4e78034d7788260d98b5dfe3 | 2,990 | py | Python | server/app/models/Person.py | abhijithvijayan/corona-screening-portal | fc2e17926131fdc76ff62f850e1cfce4e05b50dc | [
"MIT"
] | 1 | 2020-03-15T16:54:42.000Z | 2020-03-15T16:54:42.000Z | server/app/models/Person.py | abhijithvijayan/corona-screening-portal | fc2e17926131fdc76ff62f850e1cfce4e05b50dc | [
"MIT"
] | 5 | 2020-03-15T17:06:51.000Z | 2020-03-15T17:18:13.000Z | server/app/models/Person.py | abhijithvijayan/corona-screening-portal | fc2e17926131fdc76ff62f850e1cfce4e05b50dc | [
"MIT"
] | null | null | null | from sqlalchemy import text
from sqlalchemy.sql import func
from sqlalchemy.orm import relationship
from sqlalchemy.dialects.postgresql import UUID, JSON
from sqlalchemy.ext.associationproxy import association_proxy
from .Association import Association
from app import db
class Person(db.Model):
"""Main Table"""
... | 36.463415 | 93 | 0.610702 |
bce6b471c5deafd857df027eb9597b5347560972 | 6,615 | py | Python | lib/axis/tb/axis_demux/test_axis_demux.py | 1847123212/verilog-ethernet | 84004c720dd1a873db96632c9c766badf1de59be | [
"MIT"
] | 1 | 2022-01-24T04:54:00.000Z | 2022-01-24T04:54:00.000Z | fpga/lib/eth/lib/axis/tb/axis_demux/test_axis_demux.py | linjw16/corundum | 65ad32421bacc497823ca939b0b9f0801063c4ea | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | fpga/lib/eth/lib/axis/tb/axis_demux/test_axis_demux.py | linjw16/corundum | 65ad32421bacc497823ca939b0b9f0801063c4ea | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2022-03-01T13:36:39.000Z | 2022-03-01T13:36:39.000Z | #!/usr/bin/env python
"""
Copyright (c) 2021 Alex Forencich
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 limitation the rights
to use, copy, modify, merg... | 30.767442 | 124 | 0.691308 |
d0cd644868f560a339f5adf43f57c7d726731b0d | 3,801 | py | Python | netbox/dcim/management/commands/trace_paths.py | cybarox/netbox | ea197eff5f4fe925bb354d1375912decd81752bd | [
"Apache-2.0"
] | 1 | 2021-12-09T13:41:46.000Z | 2021-12-09T13:41:46.000Z | netbox/dcim/management/commands/trace_paths.py | cybarox/netbox | ea197eff5f4fe925bb354d1375912decd81752bd | [
"Apache-2.0"
] | null | null | null | netbox/dcim/management/commands/trace_paths.py | cybarox/netbox | ea197eff5f4fe925bb354d1375912decd81752bd | [
"Apache-2.0"
] | 1 | 2022-02-07T20:36:31.000Z | 2022-02-07T20:36:31.000Z | from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from django.db import connection
from django.db.models import Q
from dcim.models import CablePath, ConsolePort, ConsoleServerPort, Interface, PowerFeed, PowerOutlet, PowerPort
from dcim.signals import create_cablepath... | 41.769231 | 111 | 0.618521 |
ae3f75d92abee26a59deb7cbafb494d0bf36be07 | 1,524 | py | Python | exception/unitTest.py | chainren/python-learn | 5e48e96c4bb212806b9ae0954fdb368abdcf9ba3 | [
"Apache-2.0"
] | null | null | null | exception/unitTest.py | chainren/python-learn | 5e48e96c4bb212806b9ae0954fdb368abdcf9ba3 | [
"Apache-2.0"
] | 16 | 2020-02-12T03:09:30.000Z | 2022-03-12T00:08:59.000Z | exception/unitTest.py | chainren/python-learn | 5e48e96c4bb212806b9ae0954fdb368abdcf9ba3 | [
"Apache-2.0"
] | null | null | null | # 单元测试
# 为了编写单元测试,我们需要引入Python自带的unittest模块
import unittest
from mydict import MyDict
class TestDict(unittest.TestCase):
def test_init(self):
d = MyDict(a=1,b='test')
self.assertEqual(d.a,1)
self.assertEqual(d.b,'test')
self.assertTrue(isinstance(d, dict))
def test_key(self)... | 23.446154 | 109 | 0.674541 |
109904bcb6be40f483f6da70ec70977a72e11a15 | 2,886 | py | Python | fRunCommand.py | SkyLined/rs | df13f1c73a80fdb2a5e6626d6d88c5da974db64f | [
"CC-BY-4.0"
] | 13 | 2018-03-28T12:05:09.000Z | 2021-01-30T07:27:05.000Z | fRunCommand.py | SkyLined/rs | df13f1c73a80fdb2a5e6626d6d88c5da974db64f | [
"CC-BY-4.0"
] | 2 | 2017-12-31T10:23:35.000Z | 2017-12-31T10:24:09.000Z | fRunCommand.py | SkyLined/rs | df13f1c73a80fdb2a5e6626d6d88c5da974db64f | [
"CC-BY-4.0"
] | null | null | null | import os, re;
from mWindowsAPI import cConsoleProcess;
sComSpec = os.environ["COMSPEC"];
rSubstitudeTemplate = re.compile(
r"(\\)?"
r"\{"
r"(~?)"
r"("
r"l"
r"|"
r"(n|p)?[0-9]+"
r"|"
r"[fdpnx]+"
r")"
r"\}"
);
def fRunCommand(asCommandTemplate, sFilePath, o0LastNameMatch, ... | 30.702128 | 100 | 0.608801 |
acb37d7672c988fc4222b4a59896447e51ff7579 | 19,745 | py | Python | i3ipc/connection.py | vincentbernat/i3ipc-python | 1d0c214e0013816c413e69ef923fb3fe353cf26f | [
"BSD-3-Clause"
] | null | null | null | i3ipc/connection.py | vincentbernat/i3ipc-python | 1d0c214e0013816c413e69ef923fb3fe353cf26f | [
"BSD-3-Clause"
] | null | null | null | i3ipc/connection.py | vincentbernat/i3ipc-python | 1d0c214e0013816c413e69ef923fb3fe353cf26f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
from .con import Con
from .replies import (BarConfigReply, CommandReply, ConfigReply, OutputReply, TickReply,
VersionReply, WorkspaceReply, SeatReply, InputReply)
from .events import (IpcBaseEvent, BarconfigUpdateEvent, BindingEvent, OutputEvent, ShutdownEvent,
... | 34.640351 | 106 | 0.603343 |
c30798bbfd8f141afe8ca76d7fbd3ba89f79376b | 5,866 | py | Python | user/views.py | penagos/scientiapy | c9bc7f3e2c9c15e7b8608b7e9b94620416a83bab | [
"MIT"
] | 2 | 2020-08-20T19:47:00.000Z | 2021-08-11T10:31:48.000Z | user/views.py | penagos/scientiapy | c9bc7f3e2c9c15e7b8608b7e9b94620416a83bab | [
"MIT"
] | null | null | null | user/views.py | penagos/scientiapy | c9bc7f3e2c9c15e7b8608b7e9b94620416a83bab | [
"MIT"
] | null | null | null | from django.contrib.auth import authenticate, logout, login as auth_login
from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404, redirect, render
from django.http import HttpResponseRedirect, JsonResponse
from django.urls import reverse
from questions.models import Post
from user.mo... | 32.40884 | 79 | 0.536652 |
002221126913d97a2111b981d4662ea4a04f9f1c | 6,162 | py | Python | .github/scripts/build_assets/api_handler.py | Thomas-Boi/devicon | ac5f98152afda508ba2f1217f6b8ca7ef7b6a4f2 | [
"MIT"
] | null | null | null | .github/scripts/build_assets/api_handler.py | Thomas-Boi/devicon | ac5f98152afda508ba2f1217f6b8ca7ef7b6a4f2 | [
"MIT"
] | 47 | 2021-01-09T06:53:25.000Z | 2021-12-27T07:53:28.000Z | .github/scripts/build_assets/api_handler.py | Thomas-Boi/devicon | ac5f98152afda508ba2f1217f6b8ca7ef7b6a4f2 | [
"MIT"
] | 2 | 2021-12-30T11:27:47.000Z | 2022-01-28T18:20:49.000Z | import requests
import sys
import re
from typing import List
# our base url which leads to devicon
# base_url = "https://api.github.com/repos/devicons/devicon/"
# testing url
base_url = "https://api.github.com/repos/Thomas-Boi/devicon/"
def get_merged_pull_reqs_since_last_release(token):
"""
Get all the mer... | 33.308108 | 128 | 0.620902 |
b44a978adc34a602aff357c90dcfbc78dc927e2f | 3,715 | py | Python | official/nlp/modeling/layers/on_device_embedding.py | caleblu/influence-patterns | fa7ba555fdee9561865c88fe59364840f9721841 | [
"MIT"
] | 3 | 2021-12-08T07:47:41.000Z | 2022-02-16T23:07:58.000Z | official/nlp/modeling/layers/on_device_embedding.py | caleblu/influence-patterns | fa7ba555fdee9561865c88fe59364840f9721841 | [
"MIT"
] | 1 | 2022-02-05T18:27:14.000Z | 2022-02-05T18:27:14.000Z | official/nlp/modeling/layers/on_device_embedding.py | caleblu/influence-patterns | fa7ba555fdee9561865c88fe59364840f9721841 | [
"MIT"
] | null | null | null | # Copyright 2019 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... | 39.521277 | 83 | 0.664872 |
c1fe0020f9e65e521a36bffb15619299e145245b | 46,015 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocolstack/igmpmldrange_050273ee07c40d76e84d29c163a0efbe.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocolstack/igmpmldrange_050273ee07c40d76e84d29c163a0efbe.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocolstack/igmpmldrange_050273ee07c40d76e84d29c163a0efbe.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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 limitation
# the rights to use, copy, modify,... | 82.169643 | 4,848 | 0.75358 |
432a50795cff4dcaa0858b46870133ab8308d3bb | 3,559 | py | Python | plugins/wedo_plugin/usb/__init__.py | RodPy/TurtleBots.activity-1 | b976cb817f932f9716504c7bd38700401177cc0c | [
"MIT"
] | 1 | 2018-08-27T21:12:52.000Z | 2018-08-27T21:12:52.000Z | usb/__init__.py | HiJasper/pyusb | 2e4679183c94d5733d0e22f82ac9e827637a63ff | [
"BSD-3-Clause"
] | null | null | null | usb/__init__.py | HiJasper/pyusb | 2e4679183c94d5733d0e22f82ac9e827637a63ff | [
"BSD-3-Clause"
] | 4 | 2016-05-10T12:20:27.000Z | 2017-08-12T03:41:42.000Z | # Copyright (C) 2009-2014 Wander Lairson Costa
#
# The following terms apply to all files associated
# with the software unless explicitly disclaimed in individual files.
#
# The authors hereby grant permission to use, copy, modify, distribute,
# and license this software and its documentation for any purpose, provided... | 36.316327 | 81 | 0.70694 |
77b138d6ac2416cf21389f190b778cdeb21b5c28 | 1,318 | py | Python | XSum-Topic-ConvS2S/fairseq/criterions/fairseq_criterion.py | zsquaredz/XSum | 10f2fac2e70801e7a3973c864b5a24b61d3f8bfe | [
"MIT"
] | 235 | 2018-11-26T16:53:27.000Z | 2022-03-24T13:04:48.000Z | XSum-Topic-ConvS2S/fairseq/criterions/fairseq_criterion.py | zsquaredz/XSum | 10f2fac2e70801e7a3973c864b5a24b61d3f8bfe | [
"MIT"
] | 24 | 2018-12-19T01:02:27.000Z | 2022-01-16T07:47:36.000Z | XSum-Topic-ConvS2S/fairseq/criterions/fairseq_criterion.py | zsquaredz/XSum | 10f2fac2e70801e7a3973c864b5a24b61d3f8bfe | [
"MIT"
] | 59 | 2018-12-07T18:57:05.000Z | 2022-03-24T13:34:09.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
from torch.nn.modules.loss import ... | 31.380952 | 78 | 0.682853 |
4dba1499c072995f75d5993d336399b757b5a209 | 4,264 | py | Python | optimised_forest.py | hcbh96/Random-Forest-FYP | 4af2c85a4f4d998f616751f9c366329bdc559b13 | [
"MIT"
] | null | null | null | optimised_forest.py | hcbh96/Random-Forest-FYP | 4af2c85a4f4d998f616751f9c366329bdc559b13 | [
"MIT"
] | null | null | null | optimised_forest.py | hcbh96/Random-Forest-FYP | 4af2c85a4f4d998f616751f9c366329bdc559b13 | [
"MIT"
] | null | null | null | """
In this file I will:
Use a Randomised Search to find optimal RF params
Train A RF with optimised params
Evaluate Accuracy
Evaluate Sensitivity
Evaluate Precision
Evaluate ROC AUC
Determine the features of greatest importance
"""
import pandas as pd
import numpy as np
from sklearn.model_s... | 31.352941 | 140 | 0.720216 |
ad5647cc38318b09d5a7f499fcb9c8bef4d0d8b4 | 69,112 | py | Python | interfaces/acados_template/acados_template/acados_ocp_solver.py | psiori/acados | 05398550e9c6f766a2c30356c35cc3a12df747fd | [
"BSD-2-Clause"
] | null | null | null | interfaces/acados_template/acados_template/acados_ocp_solver.py | psiori/acados | 05398550e9c6f766a2c30356c35cc3a12df747fd | [
"BSD-2-Clause"
] | 20 | 2019-08-15T15:13:54.000Z | 2021-04-13T14:43:59.000Z | interfaces/acados_template/acados_template/acados_ocp_solver.py | psiori/acados | 05398550e9c6f766a2c30356c35cc3a12df747fd | [
"BSD-2-Clause"
] | 2 | 2020-05-29T08:27:11.000Z | 2020-10-16T10:50:28.000Z | # -*- coding: future_fstrings -*-
#
# Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
# Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
# Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
# Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Di... | 44.473616 | 174 | 0.640019 |
bfd25fece7ec87a5f2068842445a60914d5a20fd | 5,192 | py | Python | aalh_iit_parksnature_001/cleanup-subjects-column.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | aalh_iit_parksnature_001/cleanup-subjects-column.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | aalh_iit_parksnature_001/cleanup-subjects-column.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | from openpyxl import load_workbook
filename = 'aalh_iit_parksnature_001.xlsx'
wb = load_workbook(filename)
ws = wb['Metadata Template']
minimumcol = 8
maximumcol = 8
minimumrow = 7
maximumrow = 493
iterationrow = 7
targetcol = 9
placecol = 13
subjectholland = 'Images in time photographic collection. ... | 64.098765 | 141 | 0.655624 |
ee4a93f0b5129423bcd922888084b19fb7042c65 | 896 | py | Python | settings.py | glebb/eashl | 1ee0e2a895ee266a7eca103dfa0f2c5ea35768cc | [
"MIT"
] | 1 | 2015-12-21T04:44:48.000Z | 2015-12-21T04:44:48.000Z | settings.py | glebb/eashl | 1ee0e2a895ee266a7eca103dfa0f2c5ea35768cc | [
"MIT"
] | 1 | 2017-04-24T14:08:55.000Z | 2017-04-26T05:37:48.000Z | settings.py | glebb/eashl | 1ee0e2a895ee266a7eca103dfa0f2c5ea35768cc | [
"MIT"
] | 4 | 2017-04-24T14:25:25.000Z | 2022-02-23T19:00:41.000Z | HOME_TEAM = "219"
HOME_TEAM_NAME = "Murohoki"
PLATFORM = "ps4"
FETCH_MATCHES = "5"
MONGODBUSER = "eashl"
MONGODBPWD = "eashl"
DEBUG = False
MIN_GAMES_TO_SHOW_IN_STATS = 1
CLASSES = {"16200": "defensive defender",
"16201": "offensive defender",
"16202": "enforcer defender",
"16203": "two-way defender",
"16204": "grind... | 16 | 64 | 0.639509 |
c82ff1af2c964acf96a49c9ec904d81cd6a8a57a | 4,269 | py | Python | tests/libtest/test_cluster_utils.py | tiffanyn108/ocs-ci | 30350e0958d14100edeadbbc5f3fe557954a76b8 | [
"MIT"
] | null | null | null | tests/libtest/test_cluster_utils.py | tiffanyn108/ocs-ci | 30350e0958d14100edeadbbc5f3fe557954a76b8 | [
"MIT"
] | null | null | null | tests/libtest/test_cluster_utils.py | tiffanyn108/ocs-ci | 30350e0958d14100edeadbbc5f3fe557954a76b8 | [
"MIT"
] | null | null | null | import logging
import pytest
from ocs_ci.framework.testlib import ManageTest, libtest
from ocs_ci.ocs.cluster import CephCluster
from tests import helpers
log = logging.getLogger(__name__)
@pytest.fixture(scope='class')
def test_fixture(request):
"""
Create disks
"""
self = request.node.cls
de... | 29.239726 | 79 | 0.678613 |
325bddc968cb0a80d80ecbcde4bc43e81521a9ad | 3,133 | py | Python | Clustering:-Customer-Segmentation/code.py | akshatDongre/ga-learner-dsmp-repo | 6e4d993c6d078b1f559b42f42d37d2c2100f62b8 | [
"MIT"
] | null | null | null | Clustering:-Customer-Segmentation/code.py | akshatDongre/ga-learner-dsmp-repo | 6e4d993c6d078b1f559b42f42d37d2c2100f62b8 | [
"MIT"
] | null | null | null | Clustering:-Customer-Segmentation/code.py | akshatDongre/ga-learner-dsmp-repo | 6e4d993c6d078b1f559b42f42d37d2c2100f62b8 | [
"MIT"
] | null | null | null | # --------------
# import packages
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# Load Offers
offers = pd.read_excel(path, sheet_name=0)
transactions=pd.read_excel(path, sheet_name=1)
transactions['n']=1
df=pd.merge(offers, transactions)
print(df.head())
# Load Tran... | 19.220859 | 89 | 0.691989 |
118a5c5b02531ba8eb24b3cf9c408cfa3c4252d2 | 398 | py | Python | habu/cli/cmd_xor.py | NanoGitHub/habu | 5f0c5ed40ae5fdbbc0d3c317b75e447f4aa6a740 | [
"BSD-3-Clause"
] | 1 | 2018-11-02T05:42:08.000Z | 2018-11-02T05:42:08.000Z | habu/cli/cmd_xor.py | seclib/habu | 7e8106ddec07e08b994c290a38ce7f7f662c0e1c | [
"BSD-3-Clause"
] | null | null | null | habu/cli/cmd_xor.py | seclib/habu | 7e8106ddec07e08b994c290a38ce7f7f662c0e1c | [
"BSD-3-Clause"
] | 1 | 2019-05-14T07:34:20.000Z | 2019-05-14T07:34:20.000Z | import click
from habu.lib.xor import xor
@click.command()
@click.option('-k', default='0', help='Encryption key')
@click.option('-i', type=click.File('rb'), required=True, help='Input file')
@click.option('-o', type=click.File('wb'), required=True, help='Output file')
def cmd_xor(k, i, o):
"""XOR cipher"""
... | 23.411765 | 77 | 0.643216 |
dd9a634a4959ac63041ae9b636a2e27083eb5e70 | 249 | py | Python | Modules/Gekokujo_vanilla_enhanced/Code/Module_system/header_postfx.py | roalyr/gekokujo_vanilla_enhanced | 84d8cc1033be98357ac139fafbc1c10851274019 | [
"MIT"
] | 1 | 2021-01-17T06:21:36.000Z | 2021-01-17T06:21:36.000Z | Modules/Gekokujo_vanilla_enhanced/Code/Module_system/header_postfx.py | roalyr/gekokujo_vanilla_enhanced | 84d8cc1033be98357ac139fafbc1c10851274019 | [
"MIT"
] | 2 | 2021-01-17T12:57:37.000Z | 2021-02-08T02:16:45.000Z | Modules/Gekokujo_vanilla_enhanced/Code/Module_system/header_postfx.py | roalyr/gekokujo_vanilla_enhanced | 84d8cc1033be98357ac139fafbc1c10851274019 | [
"MIT"
] | null | null | null | ###################################################
# header_postfx_params.py
# This file contains declarations for postfx_params
# DO NOT EDIT THIS FILE!
###################################################
fxf_highhdr = 0x00000001
| 27.666667 | 52 | 0.417671 |
65014f269c244d916cefa081e8f7feee79c4a85f | 4,366 | py | Python | examples/test_pcrnet.py | RerRayne/learn3d | 83e4ac657c6538fb4cbed6e00b2e3ed6cbf43555 | [
"MIT"
] | 335 | 2020-05-17T19:37:47.000Z | 2022-03-29T09:32:14.000Z | examples/test_pcrnet.py | RerRayne/learn3d | 83e4ac657c6538fb4cbed6e00b2e3ed6cbf43555 | [
"MIT"
] | 13 | 2020-06-08T05:28:03.000Z | 2022-03-29T07:46:18.000Z | examples/test_pcrnet.py | RerRayne/learn3d | 83e4ac657c6538fb4cbed6e00b2e3ed6cbf43555 | [
"MIT"
] | 59 | 2020-06-27T09:01:29.000Z | 2022-03-21T07:22:09.000Z | import open3d as o3d
import argparse
import os
import sys
import logging
import numpy
import numpy as np
import torch
import torch.utils.data
import torchvision
from torch.utils.data import DataLoader
from tensorboardX import SummaryWriter
from tqdm import tqdm
# Only if the files are in example folder.
BASE_DIR = os.... | 36.383333 | 144 | 0.740266 |
504d5e1c541dfeccbee0c152786aca7805ca01e9 | 1,332 | py | Python | provisioners/ansible/library/stack_facter_facts.py | PradKhandelwal/aem-aws-stack-builder | 27ef24c0b42b921c622791ce579e91e3ed08912f | [
"Apache-2.0"
] | 36 | 2017-01-17T01:40:08.000Z | 2022-03-11T18:09:53.000Z | provisioners/ansible/library/stack_facter_facts.py | PradKhandelwal/aem-aws-stack-builder | 27ef24c0b42b921c622791ce579e91e3ed08912f | [
"Apache-2.0"
] | 192 | 2017-01-24T01:53:39.000Z | 2021-10-21T03:11:36.000Z | provisioners/ansible/library/stack_facter_facts.py | PradKhandelwal/aem-aws-stack-builder | 27ef24c0b42b921c622791ce579e91e3ed08912f | [
"Apache-2.0"
] | 50 | 2017-01-19T04:44:46.000Z | 2021-08-16T05:21:06.000Z | #!/usr/bin/python3
from ansible.module_utils.basic import *
import random
import string
def generate_facts(params):
return """stack_prefix=%s
aws_region=%s
cron_env_path=%s
cron_http_proxy=%s
cron_https_proxy=%s
cron_no_proxy=%s
publish_dispatcher_allowed_client=%s
""" % (
params['stack_prefix'],
... | 30.976744 | 76 | 0.588589 |
677eeb16b0635ad8c6a12e8921d99fc5b40ff69d | 468 | py | Python | Python/ex52.py | Anderson0312/Python | 1fd225378c55309640d584a4894393f7c40dc9ed | [
"MIT"
] | 1 | 2022-02-01T17:59:50.000Z | 2022-02-01T17:59:50.000Z | Python/ex52.py | Anderson0312/Python | 1fd225378c55309640d584a4894393f7c40dc9ed | [
"MIT"
] | null | null | null | Python/ex52.py | Anderson0312/Python | 1fd225378c55309640d584a4894393f7c40dc9ed | [
"MIT"
] | null | null | null | lista = list()
while True:
lista.append(int(input('Digite um valor: ')))
soun = str(input('Quer continuar? [S/N] '))
print('-=' * 30)
if soun in 'Nn':
break
lista.sort(reverse=True)
print(f'Você digitou {len(lista)} elementos.')
print('-=' * 30)
print('Os valores em ordem decrescente são {}'.for... | 29.25 | 61 | 0.615385 |
8b6f6925b5d69016e0aa0e747234403153748d5a | 323 | py | Python | Project/Server/McServer/backendapp/serializers.py | Tchinmai7/CSE535 | d2983355656f66070e840408a0825fae6de33df1 | [
"MIT"
] | null | null | null | Project/Server/McServer/backendapp/serializers.py | Tchinmai7/CSE535 | d2983355656f66070e840408a0825fae6de33df1 | [
"MIT"
] | 1 | 2022-02-10T12:51:12.000Z | 2022-02-10T12:51:12.000Z | Project/Server/McServer/backendapp/serializers.py | Tchinmai7/CSE535 | d2983355656f66070e840408a0825fae6de33df1 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import User
class LoginSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = "__all__"
class RegisterSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('UserName', 'UserSignalFile... | 23.071429 | 54 | 0.702786 |
d6f1bfe86e8d779215622cb65d53cf23b089ffca | 2,121 | py | Python | test/scripts/test_sequana_coverage.py | brwnj/sequana | 58f6ca47815bf7253f27e4631d971a0a479c3a63 | [
"BSD-3-Clause"
] | null | null | null | test/scripts/test_sequana_coverage.py | brwnj/sequana | 58f6ca47815bf7253f27e4631d971a0a479c3a63 | [
"BSD-3-Clause"
] | null | null | null | test/scripts/test_sequana_coverage.py | brwnj/sequana | 58f6ca47815bf7253f27e4631d971a0a479c3a63 | [
"BSD-3-Clause"
] | 1 | 2019-10-11T18:21:05.000Z | 2019-10-11T18:21:05.000Z | from sequana.scripts import coverage
from sequana import sequana_data
import pytest
prog = "sequana_coverage"
@pytest.fixture
def coveragefix():
import os
# local nosetests execution
try:os.remove('README')
except:pass
try:os.remove('quality.rules')
except:pass
try:os.remove('config.yaml')... | 27.192308 | 95 | 0.600189 |
5dda0948901fbc05f782713a8e50032d96f68462 | 551 | py | Python | env/lib/python3.8/site-packages/plotly/validators/pointcloud/stream/_maxpoints.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/pointcloud/stream/_maxpoints.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/pointcloud/stream/_maxpoints.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="maxpoints", parent_name="pointcloud.stream", **kwargs
):
super(MaxpointsValidator, self).__init__(
plotly_name=plotly_name,
paren... | 32.411765 | 80 | 0.615245 |
e834dda3a9ae105c4f4445e6dcb858fac6984d98 | 548 | py | Python | exams/2018-06-28/testo-esame/esercizio1.py | CNardin/learning-python | 407b35c3bb045477b823fb0fd8cf7ae05d92ef77 | [
"MIT"
] | null | null | null | exams/2018-06-28/testo-esame/esercizio1.py | CNardin/learning-python | 407b35c3bb045477b823fb0fd8cf7ae05d92ef77 | [
"MIT"
] | null | null | null | exams/2018-06-28/testo-esame/esercizio1.py | CNardin/learning-python | 407b35c3bb045477b823fb0fd8cf7ae05d92ef77 | [
"MIT"
] | null | null | null | """
Prende in input una lista con n numeri interi, e RITORNA una NUOVA lista che
contiene n tuple ciascuna da due elementi. Ogni tupla contiene un numero
preso dalla corrispondente posizione della lista di partenza, e il suo doppio.
Per esempio:
doppie([ 5, 3, 8])
deve dare la nuova lista
[(5,10), (3,6), (8,16)]... | 22.833333 | 79 | 0.644161 |
0c65bb9fea1af6d8c9abcd0840c9e945c923422d | 3,235 | py | Python | helper.py | edmondchuc/voc-view | 57bd965facacc77f40f218685c88e8b858d4925c | [
"MIT"
] | 3 | 2021-07-31T16:23:26.000Z | 2022-01-24T01:28:17.000Z | helper.py | edmondchuc/voc-view | 57bd965facacc77f40f218685c88e8b858d4925c | [
"MIT"
] | null | null | null | helper.py | edmondchuc/voc-view | 57bd965facacc77f40f218685c88e8b858d4925c | [
"MIT"
] | 1 | 2019-08-07T06:02:52.000Z | 2019-08-07T06:02:52.000Z | from markdown import markdown
from flask import url_for
from rdflib.namespace import DCTERMS
from rdflib import BNode, URIRef
from bs4 import BeautifulSoup
from config import Config
# from triplestore import Triplestore
import re
from urllib.parse import quote_plus
from datetime import datetime, timedelta
def rende... | 32.029703 | 221 | 0.592581 |
61fa173d68655ef833b840e0e14a36a1f15c4fae | 11,131 | py | Python | pytorch_toolbelt/modules/backbone/inceptionv4.py | papkov/pytorch-toolbelt | 71d03d907f93fa73fbfba5eb89d26ad801e47e03 | [
"MIT"
] | null | null | null | pytorch_toolbelt/modules/backbone/inceptionv4.py | papkov/pytorch-toolbelt | 71d03d907f93fa73fbfba5eb89d26ad801e47e03 | [
"MIT"
] | null | null | null | pytorch_toolbelt/modules/backbone/inceptionv4.py | papkov/pytorch-toolbelt | 71d03d907f93fa73fbfba5eb89d26ad801e47e03 | [
"MIT"
] | null | null | null | # Orignal source
# https://github.com/Cadene/pretrained-models.pytorch/blob/master/pretrainedmodels/models/inceptionv4.py
from __future__ import absolute_import, division, print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
__all__ = ["Inception... | 34.039755 | 114 | 0.577037 |
9e685ed8e30d6df08564c0586a9a82eed1c79e8e | 292 | py | Python | amd64-linux/lib/python/mod_ppc603e_commands.py | qiyancos/Simics-3.0.31 | 9bd52d5abad023ee87a37306382a338abf7885f1 | [
"BSD-4-Clause",
"FSFAP"
] | 1 | 2020-06-15T10:41:18.000Z | 2020-06-15T10:41:18.000Z | amd64-linux/lib/python/mod_ppc603e_turbo_commands.py | qiyancos/Simics-3.0.31 | 9bd52d5abad023ee87a37306382a338abf7885f1 | [
"BSD-4-Clause",
"FSFAP"
] | null | null | null | amd64-linux/lib/python/mod_ppc603e_turbo_commands.py | qiyancos/Simics-3.0.31 | 9bd52d5abad023ee87a37306382a338abf7885f1 | [
"BSD-4-Clause",
"FSFAP"
] | 3 | 2020-08-10T10:25:02.000Z | 2021-09-12T01:12:09.000Z | import ppc_commands
ppc_model = 'ppc603e'
funcs = {}
ppc_commands.setup_local_functions(ppc_model, funcs)
class_funcs = { ppc_model: funcs }
ppc_commands.enable_generic_ppc_commands(ppc_model)
ppc_commands.enable_fpu_commands(ppc_model)
ppc_commands.enable_classic_tlb_commands(ppc_model)
| 24.333333 | 52 | 0.84589 |
bf4d3a9888846547247bef1e860346e67cd5990f | 17,230 | py | Python | src/genie/libs/parser/asa/show_route.py | mirzawaqasahmed/genieparser | d6ce6f0cfd31aa6b0eef042f184e273e48b9d4d7 | [
"Apache-2.0"
] | 2 | 2021-01-27T03:37:39.000Z | 2021-01-27T03:40:50.000Z | src/genie/libs/parser/asa/show_route.py | mirzawaqasahmed/genieparser | d6ce6f0cfd31aa6b0eef042f184e273e48b9d4d7 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/asa/show_route.py | mirzawaqasahmed/genieparser | d6ce6f0cfd31aa6b0eef042f184e273e48b9d4d7 | [
"Apache-2.0"
] | null | null | null | ''' show_route.py
Parser for the following show commands:
* show route
'''
import re
from netaddr import IPAddress
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import Schema, \
Any, \
... | 48.948864 | 102 | 0.41805 |
9074570f0c9f451efac613f369675a3bd92a6fb6 | 14,377 | py | Python | src/kgm/training/matching.py | mberr/ea-sota-comparison | 0f7bb679b61675bfb65a2cd7462854968d876df2 | [
"MIT"
] | 12 | 2020-11-03T01:31:30.000Z | 2021-04-06T01:21:41.000Z | src/kgm/training/matching.py | j-huthmacher/ea-sota-comparison | 0f7bb679b61675bfb65a2cd7462854968d876df2 | [
"MIT"
] | null | null | null | src/kgm/training/matching.py | j-huthmacher/ea-sota-comparison | 0f7bb679b61675bfb65a2cd7462854968d876df2 | [
"MIT"
] | 3 | 2021-03-06T13:00:32.000Z | 2022-03-05T11:53:06.000Z | # coding=utf-8
"""Training loops for KG matching models."""
import logging
from abc import abstractmethod
from typing import Any, Iterable, List, Mapping, Optional, Sequence, Tuple, Type, Union
import torch
from torch.optim import Optimizer
from torch.utils import data
from .base import BaseTrainer, TrainerCallback
f... | 33.357309 | 118 | 0.63379 |
0aa58f52d5730a0d3bb4700f372eb29fa124963b | 2,431 | py | Python | comodit_client/console/__main__.py | AymericDuvivier/comodit-client | cd92b43240181ab7178545e48ca854ee6bc86bfc | [
"MIT"
] | 1 | 2015-01-20T17:24:34.000Z | 2015-01-20T17:24:34.000Z | comodit_client/console/__main__.py | AymericDuvivier/comodit-client | cd92b43240181ab7178545e48ca854ee6bc86bfc | [
"MIT"
] | null | null | null | comodit_client/console/__main__.py | AymericDuvivier/comodit-client | cd92b43240181ab7178545e48ca854ee6bc86bfc | [
"MIT"
] | 24 | 2016-09-07T15:28:00.000Z | 2021-12-08T16:03:16.000Z | # coding: utf-8
from __future__ import print_function
import sys, argparse
from comodit_client.console.core import ComodITConsole
from comodit_client.config import Config, ConfigException
if __name__ == '__main__':
# Load configuration
try:
config = Config()
except ConfigException as e:
p... | 41.913793 | 199 | 0.663924 |
2cd98c5a5cb1fd25700eafa2a0ae609c39832c05 | 39,296 | py | Python | awx_collection/plugins/module_utils/controller_api.py | SysBind/awx | 2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f | [
"Apache-2.0"
] | null | null | null | awx_collection/plugins/module_utils/controller_api.py | SysBind/awx | 2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f | [
"Apache-2.0"
] | null | null | null | awx_collection/plugins/module_utils/controller_api.py | SysBind/awx | 2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function
__metaclass__ = type
from .controller_module import ControllerModule
from ansible.module_utils.urls import Request, SSLValidationError, ConnectionError
from ansible.module_utils.six import PY2
from ansible.module_utils.six.moves.urllib.error import HTTP... | 50.250639 | 155 | 0.60258 |
0fec147788efbeb5b3d57e1ed378fe781c8410e1 | 1,492 | py | Python | raspy/tests/test_IO/test_PinPollFailEvent.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/tests/test_IO/test_PinPollFailEvent.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/tests/test_IO/test_PinPollFailEvent.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | """Test the PinPollFailEvent class."""
import threading
from pyee import EventEmitter
from raspy.io.pin_poll_fail_event import PinPollFailEvent
from raspy.io.io_exception import IOException
class DummyEmitter(object):
"""Dummy emitter for testing."""
__emitter = None
__evt = None
__pollThread = Non... | 27.127273 | 70 | 0.652815 |
7124590b8a6eb6cc249280466cb57028dc3f798d | 262 | py | Python | New-Egg_Spider/DataScraper/NewEgg/NewEgg/items.py | Ateridable/Portfolio | 90f067fcf6bfe418065215ee7eb59777e950d0db | [
"CC-BY-3.0"
] | null | null | null | New-Egg_Spider/DataScraper/NewEgg/NewEgg/items.py | Ateridable/Portfolio | 90f067fcf6bfe418065215ee7eb59777e950d0db | [
"CC-BY-3.0"
] | null | null | null | New-Egg_Spider/DataScraper/NewEgg/NewEgg/items.py | Ateridable/Portfolio | 90f067fcf6bfe418065215ee7eb59777e950d0db | [
"CC-BY-3.0"
] | null | null | null | # Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
import scrapy
class NeweggItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
pass
| 20.153846 | 53 | 0.71374 |
f9f8bc90944d02700679364404157c67663cdf8a | 205 | py | Python | envlogger/weather/urls.py | aquatix/envlogger | c5667d06a46c1890d145e81ac430fc5d7a4c4bc4 | [
"Apache-2.0"
] | null | null | null | envlogger/weather/urls.py | aquatix/envlogger | c5667d06a46c1890d145e81ac430fc5d7a4c4bc4 | [
"Apache-2.0"
] | 7 | 2017-12-18T15:10:29.000Z | 2021-12-12T11:21:47.000Z | envlogger/weather/urls.py | aquatix/envlogger | c5667d06a46c1890d145e81ac430fc5d7a4c4bc4 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^<int:user_id>/dashboard/$', views.weatherdashboard, name='weatherdashboard'),
]
| 22.777778 | 88 | 0.682927 |
622e6a0ce453456283ec45c5be85938ce49644ca | 7,064 | py | Python | tests/pipeline/test_frameload.py | otmaneJai/Zipline | 2bb87cbd23fc960af2c46d9580baf95ed454c39a | [
"Apache-2.0"
] | null | null | null | tests/pipeline/test_frameload.py | otmaneJai/Zipline | 2bb87cbd23fc960af2c46d9580baf95ed454c39a | [
"Apache-2.0"
] | null | null | null | tests/pipeline/test_frameload.py | otmaneJai/Zipline | 2bb87cbd23fc960af2c46d9580baf95ed454c39a | [
"Apache-2.0"
] | null | null | null | """
Tests for zipline.pipeline.loaders.frame.DataFrameLoader.
"""
from unittest import TestCase
from mock import patch
from numpy import arange, ones
from numpy.testing import assert_array_equal
from pandas import (
DataFrame,
DatetimeIndex,
Int64Index,
)
from zipline.lib.adjustment import (
Float64Ad... | 32.255708 | 79 | 0.521093 |
f344f085c0d5391ffa46957c8ec9a5e07a65a0b3 | 32,919 | py | Python | compiler_gym/envs/llvm/datasets/cbench.py | sahirgomez1/CompilerGym | 9987fbdfcf8ac9af076baf0ffd695e48f0e804cf | [
"MIT"
] | 562 | 2020-12-21T14:10:20.000Z | 2022-03-31T21:23:55.000Z | compiler_gym/envs/llvm/datasets/cbench.py | sahirgomez1/CompilerGym | 9987fbdfcf8ac9af076baf0ffd695e48f0e804cf | [
"MIT"
] | 433 | 2020-12-22T03:40:41.000Z | 2022-03-31T18:16:17.000Z | compiler_gym/envs/llvm/datasets/cbench.py | sahirgomez1/CompilerGym | 9987fbdfcf8ac9af076baf0ffd695e48f0e804cf | [
"MIT"
] | 88 | 2020-12-22T08:22:00.000Z | 2022-03-20T19:00:40.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import enum
import io
import logging
import os
import re
import shutil
import subprocess
import sys
import tarfile
import tempfile
from collect... | 35.977049 | 111 | 0.589933 |
f293d00b5b8b199b5e63d293fbc11502834e2466 | 38,071 | py | Python | sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_service_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_service_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_service_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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 ... | 55.015896 | 133 | 0.678863 |
5a37a673ee80cc522d2b856d9749044d0ee5d759 | 6,459 | py | Python | python/pyspark/sql/group.py | bopopescu/wso2-spark | 6982456ded39a8fef0ad26600218f8f575aac2a5 | [
"Apache-2.0",
"MIT"
] | 11 | 2016-05-26T12:06:38.000Z | 2020-07-06T20:37:07.000Z | python/pyspark/sql/group.py | bopopescu/wso2-spark | 6982456ded39a8fef0ad26600218f8f575aac2a5 | [
"Apache-2.0",
"MIT"
] | 2 | 2015-10-22T07:30:24.000Z | 2015-10-28T10:10:06.000Z | python/pyspark/sql/group.py | bopopescu/wso2-spark | 6982456ded39a8fef0ad26600218f8f575aac2a5 | [
"Apache-2.0",
"MIT"
] | 9 | 2016-07-29T01:13:50.000Z | 2020-07-23T16:16:17.000Z | #
# 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 us... | 32.954082 | 95 | 0.608608 |
c90a48f5af8dccaa380d974934a153b6d935bd78 | 13,132 | py | Python | cleaning_helper1.py | dan0mun/WebContentClassifier | 07d07b49f8fb5cb9413f1ee8a3952fe1bee08ee6 | [
"Apache-2.0"
] | null | null | null | cleaning_helper1.py | dan0mun/WebContentClassifier | 07d07b49f8fb5cb9413f1ee8a3952fe1bee08ee6 | [
"Apache-2.0"
] | null | null | null | cleaning_helper1.py | dan0mun/WebContentClassifier | 07d07b49f8fb5cb9413f1ee8a3952fe1bee08ee6 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
import string
import re
from nltk.corpus import stopwords
nltk_stopwords = stopwords.words('english')
remove_punctuation = '!"$%&\'()*+,-./:;<=>?@[\\]“”^_`{|}~’'
def clean_column(dataframe, column_to_clean, new_col):
df_copy = dataframe.copy()
df_copy['copied_co... | 80.073171 | 114 | 0.651157 |
7697b09b9cc20f74f5a77106cbcda72c4886c594 | 61,856 | py | Python | src/oci/oda/oda_client.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/oda/oda_client.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/oda/oda_client.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 47.074581 | 245 | 0.639566 |
dfedbe7abd4b9814ee41825b8316f2cf50c034dd | 4,534 | py | Python | metpy/plots/tests/test_util.py | ahuang11/MetPy | 6116ceca6c48fda7e4ead254d2a83ebf86391e7a | [
"BSD-3-Clause"
] | 1 | 2019-09-15T18:02:59.000Z | 2019-09-15T18:02:59.000Z | metpy/plots/tests/test_util.py | e-dennis/MetPy | 6529608d956039d4791a17a7bdb1a2c0bf97cd75 | [
"BSD-3-Clause"
] | null | null | null | metpy/plots/tests/test_util.py | e-dennis/MetPy | 6529608d956039d4791a17a7bdb1a2c0bf97cd75 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017,2018 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Tests for the `_util` module."""
from datetime import datetime
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pytest
from metpy.plots import a... | 31.054795 | 93 | 0.671372 |
003bcd9e170a259bc68deede4af20d46026a6eed | 15,664 | py | Python | plot_coco.py | zhangrj91/DarkPose | 5fbdd3fd4699a1f2aa00df69b05f93e63b674670 | [
"Apache-2.0"
] | null | null | null | plot_coco.py | zhangrj91/DarkPose | 5fbdd3fd4699a1f2aa00df69b05f93e63b674670 | [
"Apache-2.0"
] | null | null | null | plot_coco.py | zhangrj91/DarkPose | 5fbdd3fd4699a1f2aa00df69b05f93e63b674670 | [
"Apache-2.0"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Ke Sun (sunk@mail.ustc.edu.cn)
# Modified by Depu Meng (mdp@mail.ustc.edu.cn)
# ------------------------------------------------------------------------------
import... | 42.915068 | 101 | 0.385789 |
3d1321ddf1fd7d9ec0fe92cdbaa25a57c122c653 | 9,028 | py | Python | test/py/testutils/__init__.py | modulus-sa/ganeti | 592c0e945cc2c7b0013f813ea8c9d8ec0d5bab98 | [
"BSD-2-Clause"
] | 396 | 2015-01-22T11:44:32.000Z | 2022-03-31T14:14:29.000Z | test/py/testutils/__init__.py | modulus-sa/ganeti | 592c0e945cc2c7b0013f813ea8c9d8ec0d5bab98 | [
"BSD-2-Clause"
] | 1,550 | 2015-04-05T09:53:50.000Z | 2022-03-28T17:42:20.000Z | test/py/testutils/__init__.py | modulus-sa/ganeti | 592c0e945cc2c7b0013f813ea8c9d8ec0d5bab98 | [
"BSD-2-Clause"
] | 119 | 2015-01-06T21:37:15.000Z | 2022-03-07T06:36:26.000Z | #
#
# Copyright (C) 2006, 2007, 2008 Google 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of con... | 27.02994 | 79 | 0.70381 |
1820f220f73d62eea8ee358d300094f08f4c2d54 | 5,008 | py | Python | towhee/engine/operator_context.py | ThyeeZz/towhee | 4e1ace5e24f995b6f0f9b9bfac46d28ba8e0ce1d | [
"Apache-2.0"
] | null | null | null | towhee/engine/operator_context.py | ThyeeZz/towhee | 4e1ace5e24f995b6f0f9b9bfac46d28ba8e0ce1d | [
"Apache-2.0"
] | null | null | null | towhee/engine/operator_context.py | ThyeeZz/towhee | 4e1ace5e24f995b6f0f9b9bfac46d28ba8e0ce1d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Zilliz. 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 applicable law or agree... | 34.30137 | 86 | 0.642572 |
7fa4b0b4e24c6b75293ee7ed0c36fbb8c9f2eb16 | 3,071 | py | Python | src/rnn/load_pretrained_word_embeddings.py | acoli-repo/OpenIE_Stanovsky_Dagan | 0d4387b584914d118b487c6984d9655ef04f2abd | [
"MIT"
] | 117 | 2018-05-24T01:38:54.000Z | 2022-03-31T09:48:34.000Z | src/rnn/load_pretrained_word_embeddings.py | acoli-repo/OpenIE_Stanovsky_Dagan | 0d4387b584914d118b487c6984d9655ef04f2abd | [
"MIT"
] | 23 | 2018-07-26T07:47:45.000Z | 2022-03-31T09:50:30.000Z | src/rnn/load_pretrained_word_embeddings.py | acoli-repo/OpenIE_Stanovsky_Dagan | 0d4387b584914d118b487c6984d9655ef04f2abd | [
"MIT"
] | 25 | 2018-05-24T01:46:05.000Z | 2022-03-25T17:35:27.000Z | """ Usage:
load_pretrained_word_embeddings [--glove=GLOVE_FN]
"""
from docopt import docopt
import numpy as np
from word_index import Word_index
import logging
logging.basicConfig(level = logging.DEBUG)
import sys
sys.path.append("./common")
from symbols import UNK_INDEX, UNK_SYMBOL, UNK_VALUE
from keras .layers i... | 32.326316 | 102 | 0.591664 |
ebb3259ab036436000c911c87f74c6006ac3ca13 | 4,740 | py | Python | decora_wifi/models/omni_notifier_email.py | balloob/python-decora_wifi | 47900ad67002f3655fc4c799518bc4e73293ceb4 | [
"MIT"
] | 33 | 2017-09-02T16:37:15.000Z | 2021-12-28T15:24:39.000Z | decora_wifi/models/omni_notifier_email.py | balloob/python-decora_wifi | 47900ad67002f3655fc4c799518bc4e73293ceb4 | [
"MIT"
] | 17 | 2017-09-12T04:53:07.000Z | 2022-01-25T03:31:45.000Z | decora_wifi/models/omni_notifier_email.py | balloob/python-decora_wifi | 47900ad67002f3655fc4c799518bc4e73293ceb4 | [
"MIT"
] | 21 | 2018-01-29T22:50:06.000Z | 2022-01-06T02:30:47.000Z | # Leviton Cloud Services API model OmniNotifierEmail.
# Auto-generated by api_scraper.py.
#
# Copyright 2017 Tim Lyakhovetskiy <tlyakhov@gmail.com>
#
# This code is released under the terms of the MIT license. See the LICENSE
# file for more details.
from decora_wifi.base_model import BaseModel
class OmniNotifierEmai... | 31.390728 | 75 | 0.605696 |
2b600676b71bf90d83df5833a2ffb4afe9d36422 | 8,929 | py | Python | cash.py | gaoming714/cashDIFF | 14f39d2fb3f4f627b5390072662e7312ebd3301b | [
"Apache-2.0"
] | null | null | null | cash.py | gaoming714/cashDIFF | 14f39d2fb3f4f627b5390072662e7312ebd3301b | [
"Apache-2.0"
] | null | null | null | cash.py | gaoming714/cashDIFF | 14f39d2fb3f4f627b5390072662e7312ebd3301b | [
"Apache-2.0"
] | null | null | null | """
市场代码,上海是0, 深圳是1。判断深圳的办法是看代码0或者3开头。
深圳用的是re模块进行分析,上海用的是XPATH,最终存储到ticker_list & ticker_detail
ticker_list 是基础,从网页上爬下来的list。
当replaceFlag(现金替代)True是允许现金替代,False是必须,False也就是意味着reportAmount需要设置为0.
essential:
config.json
geckodriver.exe
run:
poetry run python cash.py
build for exe-onefile:
poetry run pyinstaller cas... | 33.69434 | 127 | 0.628066 |
1c4af53588d57359ae6d05b519a1dc4f2f7ca79b | 1,981 | py | Python | ampel/mongo/query/general.py | mafn/Ampel-core | 744acbf36f0a2ceae7230ceab1350236c1501b57 | [
"BSD-3-Clause"
] | null | null | null | ampel/mongo/query/general.py | mafn/Ampel-core | 744acbf36f0a2ceae7230ceab1350236c1501b57 | [
"BSD-3-Clause"
] | null | null | null | ampel/mongo/query/general.py | mafn/Ampel-core | 744acbf36f0a2ceae7230ceab1350236c1501b57 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: Ampel-core/ampel/mongo/query/general.py
# License: BSD-3-Clause
# Author: valery brinnel <firstname.lastname@gmail.com>
# Date: 11.12.2019
# Last Modified Date: 17.02.2021
# Last Modified By: valery brinnel ... | 36.018182 | 112 | 0.710752 |
ed3fa86ab29192da1327df5b717fa078ffa78372 | 2,762 | py | Python | read_in_data.py | ChenhaoLiu-SeasPenn/FCN.tensorflow | 30d646f500b563b3df37eab24903a3aeaed35300 | [
"MIT"
] | null | null | null | read_in_data.py | ChenhaoLiu-SeasPenn/FCN.tensorflow | 30d646f500b563b3df37eab24903a3aeaed35300 | [
"MIT"
] | null | null | null | read_in_data.py | ChenhaoLiu-SeasPenn/FCN.tensorflow | 30d646f500b563b3df37eab24903a3aeaed35300 | [
"MIT"
] | 1 | 2018-08-08T19:20:58.000Z | 2018-08-08T19:20:58.000Z | __author__ = 'charlie'
import numpy as np
import os
import random
from six.moves import cPickle as pickle
from tensorflow.python.platform import gfile
import glob
import TensorflowUtils as utils
# DATA_URL = 'http://sceneparsing.csail.mit.edu/data/ADEChallengeData2016.zip'
#DATA_URL = 'http://data.csail.mit.edu/place... | 34.525 | 113 | 0.630702 |
1310bcc1dbdd5d8521e0c4fd6c57bab5dd5758a8 | 7,010 | py | Python | benchmark/d3pe/d3pe/utils/tools.py | ssimonc/NeoRL | 098c58c8e4c3e43e67803f6384619d3bfe7fce5d | [
"Apache-2.0"
] | 50 | 2021-02-07T08:10:28.000Z | 2022-03-25T09:10:26.000Z | benchmark/d3pe/d3pe/utils/tools.py | ssimonc/NeoRL | 098c58c8e4c3e43e67803f6384619d3bfe7fce5d | [
"Apache-2.0"
] | 7 | 2021-07-29T14:58:31.000Z | 2022-02-01T08:02:54.000Z | benchmark/d3pe/d3pe/utils/tools.py | ssimonc/NeoRL | 098c58c8e4c3e43e67803f6384619d3bfe7fce5d | [
"Apache-2.0"
] | 4 | 2021-04-01T16:30:15.000Z | 2022-03-31T17:38:05.000Z | ''' This file contain common tools shared across different OPE algorithms '''
import torch
import numpy as np
from tqdm import tqdm
from copy import deepcopy
from typing import Optional, Union
from d3pe.utils.data import OPEDataset, to_torch
from d3pe.evaluator import Policy
from d3pe.utils.net import MLP, Distributio... | 40.755814 | 148 | 0.605849 |
918b31c1dfb33a74906a280e5b28dcd4614dfaa7 | 151 | py | Python | PythonCode/1866.py | CrystianPrintes20/ProjetoUri | 92a88ae2671a556f4d418c3605e9a2c6933dc9d8 | [
"MIT"
] | null | null | null | PythonCode/1866.py | CrystianPrintes20/ProjetoUri | 92a88ae2671a556f4d418c3605e9a2c6933dc9d8 | [
"MIT"
] | null | null | null | PythonCode/1866.py | CrystianPrintes20/ProjetoUri | 92a88ae2671a556f4d418c3605e9a2c6933dc9d8 | [
"MIT"
] | null | null | null | n = int(input())
c = []
for i in range(n):
x = int(input())
if x % 2 == 1:
c += [1]
else:
c += [0]
for j in c:
print(j) | 15.1 | 20 | 0.377483 |
84ca93f439893e14df9c1533af4d4407d6cde80f | 3,210 | py | Python | Django/src/members/forms.py | RocketSoftware/PythonBetaProject | 8a99bc0e264e3bb0169f557110fad25820e8ff09 | [
"MIT"
] | 11 | 2015-06-04T21:54:20.000Z | 2019-06-21T01:05:01.000Z | Django/src/members/forms.py | RocketSoftware/PythonBetaProject | 8a99bc0e264e3bb0169f557110fad25820e8ff09 | [
"MIT"
] | 1 | 2015-06-04T13:24:10.000Z | 2015-06-04T13:24:10.000Z | Django/src/members/forms.py | RocketSoftware/PythonBetaProject | 8a99bc0e264e3bb0169f557110fad25820e8ff09 | [
"MIT"
] | 8 | 2015-06-03T21:27:52.000Z | 2020-06-11T01:10:09.000Z | from django import forms
# get the UniVerse imports
import os
os.chdir("C:\\U2\\XDEMO\\pythonbetarocket")
import u2py
def validateid(check_id):
sub = u2py.Subroutine('VALIDATE_MEMBERS_ID', 4)
sub.args[0] = check_id
sub.call()
if str(sub.args[2]) != '0':
raise forms.ValidationError('Error! ' + ... | 30 | 99 | 0.626168 |
436700b18e63e6926cabb123659169cb120f4872 | 50,174 | py | Python | input/eg01-eg30/flatpower_d3ploy.py | robfairh/transition-scenarios | 1602e5e8c8c6914ad8879b0cdc409e73444d0f5f | [
"BSD-3-Clause"
] | 2 | 2019-03-11T12:27:40.000Z | 2019-12-05T08:09:02.000Z | input/eg01-eg30/flatpower_d3ploy.py | robfairh/transition-scenarios | 1602e5e8c8c6914ad8879b0cdc409e73444d0f5f | [
"BSD-3-Clause"
] | 119 | 2016-09-14T16:15:54.000Z | 2022-03-16T20:28:18.000Z | input/eg01-eg30/flatpower_d3ploy.py | gwenchee/transition-scenarios | 17edc74bd7f6b7391930907447465c7dc2212ef7 | [
"BSD-3-Clause"
] | 11 | 2017-02-21T19:56:44.000Z | 2021-06-09T19:57:07.000Z | """
Running this script generates .xml files and runs them producing the .sqlite
files for all the prediction methods.
The user can choose a demand equation (demand_eq), a buffer size
(buff_size), and the number of time steps forward (steps).
The buffer plays its role one time step before the transition
starts. The tr... | 38.506523 | 78 | 0.532547 |
e41d57bf8e729641fb12777f3e64e64168272313 | 280 | py | Python | 6 kyu/Triangle type.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 6 | 2020-09-03T09:32:25.000Z | 2020-12-07T04:10:01.000Z | 6 kyu/Triangle type.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 1 | 2021-12-13T15:30:21.000Z | 2021-12-13T15:30:21.000Z | 6 kyu/Triangle type.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | null | null | null | def triangle_type(a, b, c):
res=[a, b, c]
if max(res)>=sum(res)-max(res):
return 0
return 1 if sum(j**2 for i,j in enumerate(res) if i!=res.index(max(res)))>max(res)**2 else 2 if sum(j**2 for i,j in enumerate(res) if i!=res.index(max(res)))==max(res)**2 else 3 | 56 | 181 | 0.603571 |
a5340ceb8a96afd3ce04ae600afcf419d265289e | 3,218 | py | Python | tensorflow/lite/testing/op_tests/gather.py | carchrae/tensorflow | 6a69a6b2e286b14ac9ae813998bb0d78b6fee440 | [
"Apache-2.0"
] | 12 | 2020-12-28T18:42:10.000Z | 2022-03-24T17:34:21.000Z | tensorflow/lite/testing/op_tests/gather.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 58 | 2021-11-22T05:41:28.000Z | 2022-01-19T01:33:40.000Z | tensorflow/lite/testing/op_tests/gather.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 3 | 2020-11-13T09:01:58.000Z | 2021-08-02T08:04:14.000Z | # Copyright 2019 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... | 35.362637 | 80 | 0.63238 |
814df019d1f823063ac72fb938da1ce8eb8a8f21 | 5,635 | py | Python | tests/forecast/test_baggingtrees.py | cnll0075/Merlion | 37fb75ccb204d128fde8ad4230f7893da724cf7c | [
"BSD-3-Clause"
] | null | null | null | tests/forecast/test_baggingtrees.py | cnll0075/Merlion | 37fb75ccb204d128fde8ad4230f7893da724cf7c | [
"BSD-3-Clause"
] | null | null | null | tests/forecast/test_baggingtrees.py | cnll0075/Merlion | 37fb75ccb204d128fde8ad4230f7893da724cf7c | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2022 salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
#
import logging
from os.path import abspath, dirname, join
import sys
import unittest
from merlion.u... | 42.368421 | 119 | 0.701331 |
c2e76b3344f31d19b4e3dfb380849c69a281fc4d | 65,421 | py | Python | osh/cmd_exec.py | adisbladis/oil | 8ae78500da543dfa899404bdca830b90277d17ad | [
"Apache-2.0"
] | null | null | null | osh/cmd_exec.py | adisbladis/oil | 8ae78500da543dfa899404bdca830b90277d17ad | [
"Apache-2.0"
] | null | null | null | osh/cmd_exec.py | adisbladis/oil | 8ae78500da543dfa899404bdca830b90277d17ad | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# Copyright 2016 Andy Chu. 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
"""
cmd_exec.py -- Interp... | 33.107794 | 122 | 0.631372 |
67e5424ff0ab28ea1400fb0eb5ba5b8ec5a2941f | 5,489 | py | Python | codes/models/PPN.py | ZichengDuan/MVM3D | 5242fa05afb6bff097908c88a8ef0fd9bc4a1fc5 | [
"MIT"
] | 21 | 2021-09-14T19:11:29.000Z | 2022-02-05T05:58:32.000Z | codes/models/PPN.py | Robert-Mar/MVM3D | b62c96de5894ae5fef615e2ee54fe975248a3df7 | [
"MIT"
] | 1 | 2021-11-25T08:56:32.000Z | 2021-12-04T07:40:23.000Z | codes/models/PPN.py | Robert-Mar/MVM3D | b62c96de5894ae5fef615e2ee54fe975248a3df7 | [
"MIT"
] | 2 | 2021-09-13T04:07:10.000Z | 2021-09-14T09:15:52.000Z | import os
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import kornia
from codes.models.resnet import resnet18
import matplotlib
from codes.models.region_proposal_network import RegionProposalNetwork
import cv2
from codes.EX_CONST import Const
import matplotlib.pyplot as plt
mat... | 48.149123 | 145 | 0.62434 |
9ea8f734a2a1948cc5f1ffc39a3dce529ba75710 | 2,364 | py | Python | jacket/api/compute/openstack/compute/legacy_v2/contrib/image_size.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | null | null | null | jacket/api/compute/openstack/compute/legacy_v2/contrib/image_size.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | null | null | null | jacket/api/compute/openstack/compute/legacy_v2/contrib/image_size.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | 2 | 2016-08-10T02:21:49.000Z | 2020-07-24T01:57:21.000Z | # Copyright 2013 Rackspace Hosting
# 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 require... | 37.52381 | 78 | 0.668782 |
924b2947d314dc79feb69049ba885585f9ff6930 | 2,219 | py | Python | installer-pkg/src/shminstaller/components/python.py | sha1n/macos-devenv-dump-poc | be439ad4a0c0ac265fe62d44bded73eab1a0c31d | [
"MIT"
] | null | null | null | installer-pkg/src/shminstaller/components/python.py | sha1n/macos-devenv-dump-poc | be439ad4a0c0ac265fe62d44bded73eab1a0c31d | [
"MIT"
] | null | null | null | installer-pkg/src/shminstaller/components/python.py | sha1n/macos-devenv-dump-poc | be439ad4a0c0ac265fe62d44bded73eab1a0c31d | [
"MIT"
] | null | null | null | from shminspector.api.context import Context
from shminspector.api.reactor import Reactor, ReactorCommand
from shminspector.api.tags import macos, experimental, interactive, prerequisites
from shminspector.api.validator import ValidationResult, Status
from shminstaller.components.macosutil import download_and_install_c... | 38.929825 | 112 | 0.6895 |
741df6adbcc2e2e21e0fb89c3be2e491d6f44534 | 2,225 | py | Python | cities_light/tests/test_unicode.py | endur24/django-cities-light | c3c31c7e35d85952a77b9c4f90bdd30930d80e5e | [
"MIT"
] | 1 | 2020-03-28T05:41:13.000Z | 2020-03-28T05:41:13.000Z | cities_light/tests/test_unicode.py | endur24/django-cities-light | c3c31c7e35d85952a77b9c4f90bdd30930d80e5e | [
"MIT"
] | null | null | null | cities_light/tests/test_unicode.py | endur24/django-cities-light | c3c31c7e35d85952a77b9c4f90bdd30930d80e5e | [
"MIT"
] | 2 | 2018-10-02T11:33:47.000Z | 2018-10-05T16:56:33.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import warnings
import six
import unidecode
from django.utils.encoding import force_text
from ..abstract_models import to_ascii
from .base import TestImportBase, FixtureDir
class TestUnicode(TestImportBase):
"""Test case for unicode errors."""
... | 32.246377 | 97 | 0.633708 |
ae43a76cc3a750e34ab7c85c37914ca45470dcc4 | 231 | py | Python | tests/setup.py | sayantansatpati/disdat | 392b04be0e852889fc3f85971b7f7cfe4884804c | [
"Apache-2.0"
] | 44 | 2018-02-21T20:38:20.000Z | 2022-02-13T21:24:02.000Z | tests/setup.py | sayantansatpati/disdat | 392b04be0e852889fc3f85971b7f7cfe4884804c | [
"Apache-2.0"
] | 77 | 2018-01-18T01:38:07.000Z | 2022-02-04T02:27:32.000Z | tests/setup.py | sayantansatpati/disdat | 392b04be0e852889fc3f85971b7f7cfe4884804c | [
"Apache-2.0"
] | 11 | 2018-09-17T20:37:32.000Z | 2021-07-23T16:37:04.000Z | from setuptools import find_packages, setup
setup(
name='disdat-test-pipelines',
version=0.1,
packages=find_packages(exclude=['config']),
include_package_data=True,
install_requires=[
'pandas'
],
)
| 19.25 | 47 | 0.670996 |
96c634a979c9c03d82012b3d55c40068131e3a77 | 2,855 | py | Python | script.module.urlresolver/lib/urlresolver/plugins/thevideo.py | parser4life/tantrumrepo | 3b37145f4772409e538cbddb0b7aa23be525772a | [
"Beerware"
] | 1 | 2021-05-09T19:55:51.000Z | 2021-05-09T19:55:51.000Z | script.module.urlresolver/lib/urlresolver/plugins/thevideo.py | parser4life/tantrumrepo | 3b37145f4772409e538cbddb0b7aa23be525772a | [
"Beerware"
] | null | null | null | script.module.urlresolver/lib/urlresolver/plugins/thevideo.py | parser4life/tantrumrepo | 3b37145f4772409e538cbddb0b7aa23be525772a | [
"Beerware"
] | 2 | 2020-04-01T22:11:12.000Z | 2020-05-07T23:54:52.000Z | '''
thevideo urlresolver plugin
Copyright (C) 2014 Eldorado
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is di... | 39.652778 | 130 | 0.65359 |
89626f3666eb896c04384f446cae5245f53448dd | 13,784 | py | Python | serve/triton/python_model_builder.py | jaelgu/towhee | 34c79cf50831dc271ae0ab02f319f9e355c2d0bf | [
"Apache-2.0"
] | null | null | null | serve/triton/python_model_builder.py | jaelgu/towhee | 34c79cf50831dc271ae0ab02f319f9e355c2d0bf | [
"Apache-2.0"
] | null | null | null | serve/triton/python_model_builder.py | jaelgu/towhee | 34c79cf50831dc271ae0ab02f319f9e355c2d0bf | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Zilliz. 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 applicable law or agree... | 34.203474 | 129 | 0.618906 |
b46bbe5377a6dd53bf802c8cb7029aeb1b8a2e16 | 69,602 | py | Python | python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/event_log_storage.py | ibelikov/dagster | 6781eaadd33ecfb0b48d7c2c7d8e193efbda4209 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/event_log_storage.py | ibelikov/dagster | 6781eaadd33ecfb0b48d7c2c7d8e193efbda4209 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/event_log_storage.py | ibelikov/dagster | 6781eaadd33ecfb0b48d7c2c7d8e193efbda4209 | [
"Apache-2.0"
] | 1 | 2021-11-25T11:06:39.000Z | 2021-11-25T11:06:39.000Z | import re
import time
from collections import Counter
from contextlib import ExitStack
import mock
import pytest
from dagster import (
AssetKey,
AssetMaterialization,
AssetObservation,
DagsterInstance,
Field,
InputDefinition,
ModeDefinition,
Output,
OutputDefinition,
RetryReques... | 36.213319 | 120 | 0.601894 |
8dbdd9fd2d5c9074921def17c77236652f0fec7e | 8,614 | py | Python | nurse_scheduling.py | kartikd2001/nurse-scheduling | 32c61e02b87cbd16a3a0ffe5cc90068b23a2b73a | [
"Apache-2.0"
] | null | null | null | nurse_scheduling.py | kartikd2001/nurse-scheduling | 32c61e02b87cbd16a3a0ffe5cc90068b23a2b73a | [
"Apache-2.0"
] | null | null | null | nurse_scheduling.py | kartikd2001/nurse-scheduling | 32c61e02b87cbd16a3a0ffe5cc90068b23a2b73a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 D-Wave Systems Inc.
#
# 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 w... | 40.065116 | 114 | 0.69062 |
c1975209921000e5af9a8047c30c4d5c42546eac | 4,712 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_container_service_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_container_service_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_container_service_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 ... | 44.45283 | 124 | 0.703098 |
77448f502451e14bb6cb5967cc448ad18ddbfa7b | 9,428 | py | Python | fabric/io.py | robinhoodmarkets/fabric | 716fed77464b1fd7100815c774e7265d8fa285d1 | [
"BSD-2-Clause"
] | 1 | 2021-06-16T12:23:00.000Z | 2021-06-16T12:23:00.000Z | fabric/io.py | robinhoodmarkets/fabric | 716fed77464b1fd7100815c774e7265d8fa285d1 | [
"BSD-2-Clause"
] | null | null | null | fabric/io.py | robinhoodmarkets/fabric | 716fed77464b1fd7100815c774e7265d8fa285d1 | [
"BSD-2-Clause"
] | 1 | 2018-06-12T20:08:56.000Z | 2018-06-12T20:08:56.000Z | from __future__ import with_statement
import sys
import time
import re
import socket
from select import select
from fabric.state import env, output, win32
from fabric.auth import get_password, set_password
import fabric.network
from fabric.network import ssh, normalize
from fabric.utils import RingBuffer
from fabric.... | 39.613445 | 91 | 0.542851 |
1b310bcec0e1b6ffc0db2824c9a1a3556964e191 | 4,695 | py | Python | scrapers/education.py | nicobaguio-un/hdx-scraper-covid-viz | ab9bb2fcc43fdd50de414e3c54eabff67933077f | [
"MIT"
] | null | null | null | scrapers/education.py | nicobaguio-un/hdx-scraper-covid-viz | ab9bb2fcc43fdd50de414e3c54eabff67933077f | [
"MIT"
] | null | null | null | scrapers/education.py | nicobaguio-un/hdx-scraper-covid-viz | ab9bb2fcc43fdd50de414e3c54eabff67933077f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from hdx.scraper.readers import read
from hdx.utilities.dateparse import parse_date, default_date
from hdx.utilities.text import get_fraction_str
logger = logging.getLogger(__name__)
def get_education(configuration, today, countryiso3s, regionlookup, downloader, scrapers=None)... | 42.681818 | 134 | 0.632162 |
ade5888cc99f282e672e97e9019d8a74ab1da40d | 1,941 | py | Python | tests/compile/test_modes.py | abdalazizrashid/Theano-PyMC | 90fa750461e91fb6281d494ae86404e2153fd7eb | [
"BSD-3-Clause"
] | null | null | null | tests/compile/test_modes.py | abdalazizrashid/Theano-PyMC | 90fa750461e91fb6281d494ae86404e2153fd7eb | [
"BSD-3-Clause"
] | null | null | null | tests/compile/test_modes.py | abdalazizrashid/Theano-PyMC | 90fa750461e91fb6281d494ae86404e2153fd7eb | [
"BSD-3-Clause"
] | null | null | null | """
Test compilation modes
"""
import copy
import aesara
import aesara.tensor as tt
from aesara.compile import Mode
class TestBunchOfModes:
def test_modes(self):
# this is a quick test after the LazyLinker branch merge
# to check that all the current modes can still be used.
linker_class... | 33.465517 | 85 | 0.613086 |
8a98c32d2195fce1071749f7cca317dbdad66352 | 8,422 | py | Python | ironic/common/swift.py | yanndegat/ironic | 8857ec76443dea7778bb9c0d66568304e52495e5 | [
"Apache-2.0"
] | 350 | 2015-01-02T09:35:49.000Z | 2022-03-28T09:25:59.000Z | ironic/common/swift.py | yanndegat/ironic | 8857ec76443dea7778bb9c0d66568304e52495e5 | [
"Apache-2.0"
] | 7 | 2015-05-04T16:12:41.000Z | 2021-08-31T12:27:27.000Z | ironic/common/swift.py | yanndegat/ironic | 8857ec76443dea7778bb9c0d66568304e52495e5 | [
"Apache-2.0"
] | 333 | 2015-01-06T09:09:22.000Z | 2022-02-20T08:11:40.000Z | #
# Copyright 2014 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... | 42.969388 | 78 | 0.631323 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.