hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1db79199979276e38f7237dd32a74903102a2538 | 2,330 | py | Python | tests/test_utilities.py | xdb64/pyhstr | 16c568ec8e2943b84d16461e2eb469e8ec74bc3a | [
"MIT"
] | 13 | 2020-05-07T12:46:08.000Z | 2021-10-01T02:54:13.000Z | tests/test_utilities.py | overclockworked64/pyhstr | 16c568ec8e2943b84d16461e2eb469e8ec74bc3a | [
"MIT"
] | 20 | 2020-09-15T15:22:14.000Z | 2021-01-10T14:37:30.000Z | tests/test_utilities.py | overclockworked64/pyhstr | 16c568ec8e2943b84d16461e2eb469e8ec74bc3a | [
"MIT"
] | 3 | 2020-09-15T02:36:32.000Z | 2021-10-01T02:54:17.000Z | # pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-import
import os
import pytest
from pyhstr import utilities
from pyhstr.utilities import (
Shell,
detect_shell,
echo,
get_bpython_history_path,
get_ipython_history,
read,
remove_duplicates,
... | 22.843137 | 83 | 0.693133 |
1db792dabc92c59a74f0944f7407ad668dfed2ad | 2,194 | py | Python | DQN/config.py | weiyx16/Active-Perception | 7f8c44291afb8c1b117f94e99ff0f2f109fbe391 | [
"MIT"
] | 12 | 2019-07-08T13:33:56.000Z | 2021-11-15T11:35:13.000Z | DQN/config.py | weiyx16/Active-Perception | 7f8c44291afb8c1b117f94e99ff0f2f109fbe391 | [
"MIT"
] | 8 | 2019-07-23T09:10:26.000Z | 2021-01-19T06:22:44.000Z | DQN/config.py | weiyx16/Active-Perception | 7f8c44291afb8c1b117f94e99ff0f2f109fbe391 | [
"MIT"
] | 8 | 2019-01-22T16:47:10.000Z | 2021-11-15T11:35:14.000Z | class DQNConfig(object):
def __init__(self, FLAGS):
# ----------- Agent Params
self.scale = 50
# self.display = False
self.max_step = 400 * self.scale
self.memory_size = 50 * self.scale
self.batch_size = 16
# self.random_start = 30
self.cnn_format ... | 29.253333 | 88 | 0.555606 |
1db7a4b8bbb4aef4715b0ab086adc4b08279a160 | 5,753 | py | Python | load_data.py | tawnkramer/shark | 37650ea95c55e74dd5d2b4cafa7d00e4bb806454 | [
"MIT"
] | 62 | 2017-04-12T18:09:56.000Z | 2022-03-12T10:31:50.000Z | load_data.py | AutoRCCar/shark | 37650ea95c55e74dd5d2b4cafa7d00e4bb806454 | [
"MIT"
] | null | null | null | load_data.py | AutoRCCar/shark | 37650ea95c55e74dd5d2b4cafa7d00e4bb806454 | [
"MIT"
] | 16 | 2017-04-17T07:09:11.000Z | 2021-10-03T14:00:09.000Z | '''
LoadData
Handle loading image data and augmentation
Author: Tawn Kramer
'''
from __future__ import print_function
import os
import numpy as np
import fnmatch
import random
from PIL import Image
from PIL import ImageEnhance
import conf
#some images are getting cut off
min_image_size = 1 * 1024
def augment_image(im... | 33.447674 | 124 | 0.639145 |
1db845377be06ab9d49936ec983c46a0583f6ef5 | 11,156 | py | Python | utils/widgets/labeledWidgets.py | nicklovin/pipeline | 4d8e042783321e5b0ed7b8a713a7db4d2cef9adb | [
"BSD-2-Clause"
] | null | null | null | utils/widgets/labeledWidgets.py | nicklovin/pipeline | 4d8e042783321e5b0ed7b8a713a7db4d2cef9adb | [
"BSD-2-Clause"
] | null | null | null | utils/widgets/labeledWidgets.py | nicklovin/pipeline | 4d8e042783321e5b0ed7b8a713a7db4d2cef9adb | [
"BSD-2-Clause"
] | null | null | null | from functools import partial
from PySide2 import QtWidgets, QtCore, QtGui
from pipeline.utils.widgets import dynamicListWidgets as dyWidgets
class LabelLineEdit(QtWidgets.QWidget):
def __init__(
self,
title,
default_text='',
placeholder_text='',
... | 36.10356 | 108 | 0.621459 |
1db89a4a511a2c27fc36fcd67eafbcab91409480 | 2,945 | py | Python | tasty_alpha/__main__.py | jzajpt/tasty_alpha | 2f4969bc5b29a4d4ea19d8e11cc37ecbcff782c3 | [
"MIT"
] | 1 | 2020-10-19T08:07:26.000Z | 2020-10-19T08:07:26.000Z | tasty_alpha/__main__.py | jzajpt/tasty_alpha | 2f4969bc5b29a4d4ea19d8e11cc37ecbcff782c3 | [
"MIT"
] | null | null | null | tasty_alpha/__main__.py | jzajpt/tasty_alpha | 2f4969bc5b29a4d4ea19d8e11cc37ecbcff782c3 | [
"MIT"
] | 1 | 2022-02-13T07:58:03.000Z | 2022-02-13T07:58:03.000Z | import asyncio
from aiorun import run
import click
from click_datetime import Datetime
from datetime import datetime
import os
from .live.runner import run_livefeed
from .backtest.runner import run_backtest
@click.group()
def cli():
pass
@click.command()
@click.option(
'--strategy-file',
'-f',
requir... | 19.375 | 81 | 0.586418 |
1db8a15a3feb60be67f8064dccf4256324176608 | 177 | py | Python | other_stuff/PandasPlotify.py | PuuKala/My_random_stuff | 4564f79e97feb9d03bf9337fb2126dc22c2f1439 | [
"WTFPL"
] | null | null | null | other_stuff/PandasPlotify.py | PuuKala/My_random_stuff | 4564f79e97feb9d03bf9337fb2126dc22c2f1439 | [
"WTFPL"
] | null | null | null | other_stuff/PandasPlotify.py | PuuKala/My_random_stuff | 4564f79e97feb9d03bf9337fb2126dc22c2f1439 | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 29 15:54:20 2021
@author: buildbuntu
"""
from pandas import read_csv
df = read_csv("data.csv")
df.plot() | 14.75 | 35 | 0.655367 |
1db8c77d8b4d5fcfbf790742d924625cb8326bab | 22,073 | py | Python | vistrails/gui/mashups/mashups_manager.py | MaritimeResearchInstituteNetherlands/VisTrails | 9b42ca9b3550b599467b0c7dfa56f57bbd97a4f2 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/gui/mashups/mashups_manager.py | VizierDB/Vistrails | 895f7204fbf56a9cdf3f46afae72969c2fc64a24 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/gui/mashups/mashups_manager.py | VizierDB/Vistrails | 895f7204fbf56a9cdf3f46afae72969c2fc64a24 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | ###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | 48.834071 | 112 | 0.54501 |
1db8eeb8f7a665c45014389dad3d03c848cd6fe5 | 6,774 | py | Python | moa/tweet_poster.py | xurizaemon/moa | fad8fc16c6cd05040de334d1180a272d34ae1624 | [
"MIT"
] | null | null | null | moa/tweet_poster.py | xurizaemon/moa | fad8fc16c6cd05040de334d1180a272d34ae1624 | [
"MIT"
] | null | null | null | moa/tweet_poster.py | xurizaemon/moa | fad8fc16c6cd05040de334d1180a272d34ae1624 | [
"MIT"
] | null | null | null | import logging
import mimetypes
import os
import pprint as pp
import tempfile
import time
from typing import Optional
import requests
from requests.exceptions import SSLError
from twitter import TwitterError
from urllib3.exceptions import ProtocolError
from moa.message import Message
from moa.models import Mapping
fr... | 32.883495 | 110 | 0.551521 |
1db8f1b8da6901d1159581b46bd1632035e0628b | 9,823 | py | Python | qnarre/old/xlnet/train.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/old/xlnet/train.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/old/xlnet/train.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | """Pretraining on TPUs."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
from absl import app
from absl import flags
import absl.logging as _logging # pylint: disable=unused-import
import numpy as np
import tensorflow as tf
import model_utils... | 34.226481 | 95 | 0.699379 |
1db934b9d79acda91b51cd2875378f9a63e83730 | 10,130 | py | Python | whoville/cloudbreak/models/recommendation_request_json.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/models/recommendation_request_json.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/models/recommendation_request_json.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Cloudbreak API
Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud... | 31.459627 | 984 | 0.635044 |
1db9671601d3341ee9ea3fb136de87154bcbd320 | 447 | py | Python | src/bdd/flights_planner/BusinessFlight.py | tborzyszkowski/TestAutomationInPython | 843c71df796588e181466d9b9b549f03dd907a6e | [
"MIT"
] | 2 | 2020-10-08T09:44:12.000Z | 2021-10-08T08:32:19.000Z | src/bdd/flights_planner/BusinessFlight.py | tborzyszkowski/TestAutomationInPython | 843c71df796588e181466d9b9b549f03dd907a6e | [
"MIT"
] | null | null | null | src/bdd/flights_planner/BusinessFlight.py | tborzyszkowski/TestAutomationInPython | 843c71df796588e181466d9b9b549f03dd907a6e | [
"MIT"
] | 1 | 2020-10-19T14:08:00.000Z | 2020-10-19T14:08:00.000Z | from ..flights_planner.Flight import Flight
class BusinessFlight(Flight):
def __init__(self, flight_id):
super().__init__(flight_id)
def add_passenger(self, passenger):
number_of_passengers = len(self.passenger_set)
if passenger.vip:
self.passenger_set.add(passenger)
... | 27.9375 | 66 | 0.693512 |
1db96f3934f599bd4f81be87e190ca671e2210bb | 2,310 | py | Python | tests/api/v1_3_3/test_users.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v1_3_3/test_users.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v1_3_3/test_users.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI users API fixtures and tests.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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, inc... | 34.477612 | 95 | 0.774026 |
1db97020a2a81f4d034543e722a6cb7ba823f44a | 11,903 | py | Python | tensorflow/contrib/session_bundle/bundle_shim.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/session_bundle/bundle_shim.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/session_bundle/bundle_shim.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 36 | 2017-07-27T21:12:40.000Z | 2022-02-03T16:45:56.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.816547 | 80 | 0.732336 |
1db97beca44228aad445ee642f97d0a59651c7b5 | 21,544 | py | Python | alipay/aop/api/domain/AlipayEcoMycarParkingParkinglotinfoCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayEcoMycarParkingParkinglotinfoCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayEcoMycarParkingParkinglotinfoCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.BusinessItem import BusinessItem
class AlipayEcoMycarParkingParkinglotinfoCreateModel(object):
def __init__(self):
self._agent_id = None
self._business_isv = ... | 36.330523 | 105 | 0.622726 |
1db9945d0a006ee0eef48ac4ca55f27881406e8a | 1,213 | py | Python | O3/_10_bias_variance_tradeoff/bias_variance_tradeoff.py | ShAlireza/ML-Tries | 4516be7a3275c9bdedd7bd258800be384b6b34f0 | [
"MIT"
] | null | null | null | O3/_10_bias_variance_tradeoff/bias_variance_tradeoff.py | ShAlireza/ML-Tries | 4516be7a3275c9bdedd7bd258800be384b6b34f0 | [
"MIT"
] | null | null | null | O3/_10_bias_variance_tradeoff/bias_variance_tradeoff.py | ShAlireza/ML-Tries | 4516be7a3275c9bdedd7bd258800be384b6b34f0 | [
"MIT"
] | null | null | null | """The bias-variance tradeoff
Often, researchers use the terms "bias" and "variance" or "bias-
variance tradeoff" to describe the performance of a model—that
is, you may stumble upon talks, books, or articles where people
say that a model has a "high variance" or "high bias." So, what
does that mea... | 46.653846 | 82 | 0.751031 |
1db994b961c9379066f88be44023646f44691026 | 899 | py | Python | cms/old_migrations_21_sep/0005_auto_20170813_1641.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | cms/old_migrations_21_sep/0005_auto_20170813_1641.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | cms/old_migrations_21_sep/0005_auto_20170813_1641.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-08-13 16:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cms', '0004_auto_20170810_1659'),
]
operations = [
migrations.AddField(
... | 29 | 97 | 0.614016 |
1db9ad19bf51d101949c01297da7802582156190 | 9,674 | py | Python | bin/demo.py | LaudateCorpus1/orrb | 1a92b3afb6cce4758b0338ac0e2cd84a22274d38 | [
"Apache-2.0"
] | 213 | 2019-06-28T06:35:37.000Z | 2022-03-04T01:34:56.000Z | bin/demo.py | lilianweng/orrb | d98398e0f7073aad3af5ee3ad1506c2100ee28b8 | [
"Apache-2.0"
] | 5 | 2019-06-29T06:16:49.000Z | 2019-11-20T16:03:58.000Z | bin/demo.py | LaudateCorpus1/orrb | 1a92b3afb6cce4758b0338ac0e2cd84a22274d38 | [
"Apache-2.0"
] | 27 | 2019-06-28T06:38:27.000Z | 2021-12-08T16:12:14.000Z | import atexit
import click
import gym
import logging
import orrb
import orrb.utils as utils
import os
import subprocess
import sys
import tempfile
import numpy as np
from google.protobuf import json_format
from queue import Queue
import orrb.protos.RendererConfig_pb2 as renderer_config_pb2
@click.group()
def cli()... | 36.923664 | 94 | 0.639032 |
1db9b87f04d226ef950b4b4c1c9d108b57e0af39 | 3,492 | py | Python | service.py | helviojr/plugin.video.netflix | f79811835c998709668f94fd350bdf428d797c64 | [
"MIT"
] | 15 | 2018-12-29T18:11:00.000Z | 2019-03-23T19:45:21.000Z | service.py | helviojr/plugin.video.netflix | f79811835c998709668f94fd350bdf428d797c64 | [
"MIT"
] | 3 | 2019-01-06T14:57:58.000Z | 2019-01-28T20:38:35.000Z | service.py | wintuxx/plugin.video.netflix | 7db7f6398a91fdf064d4fd1cc0fdb1b08f0a39a9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Author: asciidisco
# Module: service
# Created on: 13.01.2017
# License: MIT https://goo.gl/5bMj3H
# pylint: disable=wrong-import-position
"""Kodi plugin for Netflix (https://netflix.com)"""
from __future__ import unicode_literals
import sys
import threading
import traceback
# Import and int... | 31.459459 | 78 | 0.60567 |
1db9c790db5e54a8642ac9d3940f8b6c61334fee | 22 | py | Python | jknowrob/__init__.py | sasjonge/jupyter-knowrob | 1df408e86cae7629e57f531a1ca570a705b6ab50 | [
"MIT"
] | 14 | 2018-11-21T14:02:30.000Z | 2022-01-29T07:06:58.000Z | jknowrob/__init__.py | sasjonge/jupyter-knowrob | 1df408e86cae7629e57f531a1ca570a705b6ab50 | [
"MIT"
] | 10 | 2018-10-26T21:52:53.000Z | 2020-06-02T20:23:10.000Z | network/swipl/setup/jupyter-swi-prolog/jswipl/__init__.py | Gamma749/VeracityProjectDemonstration | 158f99907e4cc2417bba198446593edaaba8ec74 | [
"MIT"
] | 4 | 2019-09-28T17:22:51.000Z | 2022-03-17T23:37:41.000Z | __all__ = ["jupyter"]
| 11 | 21 | 0.636364 |
1dba3b1bfd0fff3abd8cf51cdc179062206d8efb | 732 | py | Python | ncortex/examples/run_pendulum_ddp.py | pvarin/ncortex | e0c1cd1815148649920db100e6c8d006312ea408 | [
"MIT"
] | null | null | null | ncortex/examples/run_pendulum_ddp.py | pvarin/ncortex | e0c1cd1815148649920db100e6c8d006312ea408 | [
"MIT"
] | null | null | null | ncortex/examples/run_pendulum_ddp.py | pvarin/ncortex | e0c1cd1815148649920db100e6c8d006312ea408 | [
"MIT"
] | null | null | null | ''' An example that runs and renders a pendulum agent.
'''
import autograd.numpy as np
import matplotlib.pyplot as plt
from ncortex.envs import Pendulum
from ncortex.optimization.ddp import DDP
def main():
''' Run an example DDP on the Pendulum environment.
'''
# Initialize the environment and solve with ... | 25.241379 | 74 | 0.632514 |
1dba5c4ff7b167a218baa61e36999ed0f4e036ab | 4,405 | py | Python | influxdb_client/domain/function_expression.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/function_expression.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/function_expression.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class Func... | 26.065089 | 124 | 0.557321 |
1dba7d33416eb3ad3c98fd05615ab1939e70ab0f | 8,394 | py | Python | tests/test_views_phone.py | jibaku/django-two-factor-auth | bf9d0812ab11320a6cadc6709c382a03184f2e31 | [
"MIT"
] | null | null | null | tests/test_views_phone.py | jibaku/django-two-factor-auth | bf9d0812ab11320a6cadc6709c382a03184f2e31 | [
"MIT"
] | null | null | null | tests/test_views_phone.py | jibaku/django-two-factor-auth | bf9d0812ab11320a6cadc6709c382a03184f2e31 | [
"MIT"
] | 1 | 2020-04-27T13:06:40.000Z | 2020-04-27T13:06:40.000Z | # -*- coding: utf-8 -*-
try:
from unittest import mock
except ImportError:
import mock
from django.conf import settings
from django.shortcuts import resolve_url
from django.test import TestCase
from django.test.utils import override_settings
from django.urls import reverse, reverse_lazy
from django.utils impo... | 40.355769 | 109 | 0.648201 |
1dba96f46b1baa04d30b20e471a0d00834f2fb58 | 1,159 | py | Python | bob_white/bwhite_05.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 3 | 2020-11-16T15:20:11.000Z | 2020-12-11T17:01:42.000Z | bob_white/bwhite_05.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | null | null | null | bob_white/bwhite_05.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 1 | 2020-12-13T04:42:44.000Z | 2020-12-13T04:42:44.000Z | pzl = open("day_05.input").read().splitlines()
passes = []
for boarding_pass in pzl:
rows = range(128)
columns = range(8)
for val in boarding_pass:
if val == "F":
rows = rows[: len(rows) // 2]
elif val == "B":
rows = rows[len(rows) // 2 :]
elif val == "L":
... | 39.965517 | 152 | 0.623814 |
1dbab6004e8fa6f181345f22a7574a577d31bb55 | 545 | py | Python | tests/test_contrary.py | rbricheno/contrary | 23d790027f7deb9ccad8f356ee8a04a8b00ac05f | [
"MIT"
] | null | null | null | tests/test_contrary.py | rbricheno/contrary | 23d790027f7deb9ccad8f356ee8a04a8b00ac05f | [
"MIT"
] | null | null | null | tests/test_contrary.py | rbricheno/contrary | 23d790027f7deb9ccad8f356ee8a04a8b00ac05f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# test_contrary.py - unittests for contrary
import unittest
import contrary
class TestContrary(unittest.TestCase):
"""Tests for `contrary.py`."""
def test_contrary_blank_list_raises(self):
self.assertRaises(AssertionError, contrary.Contrary, [])
def test_contrary_none_ra... | 24.772727 | 79 | 0.726606 |
1dbab88142879c70ddeff4f9d88d2bc48a3ff732 | 263 | py | Python | terrascript/airtable/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/airtable/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/airtable/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/airtable/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class airtable_table(terrascript.Data):
pass
| 18.785714 | 79 | 0.771863 |
1dbac67aeb76a523ee2c24846a12e1e51c9484a7 | 4,660 | py | Python | tests/python/contrib/test_hexagon/topi/test_conv2d_transpose.py | pfk-beta/tvm | 5ecb8c384a66933fec8c7f033cba03337eb1a726 | [
"Apache-2.0"
] | null | null | null | tests/python/contrib/test_hexagon/topi/test_conv2d_transpose.py | pfk-beta/tvm | 5ecb8c384a66933fec8c7f033cba03337eb1a726 | [
"Apache-2.0"
] | null | null | null | tests/python/contrib/test_hexagon/topi/test_conv2d_transpose.py | pfk-beta/tvm | 5ecb8c384a66933fec8c7f033cba03337eb1a726 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 29.493671 | 100 | 0.646781 |
1dbad230cb8f8bba4962c450dfa887d7fd626d6d | 1,323 | py | Python | app/auth/forms.py | LewisNjagi/blog-website | e1f1d95ddd53a924988bfe669a4946b15dc33ac2 | [
"MIT"
] | null | null | null | app/auth/forms.py | LewisNjagi/blog-website | e1f1d95ddd53a924988bfe669a4946b15dc33ac2 | [
"MIT"
] | null | null | null | app/auth/forms.py | LewisNjagi/blog-website | e1f1d95ddd53a924988bfe669a4946b15dc33ac2 | [
"MIT"
] | 1 | 2021-03-09T13:48:00.000Z | 2021-03-09T13:48:00.000Z | from flask_wtf import FlaskForm
from wtforms import StringField,PasswordField,SubmitField
from wtforms.validators import Required,Email,EqualTo
from ..models import User
from wtforms import ValidationError
from wtforms import StringField,PasswordField,BooleanField,SubmitField
class RegistrationForm(FlaskForm):
e... | 45.62069 | 128 | 0.74452 |
1dbae0599142d953f9a597bdd3cb4081a878fcc2 | 6,919 | py | Python | nlproar/dataset/babi.py | AndreasMadsen/nlp-roar-interpretability | ad30f756cd744dfb05d1b57de744c5ff60d9f20c | [
"MIT"
] | 17 | 2021-11-04T02:15:30.000Z | 2021-12-26T16:31:27.000Z | nlproar/dataset/babi.py | AndreasMadsen/nlp-roar-interpretability | ad30f756cd744dfb05d1b57de744c5ff60d9f20c | [
"MIT"
] | null | null | null | nlproar/dataset/babi.py | AndreasMadsen/nlp-roar-interpretability | ad30f756cd744dfb05d1b57de744c5ff60d9f20c | [
"MIT"
] | 1 | 2021-11-04T10:45:25.000Z | 2021-11-04T10:45:25.000Z | import os.path as path
import numpy as np
import os
import pickle
import requests
import tarfile
from sklearn.model_selection import train_test_split
from ._choose_tokenizer import choose_tokenizer
from ._vocab_tokenizer import VocabTokenizer
from ._paired_sequence_dataset import PairedSequenceDataset
IDX_TO_TASK_MA... | 42.975155 | 134 | 0.57306 |
1dbaf78415a58d2d2e73b3ce5cbcc38170089ab9 | 2,393 | py | Python | pyplan/pyplan/config.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | null | null | null | pyplan/pyplan/config.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | null | null | null | pyplan/pyplan/config.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | null | null | null | import sys
import webbrowser
from os.path import exists, join
from shutil import copyfile, copytree
from threading import Thread
from time import sleep
from django.apps import AppConfig
from django.conf import settings
from requests import get as requests_get
class PyplanAppConfig(AppConfig):
name = 'pyplan.pypl... | 34.681159 | 85 | 0.534893 |
1dbb0468b586bdc24f7c64a55ad233ac3a024ccb | 17,574 | py | Python | tests/test_won.py | fscm/multicurrency | 5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91 | [
"MIT"
] | 2 | 2021-03-26T18:19:57.000Z | 2021-07-27T01:15:50.000Z | tests/test_won.py | fscm/multicurrency | 5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91 | [
"MIT"
] | null | null | null | tests/test_won.py | fscm/multicurrency | 5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
#
# copyright: 2020-2022, Frederico Martins
# author: Frederico Martins <http://github.com/fscm>
# license: SPDX-License-Identifier: MIT
"""Tests for the Won currency representation(s)."""
from decimal import Context
from pytest import raises
from multicurrency import Currency
from multicurren... | 39.940909 | 88 | 0.582053 |
1dbb460e1e0c04a58434accf3c6dd2a3cb4db3f0 | 2,782 | py | Python | UnleashClient/loader.py | ivanklee86/unleash-client | daa476537d38085516699a56830ef1f431ced5cf | [
"MIT"
] | 1 | 2018-10-13T19:59:46.000Z | 2018-10-13T19:59:46.000Z | UnleashClient/loader.py | ivanklee86/unleash-client | daa476537d38085516699a56830ef1f431ced5cf | [
"MIT"
] | 27 | 2018-10-03T09:53:48.000Z | 2018-10-27T09:47:14.000Z | UnleashClient/loader.py | ivanklee86/unleash-client | daa476537d38085516699a56830ef1f431ced5cf | [
"MIT"
] | 1 | 2018-10-12T16:09:07.000Z | 2018-10-12T16:09:07.000Z | from fcache.cache import FileCache
from UnleashClient.features import Feature
from UnleashClient.constants import FEATURES_URL
from UnleashClient.utils import LOGGER
# pylint: disable=broad-except
def _create_strategies(provisioning: dict,
strategy_mapping: dict) -> list:
feature_strategies ... | 36.605263 | 116 | 0.680446 |
1dbb54935f3f764fb3e68c93a137e7a0957b8191 | 3,390 | py | Python | tests/rules/test_others.py | manycoding/arche | 5c5ea7707e799e214193ae0ce3ec60e39f533afc | [
"MIT"
] | 52 | 2019-03-18T21:12:59.000Z | 2022-01-24T05:49:23.000Z | tests/rules/test_others.py | manycoding/arche | 5c5ea7707e799e214193ae0ce3ec60e39f533afc | [
"MIT"
] | 173 | 2019-03-18T15:50:14.000Z | 2019-12-09T18:03:07.000Z | tests/rules/test_others.py | manycoding/arche | 5c5ea7707e799e214193ae0ce3ec60e39f533afc | [
"MIT"
] | 21 | 2019-03-20T17:14:22.000Z | 2022-01-30T18:33:22.000Z | from functools import partial
from arche.rules.others import compare_boolean_fields, garbage_symbols
from arche.rules.result import Level
from conftest import *
import pandas as pd
import pytest
create_df = partial(create_named_df, name="Coverage for boolean fields")
compare_bool_data = [
(
{"b": [True, ... | 30.540541 | 96 | 0.459587 |
1dbb5e9d4f649601b7cee228ee63a02761226629 | 10,091 | py | Python | src/morphforge/simulationanalysis/tagviewer/tagviewer.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | 1 | 2021-01-21T11:31:59.000Z | 2021-01-21T11:31:59.000Z | src/morphforge/simulationanalysis/tagviewer/tagviewer.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | src/morphforge/simulationanalysis/tagviewer/tagviewer.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | 39.264591 | 154 | 0.642156 |
1dbb7bfd0dd9062963bb8ac690fed0d8ca9c96f9 | 185 | py | Python | ajax/urls.py | dimagi/rapidsms-contrib-apps-dev | 025f9d4cba7da59bc98d16a7d12b00c7b25c571f | [
"BSD-3-Clause"
] | 1 | 2020-09-15T22:18:37.000Z | 2020-09-15T22:18:37.000Z | ajax/urls.py | adammck/rapidsms-contrib-apps-dev | b6ef8c9c3726ca0b706b984b93342e24c62fd430 | [
"BSD-3-Clause"
] | null | null | null | ajax/urls.py | adammck/rapidsms-contrib-apps-dev | b6ef8c9c3726ca0b706b984b93342e24c62fd430 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from django.conf.urls.defaults import *
from . import views
urlpatterns = patterns('',
(r'^ajax/(?P<path>.*)$', views.proxy))
| 16.818182 | 42 | 0.637838 |
1dbb8f8876c817f7ab9d3d0d002f2fbf9253c3a6 | 1,013 | py | Python | lib/luminol/src/luminol/modules/correlation_result.py | richardhsu/naarad | 665f58f76c2412e125f2be2c111ebc7cdf6ff92e | [
"Apache-2.0"
] | 180 | 2015-01-05T13:27:16.000Z | 2021-02-08T04:11:47.000Z | lib/luminol/src/luminol/modules/correlation_result.py | richardhsu/naarad | 665f58f76c2412e125f2be2c111ebc7cdf6ff92e | [
"Apache-2.0"
] | 58 | 2015-01-07T10:25:17.000Z | 2020-11-05T03:40:23.000Z | lib/luminol/src/luminol/modules/correlation_result.py | richardhsu/naarad | 665f58f76c2412e125f2be2c111ebc7cdf6ff92e | [
"Apache-2.0"
] | 60 | 2015-01-06T09:23:33.000Z | 2021-02-11T04:29:33.000Z | # coding=utf-8
"""
© 2014 LinkedIn 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 agreed ... | 34.931034 | 96 | 0.758144 |
1dbb9626d601dbf3ebbaccc46fc8d1d01cf39103 | 287 | py | Python | Models/Detail.py | Zebra/Savanna-Python-SDK | 973f642a13f8c695a1781322ebf804c34cdb1b47 | [
"MIT"
] | 1 | 2021-03-08T06:49:57.000Z | 2021-03-08T06:49:57.000Z | Models/Detail.py | Zebra/Savanna-Python-SDK | 973f642a13f8c695a1781322ebf804c34cdb1b47 | [
"MIT"
] | 1 | 2022-01-25T16:36:43.000Z | 2022-01-25T16:36:43.000Z | Models/Detail.py | Zebra/Savanna-Python-SDK | 973f642a13f8c695a1781322ebf804c34cdb1b47 | [
"MIT"
] | 1 | 2020-06-11T14:00:40.000Z | 2020-06-11T14:00:40.000Z | """
Provides details about the results of an API call.
"""
class Detail:
def __init__(self, errorcode):
self.errorcode = errorcode
"""
The error code encountered while invoking the API.
"""
@property
def errorcode(self):
return self.__errorcode | 19.133333 | 54 | 0.644599 |
1dbb9c3aed9e02558b2a7cbbbb0f589fbd12bc03 | 101 | py | Python | tests/django_dummy_app/apps.py | qcoumes/dgeq | 087bdbf934d59d7aedcef84735a8f18460cda1d0 | [
"MIT"
] | null | null | null | tests/django_dummy_app/apps.py | qcoumes/dgeq | 087bdbf934d59d7aedcef84735a8f18460cda1d0 | [
"MIT"
] | 1 | 2021-01-24T22:53:53.000Z | 2021-01-24T22:53:53.000Z | tests/django_dummy_app/apps.py | qcoumes/dgeq | 087bdbf934d59d7aedcef84735a8f18460cda1d0 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class GeographyConfig(AppConfig):
name = 'django_dummy_app'
| 14.428571 | 33 | 0.772277 |
1dbbb0370b3c106b8317136f26caa80e4e9dea96 | 12,730 | py | Python | tensorflow_quantum/python/layers/circuit_executors/expectation.py | anushkrishnav/quantum | d8317119e45966581f2cfee9d1423b924615e5f1 | [
"Apache-2.0"
] | 3 | 2021-03-28T07:39:07.000Z | 2021-03-28T14:08:26.000Z | tensorflow_quantum/python/layers/circuit_executors/expectation.py | prashanth-up/quantum | 6deb5ad96b575b905cf33773d7a71379b8defe18 | [
"Apache-2.0"
] | 3 | 2021-08-25T15:15:49.000Z | 2022-02-10T05:10:42.000Z | tensorflow_quantum/python/layers/circuit_executors/expectation.py | prashanth-up/quantum | 6deb5ad96b575b905cf33773d7a71379b8defe18 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorFlow Quantum 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... | 42.718121 | 80 | 0.635428 |
1dbbca4c7f87304c8d0ab37db93ff3ba3371bb30 | 655 | py | Python | oracle/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | oracle/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | oracle/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import pytest
from datadog_checks.oracle import Oracle
HERE = os.path.dirname(os.path.abspath(__file__))
CHECK_NAME = "oracle"
@pytest.fixture
def aggregator():
from datadog_checks.stubs import... | 18.194444 | 59 | 0.656489 |
1dbbe2d677a7dbc4657d034c2e555607e559eb1a | 3,930 | py | Python | apps/sushi/serializers.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/sushi/serializers.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/sushi/serializers.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | from rest_framework.exceptions import PermissionDenied
from rest_framework.fields import HiddenField, CurrentUserDefault, BooleanField, \
SerializerMethodField
from rest_framework.relations import PrimaryKeyRelatedField
from rest_framework.serializers import ModelSerializer
from core.models import UL_CONS_STAFF
fr... | 47.349398 | 97 | 0.715776 |
1dbbeeef97643d110033af3f8f6456cef41fa595 | 8,113 | py | Python | angr/analyses/analysis.py | zjzh/angr | 654fc90a65748c926ee63279850b6aa9f4f8d292 | [
"BSD-2-Clause"
] | null | null | null | angr/analyses/analysis.py | zjzh/angr | 654fc90a65748c926ee63279850b6aa9f4f8d292 | [
"BSD-2-Clause"
] | null | null | null | angr/analyses/analysis.py | zjzh/angr | 654fc90a65748c926ee63279850b6aa9f4f8d292 | [
"BSD-2-Clause"
] | null | null | null | import sys
import contextlib
from collections import defaultdict
from inspect import Signature
import progressbar
import logging
import time
from typing import TYPE_CHECKING
from ..misc.plugins import PluginVendor, VendorPreset
from ..misc.ux import deprecated
from ..errors import AngrAnalysisError
if TYPE_CHECKING:
... | 34.232068 | 118 | 0.617404 |
1dbbf2f7dcc1f25385b1d195bf2b86a16daa4572 | 2,655 | py | Python | cp-book/ch1/adhoc/game/harder/379_Hiq.py | andrey-yemelyanov/competitive-programming | f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47 | [
"MIT"
] | null | null | null | cp-book/ch1/adhoc/game/harder/379_Hiq.py | andrey-yemelyanov/competitive-programming | f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47 | [
"MIT"
] | null | null | null | cp-book/ch1/adhoc/game/harder/379_Hiq.py | andrey-yemelyanov/competitive-programming | f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47 | [
"MIT"
] | null | null | null | # Problem name: 379 Hi-Q
# Problem url: https://uva.onlinejudge.org/external/3/379.pdf
# Author: Andrey Yemelyanov
import sys
import math
def main():
sys.stdin.readline() # consume line with the number of test cases
game_configs = []
for line in sys.stdin:
game_configs.extend([int(x) for x in line... | 27.091837 | 123 | 0.531073 |
1dbbf8abeec3060c27934b226f9125990f123ff5 | 2,127 | py | Python | src/streamlink/plugins/ine.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | 1 | 2019-11-25T01:37:21.000Z | 2019-11-25T01:37:21.000Z | src/streamlink/plugins/ine.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/ine.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | 1 | 2020-08-12T08:27:22.000Z | 2020-08-12T08:27:22.000Z | from __future__ import print_function
import json
import re
from streamlink.plugin import Plugin
from streamlink.plugin.api import http
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream, HTTPStream
from streamlink.utils import update_scheme
class INE(Plugin):
url_re = re.compile... | 35.45 | 111 | 0.588622 |
1dbc37aa8ccce00ba1e27297a5e115c73bf4166c | 4,736 | py | Python | synthesize.py | ankye/Tacotron-2 | e0cd46ece5d96948d684f29a224d9b7154976752 | [
"MIT"
] | 5 | 2019-04-11T02:45:04.000Z | 2019-05-22T11:58:15.000Z | synthesize.py | ankye/Tacotron-2 | e0cd46ece5d96948d684f29a224d9b7154976752 | [
"MIT"
] | 1 | 2019-12-30T08:23:36.000Z | 2020-02-22T02:15:31.000Z | synthesize.py | ankye/Tacotron-2 | e0cd46ece5d96948d684f29a224d9b7154976752 | [
"MIT"
] | 4 | 2019-05-29T14:29:46.000Z | 2020-02-21T13:16:57.000Z | import argparse
import os
from warnings import warn
from time import sleep
import tensorflow as tf
from hparams import hparams
from infolog import log
from tacotron.synthesize import tacotron_synthesize
from wavenet_vocoder.synthesize import wavenet_synthesize
def prepare_run(args):
modified_hp = hparams.parse(arg... | 46.431373 | 195 | 0.755701 |
1dbc3ec360d84df4604e1f3b2e79e046f4d6b26a | 846 | py | Python | backend/order/urls.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/order/urls.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/order/urls.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | from django.conf.urls import url
from order import views
urlpatterns = [
# Standard page
url(r'^$', views.OrderListView.as_view()),
url(r'^(?P<pk>\d+)/', views.OrderView.as_view()),
url(r'^customers/(?P<pk>\d+)/', views.CustomerOrderView.as_view()),
url(r'^orderlines/$', views.OrderLineListView.as... | 49.764706 | 105 | 0.687943 |
1dbc62b31faf221b52ae91446e4d10d59bc50e5a | 16,432 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-07-15T09:50:14.000Z | 2020-07-15T09:50:14.000Z | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 39.405276 | 109 | 0.62147 |
1dbca9f953ca78213377772a8cda5eb8b2a7f490 | 4,879 | py | Python | unicodex/settings.py | GoogleCloudPlatform/django-demo-app-unicodex | d916c48bd0a4ecb5aa7b9e0722d20ae7f59f3107 | [
"Apache-2.0"
] | 79 | 2019-10-01T14:00:52.000Z | 2022-03-28T13:27:00.000Z | unicodex/settings.py | GoogleCloudPlatform/django-demo-app-unicodex | d916c48bd0a4ecb5aa7b9e0722d20ae7f59f3107 | [
"Apache-2.0"
] | 7 | 2020-01-24T03:31:50.000Z | 2022-01-17T05:35:33.000Z | unicodex/settings.py | GoogleCloudPlatform/django-demo-app-unicodex | d916c48bd0a4ecb5aa7b9e0722d20ae7f59f3107 | [
"Apache-2.0"
] | 30 | 2019-10-09T01:10:47.000Z | 2022-03-28T13:27:23.000Z | #!/usr/bin/python
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 29.215569 | 90 | 0.710596 |
1dbcc633de9445e975f5194ccc62f62f8fe54bac | 2,396 | py | Python | delfin/exporter/prometheus/alert_manager.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 19 | 2020-07-28T00:13:43.000Z | 2022-02-15T16:44:21.000Z | delfin/exporter/prometheus/alert_manager.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 581 | 2020-06-22T15:20:58.000Z | 2022-03-31T04:06:14.000Z | delfin/exporter/prometheus/alert_manager.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 153 | 2021-03-10T09:32:08.000Z | 2022-02-22T01:32:32.000Z | # Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 38.031746 | 77 | 0.610601 |
1dbcebf549f8e8dfc17ba110d376e7bd223e3503 | 389 | py | Python | facilitator/views.py | qitianchan/Patap | e71bd95300d94f7e26f9d87e5bdb9f4c73175383 | [
"Apache-2.0"
] | null | null | null | facilitator/views.py | qitianchan/Patap | e71bd95300d94f7e26f9d87e5bdb9f4c73175383 | [
"Apache-2.0"
] | null | null | null | facilitator/views.py | qitianchan/Patap | e71bd95300d94f7e26f9d87e5bdb9f4c73175383 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Blueprint, redirect, url_for
from flask_security import login_required, current_user, roles_accepted
facilitator = Blueprint('facilitator', __name__)
@facilitator.route('/')
@login_required
def dashboard():
if 'superuser' in [role.name for role in current_user.roles]:
... | 27.785714 | 71 | 0.737789 |
1dbcf35911761139a105de7a77b88357b768f060 | 5,331 | py | Python | saleor/graphql/product/resolvers.py | acabezasg/inka2 | ea95b9de8ec211245f423423d1378ace7c00194a | [
"BSD-3-Clause"
] | 1 | 2019-04-15T09:37:26.000Z | 2019-04-15T09:37:26.000Z | saleor/graphql/product/resolvers.py | acabezasg/inka2 | ea95b9de8ec211245f423423d1378ace7c00194a | [
"BSD-3-Clause"
] | null | null | null | saleor/graphql/product/resolvers.py | acabezasg/inka2 | ea95b9de8ec211245f423423d1378ace7c00194a | [
"BSD-3-Clause"
] | null | null | null | import graphene
import graphene_django_optimizer as gql_optimizer
from django.db.models import Q, Sum
from ...order import OrderStatus
from ...product import models
from ...search.backends import picker
from ..utils import (
filter_by_period, filter_by_query_param, get_database_id, get_nodes)
from .enums import St... | 35.072368 | 79 | 0.713375 |
1dbcf993ab903a14366c63de027566d22b6848d6 | 6,291 | py | Python | src/bloombox/schema/content/Content_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 4 | 2018-01-23T20:13:11.000Z | 2018-07-28T22:36:09.000Z | src/bloombox/schema/content/Content_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 159 | 2018-02-02T09:55:52.000Z | 2021-07-21T23:41:59.000Z | src/bloombox/schema/content/Content_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 3 | 2018-01-23T20:13:15.000Z | 2020-01-17T01:07:53.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: content/Content.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection a... | 38.359756 | 856 | 0.754729 |
1dbd1d75fc55e3a6f632675ec7530cb11790f872 | 1,959 | py | Python | salt/daemons/test/test_master.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 2 | 2017-09-17T21:10:35.000Z | 2019-08-26T03:00:12.000Z | salt/daemons/test/test_master.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/daemons/test/test_master.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 3 | 2021-02-23T08:12:48.000Z | 2021-02-23T08:13:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Runs minion floscript
'''
# pylint: skip-file
import os
import stat
from ioflo.base.odicting import odict
import salt.daemons.flo
def test():
""" Execute run.start """
pkiDirpath = os.path.join('/tmp', 'raet', 'keyo', 'master', 'pki')
if not os.path.ex... | 27.208333 | 70 | 0.62634 |
1dbd4b445206e1ceaefbbc503c5ad800d6582fe7 | 8,408 | py | Python | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 9 | 2022-03-25T19:35:49.000Z | 2022-03-31T06:09:47.000Z | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 44.252632 | 224 | 0.669125 |
1dbd4d7e884c5991ad7dbc6efe27457e476c4b20 | 88,249 | py | Python | chemspacedim/notebooks/PJ2019/dbscan_display.py | npricejones/chemspacedim | 47d63d9e14200c0acf68f8e48c24326ed6d80662 | [
"MIT"
] | null | null | null | chemspacedim/notebooks/PJ2019/dbscan_display.py | npricejones/chemspacedim | 47d63d9e14200c0acf68f8e48c24326ed6d80662 | [
"MIT"
] | null | null | null | chemspacedim/notebooks/PJ2019/dbscan_display.py | npricejones/chemspacedim | 47d63d9e14200c0acf68f8e48c24326ed6d80662 | [
"MIT"
] | null | null | null | '''
Use the ``bokeh serve`` command to run the example by executing:
bokeh serve dbscan_display.py
at your command prompt. Then navigate to the URL
http://localhost:5006/dbscan_display.py
in your browser.
'''
import os
import h5py
import glob
import copy
import numpy as np
import warnings
from clustering_stats... | 43.493839 | 179 | 0.57561 |
1dbd6fbd4b6ac58d95d36ff8fee68fe4ef62dcbe | 21,161 | py | Python | genetic_alg.py | duhines/NIC-MAXSAT | faab78fa72740e7dddc1444d5c3d8014f6b1ffe7 | [
"MIT"
] | 1 | 2018-10-18T16:39:03.000Z | 2018-10-18T16:39:03.000Z | genetic_alg.py | duhines/NIC-MAXSAT | faab78fa72740e7dddc1444d5c3d8014f6b1ffe7 | [
"MIT"
] | null | null | null | genetic_alg.py | duhines/NIC-MAXSAT | faab78fa72740e7dddc1444d5c3d8014f6b1ffe7 | [
"MIT"
] | null | null | null | """
Team: 3D^3
Authors: Dustin Hines, David Anderson, Duncan Gans
Course: Nature-Inspired Computation
Assignment: Evolutionary Algorithms for MAXSAT: A Comparison of Genetic Algorithms
and Population Based Incremental Learning
Date: 1 October 2018
Description:
This file implements a genetic algorithm for solvi... | 40.230038 | 122 | 0.645858 |
1dbd8ea25eb352cfb12e98005d9eaaec4d95db28 | 383 | py | Python | tests/test_day05.py | vmorris/aoc2021 | 76896d65a5df6e51a5ddadf87cb93b8425645398 | [
"MIT"
] | null | null | null | tests/test_day05.py | vmorris/aoc2021 | 76896d65a5df6e51a5ddadf87cb93b8425645398 | [
"MIT"
] | null | null | null | tests/test_day05.py | vmorris/aoc2021 | 76896d65a5df6e51a5ddadf87cb93b8425645398 | [
"MIT"
] | null | null | null | from aoc2021.dayCHANGEME import solution
from aoc2021.util import get_input
input_data = get_input("tests/testinput.dayCHANGEME", "int")
def test_solve_part1():
expected = None
actual = solution.solve_part1(input_data)
assert expected == actual
def test_solve_part2():
expected = None
actual = ... | 21.277778 | 60 | 0.744125 |
1dbd9edf6ab4567fe0de0b1e0e981c4d723a3d9d | 3,847 | py | Python | acme/wrappers/gym_wrapper_test.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | null | null | null | acme/wrappers/gym_wrapper_test.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 1 | 2021-01-25T15:39:56.000Z | 2021-01-25T15:39:56.000Z | acme/wrappers/gym_wrapper_test.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 2 | 2021-01-07T11:35:19.000Z | 2021-01-07T12:16:21.000Z | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | 32.880342 | 74 | 0.731999 |
1dbdd6133fce29b53dcb34cec6fab320e647ca59 | 5,845 | py | Python | asposeimagingcloud/models/requests/modify_jpeg_request.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 1 | 2022-01-14T10:06:26.000Z | 2022-01-14T10:06:26.000Z | asposeimagingcloud/models/requests/modify_jpeg_request.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 3 | 2019-07-17T15:01:31.000Z | 2020-12-29T09:16:10.000Z | asposeimagingcloud/models/requests/modify_jpeg_request.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | null | null | null | # coding: utf-8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="modify_jpeg_request.py">
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person o... | 49.117647 | 252 | 0.665184 |
1dbddd279b2487d9162aae8674d6ebe040a6f996 | 3,459 | py | Python | ForgePCG.py | narendasan/neural-mmo | 36a588db0021cccd7275cebef2cbdc5ee8eb40d5 | [
"MIT"
] | null | null | null | ForgePCG.py | narendasan/neural-mmo | 36a588db0021cccd7275cebef2cbdc5ee8eb40d5 | [
"MIT"
] | null | null | null | ForgePCG.py | narendasan/neural-mmo | 36a588db0021cccd7275cebef2cbdc5ee8eb40d5 | [
"MIT"
] | null | null | null | '''Main file for the neural-mmo/projekt demo
/projeckt will give you a basic sense of the training
loop, infrastructure, and IO modules for handling input
and output spaces. From there, you can either use the
prebuilt IO networks in PyTorch to start training your
own models immediately or hack on the environment'''... | 25.248175 | 64 | 0.667534 |
1dbdede9081b12e58bbc32614cce4820e4081044 | 1,706 | py | Python | src/application/api/api.py | acbilson/chaos-auth | 8cc533bed224e407a9bd1aea464e63f32dd29549 | [
"MIT"
] | null | null | null | src/application/api/api.py | acbilson/chaos-auth | 8cc533bed224e407a9bd1aea464e63f32dd29549 | [
"MIT"
] | null | null | null | src/application/api/api.py | acbilson/chaos-auth | 8cc533bed224e407a9bd1aea464e63f32dd29549 | [
"MIT"
] | null | null | null | from flask import Blueprint, request, url_for, redirect, session, jsonify
from flask import current_app as app
# blueprint configuration
api_bp = Blueprint('api_bp', __name__)
@api_bp.route("/auth", methods=["GET"])
def get_auth():
"""
Returns a view to verify that the user wants to authorize the requested
... | 36.297872 | 78 | 0.700469 |
1dbdf4c0bd47e9f060f155f33cd44d07ed282e1f | 13,460 | py | Python | stringmethod/stringmd.py | sperezconesa/string-method-gmxapi | 57d62a28ba7787f6e08604225c9ed7008159dbfe | [
"MIT"
] | 6 | 2020-10-15T16:43:19.000Z | 2022-01-21T09:09:13.000Z | stringmethod/stringmd.py | sperezconesa/string-method-gmxapi | 57d62a28ba7787f6e08604225c9ed7008159dbfe | [
"MIT"
] | 9 | 2020-07-01T08:36:49.000Z | 2021-06-23T07:15:53.000Z | stringmethod/stringmd.py | sperezconesa/string-method-gmxapi | 57d62a28ba7787f6e08604225c9ed7008159dbfe | [
"MIT"
] | 5 | 2020-07-15T06:08:00.000Z | 2021-07-02T14:24:59.000Z | import os
import shutil
from dataclasses import dataclass
from os.path import abspath
from typing import Any, Dict, Optional
import numpy as np
from gmx_jobs import *
from stringmethod import utils
from stringmethod.config import Config
from stringmethod.utils.custom import custom_function
from stringmethod.utils.sca... | 44.276316 | 114 | 0.527117 |
1dbe04644daabda8487d3eaa87451d818ab387dc | 5,706 | py | Python | asposewordscloud/models/table_cell_insert_dto.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/table_cell_insert_dto.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/table_cell_insert_dto.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="table_cell_insert_dto.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
#... | 36.576923 | 92 | 0.586225 |
1dbe3c849bd6eb2bfc0a36f037fb8e3a5e2546de | 8,233 | py | Python | demo/w9_predict.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | demo/w9_predict.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | demo/w9_predict.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import argparse
import glob
import multiprocessing as mp
import numpy as np
import os
import tempfile
import time
import warnings
import cv2
import tqdm
import pandas as pd
import joblib
from detectron2.config import get_cfg
from detectron2.data.detection_utils import ... | 40.357843 | 177 | 0.602211 |
1dbe7614527d9841651e84397c0507c626eb3b36 | 30,005 | py | Python | IPython/core/oinspect.py | damianavila/ipython | 4481c323e0d261685ad350fc6f437494b889ab12 | [
"BSD-3-Clause-Clear"
] | 2 | 2020-11-30T14:04:30.000Z | 2021-11-08T11:29:05.000Z | IPython/core/oinspect.py | RuSHi2381/ipython | 4481c323e0d261685ad350fc6f437494b889ab12 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/core/oinspect.py | RuSHi2381/ipython | 4481c323e0d261685ad350fc6f437494b889ab12 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-11-19T05:18:41.000Z | 2020-11-19T05:18:41.000Z | # -*- coding: utf-8 -*-
"""Tools for inspecting Python objects.
Uses syntax highlighting for presenting the various information elements.
Similar in spirit to the inspect module, but all calls take a name argument to
reference the name under which an object is being read.
"""
#***************************************... | 33.980747 | 102 | 0.572071 |
1dbe8457a0fa74893c7c5a8da07fd1a43eb42564 | 3,982 | py | Python | tpm2_pytss/esys.py | dgptha/tpm2-pytss | 2f9ebdf5c3db233107cb0fa69137e70d38b8887e | [
"BSD-2-Clause"
] | null | null | null | tpm2_pytss/esys.py | dgptha/tpm2-pytss | 2f9ebdf5c3db233107cb0fa69137e70d38b8887e | [
"BSD-2-Clause"
] | null | null | null | tpm2_pytss/esys.py | dgptha/tpm2-pytss | 2f9ebdf5c3db233107cb0fa69137e70d38b8887e | [
"BSD-2-Clause"
] | null | null | null | # SPDX-License-Identifier: MIT
# Copyright (c) 2019 Intel Corporation
from functools import partial
from typing import Optional, ByteString
from .tcti import TCTIContext
from .util.swig import Wrapper
from .binding import AuthSessionContext, ESYSBinding, FlushTRContext, NVContext
from .context import BaseContextMetaCl... | 29.496296 | 83 | 0.642391 |
1dbecaaa9137a8f66be2dabb458291b30761292b | 12,943 | py | Python | ProGED/examples/oeis/fibonacci_oneby1.py | smeznar/ProGED | 191cfd2b7b1fece819109a4b61e3f7533332fd74 | [
"BSD-3-Clause"
] | 5 | 2021-02-04T10:53:10.000Z | 2022-03-29T11:14:29.000Z | ProGED/examples/oeis/fibonacci_oneby1.py | smeznar/ProGED | 191cfd2b7b1fece819109a4b61e3f7533332fd74 | [
"BSD-3-Clause"
] | 8 | 2021-02-04T10:11:36.000Z | 2022-03-04T13:35:16.000Z | ProGED/examples/oeis/fibonacci_oneby1.py | smeznar/ProGED | 191cfd2b7b1fece819109a4b61e3f7533332fd74 | [
"BSD-3-Clause"
] | null | null | null | """Run equation discovery on OEIS sequences to discover
direct, recursive or even direct-recursive equations.
"""
import numpy as np
import pandas as pd
import time
import sys
# from scipy.optimize import brute, shgo, rosen, dual_annealing
from ProGED.equation_discoverer import EqDisco
from ProGED.parameter_estimati... | 38.520833 | 119 | 0.600093 |
1dbf2caeb31f8f09aebbb40657eeebbd49f73b52 | 746 | py | Python | omrdatasettools/__init__.py | apacha/OMR-Datasets | a49af3ce4bfae370baef7e4f9c435b0f76025713 | [
"MIT"
] | 195 | 2017-09-29T10:29:59.000Z | 2022-03-16T07:54:30.000Z | omrdatasettools/__init__.py | apacha/OMR-Datasets | a49af3ce4bfae370baef7e4f9c435b0f76025713 | [
"MIT"
] | 2 | 2019-11-10T21:09:27.000Z | 2020-01-06T12:23:53.000Z | omrdatasettools/__init__.py | apacha/OMR-Datasets | a49af3ce4bfae370baef7e4f9c435b0f76025713 | [
"MIT"
] | 42 | 2017-09-13T02:52:46.000Z | 2022-03-15T12:31:51.000Z | from ._version import __version__ as version
from .AudiverisOmrImageGenerator import AudiverisOmrImageGenerator
from .CapitanImageGenerator import CapitanImageGenerator
from .Downloader import *
from .HomusImageGenerator import HomusImageGenerator
from .MeasureVisualizer import MeasureVisualizer
from .MuscimaPlusPlusMa... | 53.285714 | 116 | 0.865952 |
1dbf4415e1beb8cfd0ef7e4b1213c6278e5bf366 | 217 | py | Python | python/mathematics/palindrom_test.py | jtpio/algo-toolbox | d0f675889889ad52d853d948b0191bbd14c1e9cd | [
"MIT"
] | null | null | null | python/mathematics/palindrom_test.py | jtpio/algo-toolbox | d0f675889889ad52d853d948b0191bbd14c1e9cd | [
"MIT"
] | null | null | null | python/mathematics/palindrom_test.py | jtpio/algo-toolbox | d0f675889889ad52d853d948b0191bbd14c1e9cd | [
"MIT"
] | null | null | null | from palindrom import is_palindrom
assert is_palindrom('abcd') == False
assert is_palindrom('aaabaaa') == True
assert is_palindrom('') == True
# Can also be used for numbers
assert is_palindrom(12345654321) == True
| 24.111111 | 40 | 0.760369 |
1dbf4c6344c8a8952f696a0dc59c7005662ca7c7 | 62,038 | py | Python | test/unit/common/middleware/test_recon.py | aerwin3/swift | 96c1838a15645639154f1048285d53a891809937 | [
"Apache-2.0"
] | null | null | null | test/unit/common/middleware/test_recon.py | aerwin3/swift | 96c1838a15645639154f1048285d53a891809937 | [
"Apache-2.0"
] | null | null | null | test/unit/common/middleware/test_recon.py | aerwin3/swift | 96c1838a15645639154f1048285d53a891809937 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 43.998582 | 79 | 0.557352 |
1dbf54daccfc41203dea48f6b7a692c38e2dd758 | 929 | py | Python | P3 - Wrangling OpenStreetMap Data/sampler.py | pranavsuri/Data-Analyst-Nanodegree | e17e9c937c19edced52ba3f12a979993e00829af | [
"MIT"
] | 15 | 2018-02-15T12:46:43.000Z | 2021-12-02T14:21:00.000Z | P3 - Wrangling OpenStreetMap Data/sampler.py | suripranav1995/Data-Analyst-Nanodegree | e17e9c937c19edced52ba3f12a979993e00829af | [
"MIT"
] | null | null | null | P3 - Wrangling OpenStreetMap Data/sampler.py | suripranav1995/Data-Analyst-Nanodegree | e17e9c937c19edced52ba3f12a979993e00829af | [
"MIT"
] | 7 | 2019-05-08T07:22:58.000Z | 2021-09-17T04:02:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Use cElementTree or lxml if too slow
import xml.etree.ElementTree as ET
OSM_FILE = "san-francisco_california.osm"
SAMPLE_FILE = "sample.osm"
def get_element(osm_file, tags=('node', 'way', 'relation')):
"""Yield element if it is the right type of tag.
"""
co... | 30.966667 | 76 | 0.617869 |
1dbf7a62465a17135d7d79b6083a28d6e62a7600 | 559 | py | Python | ci/infra/testrunner/platforms/libvirt.py | butsoleg/skuba | 1a363d4f3ca8fc33bfb0284043da26fe879c31a3 | [
"Apache-2.0"
] | null | null | null | ci/infra/testrunner/platforms/libvirt.py | butsoleg/skuba | 1a363d4f3ca8fc33bfb0284043da26fe879c31a3 | [
"Apache-2.0"
] | null | null | null | ci/infra/testrunner/platforms/libvirt.py | butsoleg/skuba | 1a363d4f3ca8fc33bfb0284043da26fe879c31a3 | [
"Apache-2.0"
] | null | null | null | import os
import stat
from timeout_decorator import timeout
from platforms.terraform import Terraform
from utils import Format
class Libvirt(Terraform):
def __init__(self, conf):
super().__init__(conf, 'libvirt')
self.platform_new_vars = {
"libvirt_uri": self.conf.libvirt.uri,
... | 23.291667 | 57 | 0.654741 |
1dbf88ff1ea097e59d8c32abff3eb916b0d6d080 | 3,739 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/migration_cli/ext_alembic.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/migration_cli/ext_alembic.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/migration_cli/ext_alembic.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # 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
# d... | 40.641304 | 79 | 0.660604 |
1dbfdc3db638e7f71259d2cc1502edddd094278c | 1,406 | py | Python | src/ggrc_basic_permissions/migrations/versions/20160616122816_4d5180ab1b42_remove_private_programs.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-03-30T11:28:48.000Z | 2018-03-30T11:28:48.000Z | src/ggrc_basic_permissions/migrations/versions/20160616122816_4d5180ab1b42_remove_private_programs.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc_basic_permissions/migrations/versions/20160616122816_4d5180ab1b42_remove_private_programs.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""
Remove private programs
Create Date: 2016-06-16 12:28:16.744816
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
import sqlalchemy as s... | 25.107143 | 79 | 0.678521 |
1dbff225259a31f40643bb9ac7fa4f6aa31e942c | 9,030 | py | Python | conan_inquiry/finder.py | jsdelivrbot/conan_inquiry | 6e7e9f9e2363f942cadfa401d2238967e57d069f | [
"MIT"
] | 11 | 2017-11-14T17:21:51.000Z | 2021-04-03T13:09:56.000Z | conan_inquiry/finder.py | jsdelivrbot/conan_inquiry | 6e7e9f9e2363f942cadfa401d2238967e57d069f | [
"MIT"
] | 7 | 2018-03-31T12:22:07.000Z | 2019-12-02T02:25:04.000Z | conan_inquiry/finder.py | jsdelivrbot/conan_inquiry | 6e7e9f9e2363f942cadfa401d2238967e57d069f | [
"MIT"
] | 2 | 2018-07-30T06:09:34.000Z | 2018-12-07T18:37:49.000Z | import logging
import os
from collections import namedtuple
from typing import Tuple, Set
import re
import requests
import yaml
from conan_inquiry.util.bintray import Bintray
from conan_inquiry.util.general import load_packages, packages_directory
BintrayRepoDescriptor = namedtuple('BintrayRepoDescriptor', ['repoow... | 46.546392 | 130 | 0.602436 |
1dbff8d431cde932b44d343b561ab0c1ee93fac6 | 9,691 | py | Python | src/baselines.py | Pegayus/CoVerD | 725eba82c55ffafa8f3c7b8f46515ac4087f3f24 | [
"Apache-2.0"
] | null | null | null | src/baselines.py | Pegayus/CoVerD | 725eba82c55ffafa8f3c7b8f46515ac4087f3f24 | [
"Apache-2.0"
] | null | null | null | src/baselines.py | Pegayus/CoVerD | 725eba82c55ffafa8f3c7b8f46515ac4087f3f24 | [
"Apache-2.0"
] | null | null | null | import networkx as nx
import pickle
import os
from time import time
from datetime import datetime
from uuid import uuid4
def roam(graph, target, budget=1):
"""
Remove one, add many until target has degree 1 (extreme case)
Input:
graph: to be updated by roam_protector and return
target: the... | 33.302405 | 109 | 0.52719 |
1dc0025ef1b783588d6a4f70c8d24a903f05a721 | 2,113 | py | Python | test_miris_tracking.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | test_miris_tracking.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | test_miris_tracking.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | import os
import sys
import json
import cv2
from timeit import default_timer as timer
from splitter.constants import *
from splitter.struct import VideoStream
from splitter.utils.frame_xform import *
from splitter.utils.testing_utils import get_size
from splitter.utils.ui import play, overlay
from experiments.environ ... | 30.623188 | 147 | 0.588736 |
1dc01d69da29ef4900921219c3c970c166f665dd | 13,641 | py | Python | leetcode_python/Stack/flatten-nested-list-iterator.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Stack/flatten-nested-list-iterator.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Stack/flatten-nested-list-iterator.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
341. Flatten Nested List Iterator
Medium
You are given a nested list of integers nestedList. Each element is either an integer or a list whose elements may also be integers or other lists. Implement an iterator to flatten it.
Implement the NestedIterator class:
NestedIterator(List<NestedInteger> nestedList) Ini... | 30.722973 | 184 | 0.582215 |
1dc03f5575189e3b9a4eb8d8b0a78191b0696964 | 98 | py | Python | pytorch_forecasting/models/nn/__init__.py | JustinNeumann/pytorch-forecasting | 4f6e449cb3788b856e66c4283398a5db201aa6ff | [
"MIT"
] | 1 | 2021-02-03T16:00:04.000Z | 2021-02-03T16:00:04.000Z | pytorch_forecasting/models/nn/__init__.py | JustinNeumann/pytorch-forecasting | 4f6e449cb3788b856e66c4283398a5db201aa6ff | [
"MIT"
] | null | null | null | pytorch_forecasting/models/nn/__init__.py | JustinNeumann/pytorch-forecasting | 4f6e449cb3788b856e66c4283398a5db201aa6ff | [
"MIT"
] | 1 | 2020-11-21T21:21:08.000Z | 2020-11-21T21:21:08.000Z | from pytorch_forecasting.models.nn.embeddings import MultiEmbedding
__all__ = ["MultiEmbedding"]
| 24.5 | 67 | 0.836735 |
1dc04284d97b198acb5c992c2bf3e9f3e491afda | 1,030 | py | Python | pygame/pong/pong03.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | pygame/pong/pong03.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | pygame/pong/pong03.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Este programa es sólo el comienzo de un ping-pong muy simple
pong02.py
'''
# Imports generales
import pygame
import sys
from pygame.locals import *
# Inicialización entorno
pygame.init()
# Definiciones de colores
BLANCO = (255,255,255)
NEGRO = (0,0,0)
# Inicializac... | 18.392857 | 61 | 0.653398 |
1dc044d76f54ecfb514ef938ca1c926b1121b6a5 | 2,109 | py | Python | tests/best_subset.py | mudesire/geneticalgorithm2 | 165d87b182a0b56e035f7a37a17a16950de20ddd | [
"MIT"
] | 34 | 2020-11-25T15:01:19.000Z | 2022-03-23T17:10:33.000Z | tests/best_subset.py | mudesire/geneticalgorithm2 | 165d87b182a0b56e035f7a37a17a16950de20ddd | [
"MIT"
] | null | null | null | tests/best_subset.py | mudesire/geneticalgorithm2 | 165d87b182a0b56e035f7a37a17a16950de20ddd | [
"MIT"
] | 7 | 2020-11-30T16:50:16.000Z | 2022-02-22T16:03:45.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 28 21:09:48 2020
@author: qtckp
"""
import sys
sys.path.append('..')
import numpy as np
from geneticalgorithm2 import geneticalgorithm2 as ga
subset_size = 20 # how many objects we can choose
objects_count = 100 # how many objects are in set
my_set = np.random.rand... | 29.704225 | 92 | 0.623044 |
1dc052012622b8719708007cf40424f6b81b63ce | 614 | py | Python | integration_tests/indexing/load_and_compare_zarr_ls8_sr.py | opendatacube/datacube-zarr | 1c05a0c92d81b4235d75bbb01adcb2da9ae8013b | [
"Apache-2.0"
] | null | null | null | integration_tests/indexing/load_and_compare_zarr_ls8_sr.py | opendatacube/datacube-zarr | 1c05a0c92d81b4235d75bbb01adcb2da9ae8013b | [
"Apache-2.0"
] | null | null | null | integration_tests/indexing/load_and_compare_zarr_ls8_sr.py | opendatacube/datacube-zarr | 1c05a0c92d81b4235d75bbb01adcb2da9ae8013b | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
import datacube
# LS8 scene params
output_crs = "EPSG:32655"
resolution = (30, -30)
latitude = (-35.282468, -35.315409)
longitude = (149.0689, 149.156705)
# Load data
dc = datacube.Datacube()
data_tiff = dc.load(
product='usgs_espa_ls8c1_sr',
latitude=latitude,
longitude=longitude... | 19.806452 | 38 | 0.723127 |
1dc06dc3bc921ce2269173c8698e229574c85273 | 3,376 | py | Python | antco/preproc.py | FernandoGaGu/Ant-Colony-Optimisation | e1a1ee27f55c63c768964e80f38020f1aef664d7 | [
"BSD-3-Clause"
] | 1 | 2021-09-09T04:14:06.000Z | 2021-09-09T04:14:06.000Z | antco/preproc.py | FernandoGaGu/Ant-Colony-Optimisation | e1a1ee27f55c63c768964e80f38020f1aef664d7 | [
"BSD-3-Clause"
] | null | null | null | antco/preproc.py | FernandoGaGu/Ant-Colony-Optimisation | e1a1ee27f55c63c768964e80f38020f1aef664d7 | [
"BSD-3-Clause"
] | null | null | null | # Module that collects the possible preprocessing steps applicable to an antco.ACO instance prior
# to performing the optimisation.
#
# Author: Fernando García Gutiérrez
# Email: fegarc05@ucm.es
#
import numpy as np
from .aco import ACO
from .c_utils import minMaxScaling
def apply(aco_obj: ACO, **kwargs):
"""
... | 34.44898 | 115 | 0.665877 |
1dc09a4ded2c6acad78fb30f32d328999c90c1ff | 6,026 | py | Python | configs/default.py | BZSROCKETS/cemrl | 499939535794ee027f08b8a4133eefd0bb7abe14 | [
"MIT"
] | null | null | null | configs/default.py | BZSROCKETS/cemrl | 499939535794ee027f08b8a4133eefd0bb7abe14 | [
"MIT"
] | null | null | null | configs/default.py | BZSROCKETS/cemrl | 499939535794ee027f08b8a4133eefd0bb7abe14 | [
"MIT"
] | null | null | null | # default experiment settings
# all experiments should modify these settings only as needed
default_config = dict(
env_name='cheetah-non-stationary-vel',
env_params=dict(
n_train_tasks=100, # number train tasks
n_eval_tasks=30, # number evaluation tasks tasks
use_normalized_env=True, ... | 76.278481 | 144 | 0.734318 |
1dc0a14ac68984c921850b160a40f34f02542a76 | 2,743 | py | Python | src/validators.py | elsdes3/bikeshare-dash | 4ba751f4cbc2ae7335e4ce6bc46e826afc82bd23 | [
"MIT"
] | null | null | null | src/validators.py | elsdes3/bikeshare-dash | 4ba751f4cbc2ae7335e4ce6bc46e826afc82bd23 | [
"MIT"
] | 3 | 2021-12-07T05:21:32.000Z | 2022-03-29T22:48:36.000Z | src/validators.py | elsdes3/bikeshare-dash | 4ba751f4cbc2ae7335e4ce6bc46e826afc82bd23 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Validate data."""
# pylint: disable=invalid-name,unused-variable
import pandas as pd
from src.utils import log_prefect
def validate_merged_data(df: pd.DataFrame, use_prefect: bool = False) -> None:
"""Perform validation checks on merged ata."""
log_prefe... | 35.166667 | 78 | 0.62304 |
1dc0d64d6154486f8f1c06fefd58aa7d2aee071b | 636 | py | Python | scripts_test/mux_inv.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | null | null | null | scripts_test/mux_inv.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | null | null | null | scripts_test/mux_inv.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | 2 | 2019-06-30T07:03:02.000Z | 2020-01-07T04:55:21.000Z | # -*- coding: utf-8 -*-
import yaml
from bag.core import BagProject
from digital_ec.layout.stdcells.core import StdCellWrapper
if __name__ == '__main__':
with open('specs_test/digital_ec/stdcells/mux_inv.yaml', 'r') as f:
block_specs = yaml.load(f)
local_dict = locals()
if 'bprj' not in local_... | 25.44 | 95 | 0.680818 |
1dc11fe9e0242c6cab300046f6008b0fa5102e23 | 10,610 | py | Python | chroma/uboone/daq_uboone.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | chroma/uboone/daq_uboone.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | chroma/uboone/daq_uboone.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import os
import chroma.api as api
if api.is_gpu_api_cuda():
import pycuda.driver as cuda
from pycuda import gpuarray as ga
from pycuda import characterize
import chroma.gpu.cutools as cutools
elif api.is_gpu_api_opencl():
import pyopencl as cl
import pyopencl.array as ga
... | 56.137566 | 174 | 0.533648 |
1dc11ffcaaf1298f4e80c53dd280b70e93bbb8b6 | 1,831 | py | Python | exp_configs/exp_configs.py | rajeswar18/url_benchmark | 2fdfd82a9067222106ef7627f71b1e1ae5d70a85 | [
"MIT"
] | null | null | null | exp_configs/exp_configs.py | rajeswar18/url_benchmark | 2fdfd82a9067222106ef7627f71b1e1ae5d70a85 | [
"MIT"
] | null | null | null | exp_configs/exp_configs.py | rajeswar18/url_benchmark | 2fdfd82a9067222106ef7627f71b1e1ae5d70a85 | [
"MIT"
] | null | null | null | from haven import haven_utils as hu
obs_type = 'states'
domain = 'walker'
agent_name = ['icm', 'disagreement']
seed = 1
EXP_GROUPS = {
"pretrain": {
"agent_name": agent_name,
"domain": domain,
"obs_type": obs_type, # [states, pixels]
"snapshot_dir": f'/mnt/colab_public/projects/sai... | 33.290909 | 127 | 0.580011 |
1dc150ea2946e86c6c54e4f2bbdb3c249f8ccf20 | 4,429 | py | Python | compute_rcr_values.py | rohanshad/cfd_circulation_hf | 1a7ee1ec23a00c8bc9373673376b0936dd53105c | [
"MIT"
] | null | null | null | compute_rcr_values.py | rohanshad/cfd_circulation_hf | 1a7ee1ec23a00c8bc9373673376b0936dd53105c | [
"MIT"
] | null | null | null | compute_rcr_values.py | rohanshad/cfd_circulation_hf | 1a7ee1ec23a00c8bc9373673376b0936dd53105c | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os, re
import numpy as np
import matplotlib.pyplot as plt
debug = True
def compute_rcr_parameters(area, Q_goal, P_min, P_max, P_mean, Q_mean, ratio_prox_to_distal_resistors, decay_time, C_prefactor=1.0):
tol = 1e-12
# total resistances
R_total = []
for Q in Q_goal:
... | 25.454023 | 150 | 0.606232 |
1dc1622630067c6d8b8815919b599ff81f27e810 | 4,767 | py | Python | text_recognition/model_gru.py | ijoon/text-recognition | fd67f7f80aa31ad33fcf090b77920493f25a8ea3 | [
"Apache-2.0"
] | 1 | 2021-03-02T05:53:17.000Z | 2021-03-02T05:53:17.000Z | text_recognition/model_gru.py | ijoon/text-recognition | fd67f7f80aa31ad33fcf090b77920493f25a8ea3 | [
"Apache-2.0"
] | null | null | null | text_recognition/model_gru.py | ijoon/text-recognition | fd67f7f80aa31ad33fcf090b77920493f25a8ea3 | [
"Apache-2.0"
] | null | null | null | from keras import backend as K
from keras.layers import Conv2D, MaxPooling2D
from keras.layers import Input, Dense, Activation
from keras.layers import Reshape, Lambda, BatchNormalization
from keras.layers.merge import add, concatenate
from keras.models import Model
from keras.layers.recurrent import GRU
from pa... | 51.815217 | 127 | 0.669394 |
1dc165d473254a072e64ece0984babdc2861de48 | 3,475 | py | Python | gui.py | Inndy/python-rsa | 1779b35ee0abe80b44be77fe2e26c7fc26765c1c | [
"MIT"
] | 5 | 2018-12-01T10:30:01.000Z | 2020-10-26T07:13:40.000Z | gui.py | GoopyAspirin/python-rsa | 1779b35ee0abe80b44be77fe2e26c7fc26765c1c | [
"MIT"
] | null | null | null | gui.py | GoopyAspirin/python-rsa | 1779b35ee0abe80b44be77fe2e26c7fc26765c1c | [
"MIT"
] | 8 | 2017-11-20T04:53:01.000Z | 2021-01-24T04:19:14.000Z | from tk import *
from rsa import *
from utils import *
import sys
sys.path.insert(0, './pygubu')
import pygubu
class App(object):
def __init__(self, master):
self.builder = builder = pygubu.Builder()
builder.add_from_file('main.ui')
self.mainwindow = builder.get_object('Frame_1', master)
... | 30.217391 | 90 | 0.567194 |
1dc168beb82f57822603f6d1aa4faea95deab5cc | 10,605 | py | Python | infrastructure/src/main/python/pbase/pdata/utils/ontonotes.py | Impavidity/pinfrastructure | b5577fe1e140e0b360aec2834349ba87647eb000 | [
"MIT"
] | 10 | 2017-12-04T03:50:50.000Z | 2020-09-25T07:24:32.000Z | infrastructure/src/main/python/pbase/pdata/utils/ontonotes.py | Impavidity/pinfrastructure | b5577fe1e140e0b360aec2834349ba87647eb000 | [
"MIT"
] | 8 | 2018-07-14T09:45:38.000Z | 2018-09-17T20:56:52.000Z | infrastructure/src/main/python/pbase/pdata/utils/ontonotes.py | Impavidity/pinfrastructure | b5577fe1e140e0b360aec2834349ba87647eb000 | [
"MIT"
] | 1 | 2017-11-24T18:31:53.000Z | 2017-11-24T18:31:53.000Z | import logging
import os
from collections import defaultdict
from nltk import Tree
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
class OntonotesSentence(object):
"""
A class representing the annotations available for a single CONLL formatted sentence.
Args:
document_id (str): documen... | 33.037383 | 87 | 0.635644 |
1dc1ab03078a563c69e42e64374250fefcd21bfc | 19,122 | py | Python | scipy/special/__init__.py | disqus/scipy | 2619f0ca030b2bcf630ddd9a33f48c588cf4fcea | [
"BSD-3-Clause"
] | null | null | null | scipy/special/__init__.py | disqus/scipy | 2619f0ca030b2bcf630ddd9a33f48c588cf4fcea | [
"BSD-3-Clause"
] | null | null | null | scipy/special/__init__.py | disqus/scipy | 2619f0ca030b2bcf630ddd9a33f48c588cf4fcea | [
"BSD-3-Clause"
] | null | null | null | """
========================================
Special functions (:mod:`scipy.special`)
========================================
.. module:: scipy.special
Nearly all of the functions below are universal functions and follow
broadcasting and automatic array-looping rules. Exceptions are noted.
Error handling
==========... | 34.957952 | 121 | 0.660496 |
1dc1af378eb7618dc17496a2794e4e40c7444f0c | 2,157 | py | Python | scripts/fbOS/coding/IdentifyCustomerDropOff.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/fbOS/coding/IdentifyCustomerDropOff.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/fbOS/coding/IdentifyCustomerDropOff.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
PROBLEM : Given data about users, action and time of action, convert the given data in a table like format into a structure that can help identify customer dropoff.
You can use any data structure for input and output.
INPUT DATA
ID. TIME ACTION
100 1000 A
200 1000 A
100 1100 B
200 1150 B
200 1200 C
100 1200 A
300... | 27.303797 | 164 | 0.644414 |
1dc1b37f9e2872f762246f4f63249195aecbf60c | 3,674 | py | Python | GUI/WifiMonitor/IMU/GY80_IMU.py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | 1 | 2019-10-15T20:31:39.000Z | 2019-10-15T20:31:39.000Z | GUI/WifiMonitor/IMU/GY80_IMU.py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | null | null | null | GUI/WifiMonitor/IMU/GY80_IMU.py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
*************************************************
* @Project: Self Balance
* @Platform: Raspberry PI 2 B+
* @Description: GY80 API - IMU sensor API
* @Owner: Guilherme Chinellato
* @Email: guilhermechinellato@gmail.com
******... | 33.4 | 145 | 0.597714 |
1dc1bf9efdeebe6813d0105e3eeef5ad442298e9 | 6,413 | py | Python | zytlib/touch.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | 3 | 2021-07-03T17:27:44.000Z | 2021-09-26T20:48:19.000Z | zytlib/touch.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | null | null | null | zytlib/touch.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | 1 | 2022-03-08T08:54:03.000Z | 2022-03-08T08:54:03.000Z | #! python3.8 -u
# -*- coding: utf-8 -*-
##############################
## Project PyCTLib
## Package <main>
##############################
__all__ = """
get_environ_vars
touch
check
crash
no_print
retry
empty_function
once
""".split()
import sys
from time import sleep
from typing impo... | 28.376106 | 114 | 0.56479 |
1dc1e812673baf5f89381a195a77411367ad233a | 660 | py | Python | .venv/Scripts/rst2pseudoxml.py | JohanK91/MethodDice | 73a8962c762ff48da331c9212f10676f066ed940 | [
"MIT"
] | null | null | null | .venv/Scripts/rst2pseudoxml.py | JohanK91/MethodDice | 73a8962c762ff48da331c9212f10676f066ed940 | [
"MIT"
] | null | null | null | .venv/Scripts/rst2pseudoxml.py | JohanK91/MethodDice | 73a8962c762ff48da331c9212f10676f066ed940 | [
"MIT"
] | 1 | 2021-02-22T13:55:32.000Z | 2021-02-22T13:55:32.000Z | #!C:\Users\vigge\onedrive\dokument\github\methoddice\.venv\Scripts\python.exe
# $Id: rst2pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing pseudo-XML.... | 27.5 | 77 | 0.74697 |
1dc20c0a80be316e7b7a0f66e87d4432296c2132 | 3,712 | py | Python | fabfile/flat.py | isabella232/lookatthis | fe9ccc896f50ede13f9c469d38d90c8a732f9a71 | [
"FSFAP"
] | 15 | 2015-02-21T13:56:25.000Z | 2019-08-14T21:19:09.000Z | fabfile/flat.py | nprapps/lookatthis | fe9ccc896f50ede13f9c469d38d90c8a732f9a71 | [
"FSFAP"
] | 444 | 2015-01-06T16:54:13.000Z | 2021-09-22T11:46:33.000Z | fabfile/flat.py | isabella232/lookatthis | fe9ccc896f50ede13f9c469d38d90c8a732f9a71 | [
"FSFAP"
] | 13 | 2015-01-05T14:33:15.000Z | 2021-02-23T10:45:32.000Z | #!/usr/bin/env python
from cStringIO import StringIO
from fnmatch import fnmatch
import gzip
import hashlib
import mimetypes
import os
import boto
from boto.s3.key import Key
import app_config
import utils
GZIP_FILE_TYPES = ['.html', '.js', '.json', '.css', '.xml']
class FakeTime:
def time(self):
retur... | 26.898551 | 93 | 0.583513 |
1dc231eace1b7fb1196a95dc2ca20dbeaba355aa | 689 | py | Python | xgboost_ray/__init__.py | kyle-chen-uber/xgboost_ray | 88347d637144f155d37b6440a7d45f1d8f55893e | [
"Apache-2.0"
] | 1 | 2021-07-30T20:19:23.000Z | 2021-07-30T20:19:23.000Z | xgboost_ray/__init__.py | kyle-chen-uber/xgboost_ray | 88347d637144f155d37b6440a7d45f1d8f55893e | [
"Apache-2.0"
] | null | null | null | xgboost_ray/__init__.py | kyle-chen-uber/xgboost_ray | 88347d637144f155d37b6440a7d45f1d8f55893e | [
"Apache-2.0"
] | null | null | null | from xgboost_ray.main import RayParams, train, predict
from xgboost_ray.matrix import RayDMatrix, RayDeviceQuantileDMatrix,\
RayFileType, RayShardingMode, \
Data, combine_data
# workaround for legacy xgboost==0.9.0
try:
from xgboost_ray.sklearn import RayXGBClassifier, RayXGBRegressor, \
RayXGBRFCla... | 34.45 | 75 | 0.74746 |
1dc239562bc7ff21ba0994a4f4d2125b1438be5c | 2,068 | py | Python | src/command_modules/azure-cli-dls/setup.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-dls/setup.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 3 | 2021-03-26T00:48:20.000Z | 2022-03-29T22:05:39.000Z | src/command_modules/azure-cli-dls/setup.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... | 31.333333 | 94 | 0.607834 |
1dc24a57c454a59d1a2cc6cb1a711b46e86a20f8 | 5,231 | py | Python | test_projects/Timer/main.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | test_projects/Timer/main.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | test_projects/Timer/main.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | """The test project for the Timer class.
Command examples:
$ python test_projects/Timer/main.py
"""
import sys
sys.path.append('./')
import os
from types import ModuleType
from typing_extensions import TypedDict
import apysc as ap
from apysc._file import file_util
this_module: ModuleType = sys.... | 26.553299 | 75 | 0.619958 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.