hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 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 251 | max_forks_repo_name stringlengths 4 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 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
46fc1f3a2a61d15198e5a0cff38cbad84fddfcdc | 402 | py | Python | authors/apps/profiles/migrations/0022_auto_20190123_1211.py | andela/ah-django-unchained | a4e5f6cd11fdc0b9422020693ac1200b849cf0f3 | [
"BSD-3-Clause"
] | null | null | null | authors/apps/profiles/migrations/0022_auto_20190123_1211.py | andela/ah-django-unchained | a4e5f6cd11fdc0b9422020693ac1200b849cf0f3 | [
"BSD-3-Clause"
] | 26 | 2019-01-07T14:22:05.000Z | 2019-02-28T17:11:48.000Z | authors/apps/profiles/migrations/0022_auto_20190123_1211.py | andela/ah-django-unchained | a4e5f6cd11fdc0b9422020693ac1200b849cf0f3 | [
"BSD-3-Clause"
] | 3 | 2019-09-19T22:16:09.000Z | 2019-10-16T21:16:16.000Z | # Generated by Django 2.1.4 on 2019-01-23 12:11
from django.db import migrations, models
| 21.157895 | 63 | 0.606965 |
46fd9e6218a07bf5fa06674ee05f0d8cc3758da6 | 2,837 | py | Python | squidpy/instruments/srs.py | guenp/squidpy | 17af231cef7142325a483aaa95041671e4daaea4 | [
"MIT"
] | null | null | null | squidpy/instruments/srs.py | guenp/squidpy | 17af231cef7142325a483aaa95041671e4daaea4 | [
"MIT"
] | null | null | null | squidpy/instruments/srs.py | guenp/squidpy | 17af231cef7142325a483aaa95041671e4daaea4 | [
"MIT"
] | null | null | null | from squidpy.instrument import Instrument
import visa | 29.863158 | 101 | 0.534367 |
46fef5e639dc0c69be1d91fc51ec112c48717e44 | 3,602 | py | Python | src/hbcomp/app.py | zgoda/hbcomp | 0b787a05f2cd512c44363daaa560ec74cc9d6261 | [
"MIT"
] | null | null | null | src/hbcomp/app.py | zgoda/hbcomp | 0b787a05f2cd512c44363daaa560ec74cc9d6261 | [
"MIT"
] | null | null | null | src/hbcomp/app.py | zgoda/hbcomp | 0b787a05f2cd512c44363daaa560ec74cc9d6261 | [
"MIT"
] | null | null | null | import os
from logging.config import dictConfig
from typing import Optional
from flask import render_template, request, send_from_directory
from flask_babel import get_locale, lazy_gettext as _
from werkzeug.utils import ImportStringError
from .auth import auth_bp
from .comp import comp_bp
from .ext import babel, csr... | 29.048387 | 82 | 0.649917 |
20024a10fc3007490f9a135af56090f4d8d58d3e | 3,695 | py | Python | lib/taurus/external/test/test_qt.py | MikeFalowski/taurus | ef041bf35dd847caf08a7efbe072f4020d35522e | [
"CC-BY-3.0"
] | null | null | null | lib/taurus/external/test/test_qt.py | MikeFalowski/taurus | ef041bf35dd847caf08a7efbe072f4020d35522e | [
"CC-BY-3.0"
] | 1 | 2020-02-28T16:36:04.000Z | 2020-03-02T07:51:12.000Z | lib/taurus/external/test/test_qt.py | MikeFalowski/taurus | ef041bf35dd847caf08a7efbe072f4020d35522e | [
"CC-BY-3.0"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
##
## This file is part of Taurus
##
## http://taurus-scada.org
##
## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
## Taurus is free software: you can redistribute it and/or modify
## it under the te... | 33.288288 | 79 | 0.59567 |
200282cb4ee521ea49ac92a99760f93beca4c7e9 | 7,762 | py | Python | tools/stage2/infer_cam.py | yaoqi-zd/SGAN | 43d8a859b03967e2423a73ef1ba332ee71714ba4 | [
"MIT"
] | 48 | 2020-02-19T02:31:30.000Z | 2021-12-24T23:58:13.000Z | tools/stage2/infer_cam.py | yaoqi-zd/SGAN | 43d8a859b03967e2423a73ef1ba332ee71714ba4 | [
"MIT"
] | 16 | 2020-02-28T14:56:58.000Z | 2021-07-05T09:35:10.000Z | tools/stage2/infer_cam.py | yaoqi-zd/SGAN | 43d8a859b03967e2423a73ef1ba332ee71714ba4 | [
"MIT"
] | 12 | 2020-01-14T15:46:11.000Z | 2021-12-17T08:57:07.000Z | import os, pickle
import os.path as osp
import numpy as np
import cv2
import scipy.ndimage as nd
import init_path
from lib.dataset.get_dataset import get_dataset
from lib.network.sgan import SGAN
import torch
from torch.utils.data import DataLoader
import argparse
from ipdb import set_trace
import matplotlib.pyplot as... | 29.969112 | 125 | 0.611312 |
200340700ae186f45e01e6dbb558b6dd954ca85a | 2,902 | py | Python | python/lib/behaviors/compute.py | newrelic-experimental/demo-pythontron | 0561d7e496da3a518c28102010c3c76445a47307 | [
"Apache-2.0"
] | null | null | null | python/lib/behaviors/compute.py | newrelic-experimental/demo-pythontron | 0561d7e496da3a518c28102010c3c76445a47307 | [
"Apache-2.0"
] | null | null | null | python/lib/behaviors/compute.py | newrelic-experimental/demo-pythontron | 0561d7e496da3a518c28102010c3c76445a47307 | [
"Apache-2.0"
] | null | null | null | from random import seed, random
from math import sqrt, log, cos, pi, ceil
import time
import json
from . import behavior
from ..app_logging import AppLogging
MAX_KEY = "max"
MIN_KEY = "min"
| 26.87037 | 108 | 0.636458 |
200345ba5604afcf2886258ab05830857aef6e34 | 2,128 | py | Python | tests/st/model_zoo_tests/ncf/test_ncf.py | ATestGroup233/mindspore | 5d81221b5896cf7d7c6adb44daef28d92cb43352 | [
"Apache-2.0"
] | 1 | 2021-06-01T12:34:37.000Z | 2021-06-01T12:34:37.000Z | tests/st/model_zoo_tests/ncf/test_ncf.py | ATestGroup233/mindspore | 5d81221b5896cf7d7c6adb44daef28d92cb43352 | [
"Apache-2.0"
] | null | null | null | tests/st/model_zoo_tests/ncf/test_ncf.py | ATestGroup233/mindspore | 5d81221b5896cf7d7c6adb44daef28d92cb43352 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 43.428571 | 100 | 0.698778 |
20052b62da3c16dd50cb7d3de8d055728c8e4c25 | 2,577 | py | Python | src/data/tests/test_osm_create_maps.py | j-t-t/crash-model | 898c200edb736584f52834252639655baf132f21 | [
"MIT"
] | null | null | null | src/data/tests/test_osm_create_maps.py | j-t-t/crash-model | 898c200edb736584f52834252639655baf132f21 | [
"MIT"
] | null | null | null | src/data/tests/test_osm_create_maps.py | j-t-t/crash-model | 898c200edb736584f52834252639655baf132f21 | [
"MIT"
] | null | null | null | import os
import shutil
from shapely.geometry import Polygon
from .. import osm_create_maps
from .. import util
TEST_FP = os.path.dirname(os.path.abspath(__file__))
| 32.620253 | 78 | 0.680248 |
2005c90121b8ada17b872ccdb477c07d716b48b8 | 444 | py | Python | megnet/tests/test_losses.py | abdalazizrashid/megnet | 8ad0fca246465bd57d66392f790c5310c610dfff | [
"BSD-3-Clause"
] | null | null | null | megnet/tests/test_losses.py | abdalazizrashid/megnet | 8ad0fca246465bd57d66392f790c5310c610dfff | [
"BSD-3-Clause"
] | null | null | null | megnet/tests/test_losses.py | abdalazizrashid/megnet | 8ad0fca246465bd57d66392f790c5310c610dfff | [
"BSD-3-Clause"
] | null | null | null | import unittest
import numpy as np
import tensorflow as tf
from megnet.losses import mean_squared_error_with_scale
if __name__ == "__main__":
unittest.main()
| 23.368421 | 73 | 0.657658 |
20062f9c7e5fd8400e59369d471f42de2bae32b0 | 4,264 | py | Python | forbidden/forbidden.py | ukabes/forbidden | 0d2b70ffc28ce4242129795e35fb388685054145 | [
"MIT"
] | null | null | null | forbidden/forbidden.py | ukabes/forbidden | 0d2b70ffc28ce4242129795e35fb388685054145 | [
"MIT"
] | null | null | null | forbidden/forbidden.py | ukabes/forbidden | 0d2b70ffc28ce4242129795e35fb388685054145 | [
"MIT"
] | null | null | null | '''#The Forbidden module
---
The idea is simple;
1. Take a python data structure ( only dicts and lists for now )
and then return a serialized text format called *forbidden*.
2. Take an already serialized *forbidden* format and return the appropriate python data structure.
---
Examples:
---
#### 1.List & Tuples
| Pyt... | 32.8 | 119 | 0.626642 |
200653dc56bdb9fd9c626ec37fb718679c27c497 | 8,276 | py | Python | googledataprocauthenticator/tests/test_dataprocmagic.py | mollypi/dataprocmagic | 89ee5c2bf6daa786d0c280e37346bfb4310ec100 | [
"Apache-2.0"
] | 2 | 2021-04-06T20:08:04.000Z | 2021-07-27T14:40:48.000Z | googledataprocauthenticator/tests/test_dataprocmagic.py | mollypi/dataprocmagic | 89ee5c2bf6daa786d0c280e37346bfb4310ec100 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:54:25.000Z | 2020-08-18T00:54:25.000Z | googledataprocauthenticator/tests/test_dataprocmagic.py | mollypi/dataprocmagic | 89ee5c2bf6daa786d0c280e37346bfb4310ec100 | [
"Apache-2.0"
] | 2 | 2020-11-26T16:58:41.000Z | 2021-09-19T10:49:05.000Z | # 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 or agreed to in writing, ... | 45.224044 | 127 | 0.735863 |
2006d08163178b2ea091fe980837e1361d44718d | 1,147 | py | Python | p2p.py | barisser/hashfate | ab228706f148221861ea1cfd00fe73dc1a13b33e | [
"MIT"
] | null | null | null | p2p.py | barisser/hashfate | ab228706f148221861ea1cfd00fe73dc1a13b33e | [
"MIT"
] | null | null | null | p2p.py | barisser/hashfate | ab228706f148221861ea1cfd00fe73dc1a13b33e | [
"MIT"
] | null | null | null | import datetime
import requests
import socket
import random
import sys
import time
| 26.068182 | 117 | 0.633827 |
200b0486c0debf06bb8e2f57786c25b865a7e53f | 23,040 | py | Python | odps/models/resource.py | nurikk/aliyun-odps-python-sdk | 7887088998f03e2e4499c28be463e45fb916b919 | [
"Apache-2.0"
] | null | null | null | odps/models/resource.py | nurikk/aliyun-odps-python-sdk | 7887088998f03e2e4499c28be463e45fb916b919 | [
"Apache-2.0"
] | null | null | null | odps/models/resource.py | nurikk/aliyun-odps-python-sdk | 7887088998f03e2e4499c28be463e45fb916b919 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2017 Alibaba Group Holding Ltd.
#
# 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/LICENS... | 31.735537 | 105 | 0.602214 |
200d13d0ad19224b088e6f4e7f46fd1116b6eb06 | 525 | py | Python | src/rust/iced-x86-py/src/iced_x86/CC_g.py | clayne/iced | dcd3db725b1137fec4d2bda9b17587cead49bf4d | [
"MIT"
] | 1,018 | 2018-09-07T20:12:43.000Z | 2021-01-17T18:41:10.000Z | src/rust/iced-x86-py/src/iced_x86/CC_g.py | clayne/iced | dcd3db725b1137fec4d2bda9b17587cead49bf4d | [
"MIT"
] | 127 | 2018-09-07T19:33:48.000Z | 2021-01-17T22:20:33.000Z | src/rust/iced-x86-py/src/iced_x86/CC_g.py | clayne/iced | dcd3db725b1137fec4d2bda9b17587cead49bf4d | [
"MIT"
] | 146 | 2018-09-09T12:38:30.000Z | 2021-01-18T23:37:11.000Z | # SPDX-License-Identifier: MIT
# Copyright (C) 2018-present iced project and contributors
# This file was generated by GENERATOR!
# pylint: disable=invalid-name
# pylint: disable=line-too-long
# pylint: disable=too-many-lines
"""
Mnemonic condition code selector (eg. ``JG`` / ``JNLE``)
"""
import typing
if typing.T... | 18.75 | 58 | 0.655238 |
200ec8c2db65887cd65514805e44e172c6bb42bb | 7,936 | py | Python | python/foglamp/plugins/south/http_south/http_south.py | ashwinscale/FogLAMP | dac6f286d31978b6ce00303df8398ea5b2031d79 | [
"Apache-2.0"
] | null | null | null | python/foglamp/plugins/south/http_south/http_south.py | ashwinscale/FogLAMP | dac6f286d31978b6ce00303df8398ea5b2031d79 | [
"Apache-2.0"
] | 1 | 2018-05-10T16:04:34.000Z | 2018-05-10T16:04:34.000Z | python/foglamp/plugins/south/http_south/http_south.py | ashwinscale/FogLAMP | dac6f286d31978b6ce00303df8398ea5b2031d79 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# FOGLAMP_BEGIN
# See: http://foglamp.readthedocs.io/
# FOGLAMP_END
"""HTTP Listener handler for sensor readings"""
import asyncio
import copy
import sys
from aiohttp import web
from foglamp.common import logger
from foglamp.common.web import middleware
from foglamp.plugins.common import uti... | 32.658436 | 234 | 0.610509 |
200f798e7e0f95b3ed264166571c7a17426aefcb | 4,924 | py | Python | roberta/inference/run_classifier_infer_cv.py | LiRunyi2001/cnSoftBei | 72b90033ade1e926d3fb23621f5c67fa8eec9bb4 | [
"MIT"
] | 1 | 2021-11-29T08:33:00.000Z | 2021-11-29T08:33:00.000Z | roberta/inference/run_classifier_infer_cv.py | LiRunyi2001/cnSoftBei | 72b90033ade1e926d3fb23621f5c67fa8eec9bb4 | [
"MIT"
] | null | null | null | roberta/inference/run_classifier_infer_cv.py | LiRunyi2001/cnSoftBei | 72b90033ade1e926d3fb23621f5c67fa8eec9bb4 | [
"MIT"
] | null | null | null | """
This script provides an exmaple to wrap UER-py for classification inference (cross validation).
"""
import sys
import os
import argparse
import torch
import torch.nn as nn
import numpy as np
uer_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.append(uer_dir)
from uer.utils.vocab im... | 39.392 | 105 | 0.648253 |
20108249c7501a803109aa38a4367c232811fb45 | 6,491 | py | Python | uis/horsy_package.py | horsy-ml/horsy | 1161df2e83c201784ea674bd1d53e76831b15a0f | [
"MIT"
] | null | null | null | uis/horsy_package.py | horsy-ml/horsy | 1161df2e83c201784ea674bd1d53e76831b15a0f | [
"MIT"
] | null | null | null | uis/horsy_package.py | horsy-ml/horsy | 1161df2e83c201784ea674bd1d53e76831b15a0f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'D:\RAZNOE\prgrming\horsy\Source\client\uis\horsy_package.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know wha... | 52.346774 | 278 | 0.706671 |
2010d181957b6e1cf34b27e8fce9413591be7902 | 31,084 | py | Python | tiledb/tests/test_pandas_dataframe.py | Shelnutt2/TileDB-Py | cbc710de461a1c3abfaeb3587b1c0af209583618 | [
"MIT"
] | null | null | null | tiledb/tests/test_pandas_dataframe.py | Shelnutt2/TileDB-Py | cbc710de461a1c3abfaeb3587b1c0af209583618 | [
"MIT"
] | null | null | null | tiledb/tests/test_pandas_dataframe.py | Shelnutt2/TileDB-Py | cbc710de461a1c3abfaeb3587b1c0af209583618 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
try:
import pandas as pd
import pandas._testing as tm
import_failed = False
except ImportError:
import_failed = True
import unittest, os
import warnings
import string, random, copy
import numpy as np
from numpy.testing import assert_array_equal, assert_array_alm... | 36.228438 | 93 | 0.574926 |
201150abd59f44043c0cf22c47036ec2f4759cde | 871 | py | Python | day11/test_lib.py | heijp06/AoC-2021 | f6afead5e1fe9a839d608a5792f84e54803742c1 | [
"MIT"
] | null | null | null | day11/test_lib.py | heijp06/AoC-2021 | f6afead5e1fe9a839d608a5792f84e54803742c1 | [
"MIT"
] | null | null | null | day11/test_lib.py | heijp06/AoC-2021 | f6afead5e1fe9a839d608a5792f84e54803742c1 | [
"MIT"
] | null | null | null | import pytest
from lib import flashing_neighbours, part1, part2
def test_octopus_only_flashes_once():
assert part1(["96", "08"], 1) == 2
def test_flashing_neighbours():
assert flashing_neighbours([[10, 9]], 0, 1) == 1
small = [
"11111",
"19991",
"19191",
"19991",
"11111"
]
data = ... | 17.078431 | 75 | 0.614237 |
201157d2a3d68e419b263ee0880e9abef86ce731 | 7,728 | py | Python | data/external/repositories/178307/kaggle-otto-master/predictor.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/178307/kaggle-otto-master/predictor.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/178307/kaggle-otto-master/predictor.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | import pandas as pd
import numpy as np
from sklearn import ensemble, calibration, metrics, cross_validation
from sklearn import feature_extraction, preprocessing
import xgboost as xgb
import keras.models as kermod
import keras.layers.core as kerlay
import keras.layers.advanced_activations as keradv
import keras.layers.... | 33.025641 | 114 | 0.610766 |
201171ed4ed2acece5307ef9d3b0fd5bbf3bf1a5 | 114 | py | Python | pyeem/instruments/horiba/__init__.py | drewmee/PyEEM | 283c01405bf51da6827ba434be53acd580b7642b | [
"MIT"
] | 4 | 2020-09-01T08:27:28.000Z | 2022-03-12T09:11:15.000Z | pyeem/instruments/horiba/__init__.py | drewmee/PyEEM | 283c01405bf51da6827ba434be53acd580b7642b | [
"MIT"
] | 2 | 2021-06-11T18:20:47.000Z | 2021-11-19T14:11:09.000Z | pyeem/instruments/horiba/__init__.py | drewmee/PyEEM | 283c01405bf51da6827ba434be53acd580b7642b | [
"MIT"
] | null | null | null | from .aqualog import Aqualog
from .fluorolog import Fluorolog
name = "Horiba"
instruments = [Aqualog, Fluorolog]
| 19 | 34 | 0.780702 |
20118083c189727b7a83f1144f6b191415bf0b96 | 1,432 | py | Python | Model/Download2Mp3.py | BETRU21/DownloadToMp3 | a0499c9039348aeab1b05ca493d02f79dc8f5d1e | [
"Apache-2.0"
] | null | null | null | Model/Download2Mp3.py | BETRU21/DownloadToMp3 | a0499c9039348aeab1b05ca493d02f79dc8f5d1e | [
"Apache-2.0"
] | null | null | null | Model/Download2Mp3.py | BETRU21/DownloadToMp3 | a0499c9039348aeab1b05ca493d02f79dc8f5d1e | [
"Apache-2.0"
] | null | null | null | import youtube_dl
| 30.468085 | 61 | 0.539106 |
2013ed9ff566c0c9215f3514a117ffdd2d27c869 | 529 | py | Python | src/Python/01_Interakcja_z_konsola/Zad7.py | djeada/Nauka-programowania | b1eb6840c15b830acf552f0a0fc5cc692759152f | [
"MIT"
] | 3 | 2020-09-19T21:38:30.000Z | 2022-03-30T11:02:26.000Z | src/Python/01_Interakcja_z_konsola/Zad7.py | djeada/Nauka-programowania | b1eb6840c15b830acf552f0a0fc5cc692759152f | [
"MIT"
] | null | null | null | src/Python/01_Interakcja_z_konsola/Zad7.py | djeada/Nauka-programowania | b1eb6840c15b830acf552f0a0fc5cc692759152f | [
"MIT"
] | 1 | 2022-02-04T09:13:20.000Z | 2022-02-04T09:13:20.000Z | if __name__ == "__main__":
"""
Pobierz podstawe i wysokosc trojkata i wypisz pole.
"""
print("podaj podstawe i wysokosc trojkata:")
a = int(input())
h = int(input())
print(
"pole trojkata o podstawie ", a, " i wysokosci ", h, " jest rowne ", a * h / 2
)
"""
Pobierz dlu... | 20.346154 | 86 | 0.561437 |
20180273094d0e160bca16ce1c37d08abdc4c3cc | 803 | py | Python | message/models.py | bopopescu/storyboard | 0258fd6f80b6bbd9d0ca493cbaaae87c3a6d16e2 | [
"MIT"
] | null | null | null | message/models.py | bopopescu/storyboard | 0258fd6f80b6bbd9d0ca493cbaaae87c3a6d16e2 | [
"MIT"
] | null | null | null | message/models.py | bopopescu/storyboard | 0258fd6f80b6bbd9d0ca493cbaaae87c3a6d16e2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
models.py
Created by Darcy Liu on 2012-03-03.
Copyright (c) 2012 Close To U. All rights reserved.
"""
from django.db import models
from django.contrib.auth.models import User
# class Message(models.Model):
# key = models.AutoField(primary_key=True)
# title = models... | 33.458333 | 78 | 0.714819 |
2018bf68650c49cd5b523600df50d3ef8a5228b2 | 2,772 | py | Python | model_helpers.py | Dantistnfs/binerals-classification-task | 994a38dc4c11d05c066e595a426e7fc3320a0229 | [
"MIT"
] | null | null | null | model_helpers.py | Dantistnfs/binerals-classification-task | 994a38dc4c11d05c066e595a426e7fc3320a0229 | [
"MIT"
] | null | null | null | model_helpers.py | Dantistnfs/binerals-classification-task | 994a38dc4c11d05c066e595a426e7fc3320a0229 | [
"MIT"
] | null | null | null | """
Helper functions for model training, loading, testing etc
"""
import pickle
import tqdm
import torch
import numpy as np
| 28 | 103 | 0.556277 |
2018fb840212bddc171185fe57f1bf72ee64dbb1 | 790 | py | Python | camera/PIR_camera.py | jutako/raspi | f69d15a48765c85960e7d7da175d4f96cb1dfee3 | [
"MIT"
] | null | null | null | camera/PIR_camera.py | jutako/raspi | f69d15a48765c85960e7d7da175d4f96cb1dfee3 | [
"MIT"
] | null | null | null | camera/PIR_camera.py | jutako/raspi | f69d15a48765c85960e7d7da175d4f96cb1dfee3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import RPi.GPIO as GPIO
from picamera import PiCamera
import time
import datetime
PIN = 12
GPIO.setmode(GPIO.BCM)
GPIO.setup(PIN, GPIO.IN)
camera = PiCamera()
camera.rotation = 180
camera.resolution = (1024, 576)
#camera.start_preview()
#sleep(20)
#camera.stop_preview()
while True:
time.s... | 17.954545 | 80 | 0.589873 |
201969c88f34f0fa220bab32fdd8cbaf6e2e16f3 | 2,689 | py | Python | ca_node/scripts/ranking_controller.py | hidmic/create_autonomy | 3aec14c9a6aa2d9a7b817d119bfb82b089e60219 | [
"BSD-3-Clause"
] | null | null | null | ca_node/scripts/ranking_controller.py | hidmic/create_autonomy | 3aec14c9a6aa2d9a7b817d119bfb82b089e60219 | [
"BSD-3-Clause"
] | 4 | 2019-10-24T17:19:50.000Z | 2020-02-20T01:06:27.000Z | ca_node/scripts/ranking_controller.py | hidmic/create_autonomy | 3aec14c9a6aa2d9a7b817d119bfb82b089e60219 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import rospy
import threading
from ca_msgs.msg import Bumper
from geometry_msgs.msg import Twist, Vector3
if __name__ == "__main__":
rc = RankingController()
| 29.549451 | 92 | 0.664559 |
201e557f74f0335327de9be24c57129ec7d8f08b | 915 | py | Python | gabbi/exception.py | scottwallacesh/gabbi | 5e76332ac06cd075c11477b384ad5da1d2eaa9d5 | [
"Apache-2.0"
] | 145 | 2015-01-16T23:19:35.000Z | 2022-03-15T00:21:54.000Z | gabbi/exception.py | scottwallacesh/gabbi | 5e76332ac06cd075c11477b384ad5da1d2eaa9d5 | [
"Apache-2.0"
] | 250 | 2015-01-02T11:20:06.000Z | 2022-03-22T19:55:18.000Z | gabbi/exception.py | scottwallacesh/gabbi | 5e76332ac06cd075c11477b384ad5da1d2eaa9d5 | [
"Apache-2.0"
] | 49 | 2015-01-14T16:14:52.000Z | 2022-03-21T11:37:26.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | 31.551724 | 75 | 0.742077 |
201f3558e4dbdd368aeeee6e9f098d5308313493 | 235 | py | Python | music/filename.py | JohanLi/uncharted-waters-2-research | fe6d40a28baed38e894a301da85a80c89e7153fa | [
"MIT"
] | null | null | null | music/filename.py | JohanLi/uncharted-waters-2-research | fe6d40a28baed38e894a301da85a80c89e7153fa | [
"MIT"
] | null | null | null | music/filename.py | JohanLi/uncharted-waters-2-research | fe6d40a28baed38e894a301da85a80c89e7153fa | [
"MIT"
] | null | null | null | import os
path = './converted/'
for filename in os.listdir(path):
newFilename = filename.lower().replace(' ', '-').replace('', '')
os.rename(path + filename, path + newFilename.lower())
then = os.listdir(path)
print(then)
| 19.583333 | 69 | 0.642553 |
2020fcd0b6330a2f620511b1f0629988385a2358 | 2,792 | py | Python | django_rest_resetpassword/tests.py | fasfoxcom/django-rest-resetpassword | b459c44f4ff426b190cb7303b32a23bf7b06b823 | [
"MIT"
] | 4 | 2020-01-14T14:25:57.000Z | 2021-03-21T10:51:48.000Z | django_rest_resetpassword/tests.py | fasfoxcom/django-rest-resetpassword | b459c44f4ff426b190cb7303b32a23bf7b06b823 | [
"MIT"
] | 3 | 2020-09-16T14:09:58.000Z | 2021-03-07T10:53:29.000Z | django_rest_resetpassword/tests.py | fasfoxcom/django-rest-resetpassword | b459c44f4ff426b190cb7303b32a23bf7b06b823 | [
"MIT"
] | 3 | 2020-04-07T10:11:39.000Z | 2022-03-07T04:25:33.000Z | from django.conf import settings
from django.contrib.auth.models import User
from django.urls import reverse
from rest_framework.test import APITestCase
| 47.322034 | 98 | 0.69735 |
2020fead74782498dcbbc501d6a342b6a06a76e1 | 948 | py | Python | day2/netmiko_ex1rudy.py | rudy5rudy/pynet-ons-feb19 | 1fa0b30af35aaae73ced2f77c04ab1cb5f2ac5fc | [
"Apache-2.0"
] | null | null | null | day2/netmiko_ex1rudy.py | rudy5rudy/pynet-ons-feb19 | 1fa0b30af35aaae73ced2f77c04ab1cb5f2ac5fc | [
"Apache-2.0"
] | null | null | null | day2/netmiko_ex1rudy.py | rudy5rudy/pynet-ons-feb19 | 1fa0b30af35aaae73ced2f77c04ab1cb5f2ac5fc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Exercises using Netmiko"""
from __future__ import print_function
from getpass import getpass
from netmiko import ConnectHandler
#def save_file(filename, show_run):
# """Save the show run to a file"""
# with open(filename, "w") as f:
# f.write(show_run)
def main():
"""Exerci... | 21.066667 | 48 | 0.64135 |
20214e44beff67803045cc13f9f17cbaa929c06c | 326 | py | Python | tests/test_pytorch.py | szymonmaszke/torchtraining | 1ddf169325b7239d6d6686b20072a406b69a0180 | [
"MIT"
] | 3 | 2020-08-26T06:11:58.000Z | 2020-08-27T08:11:15.000Z | tests/test_pytorch.py | klaudiapalasz/torchtraining | 7ac54009eea2fd84aa635b6f3cbfe306f317d087 | [
"MIT"
] | 1 | 2020-08-25T19:19:43.000Z | 2020-08-25T19:19:43.000Z | tests/test_pytorch.py | klaudiapalasz/torchtraining | 7ac54009eea2fd84aa635b6f3cbfe306f317d087 | [
"MIT"
] | 1 | 2021-04-15T18:55:57.000Z | 2021-04-15T18:55:57.000Z | """Core pytorch operations regarding optimization (optimize, schedule) are placed in general tests."""
import pytest
import torch
import torchtraining.pytorch as P
| 25.076923 | 102 | 0.708589 |
2022e211ed69af3b8b01c2021ce2046666e70c5f | 1,464 | py | Python | tests/protein_test.py | LauraKaschnitz/advanced_python_2021-22_HD | 63ed116d75dd0a2e8bf9288ef95aea5b5ce860ae | [
"CC0-1.0"
] | null | null | null | tests/protein_test.py | LauraKaschnitz/advanced_python_2021-22_HD | 63ed116d75dd0a2e8bf9288ef95aea5b5ce860ae | [
"CC0-1.0"
] | null | null | null | tests/protein_test.py | LauraKaschnitz/advanced_python_2021-22_HD | 63ed116d75dd0a2e8bf9288ef95aea5b5ce860ae | [
"CC0-1.0"
] | null | null | null | import sys
from pathlib import Path
# -------- START of inconvenient addon block --------
# This block is not necessary if you have installed your package
# using e.g. pip install -e (requires setup.py)
# or have a symbolic link in your sitepackages (my preferend way)
sys.path.append(
str(Path(__file__).parent.pare... | 32.533333 | 87 | 0.715164 |
2023ddc41607e5925cec13b5cb85d8acf690b482 | 2,092 | py | Python | src/treq/test/test_utils.py | chevah/treq | 2d45c8227246583bc96cb4924722d9f79e95d4d7 | [
"MIT"
] | 20 | 2015-01-06T11:13:26.000Z | 2019-12-04T02:22:03.000Z | src/treq/test/test_utils.py | chevah/treq | 2d45c8227246583bc96cb4924722d9f79e95d4d7 | [
"MIT"
] | 13 | 2015-01-02T17:46:30.000Z | 2015-03-31T12:57:14.000Z | src/treq/test/test_utils.py | chevah/treq | 2d45c8227246583bc96cb4924722d9f79e95d4d7 | [
"MIT"
] | 10 | 2015-01-02T23:17:05.000Z | 2021-06-05T12:03:25.000Z | import mock
from twisted.trial.unittest import TestCase
from treq._utils import default_reactor, default_pool, set_global_pool
| 26.820513 | 70 | 0.666348 |
202403eba79cfd93e6eb428ba43c48862239800d | 12,792 | py | Python | pygments_lexer_solidity/lexer.py | veox/pygments-lexer-solidity | e99ccf980337ceaad4fbc7ee11795e91d7fab0ae | [
"BSD-2-Clause"
] | 2 | 2018-05-24T14:36:59.000Z | 2019-06-29T23:50:08.000Z | pygments_lexer_solidity/lexer.py | veox/pygments-lexer-solidity | e99ccf980337ceaad4fbc7ee11795e91d7fab0ae | [
"BSD-2-Clause"
] | null | null | null | pygments_lexer_solidity/lexer.py | veox/pygments-lexer-solidity | e99ccf980337ceaad4fbc7ee11795e91d7fab0ae | [
"BSD-2-Clause"
] | 1 | 2019-11-11T23:24:17.000Z | 2019-11-11T23:24:17.000Z | # -*- coding: utf-8 -*-
"""
pygments.lexers.solidity
~~~~~~~~~~~~~~~~~~~~~~~~
Lexer for the Solidity language.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import (
RegexLexer,
bygroups,
c... | 34.95082 | 92 | 0.482489 |
2024077dd459a76b5147e2c0b8b573e999001432 | 2,305 | py | Python | challenge 10/Calculator.py | caroldf07/100daysofcode-python | 508ad5464904193b0bd58fc73d26b21d8adc011a | [
"Apache-2.0"
] | 1 | 2021-11-02T22:24:13.000Z | 2021-11-02T22:24:13.000Z | challenge 10/Calculator.py | caroldf07/100challengesofcode-python | 508ad5464904193b0bd58fc73d26b21d8adc011a | [
"Apache-2.0"
] | null | null | null | challenge 10/Calculator.py | caroldf07/100challengesofcode-python | 508ad5464904193b0bd58fc73d26b21d8adc011a | [
"Apache-2.0"
] | 1 | 2021-10-15T23:46:34.000Z | 2021-10-15T23:46:34.000Z | logo = """
_____________________
| _________________ |
| | Pythonista 0. | | .----------------. .----------------. .----------------. .----------------.
| |_________________| | | .--------------. || .--------------. || .--------------. || .--------------. |
| ___ ___ ___ ___ | | | ______ | || | ... | 33.897059 | 137 | 0.358351 |
20267ec9911e5557412955f8827404aed1e89346 | 2,863 | py | Python | env/lib/python3.7/site-packages/materialx/emoji.py | ritchadh/docs-like-code-demo | 23d189e074b9ecf136b7b91df3826bcfa51cd124 | [
"BSD-3-Clause"
] | null | null | null | env/lib/python3.7/site-packages/materialx/emoji.py | ritchadh/docs-like-code-demo | 23d189e074b9ecf136b7b91df3826bcfa51cd124 | [
"BSD-3-Clause"
] | null | null | null | env/lib/python3.7/site-packages/materialx/emoji.py | ritchadh/docs-like-code-demo | 23d189e074b9ecf136b7b91df3826bcfa51cd124 | [
"BSD-3-Clause"
] | null | null | null | """
Emoji extras for Material.
Override the indexes with an extended version that includes short names for Material icons, FontAwesome, etc.
"""
import os
import glob
import copy
import codecs
import inspect
import material
import pymdownx
from pymdownx.emoji import TWEMOJI_SVG_CDN, add_attriubtes
import xml.etree.Ele... | 31.811111 | 120 | 0.624869 |
20299f247043cda7e41287f499114f04606c876f | 86 | py | Python | 2rd.py | chidanandpujar/Python_scripts | 0ee70e07ef4ab4d8c04955466ea9b305bdac0a53 | [
"Unlicense"
] | null | null | null | 2rd.py | chidanandpujar/Python_scripts | 0ee70e07ef4ab4d8c04955466ea9b305bdac0a53 | [
"Unlicense"
] | null | null | null | 2rd.py | chidanandpujar/Python_scripts | 0ee70e07ef4ab4d8c04955466ea9b305bdac0a53 | [
"Unlicense"
] | null | null | null | fd = open('f',"r")
buffer = fd.read(2)
print("first 2 chars in f:",buffer)
fd.close()
| 17.2 | 35 | 0.616279 |
202b728e02702f8a2d89aa679eb963120719716a | 1,388 | py | Python | availability/__init__.py | Leader0721/ManyIP | 2964c213b67d3cde7d72f75caa4f79b2b0b8b777 | [
"MIT"
] | 629 | 2017-09-04T04:03:08.000Z | 2022-03-27T19:49:47.000Z | availability/__init__.py | Leader0721/ManyIP | 2964c213b67d3cde7d72f75caa4f79b2b0b8b777 | [
"MIT"
] | 7 | 2017-09-04T11:19:17.000Z | 2021-04-10T02:43:33.000Z | availability/__init__.py | Leader0721/ManyIP | 2964c213b67d3cde7d72f75caa4f79b2b0b8b777 | [
"MIT"
] | 119 | 2017-09-04T04:03:11.000Z | 2021-12-20T07:58:22.000Z | # -*- coding: UTF-8 -*-
import config
import gevent
import availability.check
from persistence import persister
import time
def crawl_worker(queue_verification, queue_persistence):
"""
:param queue_verification:
:param queue_persistence:
:return:
"""
while True:
spawns = list()
... | 31.545455 | 107 | 0.64121 |
202fea4fea9302a54ade62e00c206ce92370b06d | 401 | py | Python | tests/heuristics/test_dataset_id_heuristic.py | HPI-Information-Systems/TimeEval | 9b2717b89decd57dd09e04ad94c120f13132d7b8 | [
"MIT"
] | 2 | 2022-01-29T03:46:31.000Z | 2022-02-14T14:06:35.000Z | tests/heuristics/test_dataset_id_heuristic.py | HPI-Information-Systems/TimeEval | 9b2717b89decd57dd09e04ad94c120f13132d7b8 | [
"MIT"
] | null | null | null | tests/heuristics/test_dataset_id_heuristic.py | HPI-Information-Systems/TimeEval | 9b2717b89decd57dd09e04ad94c120f13132d7b8 | [
"MIT"
] | null | null | null | import unittest
import tests.fixtures.heuristics_fixtures as fixtures
from timeeval.heuristics import DatasetIdHeuristic
| 33.416667 | 96 | 0.795511 |
2030a605cd752d14f209c7587eb4ae5e80ff522c | 551 | py | Python | src/grokcore/component/tests/adapter/importedmodel.py | zopefoundation/grokcore.component | ae027df4c0bccf59ab8358b46495456682158837 | [
"ZPL-2.1"
] | 1 | 2018-03-19T01:53:45.000Z | 2018-03-19T01:53:45.000Z | src/grokcore/component/tests/adapter/importedmodel.py | zopefoundation/grokcore.component | ae027df4c0bccf59ab8358b46495456682158837 | [
"ZPL-2.1"
] | 6 | 2015-04-21T13:26:52.000Z | 2020-11-24T07:03:27.000Z | src/grokcore/component/tests/adapter/importedmodel.py | zopefoundation/grokcore.component | ae027df4c0bccf59ab8358b46495456682158837 | [
"ZPL-2.1"
] | 4 | 2015-04-03T04:48:13.000Z | 2018-01-12T06:50:02.000Z | """
Imported model and adapter won't be grokked:
>>> import grokcore.component as grok
>>> grok.testing.grok(__name__)
>>> from grokcore.component.tests.adapter.adapter import IHome
>>> cave = Cave()
>>> home = IHome(cave)
Traceback (most recent call last):
...
TypeError: ('Could not adapt', <grokcor... | 36.733333 | 160 | 0.713249 |
20318ce6f98ad7d15054368aa42e0b37d5feb5f0 | 862 | py | Python | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/wok/core/utils/proxies.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | 1 | 2021-02-05T13:19:58.000Z | 2021-02-05T13:19:58.000Z | chapter2/wok/master/wok/core/utils/proxies.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | chapter2/wok/master/wok/core/utils/proxies.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | # from http://www.voidspace.org.uk/python/weblog/arch_d7_2007_03_17.shtml#e664 | 33.153846 | 78 | 0.603248 |
2032029ba048fe481ac31525f79cc7152354c67a | 2,834 | py | Python | donkeycar/parts/pigpio_enc.py | asepnh/donkeycar | af3883c6ea5462878de7b9f01482816ee10c20b2 | [
"MIT"
] | null | null | null | donkeycar/parts/pigpio_enc.py | asepnh/donkeycar | af3883c6ea5462878de7b9f01482816ee10c20b2 | [
"MIT"
] | null | null | null | donkeycar/parts/pigpio_enc.py | asepnh/donkeycar | af3883c6ea5462878de7b9f01482816ee10c20b2 | [
"MIT"
] | 1 | 2021-05-24T23:47:20.000Z | 2021-05-24T23:47:20.000Z | import pigpio
import time
if __name__ == "__main__":
pi = pigpio.pi()
e = PiPGIOEncoder(4, pi)
while True:
time.sleep(0.1)
e.run()
| 31.488889 | 103 | 0.60374 |
20328fd176b3f935bb3bf0db906c7f944bf98a06 | 6,370 | py | Python | huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/action_smn_forwarding.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/action_smn_forwarding.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/action_smn_forwarding.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
""... | 26.541667 | 133 | 0.595447 |
2037cfe78c4cb57f5b145bb1327426566cfe164f | 8,190 | py | Python | slack_sdk/scim/v1/user.py | priya1puresoftware/python-slack-sdk | 3503182feaaf4d41b57fd8bf10038ebc99f1f3c7 | [
"MIT"
] | 2,486 | 2016-11-03T14:31:43.000Z | 2020-10-26T23:07:44.000Z | slack_sdk/scim/v1/user.py | priya1puresoftware/python-slack-sdk | 3503182feaaf4d41b57fd8bf10038ebc99f1f3c7 | [
"MIT"
] | 721 | 2016-11-03T21:26:56.000Z | 2020-10-26T12:41:29.000Z | slack_sdk/scim/v1/user.py | priya1puresoftware/python-slack-sdk | 3503182feaaf4d41b57fd8bf10038ebc99f1f3c7 | [
"MIT"
] | 627 | 2016-11-02T19:04:19.000Z | 2020-10-25T19:21:13.000Z | from typing import Optional, Any, List, Dict, Union
from .default_arg import DefaultArg, NotGiven
from .internal_utils import _to_dict_without_not_given, _is_iterable
from .types import TypeAndValue
| 33.842975 | 86 | 0.627961 |
20387f22863064de341858a8ef9a26184e68af97 | 4,875 | py | Python | typhoon/core/glue.py | typhoon-data-org/typhoon-orchestrator | f24c4807b0e1ee38713ba1468db761119724dcf2 | [
"Apache-2.0"
] | 21 | 2021-04-10T20:57:49.000Z | 2022-03-24T06:45:30.000Z | typhoon/core/glue.py | typhoon-data-org/typhoon-orchestrator | f24c4807b0e1ee38713ba1468db761119724dcf2 | [
"Apache-2.0"
] | 7 | 2021-11-06T16:10:41.000Z | 2021-12-12T11:41:32.000Z | typhoon/core/glue.py | typhoon-data-org/typhoon-orchestrator | f24c4807b0e1ee38713ba1468db761119724dcf2 | [
"Apache-2.0"
] | 1 | 2022-03-08T21:22:33.000Z | 2022-03-08T21:22:33.000Z | """Contains code that stitches together different parts of the library. By containing most side effects here the rest
of the code can be more deterministic and testable.
This code should not be unit tested.
"""
import os
from pathlib import Path
from typing import Union, List, Tuple, Dict, Optional
import yaml
from py... | 37.21374 | 117 | 0.686974 |
203a500dc2fb2afb73319d6d75b7c082ac926d2a | 755 | py | Python | pqu/Check/check.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 14 | 2019-08-29T23:46:24.000Z | 2022-03-21T10:16:25.000Z | pqu/Check/check.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 1 | 2020-08-04T16:14:45.000Z | 2021-12-01T01:54:34.000Z | pqu/Check/check.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 2 | 2022-03-03T22:41:41.000Z | 2022-03-03T22:54:43.000Z | # <<BEGIN-copyright>>
# Copyright 2021, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# <<END-copyright>>
import sys
import glob, os, shutil, filecmp
PYTHON = sys.executable
files = sorted( glob.glob( 't*.py' ) )
if( os.path.exi... | 27.962963 | 101 | 0.598675 |
203abe1bfbdd57f76bc43df415fa9c12d5619ca5 | 315 | py | Python | config.py | nicfro/brownian_motion | 03db2d9a2527b6ee9c6004960cc71da302a1fe2e | [
"MIT"
] | null | null | null | config.py | nicfro/brownian_motion | 03db2d9a2527b6ee9c6004960cc71da302a1fe2e | [
"MIT"
] | null | null | null | config.py | nicfro/brownian_motion | 03db2d9a2527b6ee9c6004960cc71da302a1fe2e | [
"MIT"
] | null | null | null | settings = {"velocity_min": 1,
"velocity_max": 3,
"x_boundary": 800,
"y_boundary": 800,
"small_particle_radius": 5,
"big_particle_radius": 10,
"number_of_particles": 500,
"density_min": 2,
"density_max": 20
} | 31.5 | 39 | 0.47619 |
203bff717d5abec1d2372f4548aa55e0fe774c45 | 2,791 | py | Python | hooks_plugins/hooks_mail_plugin/mail_plugin.py | crawlino/crawlino-plugins | 482d2e42a43e15a65ea4ab5ee274da887214a1b7 | [
"BSD-3-Clause"
] | 2 | 2018-03-16T10:07:02.000Z | 2020-10-20T22:41:36.000Z | crawlino/plugins/hooks_plugins/hooks_mail_plugin/mail_plugin.py | BBVA/crawlino | 685f57e6b3e9356484ead2681bb178f651d2f371 | [
"Apache-2.0"
] | null | null | null | crawlino/plugins/hooks_plugins/hooks_mail_plugin/mail_plugin.py | BBVA/crawlino | 685f57e6b3e9356484ead2681bb178f651d2f371 | [
"Apache-2.0"
] | 1 | 2020-10-20T22:41:37.000Z | 2020-10-20T22:41:37.000Z | import logging
import smtplib
from crawlino import hook_plugin, PluginReturnedData, CrawlinoValueError
log = logging.getLogger("crawlino-plugin")
| 33.22619 | 79 | 0.506628 |
203d31bf82b5024f824101b94407bc8945c5c669 | 142 | py | Python | app/model/message.py | godraadam/privy-router | 05628e8744cbe26a19cf7c45b119eacb675402d4 | [
"MIT"
] | null | null | null | app/model/message.py | godraadam/privy-router | 05628e8744cbe26a19cf7c45b119eacb675402d4 | [
"MIT"
] | null | null | null | app/model/message.py | godraadam/privy-router | 05628e8744cbe26a19cf7c45b119eacb675402d4 | [
"MIT"
] | null | null | null |
from pydantic import BaseModel
| 17.75 | 45 | 0.753521 |
203d83fb18476062a54ca0ada097b5f1e4509232 | 2,825 | py | Python | src/fedActionFromTargetRate.py | jrrpanix/ML9 | e501bb530f82620146b2d7703c3b561b49067dd7 | [
"MIT"
] | null | null | null | src/fedActionFromTargetRate.py | jrrpanix/ML9 | e501bb530f82620146b2d7703c3b561b49067dd7 | [
"MIT"
] | null | null | null | src/fedActionFromTargetRate.py | jrrpanix/ML9 | e501bb530f82620146b2d7703c3b561b49067dd7 | [
"MIT"
] | null | null | null | import os
import csv
import glob
import numpy as np
import pandas as pd
import nltk
import string
import re
from numpy import genfromtxt
from nltk import *
from nltk.corpus.reader.plaintext import PlaintextCorpusReader
from nltk import word_tokenize
from nltk.util import ngrams
from collections import Counter
if __... | 34.45122 | 215 | 0.699115 |
203e507cc3f602e592e2839827155a78ab5500d6 | 47 | py | Python | wk/cv/utils/__init__.py | Peiiii/wk | dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4 | [
"MIT"
] | null | null | null | wk/cv/utils/__init__.py | Peiiii/wk | dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4 | [
"MIT"
] | null | null | null | wk/cv/utils/__init__.py | Peiiii/wk | dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4 | [
"MIT"
] | null | null | null | from .imutils import *
from .boxutils import *
| 15.666667 | 23 | 0.744681 |
203f5085c6e6bdb4474b040f35e294865c742113 | 4,256 | py | Python | PDF-Tools/main.py | Aayush-hub/Amazing-Python-Scripts | 5488454b16fa969d32ad7a56618e62e64291c052 | [
"MIT"
] | 3 | 2021-01-14T13:54:22.000Z | 2021-11-15T11:26:51.000Z | PDF-Tools/main.py | Aayush-hub/Amazing-Python-Scripts | 5488454b16fa969d32ad7a56618e62e64291c052 | [
"MIT"
] | 1 | 2021-02-24T02:06:21.000Z | 2021-02-24T02:06:21.000Z | PDF-Tools/main.py | Aayush-hub/Amazing-Python-Scripts | 5488454b16fa969d32ad7a56618e62e64291c052 | [
"MIT"
] | 1 | 2021-02-22T18:47:39.000Z | 2021-02-22T18:47:39.000Z | import os
from PyPDF2 import PdfFileReader, PdfFileWriter
def merge_pdfs():
''' Merge multiple PDF's into one combined PDF '''
input_paths = input(r"Enter comma separated list of paths to the PDFs ")
paths = input_paths.split(',')
pdf_file_writer = PdfFileWriter()
# Pick each pdf one by one and ... | 32.48855 | 118 | 0.666588 |
20405da01c0697c18d446756c010ffeb88012a42 | 6,060 | py | Python | tech.py | ajul/galciv3wikiscripts | 337fc27286e5d3117c83f3171e32be8941e9af4a | [
"MIT"
] | null | null | null | tech.py | ajul/galciv3wikiscripts | 337fc27286e5d3117c83f3171e32be8941e9af4a | [
"MIT"
] | 1 | 2016-03-06T11:57:38.000Z | 2016-04-02T02:13:41.000Z | tech.py | ajul/galciv3wikiscripts | 337fc27286e5d3117c83f3171e32be8941e9af4a | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
import re
import os
import loc
datadir = 'D:/Steam/steamapps/common/Galactic Civilizations III/data'
gamedatadir = os.path.join(datadir, 'Game')
for filename in os.listdir(gamedatadir):
techList = ET.parse(os.path.join(gamedatadir, filename)).getroot()
if techList.tag != 'Te... | 39.350649 | 109 | 0.576733 |
2040b731cc0d7545c2cc99188f7bbf870dcb905d | 13,052 | py | Python | matching/CopingWithOutlier.py | HeCraneChen/3D-Crowd-Pose-Estimation-Based-on-MVG | 0b1fc8aca27520976516012f6594a513cb1fb2f3 | [
"MIT"
] | 35 | 2020-07-14T22:42:33.000Z | 2022-01-07T06:32:26.000Z | matching/CopingWithOutlier.py | HeCraneChen/3D-Crowd-Pose-Estimation-Based-on-MVG | 0b1fc8aca27520976516012f6594a513cb1fb2f3 | [
"MIT"
] | 5 | 2020-09-14T03:19:27.000Z | 2021-05-28T19:45:29.000Z | matching/CopingWithOutlier.py | HeCraneChen/3D-Crowd-Pose-Estimation-Based-on-MVG | 0b1fc8aca27520976516012f6594a513cb1fb2f3 | [
"MIT"
] | 6 | 2020-09-15T02:28:36.000Z | 2021-07-16T06:03:36.000Z | import sys
import json
import os
import numpy as np
from scipy.optimize import linear_sum_assignment
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d, Axes3D
import cv2
import pylab as pl
from numpy import linalg as LA
import random
import math
from mpl_toolkits.mplot3d import axes3d, Axes3D
from... | 47.461818 | 196 | 0.674686 |
20415742b9197ff7961e1d8e40fda991f5be725a | 4,887 | py | Python | tests/test_workspace.py | rossumai/rossumctl | 647c2ba9c2b7eb44759b3857b93276368e3d14c8 | [
"MIT"
] | null | null | null | tests/test_workspace.py | rossumai/rossumctl | 647c2ba9c2b7eb44759b3857b93276368e3d14c8 | [
"MIT"
] | 10 | 2020-08-24T09:20:38.000Z | 2020-09-29T08:03:57.000Z | tests/test_workspace.py | rossumai/rossumctl | 647c2ba9c2b7eb44759b3857b93276368e3d14c8 | [
"MIT"
] | null | null | null | import re
from functools import partial
from traceback import print_tb
import pytest
from more_itertools import ilen
from rossum.workspace import create_command, list_command, delete_command, change_command
from tests.conftest import (
TOKEN,
match_uploaded_json,
ORGANIZATIONS_URL,
WORKSPACES_URL,
... | 33.244898 | 100 | 0.580929 |
2041841ab1ef90eb30625e075209aee43a02bb15 | 9,457 | py | Python | mesonconf.py | objectx/meson | c0f097c0c74551972f7ec2203cd960824984f058 | [
"Apache-2.0"
] | null | null | null | mesonconf.py | objectx/meson | c0f097c0c74551972f7ec2203cd960824984f058 | [
"Apache-2.0"
] | null | null | null | mesonconf.py | objectx/meson | c0f097c0c74551972f7ec2203cd960824984f058 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2014 The Meson development team
# 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 appl... | 42.791855 | 104 | 0.562863 |
204335bc3b7927613614917f0d97975baa214832 | 481 | py | Python | code/plot_harmonic_number.py | nagaokayuji/workshop-complexity | 404681fa235c1e551695bfc1481a445c268dff8e | [
"MIT"
] | null | null | null | code/plot_harmonic_number.py | nagaokayuji/workshop-complexity | 404681fa235c1e551695bfc1481a445c268dff8e | [
"MIT"
] | null | null | null | code/plot_harmonic_number.py | nagaokayuji/workshop-complexity | 404681fa235c1e551695bfc1481a445c268dff8e | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(1, 10**5, 100, dtype='int')
y = list(map(lambda x: count_harmonic_numbers(x), x))
y2 = x * np.log(x)
print(y)
print(y2)
plt.plot(x, y, label="count")
plt.plot(x, y2, label="NlogN")
plt.plot(x, x, label="N")
plt.legend()
plt.show()
| 20.913043 | 53 | 0.607069 |
2045932168297c8faa71edacf1321431a5f3bb12 | 1,549 | py | Python | stockviewer/stockviewer/source/websource.py | vyacheslav-bezborodov/skt | 58551eed497687adec5b56336037613a78cc5b2d | [
"MIT"
] | null | null | null | stockviewer/stockviewer/source/websource.py | vyacheslav-bezborodov/skt | 58551eed497687adec5b56336037613a78cc5b2d | [
"MIT"
] | null | null | null | stockviewer/stockviewer/source/websource.py | vyacheslav-bezborodov/skt | 58551eed497687adec5b56336037613a78cc5b2d | [
"MIT"
] | null | null | null | import logging
import csv
from urllib2 import urlopen, quote
from datetime import datetime
from stockviewer.utils import make_timedelta, make_fields
| 27.175439 | 177 | 0.705617 |
2046584bfc0657c5aba655a2373df7d1dfcd4130 | 90 | py | Python | backdriveb2/api/objects/__init__.py | Joffreybvn/backdriveb2 | bf6098a45aacbdad6a0ff95c45ff141a2bcf7e1c | [
"MIT"
] | null | null | null | backdriveb2/api/objects/__init__.py | Joffreybvn/backdriveb2 | bf6098a45aacbdad6a0ff95c45ff141a2bcf7e1c | [
"MIT"
] | null | null | null | backdriveb2/api/objects/__init__.py | Joffreybvn/backdriveb2 | bf6098a45aacbdad6a0ff95c45ff141a2bcf7e1c | [
"MIT"
] | null | null | null |
from .account import Account
from .bucket import Bucket
__all__ = ["Account", "Bucket"]
| 15 | 31 | 0.733333 |
2046d4bae33dd0cf277dfbef2a7af67cf8aaf6c2 | 328 | py | Python | src/utilities/helpers/predict.py | szymonmaszke/UniFirstKaggle | c1718e5ad9006251e8280c65fd8651b4d4efa31e | [
"MIT"
] | 2 | 2019-04-12T12:20:08.000Z | 2019-04-12T15:42:14.000Z | src/utilities/helpers/predict.py | szymonmaszke/UniFirstKaggle | c1718e5ad9006251e8280c65fd8651b4d4efa31e | [
"MIT"
] | null | null | null | src/utilities/helpers/predict.py | szymonmaszke/UniFirstKaggle | c1718e5ad9006251e8280c65fd8651b4d4efa31e | [
"MIT"
] | null | null | null | import pathlib
import numpy as np
| 20.5 | 79 | 0.597561 |
204741c598e69e13e9f1cf051103af7ae120ef73 | 2,566 | py | Python | pipeline.py | hodleth/bestcondor | 167b6ca5e1f6f7256b870303ebcd051d41c9a1ec | [
"MIT"
] | 5 | 2021-02-17T16:26:22.000Z | 2021-11-24T14:25:32.000Z | pipeline.py | hodleth/bestcondor | 167b6ca5e1f6f7256b870303ebcd051d41c9a1ec | [
"MIT"
] | 1 | 2019-09-30T00:43:23.000Z | 2019-09-30T00:43:23.000Z | pipeline.py | hodleth/bestcondor | 167b6ca5e1f6f7256b870303ebcd051d41c9a1ec | [
"MIT"
] | 2 | 2018-05-18T14:42:00.000Z | 2020-05-22T23:16:50.000Z | import json
import urllib
import utils as ut
from distutils.util import strtobool
def parseOptionsChain(ticker, expDate):
urlTicker = 'https://query2.finance.yahoo.com/v7/finance/options/' + ticker
urlDate = '?date=' + str(ut.formatExpiryURL(expDate))
url = urlTicker + urlDate
rawData = urllib.urlopen(url).re... | 32.075 | 95 | 0.758379 |
20487ec8a56148d10391484016a8c173799c42c3 | 352 | py | Python | setup.py | rickie/hopla | 24a422194e42c03d5877dc167b2b07147326a595 | [
"Apache-2.0"
] | null | null | null | setup.py | rickie/hopla | 24a422194e42c03d5877dc167b2b07147326a595 | [
"Apache-2.0"
] | null | null | null | setup.py | rickie/hopla | 24a422194e42c03d5877dc167b2b07147326a595 | [
"Apache-2.0"
] | null | null | null | """
Module used for building hopla.
[quote](https://setuptools.readthedocs.io/en/latest/setuptools.html):
As PEP 517 is new, support is not universal, and frontends that do
support it may still have bugs. For compatibility, you may want to
put a setup.py file containing only a setuptools.setup() invocation.
"""
import... | 29.333333 | 69 | 0.772727 |
2048990e1c1f8155fa103ba38bc3687e2cba4347 | 3,545 | py | Python | pkgs/statsmodels-0.6.1-np110py27_0/lib/python2.7/site-packages/statsmodels/regression/tests/tests_predict.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2016-09-02T20:31:32.000Z | 2016-09-02T20:31:32.000Z | pkgs/statsmodels-0.6.1-np110py27_0/lib/python2.7/site-packages/statsmodels/regression/tests/tests_predict.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/statsmodels-0.6.1-np110py27_0/lib/python2.7/site-packages/statsmodels/regression/tests/tests_predict.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-05-02T10:50:15.000Z | 2021-05-02T10:50:15.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 20 17:12:53 2014
author: Josef Perktold
"""
import numpy as np
from statsmodels.regression.linear_model import OLS, WLS
from statsmodels.sandbox.regression.predstd import wls_prediction_std
| 34.086538 | 77 | 0.626234 |
2049233a0825d6a90f1dfa2c038366a683c0ad0c | 738 | py | Python | Lib/Similarity/Jaccard.py | allanbatista/search_engine | 478b027c64889c9e5681c7ce55a9a2276522e8fd | [
"Apache-2.0"
] | 1 | 2019-04-22T21:45:54.000Z | 2019-04-22T21:45:54.000Z | Lib/Similarity/Jaccard.py | allanbatista/search_engine | 478b027c64889c9e5681c7ce55a9a2276522e8fd | [
"Apache-2.0"
] | null | null | null | Lib/Similarity/Jaccard.py | allanbatista/search_engine | 478b027c64889c9e5681c7ce55a9a2276522e8fd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import json
from Tools.Logger import logger
from Lib.Similarity.Similarity import Similarity
| 21.085714 | 66 | 0.539295 |
20493d5c70d5a62c1b2348d846154d6204b0d810 | 4,209 | py | Python | src/sequencer.py | Azure/DiskInfo | f41dfb2a4004c570b67f132c9dbf6cc53097a579 | [
"MIT"
] | 4 | 2019-10-08T18:37:21.000Z | 2020-06-01T14:09:33.000Z | src/sequencer.py | Azure/DiskInfo | f41dfb2a4004c570b67f132c9dbf6cc53097a579 | [
"MIT"
] | null | null | null | src/sequencer.py | Azure/DiskInfo | f41dfb2a4004c570b67f132c9dbf6cc53097a579 | [
"MIT"
] | 2 | 2021-01-02T15:12:42.000Z | 2021-12-03T06:18:43.000Z | """
Copyright (c) Microsoft Corporation
"""
import sys
import time
import logging
from argparse import ArgumentParser
from .constants import *
from .discovery import *
from .nvme import storeNVMeDevice
from .ata import storeATADevice
from .datahandle import outputData
REV_MAJO... | 37.580357 | 135 | 0.640057 |
204982feeb2350d700a1865a2661d1dea99858c7 | 272 | py | Python | Ekeopara_Praise/Phase 2/STRINGS/Day32 Tasks/Task8.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Ekeopara_Praise/Phase 2/STRINGS/Day32 Tasks/Task8.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Ekeopara_Praise/Phase 2/STRINGS/Day32 Tasks/Task8.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | '''8. Write a Python program to count occurrences of a substring in a string.'''
print(count_word_in_string('The quick brown fox jumps over the lazy dog that is chasing the fox.', "fox")) | 54.4 | 106 | 0.768382 |
2049a81f1692b22d6927802aa4aae5e254614b90 | 664 | py | Python | minilabs/test-hypothesis-by-simulating-statistics/m7_l1_tests/q2.py | ebaccay/inferentialthinking | 9f839c76062169b9de498c1e044f668e7517ee94 | [
"MIT"
] | 1 | 2022-02-24T20:32:17.000Z | 2022-02-24T20:32:17.000Z | minilabs/test-hypothesis-by-simulating-statistics/m7_l1_tests/q2.py | ebaccay/inferentialthinking | 9f839c76062169b9de498c1e044f668e7517ee94 | [
"MIT"
] | null | null | null | minilabs/test-hypothesis-by-simulating-statistics/m7_l1_tests/q2.py | ebaccay/inferentialthinking | 9f839c76062169b9de498c1e044f668e7517ee94 | [
"MIT"
] | 3 | 2021-03-04T06:44:47.000Z | 2021-05-05T06:00:33.000Z | test = {
"name": "q2",
"points": 1,
"hidden": True,
"suites": [
{
"cases": [
{
"code": r"""
>>> sample_population(test_results).num_rows
3000
""",
"hidden": False,
"locked": False,
},
{
"code": r"""
>>> "Test Result" in sample_population(test_results).labe... | 17.025641 | 78 | 0.460843 |
204a214617b545badaea0317c1a8410d659c58af | 3,144 | py | Python | yadage/handlers/predicate_handlers.py | vvolkl/yadage | bd34a5a1d7d06f7dd3917af2af8badd5af3f195d | [
"MIT"
] | null | null | null | yadage/handlers/predicate_handlers.py | vvolkl/yadage | bd34a5a1d7d06f7dd3917af2af8badd5af3f195d | [
"MIT"
] | null | null | null | yadage/handlers/predicate_handlers.py | vvolkl/yadage | bd34a5a1d7d06f7dd3917af2af8badd5af3f195d | [
"MIT"
] | null | null | null | import logging
import jsonpointer
import yadage.handlers.utils as utils
from yadage.handlers.expression_handlers import handlers as exprhandlers
log = logging.getLogger(__name__)
handlers, predicate = utils.handler_decorator()
def scope_done(scope, flowview):
'''
walks recursively all scopes starting at ... | 36.988235 | 116 | 0.66126 |
204a80e3dc5aa46fa4f6f7ef070b16b15e318756 | 877 | py | Python | spark/DataFormat/Parquet_Example.py | pradeep-charism/nus-mtech-workshops | 74fe1a137ee0c8efa4f53a7ade9e9203662c577f | [
"MIT"
] | null | null | null | spark/DataFormat/Parquet_Example.py | pradeep-charism/nus-mtech-workshops | 74fe1a137ee0c8efa4f53a7ade9e9203662c577f | [
"MIT"
] | null | null | null | spark/DataFormat/Parquet_Example.py | pradeep-charism/nus-mtech-workshops | 74fe1a137ee0c8efa4f53a7ade9e9203662c577f | [
"MIT"
] | null | null | null | from pyspark.sql import SparkSession
spark = SparkSession.builder.master("local").appName('ReadParquet').config("spark.driver.host", "localhost").config(
"spark.ui.port", "4040").getOrCreate()
peopleDF = spark.read.json("people.json")
# DataFrames can be saved as Parquet files, maintaining the schema information... | 38.130435 | 116 | 0.761688 |
204ae4f8d4e4ad33afe74d750b02fb1b6d933f26 | 5,832 | py | Python | async_pokepy/types/ability.py | PendragonLore/async_pokepy | 9982505fbc360eae349086bfa8f6faad0133f5fa | [
"MIT"
] | 5 | 2019-05-30T21:45:24.000Z | 2021-11-07T20:35:40.000Z | async_pokepy/types/ability.py | PendragonLore/async_pokepy | 9982505fbc360eae349086bfa8f6faad0133f5fa | [
"MIT"
] | null | null | null | async_pokepy/types/ability.py | PendragonLore/async_pokepy | 9982505fbc360eae349086bfa8f6faad0133f5fa | [
"MIT"
] | 1 | 2019-05-10T19:21:51.000Z | 2019-05-10T19:21:51.000Z | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2019 Lorenzo
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, ... | 34.305882 | 117 | 0.677812 |
204d7e55c1632816918480daf6e565802968e210 | 1,852 | py | Python | compose/metrics/client.py | galeksandrp/compose | 73f8cf9132018429783e65bde66f8f961637e418 | [
"Apache-2.0"
] | 2 | 2020-05-04T02:09:57.000Z | 2022-02-28T22:15:51.000Z | compose/metrics/client.py | galeksandrp/compose | 73f8cf9132018429783e65bde66f8f961637e418 | [
"Apache-2.0"
] | 38 | 2021-07-19T21:08:06.000Z | 2022-03-28T21:11:05.000Z | compose/metrics/client.py | galeksandrp/compose | 73f8cf9132018429783e65bde66f8f961637e418 | [
"Apache-2.0"
] | 1 | 2021-07-30T07:35:34.000Z | 2021-07-30T07:35:34.000Z | import os
from enum import Enum
import requests
from docker import ContextAPI
from docker.transport import UnixHTTPAdapter
from compose.const import IS_WINDOWS_PLATFORM
if IS_WINDOWS_PLATFORM:
from docker.transport import NpipeHTTPAdapter
if IS_WINDOWS_PLATFORM:
METRICS_SOCKET_FILE = 'npipe://\\\\.\\pipe... | 28.492308 | 94 | 0.612851 |
204e975daa460f0be111c6fc0681dc306dadfc2f | 921 | py | Python | chapter17/full_system/plot_accel_debug_pitch_and_roll.py | dannystaple/Learn-Robotics-Programming-Second-Edition | 081ed9bbab59aab57334fe8f2f06a157a8639eb4 | [
"MIT"
] | 19 | 2020-05-13T12:53:59.000Z | 2022-03-07T19:50:30.000Z | chapter17/full_system/plot_accel_debug_pitch_and_roll.py | dannystaple/Learn-Robotics-Programming-Second-Edition | 081ed9bbab59aab57334fe8f2f06a157a8639eb4 | [
"MIT"
] | 1 | 2020-11-20T16:56:24.000Z | 2020-12-01T06:24:45.000Z | chapter17/full_system/plot_accel_debug_pitch_and_roll.py | dannystaple/Learn-Robotics-Programming-Second-Edition | 081ed9bbab59aab57334fe8f2f06a157a8639eb4 | [
"MIT"
] | 12 | 2019-12-24T18:13:14.000Z | 2022-03-20T23:44:12.000Z | import vpython as vp
import logging
import time
from robot_imu import RobotImu
logging.basicConfig(level=logging.INFO)
imu = RobotImu()
pr = vp.graph(xmin=0, xmax=60, scroll=True)
graph_pitch = vp.gcurve(color=vp.color.red, graph=pr)
graph_roll = vp.gcurve(color=vp.color.green, graph=pr)
xyz = vp.graph(xmin=0, xmax... | 29.709677 | 57 | 0.724213 |
204eaeed960b5419d169a5db59cdb9bba5ac5bed | 10,440 | py | Python | sql/sql_tuning.py | bbotte/archery-sql-platfrom | 74d314832ec40c20e5656c58ce62d7cdc9731f1e | [
"Apache-2.0"
] | 2 | 2021-05-27T04:07:25.000Z | 2021-09-03T02:56:39.000Z | sql/sql_tuning.py | bbotte/archery-sql-platfrom | 74d314832ec40c20e5656c58ce62d7cdc9731f1e | [
"Apache-2.0"
] | null | null | null | sql/sql_tuning.py | bbotte/archery-sql-platfrom | 74d314832ec40c20e5656c58ce62d7cdc9731f1e | [
"Apache-2.0"
] | 1 | 2019-05-29T11:22:40.000Z | 2019-05-29T11:22:40.000Z | # -*- coding: UTF-8 -*-
import time
import simplejson as json
from MySQLdb.connections import numeric_part
from django.contrib.auth.decorators import permission_required
from django.http import HttpResponse
from common.utils.extend_json_encoder import ExtendJSONEncoder
from common.utils.const import SQLTuning
from s... | 44.050633 | 222 | 0.633908 |
204f616867cf52fd8d4b52f2ac16b848490278a9 | 902 | py | Python | LeetCode/Array and Strings/20. Valid Parentheses/solution.py | Ceruleanacg/Crack-Interview | 994dc0eee2f576fc543c90b82398dc8d957cdf09 | [
"MIT"
] | 17 | 2018-09-04T15:51:30.000Z | 2021-06-04T08:47:07.000Z | LeetCode/Array and Strings/20. Valid Parentheses/solution.py | Ceruleanacg/Crack-Interview | 994dc0eee2f576fc543c90b82398dc8d957cdf09 | [
"MIT"
] | null | null | null | LeetCode/Array and Strings/20. Valid Parentheses/solution.py | Ceruleanacg/Crack-Interview | 994dc0eee2f576fc543c90b82398dc8d957cdf09 | [
"MIT"
] | 6 | 2018-11-03T09:36:25.000Z | 2020-05-27T17:51:08.000Z |
print(Solution().isValid('()')) | 23.736842 | 57 | 0.301552 |
204fa04e0bd4b4812ebc2b27bc0f4a54565743d0 | 2,230 | py | Python | problems/g1_single/Alpha.py | cprudhom/pycsp3 | 980927188f4262c9ea48a6534795712f09d731d6 | [
"MIT"
] | 28 | 2019-12-14T09:25:52.000Z | 2022-03-24T08:15:13.000Z | problems/g1_single/Alpha.py | cprudhom/pycsp3 | 980927188f4262c9ea48a6534795712f09d731d6 | [
"MIT"
] | 7 | 2020-04-15T11:02:07.000Z | 2022-01-20T12:48:54.000Z | problems/g1_single/Alpha.py | cprudhom/pycsp3 | 980927188f4262c9ea48a6534795712f09d731d6 | [
"MIT"
] | 3 | 2020-04-15T08:23:45.000Z | 2021-12-07T14:02:28.000Z | """
Well-known crypto-arithmetic puzzle of unknown origin (e.g., a model is present in Gecode)
Examples of Execution:
python3 Alpha.py
python3 Alpha.py -variant=var
"""
from pycsp3 import *
if not variant():
# x[i] is the value for the ith letter of the alphabet
x = VarArray(size=26, dom=range(1, 27))
... | 29.342105 | 128 | 0.433632 |
204fe53dee63a8492d4a3b958826dede8b213446 | 3,030 | py | Python | 2020/day_16/day_16.py | viddrobnic/adventofcode | 8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82 | [
"MIT"
] | null | null | null | 2020/day_16/day_16.py | viddrobnic/adventofcode | 8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82 | [
"MIT"
] | null | null | null | 2020/day_16/day_16.py | viddrobnic/adventofcode | 8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82 | [
"MIT"
] | 1 | 2020-12-01T16:49:12.000Z | 2020-12-01T16:49:12.000Z |
if __name__ == '__main__':
main()
| 28.584906 | 111 | 0.488119 |
2050374ed4f6e4f4a494cbe77f255d8b721e42b6 | 3,717 | py | Python | confdgnmi/tests/test_client_server_api.py | micnovak/ConfD-Demos | 479499e7c5339ae77b611e17196e7516d1f1a1ce | [
"Apache-2.0"
] | 11 | 2019-12-07T20:15:57.000Z | 2022-02-04T18:12:52.000Z | confdgnmi/tests/test_client_server_api.py | micnovak/ConfD-Demos | 479499e7c5339ae77b611e17196e7516d1f1a1ce | [
"Apache-2.0"
] | 2 | 2020-03-01T11:04:16.000Z | 2021-02-03T14:17:23.000Z | confdgnmi/tests/test_client_server_api.py | micnovak/ConfD-Demos | 479499e7c5339ae77b611e17196e7516d1f1a1ce | [
"Apache-2.0"
] | 6 | 2019-10-18T15:26:03.000Z | 2021-01-13T10:28:30.000Z | import socket
import threading
from time import sleep
import pytest
import gnmi_pb2
from client_server_test_base import GrpcBase
from confd_gnmi_api_adapter import GnmiConfDApiServerAdapter
from confd_gnmi_common import make_gnmi_path, make_xpath_path
from confd_gnmi_server import AdapterType
from route_status import... | 34.738318 | 76 | 0.59618 |
2050ad7391c8cda60dda86f9cfecd9f21d5079fa | 3,486 | py | Python | Final_Version/FingerFinder.py | jaronoff97/mirrorpi | cf1a6d103648164f2ae154ca0bdb795a70944df9 | [
"MIT"
] | null | null | null | Final_Version/FingerFinder.py | jaronoff97/mirrorpi | cf1a6d103648164f2ae154ca0bdb795a70944df9 | [
"MIT"
] | null | null | null | Final_Version/FingerFinder.py | jaronoff97/mirrorpi | cf1a6d103648164f2ae154ca0bdb795a70944df9 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import math
| 41.5 | 75 | 0.55938 |
2052abf9b427d7f9d0208d82b5b74f383c928ce5 | 455 | py | Python | inventory/admin.py | Riphiphip/website | dc5bf64f24d5cf78661686af0281705f4d1d2576 | [
"MIT"
] | null | null | null | inventory/admin.py | Riphiphip/website | dc5bf64f24d5cf78661686af0281705f4d1d2576 | [
"MIT"
] | null | null | null | inventory/admin.py | Riphiphip/website | dc5bf64f24d5cf78661686af0281705f4d1d2576 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Item
| 18.958333 | 34 | 0.382418 |
2052dd57ee1a745e8bb3313bc85494e39874dcfb | 8,950 | py | Python | HubblePi/Toolbox.py | scriptorron/hubblepi | 402af74b537a40d0764b11d105aa8d3b0dd242f3 | [
"MIT"
] | null | null | null | HubblePi/Toolbox.py | scriptorron/hubblepi | 402af74b537a40d0764b11d105aa8d3b0dd242f3 | [
"MIT"
] | null | null | null | HubblePi/Toolbox.py | scriptorron/hubblepi | 402af74b537a40d0764b11d105aa8d3b0dd242f3 | [
"MIT"
] | null | null | null | import numpy as np
import json
import colour_demosaicing
def LoadRaw(FN):
"""
DEPRECATED!
load and unpack RAW image
:params FN: file name
"""
data = np.load(FN)
shape = data.shape
if shape == (1944, 3240):
CameraType = 1
elif shape == (2464, 4100):
CameraType = 2
... | 37.291667 | 87 | 0.540894 |
2053346c5cba5096c9f7d2677dff0f68577970a3 | 4,487 | py | Python | src/backend/autoencoder_evaluate.py | framtale/image-retrieval | 1e40def038e908545e3ec1a2dab75132a49bb005 | [
"MIT"
] | null | null | null | src/backend/autoencoder_evaluate.py | framtale/image-retrieval | 1e40def038e908545e3ec1a2dab75132a49bb005 | [
"MIT"
] | 1 | 2021-06-07T13:29:20.000Z | 2021-06-26T13:56:41.000Z | src/backend/autoencoder_evaluate.py | framtale/image-retrieval | 1e40def038e908545e3ec1a2dab75132a49bb005 | [
"MIT"
] | null | null | null | from numpy.core.defchararray import array
from tensorflow.keras.models import Model
from tensorflow.keras.models import load_model
from tensorflow.keras.datasets import mnist
from PIL import Image
from tqdm import tqdm
import matplotlib.pyplot as plt
import statistics
import numpy as np
import pickle
import cv2
import ... | 34.515385 | 75 | 0.751504 |
2053cab2dbdb69606035ee74c6e1b50faa72a65b | 14,806 | py | Python | a4plot/python/rooplot/stacks/stacks.py | a4/a4 | e1de89260cb3894908f1d01dfacea125abc79da9 | [
"BSL-1.0"
] | 4 | 2015-04-07T20:25:16.000Z | 2019-04-27T15:04:02.000Z | a4plot/python/rooplot/stacks/stacks.py | a4/a4 | e1de89260cb3894908f1d01dfacea125abc79da9 | [
"BSL-1.0"
] | null | null | null | a4plot/python/rooplot/stacks/stacks.py | a4/a4 | e1de89260cb3894908f1d01dfacea125abc79da9 | [
"BSL-1.0"
] | 1 | 2021-06-02T17:22:35.000Z | 2021-06-02T17:22:35.000Z | from ROOT import gROOT, gStyle, Double
from ROOT import TLegend, TLatex, TCanvas, THStack, TLine, TBox
from ROOT import kYellow, kBlack, kWhite, kRed, kWhite, kOrange
import os
import random
from colors import set_color_1D, set_color_2D, set_data_style, set_MCTotal_style, set_signal_style_1D
tsize = 0.06
tyoffset = ... | 33.881007 | 199 | 0.575645 |
2055ee4a9a03ad626c921954cbaa065f64b89465 | 32,421 | py | Python | test/pldi19/run_all.py | tjknoth/resyn | 54ff304c635f26b4b498b82be267923a65e0662d | [
"MIT"
] | 19 | 2020-04-20T02:45:21.000Z | 2021-12-12T22:04:31.000Z | test/pldi19/run_all.py | yunjeong-lee/resyn | 54ff304c635f26b4b498b82be267923a65e0662d | [
"MIT"
] | 1 | 2020-11-19T18:31:42.000Z | 2020-12-09T10:32:57.000Z | test/pldi19/run_all.py | yunjeong-lee/resyn | 54ff304c635f26b4b498b82be267923a65e0662d | [
"MIT"
] | 4 | 2020-06-01T05:43:15.000Z | 2021-02-19T04:04:49.000Z | #!/usr/bin/python3
import sys
import os, os.path
import platform
import shutil
import time
import re
import difflib
import pickle
from subprocess import run, PIPE
from colorama import init, Fore, Back, Style
from statistics import median
# Globals
if platform.system() in ['Linux', 'Darwin']:
SYNQUID_CMD = ['stack'... | 50.816614 | 185 | 0.555072 |
2055fa63f57d0f09cffaf4a00ba26911a5d36c1b | 977 | py | Python | plantcv/plantcv/hist_equalization.py | Howzit123/plantcv | b4ff6ad765da36353f40827ce3816b33d1d3596a | [
"MIT"
] | 2 | 2021-08-20T14:56:48.000Z | 2021-08-24T23:12:56.000Z | plantcv/plantcv/hist_equalization.py | Howzit123/plantcv | b4ff6ad765da36353f40827ce3816b33d1d3596a | [
"MIT"
] | null | null | null | plantcv/plantcv/hist_equalization.py | Howzit123/plantcv | b4ff6ad765da36353f40827ce3816b33d1d3596a | [
"MIT"
] | 1 | 2020-02-27T21:22:13.000Z | 2020-02-27T21:22:13.000Z | # Histogram equalization
import cv2
import numpy as np
import os
from plantcv.plantcv import print_image
from plantcv.plantcv import plot_image
from plantcv.plantcv import fatal_error
from plantcv.plantcv import params
def hist_equalization(gray_img):
"""Histogram equalization is a method to normalize the distri... | 26.405405 | 113 | 0.711361 |
2057865edd4337026cdfafcc62a8e73e95d64e8e | 274 | py | Python | ehub/conftest.py | teofiln/ehub | 8412ac878f80bfbba2d4b2b44d895cfa07c44319 | [
"MIT"
] | null | null | null | ehub/conftest.py | teofiln/ehub | 8412ac878f80bfbba2d4b2b44d895cfa07c44319 | [
"MIT"
] | null | null | null | ehub/conftest.py | teofiln/ehub | 8412ac878f80bfbba2d4b2b44d895cfa07c44319 | [
"MIT"
] | null | null | null | import pytest
from ehub.users.models import User
from ehub.users.tests.factories import UserFactory
| 18.266667 | 50 | 0.770073 |
2058cf52b519e3fe86186af663b8941208fe3b37 | 1,448 | py | Python | Sort/Merge.py | sywh/algorithms | 8df353aa6716f2ed83e9167a27ceb6d3384891da | [
"MIT"
] | null | null | null | Sort/Merge.py | sywh/algorithms | 8df353aa6716f2ed83e9167a27ceb6d3384891da | [
"MIT"
] | null | null | null | Sort/Merge.py | sywh/algorithms | 8df353aa6716f2ed83e9167a27ceb6d3384891da | [
"MIT"
] | null | null | null | from Sort.Example import Example
| 25.403509 | 75 | 0.410912 |
205949db776405b8c267e6e455da30481aae2d57 | 916 | py | Python | crowdsourcing/permissions/user.py | Kyeongan/crowdsource-platform | af34363158ff30ebfdade4a543648bf26a3c9698 | [
"MIT"
] | 138 | 2015-04-17T20:07:12.000Z | 2017-05-03T17:58:47.000Z | crowdsourcing/permissions/user.py | cescgie/crowdi | c16ab625f27915919e21f7eec93c45af551d9022 | [
"MIT"
] | 657 | 2015-04-19T04:54:51.000Z | 2017-06-26T18:07:42.000Z | crowdsourcing/permissions/user.py | cescgie/crowdi | c16ab625f27915919e21f7eec93c45af551d9022 | [
"MIT"
] | 311 | 2015-04-16T19:20:55.000Z | 2017-06-13T05:32:01.000Z | from rest_framework import permissions
from csp import settings
from rest_framework.exceptions import PermissionDenied
| 39.826087 | 107 | 0.689956 |
205a30215e693e91361fba6a10043eebc790a8b7 | 278 | py | Python | web/setup.py | ISTU-Labs/pt-2271-2018 | 4b35f9265420604a6c0d83e5af83936674448185 | [
"Apache-2.0"
] | null | null | null | web/setup.py | ISTU-Labs/pt-2271-2018 | 4b35f9265420604a6c0d83e5af83936674448185 | [
"Apache-2.0"
] | null | null | null | web/setup.py | ISTU-Labs/pt-2271-2018 | 4b35f9265420604a6c0d83e5af83936674448185 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
requires = [
'pyramid',
'waitress',
'python-dateutil'
]
setup(name='hello',
install_requires=requires,
package_dir={'': "hello"},
entry_points="""\
[paste.app_factory]
main = hello:main
""",
)
| 16.352941 | 32 | 0.564748 |
64458d6c26d3a77fed375b45eb8d7b157c476d26 | 1,025 | py | Python | main.py | trollerfreak331/pornhub-pluenderer | ff4260cfbe78fa36d8cd9ab8edd571fbb292e708 | [
"MIT"
] | 12 | 2018-04-12T06:54:20.000Z | 2021-10-03T10:41:38.000Z | main.py | trollerfreak331/pornhub-pluenderer | ff4260cfbe78fa36d8cd9ab8edd571fbb292e708 | [
"MIT"
] | 3 | 2017-12-01T11:47:01.000Z | 2017-12-01T15:02:53.000Z | main.py | trollerfreak331/pornhub-pluenderer | ff4260cfbe78fa36d8cd9ab8edd571fbb292e708 | [
"MIT"
] | 5 | 2018-04-14T04:02:11.000Z | 2019-12-22T07:52:50.000Z | import sys
import signal
from clint.textui import colored, puts
from downloader import Downloader
from extractor import Extractor
signal.signal(signal.SIGINT, lambda x, y: sys.exit(0))
if __name__ == "__main__":
main()
| 28.472222 | 82 | 0.675122 |
6446415ff2008281daa42e848a48f3cd5ca8c4ae | 6,259 | py | Python | dankbindings.py | actualdankcoder/erindashboard | 5c1e6e99e0280899b9150d0079e2dafc4d9b3818 | [
"MIT"
] | 1 | 2021-07-10T22:22:48.000Z | 2021-07-10T22:22:48.000Z | dankbindings.py | actualdankcoder/erindashboard | 5c1e6e99e0280899b9150d0079e2dafc4d9b3818 | [
"MIT"
] | 3 | 2021-07-10T05:08:51.000Z | 2021-07-13T01:24:48.000Z | dankbindings.py | actualdankcoder/erindashboard | 5c1e6e99e0280899b9150d0079e2dafc4d9b3818 | [
"MIT"
] | null | null | null | from cryptography.fernet import Fernet
import os
import discord
import aiohttp
import secrets
from urllib.parse import quote
from dotenv import load_dotenv
load_dotenv()
# Abstract Classes | 33.470588 | 108 | 0.596741 |
6447533b56e44b1bd8d4cefebf7b0330a82c8a36 | 17,428 | py | Python | scripts/search/agr_mapping.py | dougli1sqrd/SGDBackend-Nex2 | 2ecb2436db142cf08c6f2dbab6b115a394116632 | [
"MIT"
] | 5 | 2015-11-24T23:09:46.000Z | 2019-11-06T17:48:13.000Z | scripts/search/agr_mapping.py | dougli1sqrd/SGDBackend-Nex2 | 2ecb2436db142cf08c6f2dbab6b115a394116632 | [
"MIT"
] | 188 | 2017-08-28T22:39:03.000Z | 2022-03-02T14:53:46.000Z | scripts/search/agr_mapping.py | dougli1sqrd/SGDBackend-Nex2 | 2ecb2436db142cf08c6f2dbab6b115a394116632 | [
"MIT"
] | 7 | 2018-05-13T01:58:07.000Z | 2021-06-25T19:08:33.000Z | mapping = {
"settings": {
"index": {
"max_result_window": 15000,
"analysis": {
"analyzer": {
"default": {
"type": "custom",
"tokenizer": "whitespace",
"filter": ["english_s... | 34.105675 | 75 | 0.204441 |
6447640aa52e97e82796d679333b4a3d179ae7bb | 24,311 | py | Python | ryu/ryu/app/Ryuretic/Ryuretic_Intf_v6.py | Ryuretic/RAP | 7b0e58af7d8a932770e3c7f7620024e16992b531 | [
"Apache-2.0"
] | 2 | 2019-09-16T17:52:31.000Z | 2021-06-24T17:45:01.000Z | ryu/ryu/app/Ryuretic/Ryuretic_Intf_v6.py | Ryuretic/RAP | 7b0e58af7d8a932770e3c7f7620024e16992b531 | [
"Apache-2.0"
] | null | null | null | ryu/ryu/app/Ryuretic/Ryuretic_Intf_v6.py | Ryuretic/RAP | 7b0e58af7d8a932770e3c7f7620024e16992b531 | [
"Apache-2.0"
] | 3 | 2019-09-23T07:21:40.000Z | 2021-03-03T13:24:25.000Z | #########################################################################
# Ryuretic: A Modular Framework for RYU #
# !/ryu/ryu/app/Ryuretic/Ryuretic_Intf.py #
# Authors: #
# Jacob Cox (jcox70@gatech.edu) ... | 37.003044 | 87 | 0.569948 |
644785cc2aa6d52bbb0267c2b681bfd059e3009d | 715 | py | Python | pyPQN/SoftmaxLoss2.py | steveli/mogp | d142e7b9e5b7dbc67cfae4760c837cafd9691a51 | [
"MIT"
] | 7 | 2019-07-18T19:55:26.000Z | 2022-02-14T13:55:04.000Z | pyPQN/SoftmaxLoss2.py | mlds-lab/mogp | d142e7b9e5b7dbc67cfae4760c837cafd9691a51 | [
"MIT"
] | null | null | null | pyPQN/SoftmaxLoss2.py | mlds-lab/mogp | d142e7b9e5b7dbc67cfae4760c837cafd9691a51 | [
"MIT"
] | 2 | 2020-07-08T06:14:23.000Z | 2022-02-16T17:55:22.000Z | from __future__ import division
import numpy as np
| 25.535714 | 72 | 0.524476 |
644786691ef180005030e8c01b1e2a7613ecc55a | 3,260 | py | Python | syfertext/string_store.py | socd06/SyferText | b68f8faffb0995945676b68a37b7c3b5e0b45833 | [
"Apache-2.0"
] | null | null | null | syfertext/string_store.py | socd06/SyferText | b68f8faffb0995945676b68a37b7c3b5e0b45833 | [
"Apache-2.0"
] | 1 | 2020-09-12T11:05:51.000Z | 2020-09-12T11:05:51.000Z | syfertext/string_store.py | socd06/SyferText | b68f8faffb0995945676b68a37b7c3b5e0b45833 | [
"Apache-2.0"
] | null | null | null | from .utils import hash_string
from typing import Union
| 31.346154 | 104 | 0.593252 |
6448431393bf85bea3e0e21bbe767d47530277f5 | 5,271 | py | Python | notebooks/utils.py | wranda12/06-machine-learning | b8dc391b2599cfa5d2b1fef092ccd9eb2d27db39 | [
"MIT"
] | 1 | 2020-10-19T07:47:35.000Z | 2020-10-19T07:47:35.000Z | notebooks/utils.py | wranda12/06-machine-learning | b8dc391b2599cfa5d2b1fef092ccd9eb2d27db39 | [
"MIT"
] | 1 | 2020-11-20T04:20:04.000Z | 2020-11-20T04:20:04.000Z | notebooks/utils.py | wranda12/06-machine-learning | b8dc391b2599cfa5d2b1fef092ccd9eb2d27db39 | [
"MIT"
] | 11 | 2018-10-16T01:36:12.000Z | 2019-01-18T01:59:27.000Z |
#
# Some functions to be used in the tutorial
#
# Developed by Debora Cristina Correa
import datetime
import pandas as pd
import matplotlib.pyplot as plt # for 2D plotting
import numpy as np
import seaborn as sns # plot nicely =)
from sklearn.base import clone
from sklearn.decomposition import PCA
from sklearn.mode... | 33.150943 | 118 | 0.632138 |
64487297478b72747418471787c1d20d2191f34f | 510 | py | Python | vpn-proxy/app/migrations/0005_tunnel_protocol.py | dimrozakis/priv-net | 3eadea10c3b437ea82d8233579b31f60eaac51b1 | [
"Apache-2.0"
] | null | null | null | vpn-proxy/app/migrations/0005_tunnel_protocol.py | dimrozakis/priv-net | 3eadea10c3b437ea82d8233579b31f60eaac51b1 | [
"Apache-2.0"
] | null | null | null | vpn-proxy/app/migrations/0005_tunnel_protocol.py | dimrozakis/priv-net | 3eadea10c3b437ea82d8233579b31f60eaac51b1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-01 13:16
from __future__ import unicode_literals
from django.db import migrations, models
| 24.285714 | 106 | 0.605882 |
644a45eb3ac38fe9ed2fc02d1dd3853ea5184b50 | 714 | py | Python | t/config_test.py | jrmsdev/rosshm | 8f40dff89729351e4cc3485124b352e44fd88cd1 | [
"BSD-3-Clause"
] | null | null | null | t/config_test.py | jrmsdev/rosshm | 8f40dff89729351e4cc3485124b352e44fd88cd1 | [
"BSD-3-Clause"
] | null | null | null | t/config_test.py | jrmsdev/rosshm | 8f40dff89729351e4cc3485124b352e44fd88cd1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Jeremas Casteglione <jrmsdev@gmail.com>
# See LICENSE file.
from os import path
| 28.56 | 56 | 0.694678 |
644a513a8c3131883ee5ba1364e79e6383f94060 | 6,791 | py | Python | venv/lib/python3.8/site-packages/IPython/testing/decorators.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 2 | 2022-02-26T11:19:40.000Z | 2022-03-28T08:23:25.000Z | venv/lib/python3.8/site-packages/IPython/testing/decorators.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/IPython/testing/decorators.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 1 | 2022-03-28T09:19:34.000Z | 2022-03-28T09:19:34.000Z | # -*- coding: utf-8 -*-
"""Decorators for labeling test objects.
Decorators that merely return a modified version of the original function
object are straightforward. Decorators that return a new function object need
to use nose.tools.make_decorator(original_function)(decorator) in returning the
decorator, in order t... | 33.453202 | 91 | 0.673686 |
644a804c2e809b51b62ab072cf234ac96a1d9a07 | 1,095 | py | Python | code/_pth0_only/parameters_compute.py | uq-aibe/spir-oz | 4ae3ff6f230679f21b9c4072529df94187f9e098 | [
"MIT"
] | null | null | null | code/_pth0_only/parameters_compute.py | uq-aibe/spir-oz | 4ae3ff6f230679f21b9c4072529df94187f9e098 | [
"MIT"
] | null | null | null | code/_pth0_only/parameters_compute.py | uq-aibe/spir-oz | 4ae3ff6f230679f21b9c4072529df94187f9e098 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import numpy as np
from parameters import *
from fcn_economic import *
# ================================================================
# Computational parameters
# Ranges for state variables
kap_L = 0.1
kap_U = 10
# Ranges for policy variables
lab_L = 0.1
lab_U = 2
vec_kap_L = kap_L * ones(n... | 26.707317 | 73 | 0.591781 |