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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13cde4f4ec9916ff8a799bc071fde32fd8bf29b3 | 2,461 | py | Python | plotter.py | StrangeTcy/pathnet-pytorch | 58c8088b992ad2f36b843186d93edc872d547c7b | [
"BSD-3-Clause"
] | 86 | 2017-04-05T13:03:13.000Z | 2022-03-28T12:38:48.000Z | plotter.py | StrangeTcy/pathnet-pytorch | 58c8088b992ad2f36b843186d93edc872d547c7b | [
"BSD-3-Clause"
] | 7 | 2017-04-30T20:59:46.000Z | 2019-02-09T10:56:40.000Z | plotter.py | StrangeTcy/pathnet-pytorch | 58c8088b992ad2f36b843186d93edc872d547c7b | [
"BSD-3-Clause"
] | 21 | 2017-04-05T23:42:39.000Z | 2021-11-17T21:17:22.000Z | import argparse
import os
import pickle
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')
parser = argparse.ArgumentParser(description='PyTorch MNIST Example')
parser.add_argument('--mnist', action='store_true', default=False,
help='open mnist result')
args = parser.parse_a... | 28.952941 | 95 | 0.603007 |
13ce074cf333bc82bde9c49d1dbfefb77ad96d57 | 715 | py | Python | kindler/solver/optimizer.py | mingruimingrui/kindler | 8a9c2278b607a167b0ce827b218e54949a1120e7 | [
"MIT"
] | null | null | null | kindler/solver/optimizer.py | mingruimingrui/kindler | 8a9c2278b607a167b0ce827b218e54949a1120e7 | [
"MIT"
] | null | null | null | kindler/solver/optimizer.py | mingruimingrui/kindler | 8a9c2278b607a167b0ce827b218e54949a1120e7 | [
"MIT"
] | null | null | null | import torch
| 22.34375 | 67 | 0.601399 |
13ce147cc376d9100195efcbf75606622c35be95 | 2,805 | py | Python | platypus/tests/test_operators.py | sctiwari/EZFF_ASE | 94710d4cf778ff2db5e6df0cd6d10d92e1b98afe | [
"MIT"
] | 2 | 2021-05-10T16:28:50.000Z | 2021-12-15T04:03:34.000Z | platypus/tests/test_operators.py | sctiwari/EZFF_ASE | 94710d4cf778ff2db5e6df0cd6d10d92e1b98afe | [
"MIT"
] | null | null | null | platypus/tests/test_operators.py | sctiwari/EZFF_ASE | 94710d4cf778ff2db5e6df0cd6d10d92e1b98afe | [
"MIT"
] | null | null | null | # Copyright 2015-2018 David Hadka
#
# This file is part of Platypus, a Python module for designing and using
# evolutionary algorithms (EAs) and multiobjective evolutionary algorithms
# (MOEAs).
#
# Platypus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... | 35.961538 | 74 | 0.636364 |
13cea3eb1b8257abf1a1958d34086a311a9082d4 | 6,241 | py | Python | fusion_net/bilinear_sampler.py | ClovisChen/LearningCNN | cd9102a3d71f602024558d818039f5b759c92fa5 | [
"Apache-2.0"
] | null | null | null | fusion_net/bilinear_sampler.py | ClovisChen/LearningCNN | cd9102a3d71f602024558d818039f5b759c92fa5 | [
"Apache-2.0"
] | null | null | null | fusion_net/bilinear_sampler.py | ClovisChen/LearningCNN | cd9102a3d71f602024558d818039f5b759c92fa5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-are not covered by the UCLB ACP-A Licence,
from __future__ import absolute_import, division, print_function
import tensorflow as tf
def bilinear_sampler_1d_h(input_images, x_offset, wrap_mode='border', name='bilinear_sampler', **kwargs):
'''
: x_offset--X
: x,... | 41.331126 | 155 | 0.497196 |
13cebdf8d097569317951da787d81aebd898d39b | 7,125 | py | Python | Supernovae.py | adamamiller/iptf16hvw-1 | d674114e94b5b20398d2e4208b55eb8e2394dce9 | [
"MIT"
] | null | null | null | Supernovae.py | adamamiller/iptf16hvw-1 | d674114e94b5b20398d2e4208b55eb8e2394dce9 | [
"MIT"
] | null | null | null | Supernovae.py | adamamiller/iptf16hvw-1 | d674114e94b5b20398d2e4208b55eb8e2394dce9 | [
"MIT"
] | 1 | 2018-08-21T15:17:48.000Z | 2018-08-21T15:17:48.000Z | #import relevant libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from astropy.io import ascii
import json
from IPython.display import display, Image
from specutils import Spectrum1D
from astropy import units
from scipy.optimize import curve_fit
from scipy.interpolate import interp1d
imp... | 28.27381 | 108 | 0.629474 |
13cfe935b3ae2ffb5842e273c8ff7ca4cd002f6d | 2,753 | py | Python | userbot/plugins/alive.py | iraqis1/irqis | d95303c48b5f15dbe814454a48d847e838793713 | [
"MIT"
] | null | null | null | userbot/plugins/alive.py | iraqis1/irqis | d95303c48b5f15dbe814454a48d847e838793713 | [
"MIT"
] | null | null | null | userbot/plugins/alive.py | iraqis1/irqis | d95303c48b5f15dbe814454a48d847e838793713 | [
"MIT"
] | null | null | null | """Check if userbot alive. If you change these, you become the gayest gay such that even the gay world will disown you."""
import asyncio
from telethon import events
from telethon.tl.types import ChannelParticipantsAdmins
from platform import uname
from userbot import ALIVE_NAME
from userbot.utils import admin_cm... | 26.219048 | 123 | 0.521976 |
13d20c58618bae1fd9184241e64ff9b913dd727d | 9,313 | py | Python | connector/ADBConnector.py | qiutongxue/ArknightsAutoHelper | 6b97b289e9ea4e5e3f39561ef8c2217657f6ff60 | [
"MIT"
] | 1 | 2020-12-16T06:19:02.000Z | 2020-12-16T06:19:02.000Z | connector/ADBConnector.py | qiutongxue/ArknightsAutoHelper | 6b97b289e9ea4e5e3f39561ef8c2217657f6ff60 | [
"MIT"
] | null | null | null | connector/ADBConnector.py | qiutongxue/ArknightsAutoHelper | 6b97b289e9ea4e5e3f39561ef8c2217657f6ff60 | [
"MIT"
] | null | null | null | import os
import logging.config
from random import randint
import zlib
import struct
import socket
import time
from PIL import Image
import config
# from config import ADB_ROOT, ADB_HOST, SCREEN_SHOOT_SAVE_PATH, ShellColor, CONFIG_PATH,enable_adb_host_auto_detect, ADB_SERVER
from .ADBClientSession import ADBClientSes... | 36.521569 | 163 | 0.57962 |
13d25057738843cced8f3d82852dabf41375fb9a | 754 | py | Python | redshift_upload/base_utilities.py | douglassimonsen/redshift_upload | e549c770538f022c0b90a983ca056f3e9c16c643 | [
"MIT"
] | null | null | null | redshift_upload/base_utilities.py | douglassimonsen/redshift_upload | e549c770538f022c0b90a983ca056f3e9c16c643 | [
"MIT"
] | 1 | 2022-03-12T03:50:55.000Z | 2022-03-12T03:50:55.000Z | redshift_upload/base_utilities.py | douglassimonsen/redshift_upload | e549c770538f022c0b90a983ca056f3e9c16c643 | [
"MIT"
] | null | null | null | import inspect
import os
from pathlib import Path
| 30.16 | 98 | 0.624668 |
13d2e35293cf4b36df0d8aa584ec383e80a8a174 | 263 | py | Python | main.py | Gloriel621/MgallManager | 7d5c02ab6bdc2f6c6922d4a7e021faef33d868bb | [
"MIT"
] | 9 | 2021-12-22T11:37:23.000Z | 2022-03-09T02:25:35.000Z | main.py | Gloriel621/MgallManager | 7d5c02ab6bdc2f6c6922d4a7e021faef33d868bb | [
"MIT"
] | 4 | 2021-12-16T14:26:01.000Z | 2022-02-16T02:05:41.000Z | main.py | Gloriel621/MgallManager | 7d5c02ab6bdc2f6c6922d4a7e021faef33d868bb | [
"MIT"
] | 1 | 2021-12-22T12:59:57.000Z | 2021-12-22T12:59:57.000Z | import sys
from PyQt5.QtWidgets import QApplication
from gui import MgallManager
if __name__ == "__main__":
main()
| 16.4375 | 43 | 0.69962 |
13d3859368c4908cf2a507d1bd62d989795acc1a | 54,009 | py | Python | pysc2/lib/actions.py | javierrcc522/starcraft2_api_machineLear | 5833ba1344ab5445c4f09fafc33e6058070ebe6c | [
"Apache-2.0"
] | 2 | 2020-04-30T09:07:25.000Z | 2021-03-21T22:58:22.000Z | pysc2/lib/actions.py | javierrcc522/starcraft2_api_machineLear | 5833ba1344ab5445c4f09fafc33e6058070ebe6c | [
"Apache-2.0"
] | null | null | null | pysc2/lib/actions.py | javierrcc522/starcraft2_api_machineLear | 5833ba1344ab5445c4f09fafc33e6058070ebe6c | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc. 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 ... | 57.825482 | 100 | 0.750745 |
13d4be5ff6607a768ff6f008bc6f55355c95eab1 | 3,209 | py | Python | pywick/meters/aucmeter.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | 2 | 2020-11-28T07:56:09.000Z | 2021-11-08T09:30:39.000Z | pywick/meters/aucmeter.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | pywick/meters/aucmeter.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | import numbers
from . import meter
import numpy as np
import torch
| 38.662651 | 91 | 0.606108 |
13d5b4c27424ce3f3958c70f0a0828815649d42f | 2,971 | py | Python | homeassistant/components/zha/core/channels/lighting.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/zha/core/channels/lighting.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/zha/core/channels/lighting.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Lighting channels module for Zigbee Home Automation."""
from __future__ import annotations
from contextlib import suppress
from zigpy.zcl.clusters import lighting
from .. import registries
from ..const import REPORT_CONFIG_DEFAULT
from .base import ClientChannel, ZigbeeChannel
| 33.382022 | 76 | 0.693369 |
13d60376951a923005fa671870c17c7889bfb96b | 6,140 | py | Python | pf/queue.py | PiRAT4/py-pf | 7ffdd0a283d4a36fc4c473433d5f79a84eeb5d31 | [
"BSD-3-Clause"
] | null | null | null | pf/queue.py | PiRAT4/py-pf | 7ffdd0a283d4a36fc4c473433d5f79a84eeb5d31 | [
"BSD-3-Clause"
] | null | null | null | pf/queue.py | PiRAT4/py-pf | 7ffdd0a283d4a36fc4c473433d5f79a84eeb5d31 | [
"BSD-3-Clause"
] | null | null | null | """Classes to represent Packet Filter's queueing schedulers and statistics."""
import pf._struct
from pf._base import PFObject
from pf.constants import *
from pf._utils import rate2str
__all__ = ["ServiceCurve",
"FlowQueue",
"PFQueue",
"PFQueueStats"]
| 29.95122 | 79 | 0.548534 |
13d646c36a3c1b8a275d4d104aa95c23081163a3 | 2,378 | py | Python | sdk/python/pulumi_azure_native/labservices/v20181015/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/labservices/v20181015/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/labservices/v20181015/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from ._enums import *
from .environment import *
from .environment_setting import *
from .gallery_image imp... | 38.983607 | 102 | 0.710681 |
13d760267b20f874fc4b087de72759e81f401445 | 6,123 | py | Python | servicedirectory/src/sd-api/users/tests/tests_serializers.py | ealogar/servicedirectory | fb4f4bfa8b499b93c03af589ef2f34c08a830b17 | [
"Apache-2.0"
] | null | null | null | servicedirectory/src/sd-api/users/tests/tests_serializers.py | ealogar/servicedirectory | fb4f4bfa8b499b93c03af589ef2f34c08a830b17 | [
"Apache-2.0"
] | null | null | null | servicedirectory/src/sd-api/users/tests/tests_serializers.py | ealogar/servicedirectory | fb4f4bfa8b499b93c03af589ef2f34c08a830b17 | [
"Apache-2.0"
] | null | null | null | '''
(c) Copyright 2013 Telefonica, I+D. Printed in Spain (Europe). All Rights
Reserved.
The copyright to the software program(s) is property of Telefonica I+D.
The program(s) may be used and or copied only with the express written
consent of Telefonica I+D or in accordance with the terms and conditions
stipulated in t... | 52.784483 | 114 | 0.6634 |
13d7896d6d799cba6c0e766504d5f3eea5f2e531 | 3,124 | py | Python | Web/notifyXAPI/app/src/users/views.py | abs0lut3pwn4g3/RootersCTF2019-challenges | 397a6fad0b03e55541df06e5103172ae850cd4e5 | [
"MIT"
] | 14 | 2019-10-13T07:38:04.000Z | 2022-02-13T09:03:50.000Z | Web/notifyXAPI/app/src/users/views.py | abs0lut3pwn4g3/RootersCTF2019-challenges | 397a6fad0b03e55541df06e5103172ae850cd4e5 | [
"MIT"
] | 1 | 2019-10-13T07:35:13.000Z | 2019-10-13T08:22:48.000Z | Web/notifyXAPI/app/src/users/views.py | abs0lut3pwn4g3/RootersCTF2019-challenges | 397a6fad0b03e55541df06e5103172ae850cd4e5 | [
"MIT"
] | 4 | 2019-10-13T08:21:43.000Z | 2022-01-09T16:39:33.000Z | ''' User views '''
from datetime import timedelta
from flask import request, jsonify, make_response, redirect, json, render_template
from flask_jwt_extended import (create_access_token, jwt_required)
from flask_restful import Resource
from flask_login import login_user, current_user
from sqlalchemy.exc import Integrit... | 40.571429 | 124 | 0.588348 |
13d7ee99520201ddee21c6a144be012df62e596b | 14,211 | py | Python | querybuilder/tests/window_tests.py | wesokes/django-query-builder | 3cc53d33ee0a4ada515635e4be631167a774b457 | [
"MIT"
] | 110 | 2015-01-28T17:38:38.000Z | 2022-02-17T02:51:55.000Z | querybuilder/tests/window_tests.py | wesokes/django-query-builder | 3cc53d33ee0a4ada515635e4be631167a774b457 | [
"MIT"
] | 31 | 2015-02-17T19:57:29.000Z | 2021-08-30T03:44:55.000Z | querybuilder/tests/window_tests.py | wesokes/django-query-builder | 3cc53d33ee0a4ada515635e4be631167a774b457 | [
"MIT"
] | 33 | 2015-02-05T22:08:46.000Z | 2021-12-06T08:12:49.000Z | from querybuilder.fields import (
RankField, RowNumberField, DenseRankField, PercentRankField, CumeDistField, NTileField, LagField,
LeadField, FirstValueField, LastValueField, NthValueField, NumStdDevField
)
from querybuilder.query import QueryWindow, Query
from querybuilder.tests.models import Order
from query... | 33.916468 | 119 | 0.521779 |
13d92122cdb041cef0407b7567e1db27fbf5978f | 676 | py | Python | emoji/coffee.py | wbprice/ojimoji | 7b1a8b5ed0062d1d52e151e7412e1131e3de7924 | [
"MIT"
] | null | null | null | emoji/coffee.py | wbprice/ojimoji | 7b1a8b5ed0062d1d52e151e7412e1131e3de7924 | [
"MIT"
] | null | null | null | emoji/coffee.py | wbprice/ojimoji | 7b1a8b5ed0062d1d52e151e7412e1131e3de7924 | [
"MIT"
] | null | null | null | import numpy
h = .25
s = 1
bitmap = numpy.array([
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0],
[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],
[0,0,1,1,1,0,1,0,1,1,1,0,0,1,0,0],
[0,0,1,1,0,1,0,1,0,1,1,0,0,1,0,... | 30.727273 | 39 | 0.426036 |
13d981ac5c1effe03cfb8f11663b3250b5130bd2 | 4,546 | py | Python | dumpcode/npzbdt.py | gkfthddk/keras | 46d96c65d69c39df298800336bbb4d867a2561fb | [
"MIT"
] | null | null | null | dumpcode/npzbdt.py | gkfthddk/keras | 46d96c65d69c39df298800336bbb4d867a2561fb | [
"MIT"
] | null | null | null | dumpcode/npzbdt.py | gkfthddk/keras | 46d96c65d69c39df298800336bbb4d867a2561fb | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.model_selection import RandomizedSearchCV, GridSearchCV
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import StratifiedKFold
from sklearn.model_selection import KFold
import scipy.stats as sts
import xgboost as xgb
from xiter import *
import pandas as pd
import a... | 38.525424 | 167 | 0.720853 |
13dbe7e355868c585eddb2ca7609fa83a2860aed | 12,384 | py | Python | rlenv/StockTradingEnv0.py | watchsea/RL-Stock | 53bd13a1bd1760e082c6db2ad9b010adbc3a767b | [
"MIT"
] | null | null | null | rlenv/StockTradingEnv0.py | watchsea/RL-Stock | 53bd13a1bd1760e082c6db2ad9b010adbc3a767b | [
"MIT"
] | null | null | null | rlenv/StockTradingEnv0.py | watchsea/RL-Stock | 53bd13a1bd1760e082c6db2ad9b010adbc3a767b | [
"MIT"
] | null | null | null | import random
import json
import gym
from gym import spaces
import pandas as pd
import numpy as np
MAX_ACCOUNT_BALANCE = 2147483647
MAX_NUM_SHARES = 2147483647
MAX_SHARE_PRICE = 5000
MAX_VOLUME = 1000e8
MAX_AMOUNT = 3e10
MAX_OPEN_POSITIONS = 5
MAX_STEPS = 20000
MAX_DAY_CHANGE = 1
INITIAL_ACCOUNT_BALANCE = 10000
DATA... | 41.69697 | 127 | 0.581476 |
13dd331f73864377a1d0952e862e552f50ab90bf | 2,053 | py | Python | processing/manager.py | mrfleap/us-population-heatmap | e3f1c5d8294716ff491c7b8b40adb77929f9aeee | [
"MIT"
] | null | null | null | processing/manager.py | mrfleap/us-population-heatmap | e3f1c5d8294716ff491c7b8b40adb77929f9aeee | [
"MIT"
] | null | null | null | processing/manager.py | mrfleap/us-population-heatmap | e3f1c5d8294716ff491c7b8b40adb77929f9aeee | [
"MIT"
] | null | null | null | import json
import os
import pathlib
import time
from tqdm import tqdm
from aggregator import aggregate
from download import DOWNLOAD_PATH, download_files, unzip_files
from tqdm.contrib.concurrent import process_map
if __name__ == "__main__":
main()
| 27.013158 | 103 | 0.632245 |
13ddb1c02b1ed46330b061450969494a2a48af52 | 794 | py | Python | gen_data.py | kshoji6011/vehicleai | 135de71cce65f4a61b42c49493ed356f2d512d6c | [
"MIT"
] | null | null | null | gen_data.py | kshoji6011/vehicleai | 135de71cce65f4a61b42c49493ed356f2d512d6c | [
"MIT"
] | null | null | null | gen_data.py | kshoji6011/vehicleai | 135de71cce65f4a61b42c49493ed356f2d512d6c | [
"MIT"
] | null | null | null | from PIL import Image
import os, glob
import numpy as np
from sklearn import model_selection
classes = ["car", "bycycle", "motorcycle", "pedestrian"]
num_class = len(classes)
image_size = 50
#
X = []
Y = []
for index, classlabel in enumerate(classes):
photos_dir = "./" + classlabel
files = glob.glob(photos... | 24.8125 | 73 | 0.644836 |
13de3e4f691cb4b36cd9750b30e5106c02f72fb9 | 724 | py | Python | app/main.py | immortel32/Sword_Sorcery_Story_Generator | 7978dfc335813362b2d94c455b970f58421123c8 | [
"MIT"
] | 2 | 2021-04-01T00:50:22.000Z | 2021-04-01T02:18:45.000Z | app/main.py | immortel32/Sword_Sorcery_Story_Generator | 7978dfc335813362b2d94c455b970f58421123c8 | [
"MIT"
] | 1 | 2021-04-01T21:39:44.000Z | 2021-04-01T21:39:44.000Z | app/main.py | immortel32/Sword_Sorcery_Story_Generator | 7978dfc335813362b2d94c455b970f58421123c8 | [
"MIT"
] | 1 | 2021-04-01T01:03:33.000Z | 2021-04-01T01:03:33.000Z | from services import waypoint_scenarios, quest_scenarios
from services.build_campaign import Campaign
from log_setup import log
if __name__ == "__main__":
number_waypoint_scenario = waypoint_scenarios.get_number_of_waypoint_scenarios()
log.info(f"We have {number_waypoint_scenario} waypoint available")
numb... | 42.588235 | 84 | 0.809392 |
13ded3828a8c037ea4aa78b91386fb78512809eb | 326 | py | Python | tests/test-recipes/metadata/ignore_some_prefix_files/run_test.py | mbargull/conda-build | ebc56f48196774301863fecbe98a32a7ded6eb7e | [
"BSD-3-Clause"
] | null | null | null | tests/test-recipes/metadata/ignore_some_prefix_files/run_test.py | mbargull/conda-build | ebc56f48196774301863fecbe98a32a7ded6eb7e | [
"BSD-3-Clause"
] | null | null | null | tests/test-recipes/metadata/ignore_some_prefix_files/run_test.py | mbargull/conda-build | ebc56f48196774301863fecbe98a32a7ded6eb7e | [
"BSD-3-Clause"
] | null | null | null | import os
pkgs = os.path.join(os.environ["ROOT"], "pkgs")
info_dir = os.path.join(pkgs, "conda-build-test-ignore-some-prefix-files-1.0-0", "info")
has_prefix_file = os.path.join(info_dir, "has_prefix")
print(info_dir)
assert os.path.isfile(has_prefix_file)
with open(has_prefix_file) as f:
assert "test2" not in f.r... | 32.6 | 88 | 0.733129 |
13defa0932ab990d6739afd72d573b29bcd8a6e3 | 2,473 | py | Python | distill.py | Lukeming-tsinghua/Interpretable-NN-for-IBD-diagnosis | 5fb0fae774e010cdd6b63ff487a4528f0397647d | [
"MIT"
] | null | null | null | distill.py | Lukeming-tsinghua/Interpretable-NN-for-IBD-diagnosis | 5fb0fae774e010cdd6b63ff487a4528f0397647d | [
"MIT"
] | null | null | null | distill.py | Lukeming-tsinghua/Interpretable-NN-for-IBD-diagnosis | 5fb0fae774e010cdd6b63ff487a4528f0397647d | [
"MIT"
] | null | null | null | import os
from collections import namedtuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from sklearn.metrics import classification_report
from torch.optim import Adam
from tqdm import tqdm
from data import DataIteratorDistill
from loss import FocalLoss
from model import CNN
from torchtext impo... | 34.347222 | 89 | 0.632835 |
13df4c0e986f7c76ecd11c6a6721e985d305104d | 7,597 | py | Python | tests/TALTests/HTMLTests/TALAttributesTestCases.py | janbrohl/SimpleTAL | f5a3ddd9a74cf9af7356bb431513e3534717802d | [
"BSD-3-Clause"
] | 5 | 2015-11-20T12:17:04.000Z | 2021-03-19T13:49:33.000Z | tests/TALTests/HTMLTests/TALAttributesTestCases.py | mar10/SimpleTAL | f5a3ddd9a74cf9af7356bb431513e3534717802d | [
"BSD-3-Clause"
] | 5 | 2015-09-20T12:55:23.000Z | 2018-05-12T10:34:20.000Z | tests/TALTests/HTMLTests/TALAttributesTestCases.py | mar10/SimpleTAL | f5a3ddd9a74cf9af7356bb431513e3534717802d | [
"BSD-3-Clause"
] | 1 | 2022-01-24T13:37:38.000Z | 2022-01-24T13:37:38.000Z | #!/usr/bin/python
# -*- coding: iso-8859-1 -*-
# Copyright (c) 2016, Jan Brohl <janbrohl@t-online.de>
# All rights reserved.
# See LICENSE.txt
# Copyright (c) 2004 Colin Stewart (http://www.owlfish.com/)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# ... | 46.042424 | 162 | 0.65618 |
13dfb252487b62555c998999e6abd56dcb22612c | 562 | py | Python | iseq_prof/fasta.py | EBI-Metagenomics/iseq-prof | ca41a0f3aa1e70e59648bdc08b36da1ec76220ad | [
"MIT"
] | null | null | null | iseq_prof/fasta.py | EBI-Metagenomics/iseq-prof | ca41a0f3aa1e70e59648bdc08b36da1ec76220ad | [
"MIT"
] | null | null | null | iseq_prof/fasta.py | EBI-Metagenomics/iseq-prof | ca41a0f3aa1e70e59648bdc08b36da1ec76220ad | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import List
from fasta_reader import FASTAItem, FASTAWriter, read_fasta
__all__ = ["downsample"]
| 29.578947 | 71 | 0.715302 |
13e04df35258103610f99481901f9649956a3c76 | 209 | py | Python | src/data_settings.py | DhruvSrikanth/TSLA-React | 2ce4edb6b21ec1a301047124cfda5bb30deb3a90 | [
"MIT"
] | null | null | null | src/data_settings.py | DhruvSrikanth/TSLA-React | 2ce4edb6b21ec1a301047124cfda5bb30deb3a90 | [
"MIT"
] | null | null | null | src/data_settings.py | DhruvSrikanth/TSLA-React | 2ce4edb6b21ec1a301047124cfda5bb30deb3a90 | [
"MIT"
] | null | null | null | # API keys
# YF_API_KEY = "YRVHVLiFAt3ANYZf00BXr2LHNfZcgKzdWVmsZ9Xi" # yahoo finance api key
TICKER = "TSLA"
INTERVAL = "1m"
PERIOD = "1d"
LOOK_BACK = 30 # hard limit to not reach rate limit of 100 per day | 20.9 | 81 | 0.732057 |
13e067146d5c409e953e8fe9a97ca674f7b0976f | 2,217 | py | Python | ymir/backend/src/ymir_controller/controller/utils/invoker_mapping.py | phoenix-xhuang/ymir | 537d3ac389c4a365ce4daef431c95b42ddcd5b1b | [
"Apache-2.0"
] | 64 | 2021-11-15T03:48:00.000Z | 2022-03-25T07:08:46.000Z | ymir/backend/src/ymir_controller/controller/utils/invoker_mapping.py | phoenix-xhuang/ymir | 537d3ac389c4a365ce4daef431c95b42ddcd5b1b | [
"Apache-2.0"
] | 35 | 2021-11-23T04:14:35.000Z | 2022-03-26T09:03:43.000Z | ymir/backend/src/ymir_controller/controller/utils/invoker_mapping.py | phoenix-xhuang/ymir | 537d3ac389c4a365ce4daef431c95b42ddcd5b1b | [
"Apache-2.0"
] | 57 | 2021-11-11T10:15:40.000Z | 2022-03-29T07:27:54.000Z | from controller.invoker import (
invoker_cmd_branch_checkout,
invoker_cmd_branch_commit,
invoker_cmd_branch_create,
invoker_cmd_branch_delete,
invoker_cmd_branch_list,
invoker_cmd_evaluate,
invoker_cmd_filter,
invoker_cmd_gpu_info,
invoker_cmd_inference,
invoker_cmd_init,
inv... | 43.470588 | 87 | 0.834461 |
13e0862967d39493794d0afe2c6e9020dad2d87c | 777 | py | Python | tests/utils/date_utils.py | asuol/worky | 362257e77486af05941cc977055c01e49b09a2dd | [
"MIT"
] | null | null | null | tests/utils/date_utils.py | asuol/worky | 362257e77486af05941cc977055c01e49b09a2dd | [
"MIT"
] | null | null | null | tests/utils/date_utils.py | asuol/worky | 362257e77486af05941cc977055c01e49b09a2dd | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
due_date_format = '%Y-%m-%d'
datepicker_date_format = '%m%d%Y'
| 25.064516 | 78 | 0.776062 |
13e0ca25df4bf90f8ba82de1f47aa08f14078d33 | 5,304 | py | Python | numba/roc/tests/hsapy/test_gufuncbuilding.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | numba/roc/tests/hsapy/test_gufuncbuilding.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 108 | 2020-08-17T22:38:26.000Z | 2021-12-06T09:44:14.000Z | numba/roc/tests/hsapy/test_gufuncbuilding.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import numpy as np
from numba.roc.vectorizers import HsaGUFuncVectorize
from numba.roc.dispatch import HSAGenerializedUFunc
from numba import guvectorize
import unittest
if __name__ == '__main__':
unittest.main()
| 31.951807 | 75 | 0.532805 |
13e10f247a53a809b100dc05b97804f51f30b05a | 463 | py | Python | server/form/mongo.py | SRM-IST-KTR/ossmosis | 06e375dfdd67f91286ffbcb13e04b6543585d8ad | [
"MIT"
] | 6 | 2021-07-04T07:59:17.000Z | 2021-07-04T14:41:00.000Z | server/form/mongo.py | SRM-IST-KTR/ossmosis | 06e375dfdd67f91286ffbcb13e04b6543585d8ad | [
"MIT"
] | null | null | null | server/form/mongo.py | SRM-IST-KTR/ossmosis | 06e375dfdd67f91286ffbcb13e04b6543585d8ad | [
"MIT"
] | 1 | 2022-02-15T13:31:46.000Z | 2022-02-15T13:31:46.000Z | import os
from pymongo import MongoClient
from dotenv import load_dotenv
if __name__ == "__main__":
pass
| 21.045455 | 52 | 0.637149 |
13e1722808236b6aeebbdaf4b408b6e5d0b9cadb | 738 | py | Python | control-flow/solution/file_hosts.py | giserh/book-python | ebd4e70cea1dd56986aa8efbae3629ba3f1ba087 | [
"MIT"
] | 1 | 2019-01-02T15:04:08.000Z | 2019-01-02T15:04:08.000Z | control-flow/solution/file_hosts.py | giserh/book-python | ebd4e70cea1dd56986aa8efbae3629ba3f1ba087 | [
"MIT"
] | null | null | null | control-flow/solution/file_hosts.py | giserh/book-python | ebd4e70cea1dd56986aa8efbae3629ba3f1ba087 | [
"MIT"
] | null | null | null | FILE = r'../src/etc-hosts.txt'
hostnames = []
try:
with open(FILE, encoding='utf-8') as file:
content = file.readlines()
except FileNotFoundError:
print('File does not exist')
except PermissionError:
print('Permission denied')
for line in content:
if line.startswith('#'):
continue
... | 19.421053 | 56 | 0.550136 |
13e172837fb61cdf3f4fe7914fb4c72959b8c9f8 | 497 | py | Python | zindi/docs/utils/n_subimissions_per_day.py | eaedk/testing-zindi-package | 5aef7375a629b328fa8ecf9c4559e2897611a1e9 | [
"MIT"
] | 6 | 2020-09-07T17:56:49.000Z | 2021-12-09T12:34:01.000Z | zindi/docs/utils/n_subimissions_per_day.py | eaedk/testing-zindi-package | 5aef7375a629b328fa8ecf9c4559e2897611a1e9 | [
"MIT"
] | 2 | 2021-02-24T11:56:48.000Z | 2021-03-30T14:40:45.000Z | zindi/docs/utils/n_subimissions_per_day.py | eaedk/testing-zindi-package | 5aef7375a629b328fa8ecf9c4559e2897611a1e9 | [
"MIT"
] | 4 | 2020-11-01T00:06:36.000Z | 2021-11-19T19:20:52.000Z | def n_subimissions_per_day( url, headers ):
"""Get the number of submissions we can make per day for the selected challenge.
Parameters
----------
url : {'prize', 'points', 'knowledge' , 'all'}, default='all'
The reward of the challenges for top challengers.
headers : dictionary ,
T... | 35.5 | 84 | 0.629779 |
13e274ea10a3039f67d424845564d23d8affb74d | 2,875 | py | Python | algo/test/test_maximum_cut.py | ssavinash1/Algorithm_stanford | f2588b6bcac2b0858e78b819e6e8402109e80ee2 | [
"MIT"
] | 24 | 2016-03-21T07:53:54.000Z | 2020-06-29T12:16:36.000Z | algo/test/test_maximum_cut.py | ssavinash1/Algorithm_stanford | f2588b6bcac2b0858e78b819e6e8402109e80ee2 | [
"MIT"
] | 5 | 2015-09-29T17:12:36.000Z | 2020-03-26T20:51:56.000Z | algo/test/test_maximum_cut.py | ssavinash1/Algorithm_stanford | f2588b6bcac2b0858e78b819e6e8402109e80ee2 | [
"MIT"
] | 12 | 2016-05-24T16:48:32.000Z | 2020-10-02T12:22:09.000Z | # -*- coding: utf-8 -*-
import unittest
from src.graph import Graph
from src.maximum_cut import maximum_cut, maximum_cut_for_bipartite_graph
| 33.823529 | 79 | 0.420522 |
13e34fac65209ea50100d76fe6090282f3d8e3b4 | 5,788 | py | Python | gdb/print-avs-rbtree.py | kemonats/avs_commons | ecce4edf5376d132e3686af227c9adf22ce1090e | [
"Apache-2.0"
] | 4 | 2016-11-04T12:55:32.000Z | 2019-03-21T15:07:58.000Z | gdb/print-avs-rbtree.py | kemonats/avs_commons | ecce4edf5376d132e3686af227c9adf22ce1090e | [
"Apache-2.0"
] | 5 | 2015-02-11T09:34:36.000Z | 2021-04-19T08:51:50.000Z | gdb/print-avs-rbtree.py | kemonats/avs_commons | ecce4edf5376d132e3686af227c9adf22ce1090e | [
"Apache-2.0"
] | 17 | 2015-12-17T10:32:09.000Z | 2022-02-14T10:58:39.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2021 AVSystem <avsystem@avsystem.com>
#
# 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 requi... | 37.102564 | 146 | 0.593988 |
13e3573ef0ab92fc261e9835b12be4ef8345103f | 1,372 | py | Python | hour17/PythonGroup.py | sampx/mongodb-practice | 0698b21b7da57693ba4146384c8ad65530b0066b | [
"MIT"
] | null | null | null | hour17/PythonGroup.py | sampx/mongodb-practice | 0698b21b7da57693ba4146384c8ad65530b0066b | [
"MIT"
] | null | null | null | hour17/PythonGroup.py | sampx/mongodb-practice | 0698b21b7da57693ba4146384c8ad65530b0066b | [
"MIT"
] | null | null | null | from pymongo import MongoClient
if __name__=="__main__":
mongo = MongoClient('mongodb://localhost:27017/')
db = mongo['words']
collection = db['word_stats']
firstIsALastIsVowel(collection)
firstLetterTotals(collection) | 39.2 | 69 | 0.54519 |
13e4eede3d6e6a6be8776d50a9b969b677e1d046 | 5,115 | py | Python | packnet_sfm/models/model_utils.py | pection/packnet-sfm | d5673567b649e6bfda292c894cacdeb06aa80913 | [
"MIT"
] | 1 | 2022-02-22T06:19:02.000Z | 2022-02-22T06:19:02.000Z | packnet_sfm/models/model_utils.py | pection/packnet-sfm | d5673567b649e6bfda292c894cacdeb06aa80913 | [
"MIT"
] | null | null | null | packnet_sfm/models/model_utils.py | pection/packnet-sfm | d5673567b649e6bfda292c894cacdeb06aa80913 | [
"MIT"
] | null | null | null | # Copyright 2020 Toyota Research Institute. All rights reserved.
from packnet_sfm.utils.image import flip_lr, interpolate_scales
from packnet_sfm.utils.misc import filter_dict
from packnet_sfm.utils.types import is_tensor, is_list, is_numpy
def flip(tensor, flip_fn):
"""
Flip tensors or list of tensors base... | 28.259669 | 93 | 0.585728 |
13e58721f5e2c382c66ef605548dfd06ad0e1f44 | 1,363 | py | Python | utils/stg/min_jerk_traj.py | dgerod/more-dmps | 4dc886a138f289532b2672537f91ff857448ad27 | [
"BSD-2-Clause"
] | 7 | 2017-12-23T13:43:33.000Z | 2021-08-21T14:50:55.000Z | utils/stg/min_jerk_traj.py | dgerod/more-dmps | 4dc886a138f289532b2672537f91ff857448ad27 | [
"BSD-2-Clause"
] | 1 | 2016-08-21T05:05:32.000Z | 2016-08-21T05:05:32.000Z | utils/stg/min_jerk_traj.py | dgerod/more-dmps | 4dc886a138f289532b2672537f91ff857448ad27 | [
"BSD-2-Clause"
] | 2 | 2018-02-11T02:01:32.000Z | 2019-09-16T01:43:43.000Z | '''
Created on 25.07.2012
@author: karl
'''
| 24.781818 | 96 | 0.533382 |
13e5f9585262ddf6bd1e3799d8611f18effa881a | 40 | py | Python | tests/__init__.py | karanrampal/triplet-loss | b62008dedbf8640ccf0dc359b5aadd5e8b0ab134 | [
"MIT"
] | null | null | null | tests/__init__.py | karanrampal/triplet-loss | b62008dedbf8640ccf0dc359b5aadd5e8b0ab134 | [
"MIT"
] | null | null | null | tests/__init__.py | karanrampal/triplet-loss | b62008dedbf8640ccf0dc359b5aadd5e8b0ab134 | [
"MIT"
] | null | null | null | # To make directory as a python package
| 20 | 39 | 0.775 |
13e74a7f98e6571f4fc714e2743e38c7eafbf58e | 2,607 | py | Python | orthoexon/tests/test_util.py | jessicalettes/orthoexon | 463ad1908364c602cf75dbddb0b16a42f4100a36 | [
"BSD-3-Clause"
] | null | null | null | orthoexon/tests/test_util.py | jessicalettes/orthoexon | 463ad1908364c602cf75dbddb0b16a42f4100a36 | [
"BSD-3-Clause"
] | null | null | null | orthoexon/tests/test_util.py | jessicalettes/orthoexon | 463ad1908364c602cf75dbddb0b16a42f4100a36 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_orthoexon
----------------------------------
Tests for `orthoexon` module.
"""
import os
import pytest
def test_separate_with_quotes(exon_id_with_quotes):
from orthoexon.util import separate
test = separate(exon_id_with_quotes)
true = "ENSE00001229... | 23.917431 | 86 | 0.678558 |
13e8cb3c3e9246762451e5cb22ca74f1dccc3db7 | 2,656 | py | Python | predict_recognition.py | yeyupiaoling/Kersa-Speaker-Recognition | 7ccf42c006f42ff6074ad3937e44a0dfa68c6d33 | [
"Apache-2.0"
] | 42 | 2020-07-12T13:21:13.000Z | 2021-07-01T01:06:12.000Z | predict_recognition.py | yeyupiaoling/VoiceprintRecognition-Keras | 7ccf42c006f42ff6074ad3937e44a0dfa68c6d33 | [
"Apache-2.0"
] | 3 | 2020-08-19T06:16:02.000Z | 2020-11-02T02:16:56.000Z | predict_recognition.py | yeyupiaoling/Kersa-Speaker-Recognition | 7ccf42c006f42ff6074ad3937e44a0dfa68c6d33 | [
"Apache-2.0"
] | 12 | 2020-07-15T14:33:51.000Z | 2021-05-24T03:55:04.000Z | import argparse
import os
import shutil
import time
import numpy as np
from utils import model, utils
from utils.record import RecordAudio
parser = argparse.ArgumentParser()
parser.add_argument('--audio_db', default='audio_db/', type=str, help='')
parser.add_argument('--threshold', default=0.7, ... | 28.255319 | 103 | 0.628765 |
13e90500b4879323474a6761d01dbd32906a8b6c | 6,853 | py | Python | cubedash/_product.py | vconrado/datacube-explorer | ccb9a9a42e5dd16e2b0325a1f881b080bb2806e6 | [
"Apache-2.0"
] | null | null | null | cubedash/_product.py | vconrado/datacube-explorer | ccb9a9a42e5dd16e2b0325a1f881b080bb2806e6 | [
"Apache-2.0"
] | null | null | null | cubedash/_product.py | vconrado/datacube-explorer | ccb9a9a42e5dd16e2b0325a1f881b080bb2806e6 | [
"Apache-2.0"
] | null | null | null | import logging
from datetime import timedelta
from flask import Blueprint, Response, abort, redirect, url_for
from cubedash import _model, _utils, _utils as utils
_LOG = logging.getLogger(__name__)
bp = Blueprint("product", __name__)
def _iso8601_duration(tdelta: timedelta):
"""
Format a ti... | 27.522088 | 86 | 0.620604 |
13e960260e528ba2d92aa2f22ba8b6f12cf5bbfe | 1,923 | py | Python | litex_boards/platforms/sipeed_tang_nano.py | ozbenh/litex-boards | f18b10d1edb4e162a77972e2e9c5bad54ca00788 | [
"BSD-2-Clause"
] | null | null | null | litex_boards/platforms/sipeed_tang_nano.py | ozbenh/litex-boards | f18b10d1edb4e162a77972e2e9c5bad54ca00788 | [
"BSD-2-Clause"
] | null | null | null | litex_boards/platforms/sipeed_tang_nano.py | ozbenh/litex-boards | f18b10d1edb4e162a77972e2e9c5bad54ca00788 | [
"BSD-2-Clause"
] | null | null | null | #
# This file is part of LiteX-Boards.
#
# Copyright (c) 2021 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
# Board diagram/pinout:
# https://user-images.githubusercontent.com/1450143/133655492-532d5e9a-0635-4889-85c9-68683d06cae0.png
# http://dl.sipeed.com/TANG/Nano/HDK/Tang-NAN... | 32.05 | 115 | 0.573583 |
13eaaea3944207924e8d3d8e8f4c1a6a0ee51732 | 10,525 | py | Python | nm_cavia/rl/metalearner.py | anon-6994/nm-metarl | 45c8798c2139d8c200cc7a398331c1b98a0dccec | [
"MIT"
] | null | null | null | nm_cavia/rl/metalearner.py | anon-6994/nm-metarl | 45c8798c2139d8c200cc7a398331c1b98a0dccec | [
"MIT"
] | null | null | null | nm_cavia/rl/metalearner.py | anon-6994/nm-metarl | 45c8798c2139d8c200cc7a398331c1b98a0dccec | [
"MIT"
] | null | null | null | import torch
from torch.distributions.kl import kl_divergence
from torch.nn.utils.convert_parameters import (vector_to_parameters,
parameters_to_vector)
from rl_utils.optimization import conjugate_gradient
from rl_utils.torch_utils import (weighted_mean, detach_distributi... | 40.171756 | 120 | 0.624323 |
13eac7b96baca5f54a52331a42d7e035d905943e | 2,321 | py | Python | request/management/commands/purgerequests.py | hramezani/django-request | 4b9c7b22f26338d2c93110477aa44041b1c5ddb4 | [
"BSD-2-Clause"
] | 373 | 2016-04-22T21:18:41.000Z | 2022-03-31T23:13:31.000Z | request/management/commands/purgerequests.py | hramezani/django-request | 4b9c7b22f26338d2c93110477aa44041b1c5ddb4 | [
"BSD-2-Clause"
] | 128 | 2016-04-22T21:30:55.000Z | 2022-03-08T20:24:44.000Z | request/management/commands/purgerequests.py | hramezani/django-request | 4b9c7b22f26338d2c93110477aa44041b1c5ddb4 | [
"BSD-2-Clause"
] | 79 | 2016-04-25T08:44:56.000Z | 2022-03-17T01:41:27.000Z | from datetime import timedelta
from dateutil.relativedelta import relativedelta
from django.core.management.base import BaseCommand, CommandError
from django.utils import timezone
from ...models import Request
DURATION_OPTIONS = {
'hours': lambda amount: timezone.now() - timedelta(hours=amount),
'days': lamb... | 30.142857 | 88 | 0.623007 |
13ebac2480a38d6864e7de863e165c5d96c0e1f7 | 10,928 | py | Python | tests/test_crypto.py | kimtaehong/PythonForWindows | d04eed1754e2e23474213b89580d68e1b73c3fe4 | [
"BSD-3-Clause"
] | null | null | null | tests/test_crypto.py | kimtaehong/PythonForWindows | d04eed1754e2e23474213b89580d68e1b73c3fe4 | [
"BSD-3-Clause"
] | null | null | null | tests/test_crypto.py | kimtaehong/PythonForWindows | d04eed1754e2e23474213b89580d68e1b73c3fe4 | [
"BSD-3-Clause"
] | null | null | null | import pytest
import windows.crypto
import windows.generated_def as gdef
import windows.crypto.generation
from .pfwtest import *
pytestmark = pytest.mark.usefixtures('check_for_gc_garbage')
TEST_CERT = b"""
MIIBwTCCASqgAwIBAgIQG46Uyws+67ZBOfPJCbFrRjANBgkqhkiG9w0BAQsFADAfMR0wGwYDVQQD
ExRQeXRob25Gb3JXaW5kb3dzVGVzdDAe... | 45.344398 | 132 | 0.811585 |
13ec7c22478f599c0c77b64f3478dbd3b142fa61 | 8,135 | py | Python | cdci_data_analysis/analysis/plot_tools.py | andreatramacere/cdci_data_analysis | 8ae34a7252d6baf011a3b99fbe4f6e624b63d7df | [
"MIT"
] | null | null | null | cdci_data_analysis/analysis/plot_tools.py | andreatramacere/cdci_data_analysis | 8ae34a7252d6baf011a3b99fbe4f6e624b63d7df | [
"MIT"
] | null | null | null | cdci_data_analysis/analysis/plot_tools.py | andreatramacere/cdci_data_analysis | 8ae34a7252d6baf011a3b99fbe4f6e624b63d7df | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
from builtins import (bytes, str, open, super, range,
zip, round, input, int, pow, object, map, zip)
__author__ = "Andrea Tramacere"
import numpy as np
from astropy import wcs
from bokeh.layouts import row, widgetbox,gridplot
... | 31.288462 | 132 | 0.547019 |
13edd551b75e71fd96ef5d443c0c54bbec028a56 | 844 | py | Python | test/unit/test_testaid_unit_pathlist.py | RebelCodeBase/testaid | 998c827b826fe4374ecf0a234fef61a975e2fcd7 | [
"Apache-2.0"
] | 17 | 2019-08-04T09:29:19.000Z | 2020-05-16T02:25:20.000Z | test/unit/test_testaid_unit_pathlist.py | RebelCodeBase/testaid | 998c827b826fe4374ecf0a234fef61a975e2fcd7 | [
"Apache-2.0"
] | 12 | 2019-07-19T22:20:42.000Z | 2020-01-20T06:45:38.000Z | test/unit/test_testaid_unit_pathlist.py | RebelCodeBase/testaid | 998c827b826fe4374ecf0a234fef61a975e2fcd7 | [
"Apache-2.0"
] | 3 | 2019-08-08T18:18:13.000Z | 2019-10-07T13:46:03.000Z | from pathlib import Path
from testaid.pathlist import PathList
| 29.103448 | 73 | 0.726303 |
13ee6c7b533dc2afb81ce7087fea00c547679671 | 22,147 | py | Python | tests/unit/zhmcclient/test_hba.py | vkpro-forks/python-zhmcclient | eab2dca37cb417d03411450dabf72805214b5ca0 | [
"Apache-2.0"
] | null | null | null | tests/unit/zhmcclient/test_hba.py | vkpro-forks/python-zhmcclient | eab2dca37cb417d03411450dabf72805214b5ca0 | [
"Apache-2.0"
] | null | null | null | tests/unit/zhmcclient/test_hba.py | vkpro-forks/python-zhmcclient | eab2dca37cb417d03411450dabf72805214b5ca0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2017 IBM Corp. 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... | 34.658842 | 77 | 0.557457 |
13ef6d428251649b315fbe8757c2d7336d7471a8 | 367 | py | Python | compiler-rt/test/asan/TestCases/Windows/lit.local.cfg.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 2,338 | 2018-06-19T17:34:51.000Z | 2022-03-31T11:00:37.000Z | compiler-rt/test/asan/TestCases/Windows/lit.local.cfg.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 3,740 | 2019-01-23T15:36:48.000Z | 2022-03-31T22:01:13.000Z | compiler-rt/test/asan/TestCases/Windows/lit.local.cfg.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 500 | 2019-01-23T07:49:22.000Z | 2022-03-30T02:59:37.000Z |
root = getRoot(config)
# We only run a small set of tests on Windows for now.
# Override the parent directory's "unsupported" decision until we can handle
# all of its tests.
if root.host_os in ['Windows']:
config.unsupported = False
else:
config.unsupported = True
| 24.466667 | 76 | 0.73842 |
13efdb45818b7da3afae845201256a86d37c940d | 4,302 | py | Python | Lib/test/libregrtest/utils.py | oskomorokhov/cpython | c0e11a3ceb9427e09db4224f394c7789bf6deec5 | [
"0BSD"
] | 5 | 2017-08-25T04:31:30.000Z | 2022-03-22T15:01:56.000Z | Lib/test/libregrtest/utils.py | oskomorokhov/cpython | c0e11a3ceb9427e09db4224f394c7789bf6deec5 | [
"0BSD"
] | 20 | 2021-03-25T12:52:42.000Z | 2022-03-01T02:02:03.000Z | Lib/test/libregrtest/utils.py | oskomorokhov/cpython | c0e11a3ceb9427e09db4224f394c7789bf6deec5 | [
"0BSD"
] | 3 | 2020-04-13T14:41:31.000Z | 2022-03-02T18:56:32.000Z | import math
import os.path
import sys
import textwrap
from test import support
def printlist(x, width=70, indent=4, file=None):
"""Print the elements of iterable x to stdout.
Optional arg width (default 70) is the maximum line length.
Optional arg indent (default 4) is the number of blanks with which ... | 22.761905 | 75 | 0.600418 |
13f22ca29da54a0f4486e1f8539ee236d259fc1e | 5,960 | py | Python | efetch_server/plugins/fa_sqlite/fa_sqlite_ajax.py | Syrkadian/efetch | 120ac963507d54998beecfd8b8cd85ad123e6e54 | [
"Apache-2.0"
] | 38 | 2015-08-18T00:29:16.000Z | 2021-12-06T15:53:47.000Z | efetch_server/plugins/fa_sqlite/fa_sqlite_ajax.py | Syrkadian/efetch | 120ac963507d54998beecfd8b8cd85ad123e6e54 | [
"Apache-2.0"
] | 20 | 2016-03-18T02:20:27.000Z | 2020-04-09T22:16:42.000Z | efetch_server/plugins/fa_sqlite/fa_sqlite_ajax.py | Syrkadian/efetch | 120ac963507d54998beecfd8b8cd85ad123e6e54 | [
"Apache-2.0"
] | 8 | 2016-08-23T14:59:15.000Z | 2020-04-09T21:43:25.000Z | """
AJAX for SQLite Viewer plugin
"""
from yapsy.IPlugin import IPlugin
from flask import Response, jsonify
import json
import logging
import sqlite3
| 35.266272 | 133 | 0.51896 |
13f2af320410f86bedc3a6ddc8c44eb547f14053 | 252 | py | Python | raspagem/random/lista_cidades.py | sslppractice/propython | fa470c3bf0dcfbb26037146d77c7491596cabb26 | [
"MIT"
] | null | null | null | raspagem/random/lista_cidades.py | sslppractice/propython | fa470c3bf0dcfbb26037146d77c7491596cabb26 | [
"MIT"
] | null | null | null | raspagem/random/lista_cidades.py | sslppractice/propython | fa470c3bf0dcfbb26037146d77c7491596cabb26 | [
"MIT"
] | null | null | null | import requests, json
url = 'http://educacao.dadosabertosbr.com/api/cidades/ce'
cidades = requests.get(url).content
cidades = cidades.decode('utf-8')
cidades = json.loads(cidades)
for cidade in cidades:
codigo, nome = cidade.split(':')
print(nome)
| 22.909091 | 57 | 0.734127 |
13f387c5b382d039623c959bbf8db86a94b8f10b | 29 | py | Python | mezzanine/__init__.py | startupgrind/mezzanine | 23d24a07c69bf8f02d60148b0b8da6c76bc5061e | [
"BSD-2-Clause"
] | null | null | null | mezzanine/__init__.py | startupgrind/mezzanine | 23d24a07c69bf8f02d60148b0b8da6c76bc5061e | [
"BSD-2-Clause"
] | 3 | 2019-02-18T07:52:41.000Z | 2021-03-31T03:51:11.000Z | mezzanine/__init__.py | startupgrind/mezzanine | 23d24a07c69bf8f02d60148b0b8da6c76bc5061e | [
"BSD-2-Clause"
] | null | null | null |
__version__ = "4.3.1.post1"
| 9.666667 | 27 | 0.655172 |
13f3a6d9012ba4c4473a1ffb1f1db1418326ee1f | 7,566 | py | Python | src/autonomous/purepursuit.py | Sloomey/DeepSpace2019 | dda035c0ac100209b03a2ff04d86df09c6de9a85 | [
"MIT"
] | null | null | null | src/autonomous/purepursuit.py | Sloomey/DeepSpace2019 | dda035c0ac100209b03a2ff04d86df09c6de9a85 | [
"MIT"
] | null | null | null | src/autonomous/purepursuit.py | Sloomey/DeepSpace2019 | dda035c0ac100209b03a2ff04d86df09c6de9a85 | [
"MIT"
] | null | null | null | import math
from constants import Constants
from utils import vector2d
from wpilib import SmartDashboard as Dash
from autonomous import pursuitpoint
| 50.10596 | 178 | 0.655432 |
13f4c5d6b839fc74a59e3720afa044833541c6ea | 8,661 | py | Python | esphome/voluptuous_schema.py | TheEggi/esphomeyaml | 98e8cc1edc7b29891e8100eb484922e5c2d4fc33 | [
"MIT"
] | null | null | null | esphome/voluptuous_schema.py | TheEggi/esphomeyaml | 98e8cc1edc7b29891e8100eb484922e5c2d4fc33 | [
"MIT"
] | null | null | null | esphome/voluptuous_schema.py | TheEggi/esphomeyaml | 98e8cc1edc7b29891e8100eb484922e5c2d4fc33 | [
"MIT"
] | null | null | null | import difflib
import itertools
import voluptuous as vol
from esphome.py_compat import string_types
# pylint: disable=protected-access, unidiomatic-typecheck
| 43.305 | 99 | 0.564831 |
13f5928fe05ccf64858c18af5eff2188153c32e0 | 20,738 | py | Python | semisupervised/DensityPeaks.py | dpr1005/Semisupervised-learning-and-instance-selection-methods | 646d9e729c85322e859928e71a3241f2aec6d93d | [
"MIT"
] | 3 | 2021-12-10T09:04:18.000Z | 2022-01-22T15:03:19.000Z | semisupervised/DensityPeaks.py | dpr1005/Semisupervised-learning-and-instance-selection-methods | 646d9e729c85322e859928e71a3241f2aec6d93d | [
"MIT"
] | 107 | 2021-12-02T07:43:11.000Z | 2022-03-31T11:02:46.000Z | semisupervised/DensityPeaks.py | dpr1005/Semisupervised-learning-and-instance-selection-methods | 646d9e729c85322e859928e71a3241f2aec6d93d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Filename: DensityPeaks.py
# @Author: Daniel Puente Ramrez
# @Time: 5/3/22 09:55
# @Version: 4.0
import math
from collections import defaultdict
import numpy as np
import pandas as pd
from sklearn.neighbors import KNeighborsClassifier, NearestNeighbors... | 35.268707 | 86 | 0.580384 |
13f713d62e74a1cd787ec98b134812d16f5287ea | 933 | py | Python | N-aryTreeLevelOrderTraversal429.py | Bit64L/LeetCode-Python- | 64847cbb1adcaca4561b949e8acc52e8e031a6cb | [
"MIT"
] | null | null | null | N-aryTreeLevelOrderTraversal429.py | Bit64L/LeetCode-Python- | 64847cbb1adcaca4561b949e8acc52e8e031a6cb | [
"MIT"
] | null | null | null | N-aryTreeLevelOrderTraversal429.py | Bit64L/LeetCode-Python- | 64847cbb1adcaca4561b949e8acc52e8e031a6cb | [
"MIT"
] | null | null | null | """
# Definition for a Node.
"""
node2 = TreeNode(2, [])
node3 = TreeNode(3, [])
children = [node2, node3]
node1 = TreeNode(1, children)
solution = Solution()
print(solution.levelOrder(node1))
| 20.733333 | 39 | 0.485531 |
13f7593938a4204f0e27844ca0c493ca0b47ec5f | 16,444 | py | Python | plugin.video.team.milhanos/websocket/_core.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 2 | 2018-11-02T19:55:30.000Z | 2020-08-14T02:22:20.000Z | venv/lib/python3.5/site-packages/websocket/_core.py | dukakisxyz/wifiportal21-map | 1f1917c2f3c2987f7a88cc537d7c50449d144ea0 | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/websocket/_core.py | dukakisxyz/wifiportal21-map | 1f1917c2f3c2987f7a88cc537d7c50449d144ea0 | [
"MIT"
] | 3 | 2019-12-17T20:47:00.000Z | 2021-02-11T19:03:59.000Z | """
websocket - WebSocket client library for Python
Copyright (C) 2010 Hiroki Ohtani(liris)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, ... | 33.490835 | 90 | 0.589698 |
13f7ddb9a41846fb5799958db3fabf2ed4eeb64a | 3,105 | py | Python | vaccine_card/logistic/models.py | Unanimad/lais_046_2020_etapa_2 | 630efc6b25a580be44b6cd50be6744a01221a2c4 | [
"Apache-2.0"
] | null | null | null | vaccine_card/logistic/models.py | Unanimad/lais_046_2020_etapa_2 | 630efc6b25a580be44b6cd50be6744a01221a2c4 | [
"Apache-2.0"
] | null | null | null | vaccine_card/logistic/models.py | Unanimad/lais_046_2020_etapa_2 | 630efc6b25a580be44b6cd50be6744a01221a2c4 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from vaccine_card.vaccination.models import Vaccine
| 36.104651 | 111 | 0.738808 |
13f954a55ebaa879400311cfe5c32a3993b29137 | 12,933 | py | Python | test/test_rimuhosting.py | shenoyn/libcloud | bd902992a658b6a99193d69323e051ffa7388253 | [
"Apache-2.0"
] | 1 | 2015-11-08T12:59:27.000Z | 2015-11-08T12:59:27.000Z | test/test_rimuhosting.py | shenoyn/libcloud | bd902992a658b6a99193d69323e051ffa7388253 | [
"Apache-2.0"
] | null | null | null | test/test_rimuhosting.py | shenoyn/libcloud | bd902992a658b6a99193d69323e051ffa7388253 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# libcloud.org licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not... | 45.22028 | 380 | 0.540478 |
13f9663c3671ee791e1374fc1c550b7438edff48 | 1,033 | py | Python | tests/base_tests/polygon_tests/test_contains.py | lycantropos/gon | b3f811ece5989d1623b17d633a84071fbff6dd69 | [
"MIT"
] | 10 | 2020-07-18T12:55:52.000Z | 2022-03-20T07:09:10.000Z | tests/base_tests/polygon_tests/test_contains.py | lycantropos/gon | b3f811ece5989d1623b17d633a84071fbff6dd69 | [
"MIT"
] | 52 | 2019-07-11T16:59:01.000Z | 2022-03-29T19:41:59.000Z | tests/base_tests/polygon_tests/test_contains.py | lycantropos/gon | b3f811ece5989d1623b17d633a84071fbff6dd69 | [
"MIT"
] | 1 | 2020-03-22T12:56:07.000Z | 2020-03-22T12:56:07.000Z | from typing import Tuple
from hypothesis import given
from gon.base import (Point,
Polygon)
from tests.utils import (equivalence,
implication)
from . import strategies
| 26.487179 | 72 | 0.708616 |
b913259774170b0ae117752589cf379fac40286c | 4,139 | py | Python | easyidp/core/tests/test_class_reconsproject.py | HowcanoeWang/EasyIDP | 0d0a0df1287e3c15cda17e8e4cdcbe05f21f7272 | [
"MIT"
] | null | null | null | easyidp/core/tests/test_class_reconsproject.py | HowcanoeWang/EasyIDP | 0d0a0df1287e3c15cda17e8e4cdcbe05f21f7272 | [
"MIT"
] | null | null | null | easyidp/core/tests/test_class_reconsproject.py | HowcanoeWang/EasyIDP | 0d0a0df1287e3c15cda17e8e4cdcbe05f21f7272 | [
"MIT"
] | null | null | null | import os
import numpy as np
import pytest
import easyidp
from easyidp.core.objects import ReconsProject, Points
from easyidp.io import metashape
module_path = os.path.join(easyidp.__path__[0], "io/tests")
| 42.234694 | 112 | 0.723846 |
b9139bb412d2bf193e04d2282744a0d621a61a94 | 2,413 | py | Python | withings_api/const.py | tiloc/python_withings_api | 64c9706ab70c93e4c54cc843a778ecd3f9960980 | [
"MIT"
] | null | null | null | withings_api/const.py | tiloc/python_withings_api | 64c9706ab70c93e4c54cc843a778ecd3f9960980 | [
"MIT"
] | null | null | null | withings_api/const.py | tiloc/python_withings_api | 64c9706ab70c93e4c54cc843a778ecd3f9960980 | [
"MIT"
] | null | null | null | """Constant values."""
STATUS_SUCCESS = (0,)
STATUS_AUTH_FAILED = (100, 101, 102, 200, 401)
STATUS_INVALID_PARAMS = (
201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
211,
212,
213,
216,
217,
218,
220,
221,
223,
225,
227,
228,
... | 9.690763 | 50 | 0.390385 |
b9141fcf42d65abf107a484255f641db4d6e639b | 3,249 | py | Python | examples/canvas/bezier.py | sirpercival/kivy | 29ef854a200e6764aae60ea29324379c69d271a3 | [
"MIT"
] | 2 | 2015-10-26T12:35:37.000Z | 2020-11-26T12:06:09.000Z | examples/canvas/bezier.py | sirpercival/kivy | 29ef854a200e6764aae60ea29324379c69d271a3 | [
"MIT"
] | null | null | null | examples/canvas/bezier.py | sirpercival/kivy | 29ef854a200e6764aae60ea29324379c69d271a3 | [
"MIT"
] | 3 | 2015-07-18T11:03:59.000Z | 2018-03-17T01:32:42.000Z | #!/usr/bin/env python
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.slider import Slider
from kivy.graphics import Color, Bezier, Line
if __name__ == '__main__':
Main().run()
| 33.84375 | 82 | 0.544783 |
b915c0a9f384ec67869ab91a6425fc1e66fbe2a2 | 2,698 | py | Python | tests/bugs/core_6489_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_6489_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_6489_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_6489
# title: User without ALTER ANY ROLE privilege can use COMMENT ON ROLE
# decription:
# Test creates two users: one of them has no any rights, second is granted with 'alter any role' privilege.
# First user ('junior') must not hav... | 32.902439 | 124 | 0.648258 |
b915eeed88fbfbe46318454fd21bc9db43d6d639 | 6,023 | py | Python | utils/utils_bbox.py | MasoonZhang/FasterRConvMixer | a7a17d00f716a28a5b301088053e00840c222524 | [
"MIT"
] | null | null | null | utils/utils_bbox.py | MasoonZhang/FasterRConvMixer | a7a17d00f716a28a5b301088053e00840c222524 | [
"MIT"
] | null | null | null | utils/utils_bbox.py | MasoonZhang/FasterRConvMixer | a7a17d00f716a28a5b301088053e00840c222524 | [
"MIT"
] | 1 | 2022-03-14T05:29:42.000Z | 2022-03-14T05:29:42.000Z | import numpy as np
import torch
from torch.nn import functional as F
from torchvision.ops import nms
| 45.628788 | 136 | 0.381205 |
b9160a13d47cfdacbbfdb45a0590f6674809ddbe | 96 | py | Python | lib/python/test/__init__.py | woozhijun/cat | 3d523202c38e37b1a2244b26d4336ebbea5db001 | [
"Apache-2.0"
] | 17,318 | 2015-01-03T03:02:07.000Z | 2022-03-31T02:43:28.000Z | lib/python/test/__init__.py | MrCoderYu/cat | 674bd9ab70267dd6fc74879e4344af77397f4acd | [
"Apache-2.0"
] | 1,162 | 2015-01-04T08:23:49.000Z | 2022-03-31T15:38:04.000Z | lib/python/test/__init__.py | MrCoderYu/cat | 674bd9ab70267dd6fc74879e4344af77397f4acd | [
"Apache-2.0"
] | 5,520 | 2015-01-03T03:02:07.000Z | 2022-03-31T16:16:56.000Z | #!/usr/bin/env python
# encoding: utf-8
import sys
reload(sys)
sys.setdefaultencoding("utf-8") | 13.714286 | 31 | 0.729167 |
b918984647c67e09bce945847905654d35530277 | 15,886 | py | Python | tests/test_pyclipper.py | odidev/pyclipper | 3de54fa4c4d5b8efeede364fbe69336f935f88f2 | [
"MIT"
] | null | null | null | tests/test_pyclipper.py | odidev/pyclipper | 3de54fa4c4d5b8efeede364fbe69336f935f88f2 | [
"MIT"
] | null | null | null | tests/test_pyclipper.py | odidev/pyclipper | 3de54fa4c4d5b8efeede364fbe69336f935f88f2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
Tests for Pyclipper wrapper library.
"""
from __future__ import print_function
from unittest2 import TestCase, main
import sys
if sys.version_info < (3,):
integer_types = (int, long)
else:
integer_types = (int,)
import pyclipper
# Example polygons from http://www.angusj.com/delphi/clip... | 34.914286 | 111 | 0.660078 |
b918bb151415e9d667f5286334be578684cceb18 | 10,754 | py | Python | espoem_facts/facts.py | emre/espoem_facts | 0d7164dcfe8a82e1f142929b1e00c3a85f29f101 | [
"MIT"
] | null | null | null | espoem_facts/facts.py | emre/espoem_facts | 0d7164dcfe8a82e1f142929b1e00c3a85f29f101 | [
"MIT"
] | null | null | null | espoem_facts/facts.py | emre/espoem_facts | 0d7164dcfe8a82e1f142929b1e00c3a85f29f101 | [
"MIT"
] | 1 | 2018-07-19T18:44:09.000Z | 2018-07-19T18:44:09.000Z | FACTS = ['espoem multiplied by zero still equals espoem.',
'There is no theory of evolution. Just a list of creatures espoem has allowed to live.',
'espoem does not sleep. He waits.',
'Alexander Graham Bell had three missed calls from espoem when he invented the telephone.',
'espoem ... | 102.419048 | 232 | 0.702343 |
b918c27f2b168efd69908773e44475244b686dd0 | 3,379 | py | Python | imageproc_OE_IF_quant/2_annotate_extracted_cells.py | hshayya/2022_Shayya_UPR_Guidance | b9a305a147a105c3ac9c0173e06b94f66e4a6102 | [
"MIT"
] | null | null | null | imageproc_OE_IF_quant/2_annotate_extracted_cells.py | hshayya/2022_Shayya_UPR_Guidance | b9a305a147a105c3ac9c0173e06b94f66e4a6102 | [
"MIT"
] | null | null | null | imageproc_OE_IF_quant/2_annotate_extracted_cells.py | hshayya/2022_Shayya_UPR_Guidance | b9a305a147a105c3ac9c0173e06b94f66e4a6102 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
import csv
import os
import re
from ij import IJ
from loci.plugins.in import ImporterOptions
from loci.plugins import BF
from ij.plugin import ImagesToStack
from ij import io
#Records metadata (x,y location) for cells that were extracted with 1_find_extract_cells.py
#metadata will be... | 40.710843 | 137 | 0.693992 |
b919ab13ac46e733a617fc950c062280033c20b8 | 439 | py | Python | MAEnv/env_SingleCatchPigs/test_SingleCatchPigs.py | Abluceli/Multi-agent-Reinforcement-Learning-Algorithms | 15810a559e2f2cf9e5fcb158c083f9e9dd6012fc | [
"MIT"
] | 5 | 2020-05-25T03:08:09.000Z | 2022-02-27T05:57:28.000Z | MAEnv/env_SingleCatchPigs/test_SingleCatchPigs.py | Abluceli/Multi-agent-Reinforcement-Learning-Algorithms | 15810a559e2f2cf9e5fcb158c083f9e9dd6012fc | [
"MIT"
] | 1 | 2020-12-22T01:35:36.000Z | 2022-01-28T01:51:06.000Z | MAEnv/env_SingleCatchPigs/test_SingleCatchPigs.py | Abluceli/Multi-agent-Reinforcement-Learning-Algorithms | 15810a559e2f2cf9e5fcb158c083f9e9dd6012fc | [
"MIT"
] | 1 | 2020-05-06T01:56:55.000Z | 2020-05-06T01:56:55.000Z | from env_SingleCatchPigs import EnvSingleCatchPigs
import random
env = EnvSingleCatchPigs(7)
max_iter = 10000
env.set_agent_at([2, 2], 0)
env.set_pig_at([4, 4], 0)
for i in range(max_iter):
print("iter= ", i)
env.render()
action = random.randint(0, 4)
print('action is', action)
reward, done = env.s... | 24.388889 | 50 | 0.658314 |
b91c1523d70c0416c1afa5a4c6a25a3d2f1e426b | 3,417 | py | Python | eust/tables/data.py | rasmuse/eust | 2138076d52c0ffa20fba10e4e0319dd50c4e8a91 | [
"MIT"
] | 1 | 2021-03-14T04:06:02.000Z | 2021-03-14T04:06:02.000Z | eust/tables/data.py | rasmuse/eust | 2138076d52c0ffa20fba10e4e0319dd50c4e8a91 | [
"MIT"
] | 9 | 2019-04-29T09:01:39.000Z | 2021-11-15T17:48:36.000Z | eust/tables/data.py | rasmuse/eust | 2138076d52c0ffa20fba10e4e0319dd50c4e8a91 | [
"MIT"
] | 1 | 2019-10-23T08:56:33.000Z | 2019-10-23T08:56:33.000Z | # -*- coding: utf-8 -*-
import re
import gzip
import pandas as pd
import numpy as np
from eust.core import _download_file, conf
_DIMENSION_NAME_RE = re.compile(r"^[a-z_0-9]+$")
_YEAR_RE = re.compile(r"^(1|2)[0-9]{3}$")
_TSV_GZ_FILENAME = "data.tsv.gz"
_HDF_FILENAME = "data.h5"
_HDF_TABLE_PATH = "eurostat_tab... | 26.695313 | 78 | 0.654375 |
b91ce0003a23729f5cf4b45b783933c9e0cd6696 | 22,196 | py | Python | utils.py | fatemehtd/Echo-SyncNet | ebb280e83a67b31436c4cfa420f9c06a92ac8c12 | [
"MIT"
] | 6 | 2021-03-19T16:55:30.000Z | 2022-03-15T08:41:56.000Z | utils.py | matiasmolinas/Echo-SyncNet | f7f81ead7a24d7574c0668df3765ef58fd71d54d | [
"MIT"
] | 3 | 2021-10-01T22:15:44.000Z | 2022-03-25T03:12:47.000Z | utils.py | matiasmolinas/Echo-SyncNet | f7f81ead7a24d7574c0668df3765ef58fd71d54d | [
"MIT"
] | 3 | 2021-03-19T16:55:35.000Z | 2022-02-03T10:40:48.000Z |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from config import CONFIG
import json
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt # pylint: disable=g-import-not-at-top
import io
import math
import os
import time
from absl i... | 36.748344 | 113 | 0.621193 |
b91d0a28a2d3c169f55ef3fbe14306db5438a499 | 8,468 | py | Python | UnityPy/classes/Sprite.py | dblack2056/UnityPy | 303291e46ddfbf266131237e59e6b1b5c46a9ca4 | [
"MIT"
] | null | null | null | UnityPy/classes/Sprite.py | dblack2056/UnityPy | 303291e46ddfbf266131237e59e6b1b5c46a9ca4 | [
"MIT"
] | null | null | null | UnityPy/classes/Sprite.py | dblack2056/UnityPy | 303291e46ddfbf266131237e59e6b1b5c46a9ca4 | [
"MIT"
] | null | null | null | from enum import IntEnum
from .Mesh import BoneWeights4, SubMesh, VertexData
from .NamedObject import NamedObject
from .PPtr import PPtr, save_ptr
from ..export import SpriteHelper
from ..enums import SpriteMeshType
from ..streams import EndianBinaryWriter
class SpriteVertex:
def __init__(self, reader):
... | 34.563265 | 90 | 0.599906 |
b91e27e8ce2a32cb1f2fa0c55d35f35399d00f99 | 11,123 | py | Python | eazy/filters.py | albertfxwang/eazy-py | bcfd8a1e49f077adc794202871345542ab29800b | [
"MIT"
] | null | null | null | eazy/filters.py | albertfxwang/eazy-py | bcfd8a1e49f077adc794202871345542ab29800b | [
"MIT"
] | null | null | null | eazy/filters.py | albertfxwang/eazy-py | bcfd8a1e49f077adc794202871345542ab29800b | [
"MIT"
] | null | null | null | import numpy as np
import os
from astropy.table import Table
from . import utils
__all__ = ["FilterDefinition", "FilterFile", "ParamFilter"]
VEGA_FILE = os.path.join(utils.path_to_eazy_data(),
'alpha_lyr_stis_008.fits')
VEGA = Table.read(VEGA_FILE)
for c in VEGA.col... | 30.225543 | 134 | 0.507687 |
b91e9c056c9dab4c7981c513788ac7b746223cf5 | 672 | py | Python | LeetCode/106.py | KevinTMtz/CompetitiveProgramming | 0bf8a297c404073df707b6d7b06965b055ccd872 | [
"MIT"
] | 1 | 2020-12-08T02:01:18.000Z | 2020-12-08T02:01:18.000Z | LeetCode/106.py | KevinTMtz/CompetitiveProgramming | 0bf8a297c404073df707b6d7b06965b055ccd872 | [
"MIT"
] | null | null | null | LeetCode/106.py | KevinTMtz/CompetitiveProgramming | 0bf8a297c404073df707b6d7b06965b055ccd872 | [
"MIT"
] | null | null | null | #
# LeetCode
#
# Problem - 106
# URL - https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/
#
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = ri... | 24 | 97 | 0.651786 |
b91f064ec51160dd5a168a0ea9d44e81a3af31b7 | 44,880 | py | Python | evalml/automl/automl_search.py | skvorekn/evalml | 2cbfa344ec3fdc0fb0f4a0f1093811135b9b97d8 | [
"BSD-3-Clause"
] | null | null | null | evalml/automl/automl_search.py | skvorekn/evalml | 2cbfa344ec3fdc0fb0f4a0f1093811135b9b97d8 | [
"BSD-3-Clause"
] | null | null | null | evalml/automl/automl_search.py | skvorekn/evalml | 2cbfa344ec3fdc0fb0f4a0f1093811135b9b97d8 | [
"BSD-3-Clause"
] | null | null | null | import copy
import time
from collections import defaultdict
import cloudpickle
import numpy as np
import pandas as pd
import woodwork as ww
from sklearn.model_selection import BaseCrossValidator
from .pipeline_search_plots import PipelineSearchPlots
from evalml.automl.automl_algorithm import IterativeAlgorithm
from ... | 50.145251 | 234 | 0.660561 |
b9206e8febc3abecc98cfdec65d8f8f8f61e43fc | 782 | py | Python | graphql_social_auth/mutations.py | deepsourcelabs/django-graphql-social-auth | a0cc7715144dc289ccb4d2430e7c3b94fc1dffba | [
"MIT"
] | 1 | 2021-09-03T11:55:33.000Z | 2021-09-03T11:55:33.000Z | graphql_social_auth/mutations.py | deepsourcelabs/django-graphql-social-auth | a0cc7715144dc289ccb4d2430e7c3b94fc1dffba | [
"MIT"
] | null | null | null | graphql_social_auth/mutations.py | deepsourcelabs/django-graphql-social-auth | a0cc7715144dc289ccb4d2430e7c3b94fc1dffba | [
"MIT"
] | null | null | null | import graphene
from graphql_jwt.decorators import setup_jwt_cookie
from . import mixins, types
from .decorators import social_auth
| 25.225806 | 68 | 0.726343 |
b92225fd1fc48f3b53478df0ef2d1501b1d04475 | 1,625 | py | Python | yellowbrick/regressor/base.py | Juan0001/yellowbrick-docs-zh | 36275d9704fc2a946c5bec5f802106bb5281efd1 | [
"Apache-2.0"
] | 20 | 2018-03-24T02:29:20.000Z | 2022-03-03T05:01:40.000Z | yellowbrick/regressor/base.py | Juan0001/yellowbrick-docs-zh | 36275d9704fc2a946c5bec5f802106bb5281efd1 | [
"Apache-2.0"
] | 4 | 2018-03-20T12:01:17.000Z | 2019-04-07T16:02:19.000Z | yellowbrick/regressor/base.py | Juan0001/yellowbrick-docs-zh | 36275d9704fc2a946c5bec5f802106bb5281efd1 | [
"Apache-2.0"
] | 5 | 2018-03-17T08:18:57.000Z | 2019-11-15T02:20:20.000Z | # yellowbrick.regressor.base
# Base classes for regressor Visualizers.
#
# Author: Rebecca Bilbro <rbilbro@districtdatalabs.com>
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Fri Jun 03 10:30:36 2016 -0700
#
# Copyright (C) 2016 District Data Labs
# For license information, see LICENSE.tx... | 30.660377 | 79 | 0.582154 |
b92247a49fd2631992a5eddee925c5305320a529 | 2,941 | py | Python | contrib/stack/stripmapStack/crossmul.py | falkamelung/isce2 | edea69d4b6216f4ac729eba78f12547807a2751a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | contrib/stack/stripmapStack/crossmul.py | falkamelung/isce2 | edea69d4b6216f4ac729eba78f12547807a2751a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | contrib/stack/stripmapStack/crossmul.py | falkamelung/isce2 | edea69d4b6216f4ac729eba78f12547807a2751a | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-06-05T16:39:25.000Z | 2021-06-05T16:39:25.000Z | #!/usr/bin/env python3
import os
import argparse
import logging
import isce
import isceobj
from components.stdproc.stdproc import crossmul
from iscesys.ImageUtil.ImageUtil import ImageUtil as IU
def createParser():
'''
Command Line Parser.
'''
parser = argparse.ArgumentParser( description='Generat... | 27.485981 | 102 | 0.682761 |
b92338655b37aa1b9646d78826676f4639eac7d3 | 550 | py | Python | 27. Remove Element/solution2.py | sunshot/LeetCode | 8f6503201831055f1d49ed3abb25be44a13ec317 | [
"MIT"
] | null | null | null | 27. Remove Element/solution2.py | sunshot/LeetCode | 8f6503201831055f1d49ed3abb25be44a13ec317 | [
"MIT"
] | null | null | null | 27. Remove Element/solution2.py | sunshot/LeetCode | 8f6503201831055f1d49ed3abb25be44a13ec317 | [
"MIT"
] | null | null | null | from typing import List
if __name__== '__main__':
solution = Solution()
nums = [3,2,2,3]
val = 3
ans = solution.removeElement(nums, val)
# print(ans)
print(nums[:ans]) | 23.913043 | 62 | 0.461818 |
b923cd998b5a122c2fa8e86b09305b2b291d6507 | 3,873 | py | Python | platformio/commands/home/run.py | Granjow/platformio-core | 71ae579bc07b2e11fec16acda482dea04bc3a359 | [
"Apache-2.0"
] | 4,744 | 2016-11-28T14:37:47.000Z | 2022-03-31T12:35:56.000Z | platformio/commands/home/run.py | Granjow/platformio-core | 71ae579bc07b2e11fec16acda482dea04bc3a359 | [
"Apache-2.0"
] | 3,424 | 2016-11-27T22:45:41.000Z | 2022-03-31T21:40:03.000Z | platformio/commands/home/run.py | Granjow/platformio-core | 71ae579bc07b2e11fec16acda482dea04bc3a359 | [
"Apache-2.0"
] | 576 | 2016-12-01T18:48:22.000Z | 2022-03-30T02:27:35.000Z | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | 38.73 | 88 | 0.737155 |
b924107dfd6ae9e56411cce662afa3db86b021e5 | 11,450 | py | Python | appengine/components/components/machine_provider/rpc_messages.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2017-10-30T15:08:10.000Z | 2017-10-30T15:08:10.000Z | appengine/components/components/machine_provider/rpc_messages.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/components/components/machine_provider/rpc_messages.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Messages for the Machine Provider API."""
# pylint: disable=unused-wildcard-import, wildcard-import
from protorpc import messages
from compo... | 38.945578 | 79 | 0.773537 |
b925f7b3126896a3611797c97e1fa8d0eee2234c | 564 | py | Python | webscraping.py | carvalho-fdec/DesafioDSA | fec9742bd77ddc3923ed616b6511cce87de48968 | [
"MIT"
] | null | null | null | webscraping.py | carvalho-fdec/DesafioDSA | fec9742bd77ddc3923ed616b6511cce87de48968 | [
"MIT"
] | null | null | null | webscraping.py | carvalho-fdec/DesafioDSA | fec9742bd77ddc3923ed616b6511cce87de48968 | [
"MIT"
] | null | null | null | # webscraping test
import urllib.request
from bs4 import BeautifulSoup
with urllib.request.urlopen('http://www.netvasco.com.br') as url:
page = url.read()
#print(page)
print(url.geturl())
print(url.info())
print(url.getcode())
# Analise o html na varivel 'page' e armazene-o no formato Beautiful ... | 18.193548 | 74 | 0.687943 |
b9270600c4aae588202efc6c296f0228f4d2527a | 21,441 | py | Python | tensorboard/backend/event_processing/data_provider_test.py | hongxu-jia/tensorboard | 98d4dadc61fd5a0580bed808653c59fb37748893 | [
"Apache-2.0"
] | 1 | 2021-01-07T14:58:47.000Z | 2021-01-07T14:58:47.000Z | tensorboard/backend/event_processing/data_provider_test.py | hongxu-jia/tensorboard | 98d4dadc61fd5a0580bed808653c59fb37748893 | [
"Apache-2.0"
] | null | null | null | tensorboard/backend/event_processing/data_provider_test.py | hongxu-jia/tensorboard | 98d4dadc61fd5a0580bed808653c59fb37748893 | [
"Apache-2.0"
] | 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 applicabl... | 39.559041 | 80 | 0.583741 |
b927180a3b55091e89983dcae5d96dd47f1373ae | 4,172 | py | Python | extras/amld/cloud/quickdraw_rnn/task.py | luyang1210/tensorflow | 948324f4cafdc97ae51c0e44fc1c28677a6e2e8a | [
"Apache-2.0"
] | 1 | 2019-04-28T15:46:45.000Z | 2019-04-28T15:46:45.000Z | extras/amld/cloud/quickdraw_rnn/task.py | luyang1210/tensorflow | 948324f4cafdc97ae51c0e44fc1c28677a6e2e8a | [
"Apache-2.0"
] | null | null | null | extras/amld/cloud/quickdraw_rnn/task.py | luyang1210/tensorflow | 948324f4cafdc97ae51c0e44fc1c28677a6e2e8a | [
"Apache-2.0"
] | 1 | 2020-11-18T04:43:33.000Z | 2020-11-18T04:43:33.000Z | """Experiment wrapper for training on Cloud ML."""
import argparse, glob, os
import tensorflow as tf
# From this package.
import model
def generate_experiment_fn(data_dir, train_batch_size, eval_batch_size,
train_steps, eval_steps, cell_size, hidden,
**experime... | 28.972222 | 81 | 0.613375 |
b92725db4e0f08b5ebf9656b39a1e567c20d5ffb | 150 | py | Python | A/116A.py | johnggo/Codeforces-Solutions | 4127ae6f72294b5781fb94c42b69cfef570aae42 | [
"MIT"
] | 1 | 2020-08-25T19:59:11.000Z | 2020-08-25T19:59:11.000Z | A/116A.py | johnggo/Codeforces-Solutions | 4127ae6f72294b5781fb94c42b69cfef570aae42 | [
"MIT"
] | null | null | null | A/116A.py | johnggo/Codeforces-Solutions | 4127ae6f72294b5781fb94c42b69cfef570aae42 | [
"MIT"
] | null | null | null | # Time: 310 ms
# Memory: 1664 KB
n = int(input())
e = 0
s = 0
for i in range(n):
s =s- eval(input().replace(' ', '-'))
e = max(e, s)
print(e)
| 15 | 41 | 0.506667 |
b9299565a87f9a052852f5ae8225680eeeb2de61 | 1,923 | py | Python | tests/test_serialize.py | aferrall/redner | be52e4105140f575f153d640ba889eb6e6015616 | [
"MIT"
] | 1,146 | 2018-11-11T01:47:18.000Z | 2022-03-31T14:11:03.000Z | tests/test_serialize.py | Awcrr/redner | b4f57037af26b720d916bbaf26103a3499101a9f | [
"MIT"
] | 177 | 2018-11-13T22:48:25.000Z | 2022-03-30T07:19:29.000Z | tests/test_serialize.py | Awcrr/redner | b4f57037af26b720d916bbaf26103a3499101a9f | [
"MIT"
] | 127 | 2018-11-11T02:32:17.000Z | 2022-03-31T07:24:03.000Z | import pyredner
import numpy as np
import torch
cam = pyredner.Camera(position = torch.tensor([0.0, 0.0, -5.0]),
look_at = torch.tensor([0.0, 0.0, 0.0]),
up = torch.tensor([0.0, 1.0, 0.0]),
fov = torch.tensor([45.0]), # in degree
c... | 34.339286 | 83 | 0.560582 |
b92a551001bac345f595f68ea0440f1231ad8e57 | 2,302 | py | Python | src/zope/publisher/tests/test_requestdataproperty.py | Shoobx/zope.publisher | 790e82045d7ae06146bd8c5e27139555b9ec1641 | [
"ZPL-2.1"
] | 3 | 2016-11-18T08:58:09.000Z | 2021-02-01T06:13:45.000Z | src/zope/publisher/tests/test_requestdataproperty.py | Shoobx/zope.publisher | 790e82045d7ae06146bd8c5e27139555b9ec1641 | [
"ZPL-2.1"
] | 42 | 2015-06-02T19:26:10.000Z | 2022-03-15T07:24:03.000Z | src/zope/publisher/tests/test_requestdataproperty.py | Shoobx/zope.publisher | 790e82045d7ae06146bd8c5e27139555b9ec1641 | [
"ZPL-2.1"
] | 7 | 2015-04-03T09:29:31.000Z | 2021-06-07T14:47:45.000Z | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | 27.404762 | 78 | 0.614683 |
b92a9fd2163ca676afa6df078248d3bd1b2d8259 | 146 | py | Python | tools/scoring/dimensions/__init__.py | ahemphill/digitalbuildings | 56a03b0055f9f771c3ed0a962f6bfb2b1d968947 | [
"Apache-2.0"
] | null | null | null | tools/scoring/dimensions/__init__.py | ahemphill/digitalbuildings | 56a03b0055f9f771c3ed0a962f6bfb2b1d968947 | [
"Apache-2.0"
] | null | null | null | tools/scoring/dimensions/__init__.py | ahemphill/digitalbuildings | 56a03b0055f9f771c3ed0a962f6bfb2b1d968947 | [
"Apache-2.0"
] | null | null | null | """ Enable import """
from os import path
import sys
sys.path.append(
path.abspath(path.join('tools', 'validators', 'instance_validator')))
| 18.25 | 73 | 0.69863 |
b92b002b9d57e933962f9291a749b365792c1b9a | 1,444 | py | Python | src/thornfield/caches/cache_compression_decorator.py | drorvinkler/thornfield | 3c5bb8afaa96097bc71cccb119394a0f351d828f | [
"MIT"
] | 2 | 2020-11-24T13:27:14.000Z | 2020-11-24T13:29:40.000Z | src/thornfield/caches/cache_compression_decorator.py | drorvinkler/thornfield | 3c5bb8afaa96097bc71cccb119394a0f351d828f | [
"MIT"
] | 1 | 2020-11-24T13:33:45.000Z | 2020-11-24T15:10:41.000Z | src/thornfield/caches/cache_compression_decorator.py | drorvinkler/thornfield | 3c5bb8afaa96097bc71cccb119394a0f351d828f | [
"MIT"
] | null | null | null | from typing import Callable, AnyStr, Optional
from zlib import compress as default_compress, decompress as default_decompress
from .cache import Cache
from ..constants import NOT_FOUND
| 29.469388 | 79 | 0.628809 |
b92be50c97841e71ffe31a7d7baa405cc9ba5537 | 38,846 | py | Python | manim/mobject/vector_field.py | kdkasad/manim | 249b1dcab0f18a43e953b5fda517734084c0a941 | [
"MIT"
] | 2 | 2021-12-07T14:25:07.000Z | 2021-12-09T14:16:10.000Z | manim/mobject/vector_field.py | kdkasad/manim | 249b1dcab0f18a43e953b5fda517734084c0a941 | [
"MIT"
] | 3 | 2021-09-15T08:11:29.000Z | 2021-10-06T02:00:03.000Z | manim/mobject/vector_field.py | kdkasad/manim | 249b1dcab0f18a43e953b5fda517734084c0a941 | [
"MIT"
] | 3 | 2020-04-10T20:38:06.000Z | 2020-09-30T03:03:45.000Z | """Mobjects representing vector fields."""
__all__ = [
"VectorField",
"ArrowVectorField",
"StreamLines",
]
import itertools as it
import random
from math import ceil, floor
from typing import Callable, Iterable, Optional, Sequence, Tuple, Type
import numpy as np
from colour import Color
from PIL import I... | 36.96099 | 185 | 0.57298 |
b92c7cbb70fbc4dd2dec20c24e021d0f6405bd12 | 19,900 | py | Python | marshmallow_dataclass/__init__.py | dan-starkware/marshmallow_dataclass | 25c3e041d8c6a87d740984e57a5bd29b768afbf8 | [
"MIT"
] | null | null | null | marshmallow_dataclass/__init__.py | dan-starkware/marshmallow_dataclass | 25c3e041d8c6a87d740984e57a5bd29b768afbf8 | [
"MIT"
] | null | null | null | marshmallow_dataclass/__init__.py | dan-starkware/marshmallow_dataclass | 25c3e041d8c6a87d740984e57a5bd29b768afbf8 | [
"MIT"
] | null | null | null | """
This library allows the conversion of python 3.7's :mod:`dataclasses`
to :mod:`marshmallow` schemas.
It takes a python class, and generates a marshmallow schema for it.
Simple example::
from marshmallow import Schema
from marshmallow_dataclass import dataclass
@dataclass
class Point:
x:flo... | 34.133791 | 110 | 0.647538 |
b92e1fb5ed102dbd1d7dc2d4b0ef720e265a976f | 1,045 | py | Python | electrum_trc/scripts/txradar.py | TheSin-/electrum-trc | d2f5b15fd4399a9248cce0d63e20128f3f54e69c | [
"MIT"
] | 1 | 2019-08-20T18:05:32.000Z | 2019-08-20T18:05:32.000Z | electrum_trc/scripts/txradar.py | TheSin-/electrum-trc | d2f5b15fd4399a9248cce0d63e20128f3f54e69c | [
"MIT"
] | 1 | 2022-03-14T19:45:31.000Z | 2022-03-14T19:45:31.000Z | electrum_trc/scripts/txradar.py | TheSin-/electrum-trc | d2f5b15fd4399a9248cce0d63e20128f3f54e69c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import asyncio
from electrum_trc.network import filter_protocol, Network
from electrum_trc.util import create_and_start_event_loop, log_exceptions
try:
txid = sys.argv[1]
except:
print("usage: txradar txid")
sys.exit(1)
loop, stopping_fut, loop_thread = create_and_star... | 28.243243 | 99 | 0.675598 |
b92ef9143bb84fe6d37501129ff559d015cf231e | 1,091 | py | Python | jp.atcoder/dp/dp_g/24586988.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/dp/dp_g/24586988.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/dp/dp_g/24586988.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
import typing
import numpy as np
OJ = 'ONLINE_JUDGE'
if sys.argv[-1] == OJ:
from numba import i8, njit
from numba.pycc import CC
cc = CC('my_module')
fn = solve
signature = (i8, i8[:, :])
cc.export(
fn.__name__,
signature,
)(fn)
cc.compile()
exit(0)
from my_module impor... | 13.810127 | 30 | 0.505041 |
b930187de467bdc99d38231d4b217f6589a62613 | 2,039 | py | Python | starteMessung.py | jkerpe/TroubleBubble | 813ad797398b9f338f136bcb96c6c92186d92ebf | [
"MIT"
] | null | null | null | starteMessung.py | jkerpe/TroubleBubble | 813ad797398b9f338f136bcb96c6c92186d92ebf | [
"MIT"
] | null | null | null | starteMessung.py | jkerpe/TroubleBubble | 813ad797398b9f338f136bcb96c6c92186d92ebf | [
"MIT"
] | 1 | 2021-08-09T14:57:57.000Z | 2021-08-09T14:57:57.000Z | from datetime import datetime
from pypylon import pylon
import nimmAuf
import smbus2
import os
import argparse
import bestimmeVolumen
from threading import Thread
import time
programmstart = time.time()
# Argumente parsen (bei Aufruf im Terminal z.B. 'starteMessung.py -n 100' eingeben)
ap = argparse.ArgumentParser(de... | 34.559322 | 169 | 0.703776 |
b93050ad4c3c78860eb79accbddb8566a673cb7e | 3,211 | py | Python | application/services/decart.py | Sapfir0/web-premier-eye | f060b01e98a923374ea60360ba133caaa654b6c7 | [
"MIT"
] | null | null | null | application/services/decart.py | Sapfir0/web-premier-eye | f060b01e98a923374ea60360ba133caaa654b6c7 | [
"MIT"
] | null | null | null | application/services/decart.py | Sapfir0/web-premier-eye | f060b01e98a923374ea60360ba133caaa654b6c7 | [
"MIT"
] | 1 | 2020-01-06T18:27:45.000Z | 2020-01-06T18:27:45.000Z | import os
import tempfile
| 28.927928 | 117 | 0.62753 |
b9312660991c249b5bd6faf4ead63f4150e99b7e | 4,915 | py | Python | pysnmp/EXTREME-RTSTATS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/EXTREME-RTSTATS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/EXTREME-RTSTATS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module EXTREME-RTSTATS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EXTREME-BASE-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:53:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, M... | 114.302326 | 713 | 0.790031 |