hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8cf134599c2f115df844c3fa206b23bc10c5d4ff | 2,173 | py | Python | gym_miniworld/envs/tmaze.py | CyberHolmes/gym-miniworld | f0665b4af2f89f43fbad3aa408e45ece29c624ae | [
"Apache-2.0"
] | null | null | null | gym_miniworld/envs/tmaze.py | CyberHolmes/gym-miniworld | f0665b4af2f89f43fbad3aa408e45ece29c624ae | [
"Apache-2.0"
] | null | null | null | gym_miniworld/envs/tmaze.py | CyberHolmes/gym-miniworld | f0665b4af2f89f43fbad3aa408e45ece29c624ae | [
"Apache-2.0"
] | null | null | null | import numpy as np
import math
from ..miniworld import MiniWorldEnv, Room
from ..entity import Box
from gym import spaces
class TMaze(MiniWorldEnv):
"""
Two hallways connected in a T-junction
"""
def __init__(
self,
goal_pos=None,
**kwargs
):
self.goal_pos = goal_po... | 26.82716 | 78 | 0.54809 |
1d73d1724ca47c71fe31c78f64a43ef277f0d71e | 51,257 | py | Python | sympy/core/exprtools.py | shivank070701/sympy | c681a15b781aeefdbea846d67cf9b9b6ced77b4a | [
"BSD-3-Clause"
] | 1 | 2022-01-19T04:02:46.000Z | 2022-01-19T04:02:46.000Z | sympy/core/exprtools.py | shivank070701/sympy | c681a15b781aeefdbea846d67cf9b9b6ced77b4a | [
"BSD-3-Clause"
] | 10 | 2021-07-21T20:56:57.000Z | 2021-07-31T16:35:28.000Z | sympy/core/exprtools.py | shivank070701/sympy | c681a15b781aeefdbea846d67cf9b9b6ced77b4a | [
"BSD-3-Clause"
] | 1 | 2022-01-14T17:15:38.000Z | 2022-01-14T17:15:38.000Z | """Tools for manipulating of large commutative expressions. """
from sympy.core.add import Add
from sympy.core.compatibility import iterable, is_sequence, SYMPY_INTS
from sympy.core.mul import Mul, _keep_coeff
from sympy.core.power import Pow
from sympy.core.basic import Basic, preorder_traversal
from sympy.core.expr ... | 32.564803 | 106 | 0.50955 |
f518dccee040d9d5bfc321db9c91e5e0fb62b13d | 707 | py | Python | py/ec_condition.py | easycoder/EasyCoder | b9a1add42b01dd98059045aac64fda8abc7b5de5 | [
"Apache-2.0"
] | 2 | 2021-08-15T06:05:25.000Z | 2021-08-20T18:03:24.000Z | py/ec_condition.py | easycoder/EasyCoder | b9a1add42b01dd98059045aac64fda8abc7b5de5 | [
"Apache-2.0"
] | 1 | 2021-02-28T20:46:36.000Z | 2021-02-28T20:46:36.000Z | py/ec_condition.py | easycoder/EasyCoder | b9a1add42b01dd98059045aac64fda8abc7b5de5 | [
"Apache-2.0"
] | null | null | null | class Condition:
def __init__(self, compiler):
self.domains = compiler.domains
self.getToken = compiler.getToken
self.nextToken = compiler.nextToken
self.peek = compiler.peek
self.tokenIs = compiler.tokenIs
self.mark = compiler.mark
self.rewind = compiler.rewind
self.program = compiler.program
def c... | 27.192308 | 56 | 0.729844 |
c047af6df5373732fb07c10c94416e5db5d6fc73 | 23,903 | py | Python | venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_internal/cli/cmdoptions.py | nguidjoi/bigData | aef722e77c10b8b0261578277892ebb15764d680 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_internal/cli/cmdoptions.py | nguidjoi/bigData | aef722e77c10b8b0261578277892ebb15764d680 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_internal/cli/cmdoptions.py | nguidjoi/bigData | aef722e77c10b8b0261578277892ebb15764d680 | [
"Apache-2.0"
] | null | null | null | """
shared options and groups
The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this de... | 29.693168 | 79 | 0.623897 |
78454eb0706d5cab92f58509223e3675604201f6 | 3,048 | py | Python | openprocurement/auction/texas/forms.py | oleksiyVeretiuk/openprocurement.auction.gong | 783ea355c1633e084aaf26a1d6128cc77ae6f642 | [
"Apache-2.0"
] | null | null | null | openprocurement/auction/texas/forms.py | oleksiyVeretiuk/openprocurement.auction.gong | 783ea355c1633e084aaf26a1d6128cc77ae6f642 | [
"Apache-2.0"
] | null | null | null | openprocurement/auction/texas/forms.py | oleksiyVeretiuk/openprocurement.auction.gong | 783ea355c1633e084aaf26a1d6128cc77ae6f642 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime
import wtforms_json
from flask import request, session, current_app as app
from wtforms import Form, FloatField, StringField
from wtforms.validators import InputRequired, ValidationError
from openprocurement.auction.utils import prepare_extra_journal_fields
from o... | 37.62963 | 91 | 0.623031 |
78b52faabc06fd4b363b2e1fb2b09e11319af62e | 2,640 | py | Python | python/ymt_components/ymt_face_eyebrow_01/settingsUI.py | yamahigashi/mgear_shifter_components | c4e4c19d8a972e4d78df46f4bdf0b3319da5a792 | [
"MIT"
] | 10 | 2020-01-24T10:10:39.000Z | 2021-09-16T06:20:55.000Z | python/ymt_components/ymt_face_eyebrow_01/settingsUI.py | yamahigashi/mgear_shifter_components | c4e4c19d8a972e4d78df46f4bdf0b3319da5a792 | [
"MIT"
] | null | null | null | python/ymt_components/ymt_face_eyebrow_01/settingsUI.py | yamahigashi/mgear_shifter_components | c4e4c19d8a972e4d78df46f4bdf0b3319da5a792 | [
"MIT"
] | 2 | 2020-01-24T10:11:07.000Z | 2020-04-21T18:17:09.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'D:/Projects/Pipeline/rez-packages/third/github.com/yamahigashi/ymtshiftercomponents/mgear_shifter_components/python/ymt_components/ymt_face_eyebrow_01/settingsUI.ui'
#
# Created: Sun Apr 11 12:55:04 2021
# by: pyside2-uic running on Py... | 51.764706 | 219 | 0.737879 |
471f79c791043c367a2345faf3570defe0835229 | 21,815 | py | Python | tests/main_test.py | flyingbarron/detect-secrets | 5f9887179794ce037d97c1b343623eb5937ce800 | [
"Apache-2.0"
] | null | null | null | tests/main_test.py | flyingbarron/detect-secrets | 5f9887179794ce037d97c1b343623eb5937ce800 | [
"Apache-2.0"
] | null | null | null | tests/main_test.py | flyingbarron/detect-secrets | 5f9887179794ce037d97c1b343623eb5937ce800 | [
"Apache-2.0"
] | null | null | null | import json
import shlex
import textwrap
from contextlib import contextmanager
import mock
import pytest
from detect_secrets import main as main_module
from detect_secrets import VERSION
from detect_secrets.core import audit as audit_module
from detect_secrets.main import main
from detect_secrets.plugins.common.util ... | 32.318519 | 95 | 0.476461 |
56ed1a1c49244c3131011bab0f49446d07144709 | 6,760 | py | Python | python/ray/rllib/optimizers/multi_gpu_optimizer.py | matthew-z/ray | f37c260bdb3cbaafc783c6274f2c4b929fce0f9a | [
"Apache-2.0"
] | null | null | null | python/ray/rllib/optimizers/multi_gpu_optimizer.py | matthew-z/ray | f37c260bdb3cbaafc783c6274f2c4b929fce0f9a | [
"Apache-2.0"
] | null | null | null | python/ray/rllib/optimizers/multi_gpu_optimizer.py | matthew-z/ray | f37c260bdb3cbaafc783c6274f2c4b929fce0f9a | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from collections import defaultdict
import os
import tensorflow as tf
import ray
from ray.rllib.evaluation.tf_policy_graph import TFPolicyGraph
from ray.rllib.optimizers.policy_optimizer imp... | 41.987578 | 79 | 0.605621 |
b230783fc9834d84bc3a06121faa4bb99b564d0f | 17,951 | py | Python | netbox/ipam/views.py | pkorovin/netbox | bf35b4121fdf51908be3d8df625db828261eecaa | [
"Apache-2.0"
] | 1 | 2021-09-06T05:12:45.000Z | 2021-09-06T05:12:45.000Z | netbox/ipam/views.py | kovarus/netbox | db72a64ef7639a34ebd96038e05443222566a790 | [
"Apache-2.0"
] | null | null | null | netbox/ipam/views.py | kovarus/netbox | db72a64ef7639a34ebd96038e05443222566a790 | [
"Apache-2.0"
] | 1 | 2020-10-15T07:41:44.000Z | 2020-10-15T07:41:44.000Z | from netaddr import IPSet
from django_tables2 import RequestConfig
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.db.models import Count
from django.shortcuts import get_object_or_404, render
from dcim.models import Device
from utilities.paginator import EnhancedPaginator
from utilities.vi... | 32.757299 | 112 | 0.724584 |
e9668243db28416da2da26a5fbe0bd86fd17d4e4 | 9,504 | py | Python | my_tools.py | Nykaus/my_tools | a23045c8f0d91844c9db2f82a5694da5cc9e4ae1 | [
"MIT"
] | null | null | null | my_tools.py | Nykaus/my_tools | a23045c8f0d91844c9db2f82a5694da5cc9e4ae1 | [
"MIT"
] | null | null | null | my_tools.py | Nykaus/my_tools | a23045c8f0d91844c9db2f82a5694da5cc9e4ae1 | [
"MIT"
] | null | null | null | import sublime
import sublime_plugin
import os
import re
import html
import webbrowser
import urllib.request
#import requests
#package_dir = os.path.abspath(os.path.dirname(__file__))
#class GetContentHtmlCommand(sublime_plugin.TextCommand):
# def run(self,edit):
#
# #recuperation des selections faites sur l'editeu... | 32.108108 | 356 | 0.686553 |
e383dc832d93a413bd49aba2e76d9722897a50a9 | 3,808 | py | Python | tests/test_assets_api.py | oceanprotocol/provider-backend | f9e36e3d6b880de548c6b92c38d10d76daf369ba | [
"Apache-2.0"
] | null | null | null | tests/test_assets_api.py | oceanprotocol/provider-backend | f9e36e3d6b880de548c6b92c38d10d76daf369ba | [
"Apache-2.0"
] | 1 | 2018-08-15T09:57:01.000Z | 2018-08-15T09:57:01.000Z | tests/test_assets_api.py | oceanprotocol/provider-backend | f9e36e3d6b880de548c6b92c38d10d76daf369ba | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2021 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
import json
from aquarius.constants import BaseURLs
from aquarius.events.constants import EventTypes
from tests.ddo_samples_invalid import json_dict_no_valid_metadata
from tests.ddos.ddo_sample1_v4 import json_dict
from tests.helpers ... | 31.471074 | 88 | 0.678309 |
c063f999257490dccc1087c48d2f3616c4814b83 | 3,225 | py | Python | venv/lib/python3.7/site-packages/PyInstaller/hooks/hook-xml.dom.html.HTMLDocument.py | alexzacher/BMI-Body-Mass-Index-Calculator-APP | f54473757992568b73b066d507059e1053357174 | [
"MIT"
] | 5 | 2020-08-24T23:29:58.000Z | 2022-02-07T19:58:07.000Z | PyInstaller/hooks/hook-xml.dom.html.HTMLDocument.py | samuelhwilliams/pyinstaller | 8714423aa56803027b5a5585257392024ea9f7a0 | [
"Apache-2.0"
] | 12 | 2020-02-15T04:04:55.000Z | 2022-02-18T20:29:49.000Z | pyinstaller-develop/PyInstaller/hooks/hook-xml.dom.html.HTMLDocument.py | onecklam/ethereum-graphviz | 6993accf0cb85e23013bf7ae6b04145724a6dbd2 | [
"Apache-2.0"
] | 2 | 2020-08-24T23:30:06.000Z | 2021-12-23T18:23:38.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2013-2020, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | 47.426471 | 78 | 0.530543 |
50474356d153dd3aa53c88c3e7ffd7b5945fb5d2 | 4,988 | py | Python | third_party/unidecode/x0bb.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 39 | 2015-06-10T23:18:07.000Z | 2021-10-21T04:29:06.000Z | third_party/unidecode/x0bb.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 2 | 2016-08-22T12:38:10.000Z | 2017-01-26T18:37:33.000Z | third_party/unidecode/x0bb.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 26 | 2015-06-10T22:09:15.000Z | 2021-06-27T15:45:15.000Z | data = (
'moen', # 0x00
'moenj', # 0x01
'moenh', # 0x02
'moed', # 0x03
'moel', # 0x04
'moelg', # 0x05
'moelm', # 0x06
'moelb', # 0x07
'moels', # 0x08
'moelt', # 0x09
'moelp', # 0x0a
'moelh', # 0x0b
'moem', # 0x0c
'moeb', # 0x0d
'moebs', # 0x0e
'moes', # 0x... | 19.258687 | 20 | 0.433641 |
4044fd554accc710808183904c7905a1a811f040 | 7,574 | py | Python | isi_sdk_9_0_0/isi_sdk_9_0_0/models/ndmp_sessions_node.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_9_0_0/isi_sdk_9_0_0/models/ndmp_sessions_node.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_9_0_0/isi_sdk_9_0_0/models/ndmp_sessions_node.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 10
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_9_0_0.models.ndmp_s... | 31.168724 | 124 | 0.577238 |
54d1c3d06301c20e74cabc64b6760c098a746bd4 | 932 | py | Python | test/proj4/proj-regression-meteosat_145.py | dvuckovic/magics-test | bd8baf97b0db986f6adf63700d3cf77bbcbad2f2 | [
"Apache-2.0"
] | 7 | 2019-03-19T09:32:41.000Z | 2022-02-07T13:20:33.000Z | test/proj4/proj-regression-meteosat_145.py | dvuckovic/magics-test | bd8baf97b0db986f6adf63700d3cf77bbcbad2f2 | [
"Apache-2.0"
] | 2 | 2021-03-30T05:37:20.000Z | 2021-08-17T13:58:04.000Z | test/proj4/proj-regression-meteosat_145.py | dvuckovic/magics-test | bd8baf97b0db986f6adf63700d3cf77bbcbad2f2 | [
"Apache-2.0"
] | 5 | 2019-03-19T10:43:46.000Z | 2021-09-09T14:28:39.000Z | from Magics.macro import *
import os
def plot_area(epsg):
img = os.path.basename(__file__).split('.')[0]
title = "Projection {} ".format(epsg)
#Setting output
png = output(
output_formats = ['png'],
output_name = img,
output_name_first_page_number = 'off')
#Setting the ge... | 23.3 | 54 | 0.60515 |
fcba2d280840edea0e2e62a1021eb18085fe6c38 | 132,479 | py | Python | gui/qt/main_window.py | quietnan/electrum-ftc | 5f72cadd777d80a7235e4860589c425287a67fe9 | [
"MIT"
] | null | null | null | gui/qt/main_window.py | quietnan/electrum-ftc | 5f72cadd777d80a7235e4860589c425287a67fe9 | [
"MIT"
] | null | null | null | gui/qt/main_window.py | quietnan/electrum-ftc | 5f72cadd777d80a7235e4860589c425287a67fe9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including witho... | 41.56856 | 411 | 0.609319 |
33370113c567c884153457d2ed20d816e08647fc | 3,617 | py | Python | bridge/pearl.py | joshdabosh/dhbridge | dfef6fe37d5dda45af65880875bb9914c31b5d11 | [
"MIT"
] | 6 | 2020-03-30T22:55:51.000Z | 2021-12-25T21:17:29.000Z | bridge/pearl.py | joshdabosh/dhbridge | dfef6fe37d5dda45af65880875bb9914c31b5d11 | [
"MIT"
] | 1 | 2021-12-25T17:10:41.000Z | 2021-12-25T17:10:41.000Z | bridge/pearl.py | joshdabosh/dhbridge | dfef6fe37d5dda45af65880875bb9914c31b5d11 | [
"MIT"
] | null | null | null | import asyncio, importlib, json, os
from threading import Thread
import hangups
import discord
import nacre
import lockfile
class Pearl:
def __init__(self, auth, config):
self.auth = auth
self.config = config
self.client = hangups.client.Client(self.authenticate())
self.admins ... | 28.480315 | 112 | 0.601051 |
b61f4be37da644bea54dddb50d24749981da2ced | 294 | py | Python | leet/slidingwindow/longestOnes.py | monishshah18/python-cp-cheatsheet | a5514b08816959de1198156f7764c54a7a585f20 | [
"Apache-2.0"
] | 1 | 2021-12-16T10:31:50.000Z | 2021-12-16T10:31:50.000Z | leet/slidingwindow/longestOnes.py | Rahul-k25/python-cp-cheatsheet | 17ea967f669e4992fba51b26accdd44a01aaac32 | [
"Apache-2.0"
] | null | null | null | leet/slidingwindow/longestOnes.py | Rahul-k25/python-cp-cheatsheet | 17ea967f669e4992fba51b26accdd44a01aaac32 | [
"Apache-2.0"
] | 1 | 2021-09-22T04:41:47.000Z | 2021-09-22T04:41:47.000Z | class Solution:
def longestOnes(self, A: List[int], K: int) -> int:
l = 0
cnt = 0
for r in range(len(A)):
K -= 1 - A[r]
if K < 0:
K += 1 - A[l]
l += 1
return r-l+1 | 22.615385 | 55 | 0.306122 |
2cfb7a294a361e72983473a4d12b0585548611c6 | 1,980 | py | Python | fundamental_blockchain.py | AnandaRauf/Fundamental-Blockchain | 583f70bbc75b703a953e5fb6a857cc15aaf9ff0a | [
"MIT"
] | 2 | 2021-05-21T12:59:13.000Z | 2021-07-21T02:50:28.000Z | fundamental_blockchain.py | AnandaRauf/Fundamental-Blockchain | 583f70bbc75b703a953e5fb6a857cc15aaf9ff0a | [
"MIT"
] | null | null | null | fundamental_blockchain.py | AnandaRauf/Fundamental-Blockchain | 583f70bbc75b703a953e5fb6a857cc15aaf9ff0a | [
"MIT"
] | null | null | null | def lightning_hash(data): #Example hash function
return data + '*' #star and plus is asterix for as return value #for generate unique hash #Lightning Version Blockhain #Suffix start in 1 for hashing data
class Block: #Primarily Storage unit
#Function method / define method. #Have parameter is self and... | 42.12766 | 160 | 0.699495 |
d3af5e3685a63ddd5def106bf8ae3fd309056715 | 1,683 | py | Python | Python/areas.py | chernyshov-dev/ideal-octo-waffle | c50f29795352766752dbbbcd46693ff54f23369b | [
"WTFPL"
] | 3 | 2021-08-29T15:22:08.000Z | 2021-08-29T17:12:01.000Z | Python/areas.py | chernyshov-dev/ideal-octo-waffle | c50f29795352766752dbbbcd46693ff54f23369b | [
"WTFPL"
] | 11 | 2021-09-07T19:24:15.000Z | 2022-01-13T19:51:25.000Z | Python/areas.py | chernyshov-dev/university-practice-heap | c50f29795352766752dbbbcd46693ff54f23369b | [
"WTFPL"
] | null | null | null | import math
print('Данная программа вычисляет площадь выбранной вами фигуры')
print('Доступные фигуры: прямоугольник, треугольник, трапеция, круг, эллипс')
f = input('Введите название фигуры -> ')
def rec():
a = float(input('Введите длину: '))
b = float(input('Введите ширину: '))
sr = a * b
... | 21.857143 | 78 | 0.545455 |
1a8d4dfbd1caf130cf1077c8115198124f6c4fb3 | 1,244 | py | Python | jscodestyle/common/lintrunner.py | zeth/jscodestyle | 43c98de7b544bf2203b23792677a7cefb5daf1d9 | [
"Apache-2.0"
] | null | null | null | jscodestyle/common/lintrunner.py | zeth/jscodestyle | 43c98de7b544bf2203b23792677a7cefb5daf1d9 | [
"Apache-2.0"
] | null | null | null | jscodestyle/common/lintrunner.py | zeth/jscodestyle | 43c98de7b544bf2203b23792677a7cefb5daf1d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2018 The JsCodeStyle Authors.
# Copyright 2008 The Closure Linter 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
#
# ht... | 32.736842 | 76 | 0.70418 |
07d6502cf18b334835952d168a77e6acc301facb | 11,866 | py | Python | step1_generate_dataset_IndexImage.py | imiled/DL_Tools_For_Finance | 7b1d3246a4271170af0a99a7ab6790b7377249fd | [
"Apache-2.0"
] | 1 | 2020-09-04T18:04:02.000Z | 2020-09-04T18:04:02.000Z | step1_generate_dataset_IndexImage.py | imiled/DL_Tools_For_Finance | 7b1d3246a4271170af0a99a7ab6790b7377249fd | [
"Apache-2.0"
] | 3 | 2020-09-19T15:23:38.000Z | 2021-08-25T16:13:04.000Z | step1_generate_dataset_IndexImage.py | imiled/DL_Tools_For_Finance | 7b1d3246a4271170af0a99a7ab6790b7377249fd | [
"Apache-2.0"
] | 1 | 2020-11-26T00:42:58.000Z | 2020-11-26T00:42:58.000Z | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import bs4 as bs
import requests
import yfinance as yf
#import fix_yahoo_finance as yf
import datetime
import io
import cv2
import skimage
import datetime
from PIL import Image
from pandas_datareader import data as pdr
from skimage import measure
fr... | 36.398773 | 168 | 0.740182 |
a57dedc50984afe55e13d67dcf5bf6e6ddbfd537 | 26,805 | py | Python | tricircle-6.0.0/tricircle/db/api.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 1 | 2021-03-19T16:48:54.000Z | 2021-03-19T16:48:54.000Z | tricircle-6.0.0/tricircle/db/api.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | tricircle-6.0.0/tricircle/db/api.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2015 Huawei Technologies Co., Ltd.
# 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
#
# Unl... | 35.550398 | 79 | 0.597426 |
b3334e92c4a8286f002e874a64be432e10b0e37f | 93,885 | py | Python | xarray/tests/test_variable.py | AlexBodner/xarray | 39dc75d76b00bc60e567269a2dfd463fa482a3fd | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | xarray/tests/test_variable.py | AlexBodner/xarray | 39dc75d76b00bc60e567269a2dfd463fa482a3fd | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | xarray/tests/test_variable.py | AlexBodner/xarray | 39dc75d76b00bc60e567269a2dfd463fa482a3fd | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import warnings
from copy import copy, deepcopy
from datetime import datetime, timedelta
from textwrap import dedent
import numpy as np
import pandas as pd
import pytest
import pytz
from xarray import Coordinate, DataArray, Dataset, IndexVariable, Variable, set_options
from xarray.core import dtypes, duck_array_ops, ... | 36.918993 | 88 | 0.550301 |
eb6f0b9fe83d901a74fad547e2e3fc8e4bf7e7c7 | 14,552 | py | Python | inspectors/utils/admin.py | divergentdave/inspectors-general | 611d5ab2009390076ff59d3a638fc0cf8c23dbd4 | [
"CC0-1.0"
] | null | null | null | inspectors/utils/admin.py | divergentdave/inspectors-general | 611d5ab2009390076ff59d3a638fc0cf8c23dbd4 | [
"CC0-1.0"
] | null | null | null | inspectors/utils/admin.py | divergentdave/inspectors-general | 611d5ab2009390076ff59d3a638fc0cf8c23dbd4 | [
"CC0-1.0"
] | null | null | null | # functions for communicating with an admin
import os
import sys
import traceback
import yaml
import logging
import re
import atexit
import requests
import scrapelib
import smtplib
import email.utils
from email.mime.text import MIMEText
import json
import urllib.request
import urllib.parse
# read in an opt-in confi... | 31.227468 | 93 | 0.674478 |
622c67170425fd24dd17deb7fea4364d566caedc | 1,626 | py | Python | sparse_operation_kit/sparse_operation_kit/__init__.py | marsmiao/HugeCTR | c9ff359a69565200fcc0c7aae291d9c297bea70e | [
"Apache-2.0"
] | null | null | null | sparse_operation_kit/sparse_operation_kit/__init__.py | marsmiao/HugeCTR | c9ff359a69565200fcc0c7aae291d9c297bea70e | [
"Apache-2.0"
] | null | null | null | sparse_operation_kit/sparse_operation_kit/__init__.py | marsmiao/HugeCTR | c9ff359a69565200fcc0c7aae291d9c297bea70e | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2021, NVIDIA CORPORATION.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | 40.65 | 89 | 0.798278 |
0d9db5cd92c293752edb49e912a26ee153f7484f | 4,293 | py | Python | examples/soce_python/clients/set-preferences.py | gsi-upm/sawtooth-soce | ff9a8e396d91d6ce5a35803dcf8a10826dc5f0ed | [
"Apache-2.0"
] | null | null | null | examples/soce_python/clients/set-preferences.py | gsi-upm/sawtooth-soce | ff9a8e396d91d6ce5a35803dcf8a10826dc5f0ed | [
"Apache-2.0"
] | null | null | null | examples/soce_python/clients/set-preferences.py | gsi-upm/sawtooth-soce | ff9a8e396d91d6ce5a35803dcf8a10826dc5f0ed | [
"Apache-2.0"
] | null | null | null | from sawtooth_signing import create_context
from sawtooth_signing import CryptoFactory
from hashlib import sha512
from sawtooth_sdk.protobuf.transaction_pb2 import TransactionHeader
import cbor
from sawtooth_sdk.protobuf.transaction_pb2 import Transaction
from sawtooth_sdk.protobuf.batch_pb2 import BatchHeader
from saw... | 32.037313 | 152 | 0.753785 |
8c9de99b1f0fbaab20449e85898caf016044c070 | 5,229 | py | Python | zerver/views/user_groups.py | ricardoteixeiraduarte/zulip | 149132348feda1c6929e94e72abb167cc882fc74 | [
"Apache-2.0"
] | 3 | 2018-12-04T01:44:43.000Z | 2019-05-13T06:16:21.000Z | zerver/views/user_groups.py | ricardoteixeiraduarte/zulip | 149132348feda1c6929e94e72abb167cc882fc74 | [
"Apache-2.0"
] | 58 | 2018-11-27T15:18:54.000Z | 2018-12-09T13:43:07.000Z | zerver/views/user_groups.py | ricardoteixeiraduarte/zulip | 149132348feda1c6929e94e72abb167cc882fc74 | [
"Apache-2.0"
] | 9 | 2019-11-04T18:59:29.000Z | 2022-03-22T17:46:37.000Z | from django.http import HttpResponse, HttpRequest
from django.utils.translation import ugettext as _
from typing import List
from zerver.decorator import require_non_guest_human_user
from zerver.context_processors import get_realm_from_request
from zerver.lib.actions import check_add_user_group, do_update_user_group_... | 45.077586 | 100 | 0.735705 |
c4276690750fcd98ab95c58d0fc26e6a46544ad6 | 872 | py | Python | tomltoml/tomltoken.py | wting/tomltoml | 9ff477e629a50cc6deb3d729bcc0a835fd0e3acf | [
"MIT"
] | null | null | null | tomltoml/tomltoken.py | wting/tomltoml | 9ff477e629a50cc6deb3d729bcc0a835fd0e3acf | [
"MIT"
] | null | null | null | tomltoml/tomltoken.py | wting/tomltoml | 9ff477e629a50cc6deb3d729bcc0a835fd0e3acf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is purposely named tomltoken instead of token to prevent shadowing
# the native Python token module
from __future__ import absolute_import
from __future__ import unicode_literals
class Word(object):
def __init__(self, value):
self.value = value
class Comment(Word):
... | 15.034483 | 78 | 0.674312 |
4629d04766d470cfcfd5f6bd9fa83fc70fdca9d0 | 623 | py | Python | google-cloud-sdk/lib/googlecloudsdk/command_lib/util/__init__.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/lib/googlecloudsdk/command_lib/util/__init__.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/lib/googlecloudsdk/command_lib/util/__init__.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 3 | 2017-07-27T18:44:13.000Z | 2020-07-25T17:48:53.000Z | # Copyright 2016 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 ag... | 38.9375 | 74 | 0.757624 |
440afecaa966d4e408be1e329a69c226d7596162 | 1,084 | py | Python | lightkurve/io/k2sff.py | barentsen/lightkurve | 5b1693832bc509e42742d1b6f20224d131e62d8c | [
"MIT"
] | 1 | 2021-05-07T10:42:01.000Z | 2021-05-07T10:42:01.000Z | lightkurve/io/k2sff.py | dhomeier/lightkurve | ea53c81f3d7617441a02288ed84c016e8ef80ceb | [
"MIT"
] | 7 | 2018-07-14T17:49:36.000Z | 2020-09-24T19:58:13.000Z | lightkurve/io/k2sff.py | barentsen/lightkurve | 5b1693832bc509e42742d1b6f20224d131e62d8c | [
"MIT"
] | null | null | null | """Reader function for K2SFF community light curve products."""
from ..lightcurve import KeplerLightCurve
from ..utils import validate_method
from .generic import read_generic_lightcurve
def read_k2sff_lightcurve(filename, ext="BESTAPER", **kwargs):
"""Read a K2SFF light curve file.
More information: https:... | 30.971429 | 79 | 0.613469 |
17289f9e07f12298a36e81bbb9431320ddb3ad65 | 314 | py | Python | openspoor/spoortakmodel/singleton.py | ProRail-DataLab/openspoor | 548c7ffc12a5a97459bafe5327aa9b0d0546537c | [
"MIT"
] | 7 | 2022-01-28T09:54:10.000Z | 2022-03-25T10:02:08.000Z | openspoor/spoortakmodel/singleton.py | ProRail-DataLab/openspoor | 548c7ffc12a5a97459bafe5327aa9b0d0546537c | [
"MIT"
] | 11 | 2022-03-17T12:48:30.000Z | 2022-03-25T11:22:39.000Z | openspoor/spoortakmodel/singleton.py | ProRail-DataLab/openspoor | 548c7ffc12a5a97459bafe5327aa9b0d0546537c | [
"MIT"
] | 2 | 2022-03-16T14:11:48.000Z | 2022-03-25T09:10:30.000Z | class Singleton(object):
""" helper class to implement the singleton pattern """
_instances = {}
def __new__(class_, *args, **kwargs):
if class_ not in class_._instances:
class_._instances[class_] = super(Singleton, class_).__new__(class_)
return class_._instances[class_]
| 34.888889 | 80 | 0.665605 |
91ae75722c313f023c15ed59289411991a438ffa | 8,207 | py | Python | tests/share/metadata_formats/test_sharev2_elastic_formatter.py | CenterForOpenScience/SHARE | c7715af2881f6fa23197d4e7c381d90169a90ed1 | [
"Apache-2.0"
] | 87 | 2015-01-06T18:24:45.000Z | 2021-08-08T07:59:40.000Z | tests/share/metadata_formats/test_sharev2_elastic_formatter.py | fortress-biotech/SHARE | 9c5a05dd831447949fa6253afec5225ff8ab5d4f | [
"Apache-2.0"
] | 442 | 2015-01-01T19:16:01.000Z | 2022-03-30T21:10:26.000Z | tests/share/metadata_formats/test_sharev2_elastic_formatter.py | fortress-biotech/SHARE | 9c5a05dd831447949fa6253afec5225ff8ab5d4f | [
"Apache-2.0"
] | 67 | 2015-03-10T16:32:58.000Z | 2021-11-12T16:33:41.000Z | import json
import pytest
from unittest.mock import patch
from share.metadata_formats.sharev2_elastic import format_type
from tests.share.metadata_formats.base import BaseMetadataFormatterTest
@pytest.mark.parametrize('type_name,expected', [
('Foo', 'foo'),
('FooBar', 'foo bar'),
])
def test_format_type(typ... | 37.646789 | 100 | 0.402949 |
155214d93088f78e838595e3e3787c951d281102 | 985 | py | Python | swg_generated/python/test/test_new_order.py | 942star/upbit-client | 43201797a605d1e1b3e0db1183ced8ec9997699f | [
"MIT"
] | 1 | 2021-11-03T15:13:03.000Z | 2021-11-03T15:13:03.000Z | swg_generated/python/test/test_new_order.py | 942star/upbit-client | 43201797a605d1e1b3e0db1183ced8ec9997699f | [
"MIT"
] | null | null | null | swg_generated/python/test/test_new_order.py | 942star/upbit-client | 43201797a605d1e1b3e0db1183ced8ec9997699f | [
"MIT"
] | 1 | 2021-11-03T15:12:55.000Z | 2021-11-03T15:12:55.000Z | # coding: utf-8
"""
Upbit Open API
## REST API for Upbit Exchange - Base URL: [https://api.upbit.com] - Official Upbit API Documents: [https://docs.upbit.com] - Official Support email: [open-api@upbit.com] # noqa: E501
OpenAPI spec version: 1.1.6
Contact: ujhin942@gmail.com
Generated by: https:... | 24.02439 | 189 | 0.68731 |
5c07d9165f9f89107d55ba1572d4d02600f601be | 31,268 | py | Python | tools/ll_prof.py | chromium-googlesource-mirror/v8 | bf0c820d028452571c8c744ddd212c32c6d6a996 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 12 | 2015-03-03T02:38:54.000Z | 2020-07-07T17:59:31.000Z | deps/v8/tools/ll_prof.py | emerleite/node | aa67b1f3750646a0f30e12a3b4e4fcb84dc8cafa | [
"MIT"
] | null | null | null | deps/v8/tools/ll_prof.py | emerleite/node | aa67b1f3750646a0f30e12a3b4e4fcb84dc8cafa | [
"MIT"
] | 3 | 2017-02-25T05:46:09.000Z | 2019-07-01T01:22:33.000Z | #!/usr/bin/env python
#
# Copyright 2010 the V8 project authors. 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
# noti... | 32.983122 | 97 | 0.641774 |
0e711d489b4a4566faa9b1b167ac00c3fd9903dc | 663 | py | Python | advent/day_02/task_1.py | kurazu/advent_of_code_2021 | a4b18e0e7f286d3485d85f2a1a58c7bdea0115d7 | [
"MIT"
] | null | null | null | advent/day_02/task_1.py | kurazu/advent_of_code_2021 | a4b18e0e7f286d3485d85f2a1a58c7bdea0115d7 | [
"MIT"
] | null | null | null | advent/day_02/task_1.py | kurazu/advent_of_code_2021 | a4b18e0e7f286d3485d85f2a1a58c7bdea0115d7 | [
"MIT"
] | null | null | null | import logging
from typing import TextIO
import pandas as pd
from ..cli import run_with_file_argument
logger = logging.getLogger(__name__)
def main(input: TextIO) -> str:
df = pd.read_csv(input, names=["direction", "distance"], delimiter=" ")
df["x_factor"] = df["direction"].map({"forward": 1, "down": 0, "... | 26.52 | 77 | 0.594268 |
24e34dda9c7e01baac11bf502de3a2dac04a050b | 1,238 | py | Python | IM_test/app_lib/serialOperate.py | joakimzhang/qa_study | ff8930e674d45c49bea4e130d14d73d17b090e48 | [
"Apache-2.0"
] | null | null | null | IM_test/app_lib/serialOperate.py | joakimzhang/qa_study | ff8930e674d45c49bea4e130d14d73d17b090e48 | [
"Apache-2.0"
] | null | null | null | IM_test/app_lib/serialOperate.py | joakimzhang/qa_study | ff8930e674d45c49bea4e130d14d73d17b090e48 | [
"Apache-2.0"
] | null | null | null | import serial
import sys
import globalVariable
class SerialOperation(object):
def __init__(self):
self.com = globalVariable.serial_config['serial_port']
self.xonxoff = globalVariable.serial_config['xonxoff']
self.baudrate = globalVariable.serial_config['baudrate']
self.timeout = g... | 25.791667 | 64 | 0.546042 |
37a9657c57b6a3217a97115cbac1833169d5bebd | 471 | py | Python | src/scimschema/__init__.py | stefanfoulis/scimschema | a314453d7b0fbabc69a0fad864d727a8d158abf9 | [
"MIT"
] | null | null | null | src/scimschema/__init__.py | stefanfoulis/scimschema | a314453d7b0fbabc69a0fad864d727a8d158abf9 | [
"MIT"
] | null | null | null | src/scimschema/__init__.py | stefanfoulis/scimschema | a314453d7b0fbabc69a0fad864d727a8d158abf9 | [
"MIT"
] | null | null | null | from .core_schemas import load_dict as _load_dict
from . import core_schemas
from ._model.schema_response import ScimResponse
from ._model import scim_exceptions, model, attribute
def validate(data, extension_schema_definitions):
ScimResponse(
data=data,
core_schema_definitions=core_schemas.schema... | 27.705882 | 65 | 0.787686 |
d44f5540dee95de5e5eb62d7bd35cef58814928d | 14,524 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ethernet_lldp_cfg.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ethernet_lldp_cfg.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ethernet_lldp_cfg.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """ Cisco_IOS_XR_ethernet_lldp_cfg
This module contains a collection of YANG definitions
for Cisco IOS\-XR ethernet\-lldp package configuration.
This module contains definitions
for the following management objects\:
lldp\: Enable LLDP, or configure global LLDP subcommands
This YANG module augments the
Cisco\-I... | 34.580952 | 433 | 0.568232 |
19e74a657445f9da21052744db0d22026f95773b | 1,399 | py | Python | python/matplotlib/imshow_colour_map_ax.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 23 | 2015-06-08T13:01:00.000Z | 2021-12-30T08:20:04.000Z | python/matplotlib/imshow_colour_map_ax.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 1 | 2020-10-22T02:36:10.000Z | 2020-10-22T02:36:10.000Z | python/matplotlib/imshow_colour_map_ax.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 7 | 2017-10-31T09:48:14.000Z | 2022-01-04T15:59:45.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Display data as an image using a color bar (via AxesSubplot)
See: http://matplotlib.org/examples/pylab_examples/image_demo.html
See also:
- http://matplotlib.org/examples/color/colormaps_reference.html (the list of all colormaps)
- http://matplotlib.org/users/color... | 34.121951 | 135 | 0.626876 |
73499d1b3e46d625246e734381206ba0364bccb0 | 1,397 | py | Python | setup.py | adrianmo/pymeteoclimatic | e699766282d1a6f09a452bac68b7f5e9ae510073 | [
"MIT"
] | 3 | 2021-01-18T12:20:31.000Z | 2022-01-28T19:31:23.000Z | setup.py | adrianmo/pymeteoclimatic | e699766282d1a6f09a452bac68b7f5e9ae510073 | [
"MIT"
] | 1 | 2020-09-11T16:31:34.000Z | 2020-09-14T07:36:45.000Z | setup.py | adrianmo/pymeteoclimatic | e699766282d1a6f09a452bac68b7f5e9ae510073 | [
"MIT"
] | 1 | 2022-01-31T20:07:41.000Z | 2022-01-31T20:07:41.000Z | from setuptools import setup
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='pymeteoclimatic',
version='0.0.6',
description='A Python wrapper around the Meteocli... | 36.763158 | 73 | 0.634932 |
9cb99d3767b0e8aafd120a5e4bf25e141b29434d | 1,171 | py | Python | dictionaries/memory_game.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | null | null | null | dictionaries/memory_game.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | null | null | null | dictionaries/memory_game.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | 1 | 2022-01-14T17:12:44.000Z | 2022-01-14T17:12:44.000Z | sequence_of_elements = input().split()
count_moves = 0
command = input()
while not command == "end":
count_moves += 1
index1 = int(command.split()[0])
index2 = int(command.split()[1])
if index1 == index2 or index1 < 0 or index2 < 0 or index1 >= len(sequence_of_elements) or index2 >= len(sequence_of_elem... | 48.791667 | 130 | 0.677199 |
19b77e626ce44cb2b631aa070c2650c2c7d0b614 | 2,297 | py | Python | test/pseudo_terminal.py | cbuescher/documentation | 97714317adef3eb676a7941df94d2d1c3835e909 | [
"Apache-2.0"
] | null | null | null | test/pseudo_terminal.py | cbuescher/documentation | 97714317adef3eb676a7941df94d2d1c3835e909 | [
"Apache-2.0"
] | null | null | null | test/pseudo_terminal.py | cbuescher/documentation | 97714317adef3eb676a7941df94d2d1c3835e909 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
import os
import re
import sys
import random
import pexpect
class Log:
def __init__(self):
self._log = None
self._filter_pattern = None
self.reset_log(... | 28.012195 | 117 | 0.60296 |
a2f4951723a1a141f09e7f02d27bf6ae92c4d1f2 | 6,616 | py | Python | numba/typing/listdecl.py | jdtatz/numba | eaba872337e0116f742c157301a3a42bcb1ca63f | [
"BSD-2-Clause"
] | 3 | 2019-09-30T20:00:36.000Z | 2020-07-13T04:17:15.000Z | numba/typing/listdecl.py | jdtatz/numba | eaba872337e0116f742c157301a3a42bcb1ca63f | [
"BSD-2-Clause"
] | null | null | null | numba/typing/listdecl.py | jdtatz/numba | eaba872337e0116f742c157301a3a42bcb1ca63f | [
"BSD-2-Clause"
] | 1 | 2021-12-14T16:21:11.000Z | 2021-12-14T16:21:11.000Z | from __future__ import absolute_import, print_function
from .. import types
from .templates import (ConcreteTemplate, AbstractTemplate, AttributeTemplate,
CallableTemplate, Registry, signature, bound_function,
make_callable_template)
# Ensure list is typed as a collecti... | 29.145374 | 80 | 0.586457 |
fa8f2792a0241f9aba5ce8a6e17325d5aa4e334f | 2,470 | py | Python | scripts/calculate_distance.py | colbyprior/python-maec | 109d4517b0123a5f01e31c15818f35772d451705 | [
"BSD-3-Clause"
] | null | null | null | scripts/calculate_distance.py | colbyprior/python-maec | 109d4517b0123a5f01e31c15818f35772d451705 | [
"BSD-3-Clause"
] | null | null | null | scripts/calculate_distance.py | colbyprior/python-maec | 109d4517b0123a5f01e31c15818f35772d451705 | [
"BSD-3-Clause"
] | null | null | null | # calculate_distance script
# Calculates and prints the distance between two or more MAEC Malware Subjects
# NOTE: This code imports and uses the maec.analytics.distance module, which uses the external numpy library.
# Numpy can be found here: https://pypi.python.org/pypi/numpy
# Copyright (c) 2015, The MITRE Corporat... | 43.333333 | 152 | 0.693117 |
e1b60c32f7094e4e5cfc5a3ef8be26699d826492 | 731 | py | Python | backend/tests/libs/cinq_test_cls.py | gibbsie/cloud-inquisitor | 03bc5bb70ff5ab27393fae833af7b6b750d39ce5 | [
"Apache-2.0"
] | 462 | 2017-11-27T20:53:25.000Z | 2022-03-26T18:32:50.000Z | backend/tests/libs/cinq_test_cls.py | gibbsie/cloud-inquisitor | 03bc5bb70ff5ab27393fae833af7b6b750d39ce5 | [
"Apache-2.0"
] | 103 | 2017-11-28T14:33:26.000Z | 2020-11-06T20:01:11.000Z | backend/tests/libs/cinq_test_cls.py | gibbsie/cloud-inquisitor | 03bc5bb70ff5ab27393fae833af7b6b750d39ce5 | [
"Apache-2.0"
] | 58 | 2017-11-28T00:49:12.000Z | 2022-03-26T18:32:44.000Z | from cinq_auditor_domain_hijacking import DomainHijackAuditor
from cinq_auditor_ebs import EBSAuditor
from cinq_auditor_required_tags import RequiredTagsAuditor
from cloud_inquisitor.constants import ActionStatus
class MockNotify(object):
def notify(self, notices):
self._cinq_test_notices = notices
cl... | 26.107143 | 79 | 0.783858 |
9ec540f1aa519a3c163fcf3b9226a6b296e41131 | 4,169 | py | Python | AlgorithmDevCode/bgrem2.py | norm42/summerize_video | 18e5665e66f037dfa27382162ab9c41e5c2707dd | [
"MIT"
] | 1 | 2020-05-18T23:39:29.000Z | 2020-05-18T23:39:29.000Z | AlgorithmDevCode/bgrem2.py | norm42/summerize_video | 18e5665e66f037dfa27382162ab9c41e5c2707dd | [
"MIT"
] | 1 | 2021-06-02T01:48:53.000Z | 2021-06-02T01:48:53.000Z | AlgorithmDevCode/bgrem2.py | norm42/summerize_video | 18e5665e66f037dfa27382162ab9c41e5c2707dd | [
"MIT"
] | null | null | null | #
# Copyright https://github.com/norm42/summerize_video/blob/master/LICENSE.md
# (Mit license)
#
import sys
import numpy as np
import cv2
import create_collage as ccoll
threshold = 20
# Open video file for processing
camera = cv2.VideoCapture('Front.20200506_154854.mp4')
fps = camera.get(cv2.CAP_PROP_F... | 45.315217 | 92 | 0.679539 |
4e6d736eb37d8762a439fd1420929c032780033f | 3,136 | py | Python | tests/pipeline/nodes/draw/test_legend.py | chngzyk/PeekingDuck | 299dbbda9104c40822ff1076e98b2d45f9974302 | [
"Apache-2.0"
] | 79 | 2021-06-04T04:11:33.000Z | 2022-03-31T17:46:38.000Z | tests/pipeline/nodes/draw/test_legend.py | chngzyk/PeekingDuck | 299dbbda9104c40822ff1076e98b2d45f9974302 | [
"Apache-2.0"
] | 248 | 2021-06-04T07:19:52.000Z | 2022-03-30T08:03:35.000Z | tests/pipeline/nodes/draw/test_legend.py | chngzyk/PeekingDuck | 299dbbda9104c40822ff1076e98b2d45f9974302 | [
"Apache-2.0"
] | 25 | 2021-06-22T03:48:57.000Z | 2022-03-16T04:33:52.000Z | # Copyright 2021 AI Singapore
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 29.308411 | 85 | 0.610651 |
8ddae8442b0851bdc04859a6e20172cff5d9f9f2 | 847 | py | Python | mvpa2/clfs/sg/__init__.py | mortonne/PyMVPA | 98644c5cd9733edd39fac746ea7cf67398674645 | [
"MIT"
] | null | null | null | mvpa2/clfs/sg/__init__.py | mortonne/PyMVPA | 98644c5cd9733edd39fac746ea7cf67398674645 | [
"MIT"
] | null | null | null | mvpa2/clfs/sg/__init__.py | mortonne/PyMVPA | 98644c5cd9733edd39fac746ea7cf67398674645 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the PyMVPA package for the
# copyright and license terms.
#
### ### ### ### ###... | 25.666667 | 78 | 0.563164 |
ab0fb28cc896e624366ee64b7fa086ff45bd8bcc | 7,631 | py | Python | mmf/models/base_model.py | facebookresearch/worldsheet | 13175f8f5e10b13436546ebf1600dc21005124d0 | [
"BSD-3-Clause"
] | 21 | 2021-09-29T17:19:29.000Z | 2022-03-14T23:24:51.000Z | mmf/models/base_model.py | facebookresearch/worldsheet | 13175f8f5e10b13436546ebf1600dc21005124d0 | [
"BSD-3-Clause"
] | 1 | 2022-03-14T00:53:26.000Z | 2022-03-15T16:08:16.000Z | mmf/models/base_model.py | facebookresearch/worldsheet | 13175f8f5e10b13436546ebf1600dc21005124d0 | [
"BSD-3-Clause"
] | 2 | 2021-11-06T01:35:39.000Z | 2021-11-27T02:53:49.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
"""
Models built on top of Pythia need to inherit ``BaseModel`` class and adhere to
some format. To create a model... | 35.004587 | 87 | 0.654829 |
1c0eb30ba262827170e41dce538fbd6a4a8c3e56 | 3,508 | py | Python | poship/engine/components/user/handlers.py | candango/podship-engine | d8cef10da00182c034320113fe1d990f40a585bd | [
"Apache-2.0"
] | null | null | null | poship/engine/components/user/handlers.py | candango/podship-engine | d8cef10da00182c034320113fe1d990f40a585bd | [
"Apache-2.0"
] | null | null | null | poship/engine/components/user/handlers.py | candango/podship-engine | d8cef10da00182c034320113fe1d990f40a585bd | [
"Apache-2.0"
] | 2 | 2016-08-04T14:55:17.000Z | 2016-08-05T13:50:50.000Z | #!/usr/bin/env python
#
# Copyright 2015-2016 Flavio Garcia
#
# 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... | 32.183486 | 83 | 0.590935 |
b141f6bebc0e3315e743b8d9a2f1496dbe7dc56b | 1,970 | py | Python | Experiments/VLDB20/Synthetic_data/report_median.py | northeastern-datalab/anyk-code | 45354ecb8716b227e8cf0fe8e0c8afc5327f3828 | [
"Apache-2.0"
] | 2 | 2021-09-03T22:07:01.000Z | 2021-11-09T19:01:58.000Z | Experiments/VLDB20/Synthetic_data/report_median.py | northeastern-datalab/anyk-code | 45354ecb8716b227e8cf0fe8e0c8afc5327f3828 | [
"Apache-2.0"
] | null | null | null | Experiments/VLDB20/Synthetic_data/report_median.py | northeastern-datalab/anyk-code | 45354ecb8716b227e8cf0fe8e0c8afc5327f3828 | [
"Apache-2.0"
] | 2 | 2021-07-05T17:51:36.000Z | 2021-09-03T22:07:02.000Z | #!/usr/bin/env python
import sys
import os
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
# For debugging
def print_list(times, k_list):
for i in range(len(k_list)):
print "k = " + str(k_list[i]) + " : " + str(times[i])
## -- Read input
import argparse
parser = argpars... | 29.402985 | 123 | 0.669036 |
37c1a6ad9e5aa7960d2f6a494f47f51e1ac0007a | 52,379 | py | Python | pyzfscmds/cmd.py | johnramsden/pyzfscmds | b5d430ffd0454bc6b09e256aeea67164714d9809 | [
"BSD-3-Clause"
] | 9 | 2018-07-08T20:01:33.000Z | 2022-03-29T11:31:51.000Z | pyzfscmds/cmd.py | johnramsden/pyzfscmds | b5d430ffd0454bc6b09e256aeea67164714d9809 | [
"BSD-3-Clause"
] | 1 | 2019-07-10T12:16:53.000Z | 2019-07-10T12:16:53.000Z | pyzfscmds/cmd.py | johnramsden/pyzfscmds | b5d430ffd0454bc6b09e256aeea67164714d9809 | [
"BSD-3-Clause"
] | 5 | 2018-06-04T02:33:43.000Z | 2020-05-25T22:48:58.000Z | """ZFS library"""
import itertools
import os
import subprocess
from typing import List
import pyzfscmds.check
import pyzfscmds.utility
import pyzfscmds.system.agnostic
"""
ZFS commands
"""
class _Command:
def __init__(self,
sub_command: str,
options: list = None,
... | 34.145372 | 97 | 0.602589 |
0f70b4a4dc40adf68a4b331fcc2f4ae0aa7a1ba0 | 2,179 | py | Python | setup.py | ossobv/djangosaml2idp | 71e65e28cff8e83d1a77325396784c879906d962 | [
"Apache-2.0"
] | 2 | 2018-11-14T07:44:24.000Z | 2018-11-19T01:01:58.000Z | setup.py | ossobv/djangosaml2idp | 71e65e28cff8e83d1a77325396784c879906d962 | [
"Apache-2.0"
] | null | null | null | setup.py | ossobv/djangosaml2idp | 71e65e28cff8e83d1a77325396784c879906d962 | [
"Apache-2.0"
] | 1 | 2018-12-19T22:02:34.000Z | 2018-12-19T22:02:34.000Z | # -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
from djangosaml2idp import __version__
setup(
name='djangosaml2idp',
version=__version__,
description='SAML 2.0 Identity Provider for Django',
keywords="django,pysaml2,sso,saml2,federated authentication,authentication,idp",
... | 34.046875 | 84 | 0.591097 |
41179067c41d948a13025281ab69785d87c223d3 | 8,331 | py | Python | test/functional/feature_proxy.py | Blessing-BLES/NEWSAVINGSOURCE | 529d24de45cffe89ad6c39e30e13f57dd1eee4f5 | [
"MIT"
] | 1 | 2021-02-10T13:20:37.000Z | 2021-02-10T13:20:37.000Z | test/functional/feature_proxy.py | Blessing-BLES/NEWSAVINGSOURCE | 529d24de45cffe89ad6c39e30e13f57dd1eee4f5 | [
"MIT"
] | null | null | null | test/functional/feature_proxy.py | Blessing-BLES/NEWSAVINGSOURCE | 529d24de45cffe89ad6c39e30e13f57dd1eee4f5 | [
"MIT"
] | 2 | 2020-10-16T16:38:23.000Z | 2021-10-05T03:13:18.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test bitcoind with different proxy configuration.
Test plan:
- Start savingd's with different proxy co... | 41.242574 | 121 | 0.625495 |
ea79ceba3366cb53748bff2f20b28d9ef1473ea0 | 9,907 | py | Python | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_hooks_aad.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_hooks_aad.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_hooks_aad.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ----------------------------------------------------------------------... | 39.158103 | 89 | 0.587766 |
04998d0b7366eb608119f1e5c7f3c21ac6c1f34b | 319 | py | Python | Mundo 1 Fundamentos/ex013.py | costa53/curso_em_video_python3 | 4f859641324f8b35be56d807f40457d7dddc451f | [
"MIT"
] | 1 | 2022-02-17T16:23:52.000Z | 2022-02-17T16:23:52.000Z | Mundo 1 Fundamentos/ex013.py | costa53/curso_em_video_python3 | 4f859641324f8b35be56d807f40457d7dddc451f | [
"MIT"
] | null | null | null | Mundo 1 Fundamentos/ex013.py | costa53/curso_em_video_python3 | 4f859641324f8b35be56d807f40457d7dddc451f | [
"MIT"
] | null | null | null | # DESAFIO 013
# Faça um algoritmo que leia o salário de um funcionário e mostre seu novo salário, com 15% de aumento.
sal = float(input('Qual é o salário do funcionário? R$'))
aum = 15
novo = sal + (sal * aum / 100)
print(f'Um funcionário que ganhava R${sal:.2f}, com {aum}% de aumento, passa a receber R${novo:.2f}')
| 39.875 | 103 | 0.69279 |
a96d365fb486eb7959981a4db6e2db141b31a718 | 1,099 | py | Python | OracleInternetDirectory/dockerfiles/12.2.1.4.0/container-scripts/stop_oid_component.py | MarkkuPekkarinen/docker-images | 675a87d61bedd9117ffc88b651cda533e7c4a6b8 | [
"UPL-1.0"
] | 5,519 | 2015-01-23T15:07:05.000Z | 2022-03-31T12:12:19.000Z | OracleInternetDirectory/dockerfiles/12.2.1.4.0/container-scripts/stop_oid_component.py | MarkkuPekkarinen/docker-images | 675a87d61bedd9117ffc88b651cda533e7c4a6b8 | [
"UPL-1.0"
] | 1,492 | 2015-01-26T05:31:35.000Z | 2022-03-31T21:16:34.000Z | OracleInternetDirectory/dockerfiles/12.2.1.4.0/container-scripts/stop_oid_component.py | MarkkuPekkarinen/docker-images | 675a87d61bedd9117ffc88b651cda533e7c4a6b8 | [
"UPL-1.0"
] | 5,850 | 2015-01-22T01:40:51.000Z | 2022-03-31T12:12:19.000Z | #!/usr/bin/python
#
# Copyright (c) 2021, Oracle and/or its affiliates.
#
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
# Author: Pratyush Dash
#
import os, sys, re
domain_name = os.environ.get("DOMAIN_NAME", "oid_domain")
oracle_home = os.environ.get("ORACL... | 28.921053 | 104 | 0.643312 |
ec92e85d6fdf833542f0f87a175c0759609a14ed | 5,621 | py | Python | vaccineSpotter.py | iamspidey/Vaccine-Spotter-India | 212c5d7009f7c281d6b314ce4faa8376398e6bb7 | [
"MIT"
] | 17 | 2021-05-01T18:27:29.000Z | 2021-11-09T10:39:37.000Z | vaccineSpotter.py | iamspidey/Vaccine-Spotter-India | 212c5d7009f7c281d6b314ce4faa8376398e6bb7 | [
"MIT"
] | 5 | 2021-05-05T06:30:22.000Z | 2021-07-15T14:54:40.000Z | vaccineSpotter.py | iamspidey/Vaccine-Spotter-India | 212c5d7009f7c281d6b314ce4faa8376398e6bb7 | [
"MIT"
] | 23 | 2021-05-02T05:08:53.000Z | 2021-05-26T06:20:11.000Z | import requests
from datetime import date,datetime
import os
import smtplib
from time import time,ctime
import yaml
class vaccineSpotter:
def __init__(self, config_file_path, time_delay=1):
self.config_file_path = config_file_path
self.time_delay = time_delay
self.cfg = self.read_config()
self.set_params()
... | 32.491329 | 150 | 0.68333 |
dc2fcaa4ea06d8f72ff8a454dd275f4b0d6af05a | 4,797 | py | Python | examples/samples/wr_strategy.py | walter211/ctpbee | 0cb45f7a3822ab6040286a6eb0d3240fb347fad3 | [
"MIT"
] | 1 | 2021-03-30T01:20:56.000Z | 2021-03-30T01:20:56.000Z | examples/samples/wr_strategy.py | walter211/ctpbee | 0cb45f7a3822ab6040286a6eb0d3240fb347fad3 | [
"MIT"
] | null | null | null | examples/samples/wr_strategy.py | walter211/ctpbee | 0cb45f7a3822ab6040286a6eb0d3240fb347fad3 | [
"MIT"
] | 1 | 2019-12-06T01:38:22.000Z | 2019-12-06T01:38:22.000Z | """
简单威廉姆斯wr策略 wr = info.wr()
"""
import json
from datetime import datetime, date
from ctpbee import LooperApi, Vessel
from ctpbee.constant import Direction
from ctpbee.indicator import Indicator
def get_data(start, end, symbol, exchange, level):
""" using rqdatac to make an example """
# import rqdatac... | 33.545455 | 104 | 0.536377 |
5c5031044f245b76564e7d851d48f35514bda9b5 | 4,226 | py | Python | pystr/decodable.py | gwangyi/pystr | b80ac1906746e98afeaf934a3593633a2e439172 | [
"MIT"
] | null | null | null | pystr/decodable.py | gwangyi/pystr | b80ac1906746e98afeaf934a3593633a2e439172 | [
"MIT"
] | null | null | null | pystr/decodable.py | gwangyi/pystr | b80ac1906746e98afeaf934a3593633a2e439172 | [
"MIT"
] | null | null | null | r"""This module provides decoding functionality of struct
+-------+--------+-------------------------------+---+---+---+---+---+---+---+---+
| Byte | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
+-------+--------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| bit | ... | 32.015152 | 88 | 0.493138 |
f3bac61a516e37f4a6fb93ca3531ef6edce6f320 | 40,046 | py | Python | src/trunk/apps/fdsnws/fdsnws.py | megies/seiscomp3 | 0daa3700c728f503c9c6c626dd7b17c84ff98ac4 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2015-09-17T22:43:50.000Z | 2017-11-29T20:27:11.000Z | src/trunk/apps/fdsnws/fdsnws.py | megies/seiscomp3 | 0daa3700c728f503c9c6c626dd7b17c84ff98ac4 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2016-04-26T00:03:09.000Z | 2017-12-05T02:24:50.000Z | src/trunk/apps/fdsnws/fdsnws.py | salichon/seiscomp3 | 4f7715f9ff9a35e7912c379ebf10446d0bceaeb2 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | #!/usr/bin/env python
################################################################################
# Copyright (C) 2013-2014 by gempa GmbH
#
# FDSNWS -- Implements FDSN Web Service interface, see
# http://www.fdsn.org/webservices/
#
# Implemented Services:
# fdsnws-dataselect
# fdsnws-event
# fdsnws-station
... | 32.932566 | 109 | 0.606527 |
8141404e5a1258c12c0cb4333e11080018aaee27 | 20,013 | py | Python | backend/worker/pe_scripts/enrich_shodan_pe.py | v0rts/crossfeed | cfac3f9597ada37df1c2ae46c34cf27efd5cb706 | [
"CC0-1.0"
] | null | null | null | backend/worker/pe_scripts/enrich_shodan_pe.py | v0rts/crossfeed | cfac3f9597ada37df1c2ae46c34cf27efd5cb706 | [
"CC0-1.0"
] | 12 | 2021-11-30T11:25:26.000Z | 2022-03-30T11:28:39.000Z | backend/worker/pe_scripts/enrich_shodan_pe.py | v0rts/crossfeed | cfac3f9597ada37df1c2ae46c34cf27efd5cb706 | [
"CC0-1.0"
] | null | null | null | try:
import traceback
import shodan
import pandas as pd
import requests
import time
import os
import datetime
import json
import sys
from pe_db.query_db import (
execute_shodan_data,
query_ips,
getDataSource,
get_org_id,
)
import time
excep... | 39.708333 | 775 | 0.47664 |
7804752b7ad05cfe60d1838935a4032236c31f59 | 75,027 | py | Python | python/datamodel_parser/application/Hdu.py | sdss/datamodel_parser | a4ff123ff7daf88e7402a7d50c38141d206e8054 | [
"BSD-3-Clause"
] | 2 | 2019-06-19T09:28:26.000Z | 2019-09-20T01:58:00.000Z | python/datamodel_parser/application/Hdu.py | sdss/datamodel_parser | a4ff123ff7daf88e7402a7d50c38141d206e8054 | [
"BSD-3-Clause"
] | null | null | null | python/datamodel_parser/application/Hdu.py | sdss/datamodel_parser | a4ff123ff7daf88e7402a7d50c38141d206e8054 | [
"BSD-3-Clause"
] | null | null | null | from bs4 import Tag, NavigableString
from datamodel_parser.application import Util
from datamodel_parser.application import Intro
from datamodel_parser.application.Type import Hdu_type
import string
from json import dumps
class Hdu:
'''
'''
def __init__(self,logger=None,options=None,body=None):
... | 51.635926 | 99 | 0.424141 |
955258576004f8aaac36f37af8c24bf9e6e9d72e | 3,417 | py | Python | plot_HDDM_priors.py | anne-urai/RT_RDK | 1a2f168ca05ff9759cc3ede4b5ead7f22df098ae | [
"MIT"
] | 5 | 2019-07-02T17:44:12.000Z | 2022-02-16T14:07:03.000Z | plot_HDDM_priors.py | anne-urai/RT_RDK | 1a2f168ca05ff9759cc3ede4b5ead7f22df098ae | [
"MIT"
] | null | null | null | plot_HDDM_priors.py | anne-urai/RT_RDK | 1a2f168ca05ff9759cc3ede4b5ead7f22df098ae | [
"MIT"
] | 3 | 2019-08-26T07:09:42.000Z | 2021-08-16T16:12:02.000Z | #!/usr/bin/env python
# encoding: utf-8
import os
import numpy as np
import scipy as sp
import matplotlib as mpl
mpl.use('Agg') # to still plot even when no display is defined
import matplotlib.pyplot as plt
mpl.rcParams['pdf.fonttype'] = 42
# import matplotlib.pylab as plt
import seaborn as sns
import pandas as pd
... | 27.336 | 102 | 0.612233 |
fb69e3c668d5d8faae9db24657569f20486cbf4d | 2,747 | py | Python | mosdef_code/main_script.py | brianlorenz/code | e24277bbb1deb2f0488f7b6e1f28c7b633c2c12b | [
"MIT"
] | null | null | null | mosdef_code/main_script.py | brianlorenz/code | e24277bbb1deb2f0488f7b6e1f28c7b633c2c12b | [
"MIT"
] | null | null | null | mosdef_code/main_script.py | brianlorenz/code | e24277bbb1deb2f0488f7b6e1f28c7b633c2c12b | [
"MIT"
] | 1 | 2021-12-08T01:20:12.000Z | 2021-12-08T01:20:12.000Z | '''Runs all methods after clustering the SEDs'''
import sys
import os
import string
import numpy as np
import initialize_mosdef_dirs as imd
from composite_sed import get_all_composite_seds
from stack_spectra import stack_all_spectra
from fit_emission import fit_all_emission
from generate_cluster_plots import generate... | 36.626667 | 113 | 0.832545 |
61764ab80d8db54c9ba437b7ee2eb135a2a9d6c4 | 8,937 | py | Python | mars/utils.py | pingrunhuang/mars | ae920c374e9844d7426d0cc09c0d97059dc5341c | [
"Apache-2.0"
] | 1 | 2019-09-22T16:00:48.000Z | 2019-09-22T16:00:48.000Z | mars/utils.py | turboFei/mars | cde691285d921add5460944764c7278e7ddec8ff | [
"Apache-2.0"
] | null | null | null | mars/utils.py | turboFei/mars | cde691285d921add5460944764c7278e7ddec8ff | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2018 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | 29.016234 | 96 | 0.633882 |
0c09ca97fba4e8882d11ce0c71e41cd5dbf379e9 | 2,630 | py | Python | tests/unit/pywbemcli/all_types_method_mock_v1old.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 8 | 2017-04-01T13:55:00.000Z | 2022-03-15T18:28:47.000Z | tests/unit/pywbemcli/all_types_method_mock_v1old.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 918 | 2017-03-03T14:29:03.000Z | 2022-03-29T15:32:16.000Z | tests/unit/pywbemcli/all_types_method_mock_v1old.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 2 | 2020-01-17T15:56:46.000Z | 2020-02-12T18:49:30.000Z | """
Test mock script that installs a test method provider for CIM method
AllTypesMethod() in CIM class PyWBEM_AllTypes, using the old setup approach
with global variables.
Note: This script and its method provider perform checks because their purpose
is to test the provider dispatcher. A real mock script with a real m... | 36.527778 | 79 | 0.715209 |
1cebeebe882615792cb0e7d5dcafcc9c2949e554 | 8,665 | bzl | Python | apple/internal/platform_support.bzl | michaeleisel/rules_apple | 424c73847eba4d2a093fa59df1aa22b5629b0fda | [
"Apache-2.0"
] | null | null | null | apple/internal/platform_support.bzl | michaeleisel/rules_apple | 424c73847eba4d2a093fa59df1aa22b5629b0fda | [
"Apache-2.0"
] | null | null | null | apple/internal/platform_support.bzl | michaeleisel/rules_apple | 424c73847eba4d2a093fa59df1aa22b5629b0fda | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Bazel 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 applicable la... | 35.512295 | 127 | 0.723485 |
7009292ba26b02bedb7383ba0d697b0f260abc13 | 761 | py | Python | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/network/cmd/nameserverlookup/errors.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 9 | 2019-11-22T04:58:40.000Z | 2022-02-26T16:47:28.000Z | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/network/cmd/nameserverlookup/errors.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | null | null | null | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/network/cmd/nameserverlookup/errors.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 8 | 2017-09-27T10:31:18.000Z | 2022-01-08T10:30:46.000Z | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: errors.py
import mcl.status
ERR_SUCCESS = mcl.status.MCL_SUCCESS
ERR_INVALID_PARAM = mcl.status.framework.ERR_START
ERR_CONTEXT_INVALID = mcl.status.... | 42.277778 | 67 | 0.777924 |
d387b26775f2a57579e8ede80f77a0b8c724cef3 | 3,374 | py | Python | act/act_portero/atajar.py | Gusta2307/Football-Simulation-IA-SIM-COM- | 8c29c5b1ef61708a4f8b34f5e0e00990aeecfacd | [
"MIT"
] | null | null | null | act/act_portero/atajar.py | Gusta2307/Football-Simulation-IA-SIM-COM- | 8c29c5b1ef61708a4f8b34f5e0e00990aeecfacd | [
"MIT"
] | null | null | null | act/act_portero/atajar.py | Gusta2307/Football-Simulation-IA-SIM-COM- | 8c29c5b1ef61708a4f8b34f5e0e00990aeecfacd | [
"MIT"
] | 1 | 2022-02-07T04:47:15.000Z | 2022-02-07T04:47:15.000Z | import numpy
from act.accion import Accion
from config import Config
from colorama import Fore, Style
config = Config()
class Atajar(Accion):
def __init__(self, agente) -> None:
self.agente = agente
self.__descripcion = f"El portero {self.agente.nombre} "
self.estado = None
self.t... | 49.617647 | 314 | 0.658269 |
0775d359356a2a87bdf8001f0d738258356bc156 | 53,505 | py | Python | cwltool/main.py | huzech/cwltool | c26a7881c5135a42c5891e3903ba755a3ceefa6b | [
"Apache-2.0"
] | null | null | null | cwltool/main.py | huzech/cwltool | c26a7881c5135a42c5891e3903ba755a3ceefa6b | [
"Apache-2.0"
] | null | null | null | cwltool/main.py | huzech/cwltool | c26a7881c5135a42c5891e3903ba755a3ceefa6b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# PYTHON_ARGCOMPLETE_OK
"""Entry point for cwltool."""
import argparse
import copy
import functools
import io
import logging
import os
import signal
import subprocess # nosec
import sys
import time
import urllib
import warnings
from codecs import StreamWriter, getwriter
from collections.abc imp... | 35.765374 | 88 | 0.574881 |
883ef0f97acc6ee7478856b59000b1246b829465 | 3,976 | py | Python | examples/contrib/strimko2.py | AlohaChina/or-tools | 1ece0518104db435593a1a21882801ab6ada3e15 | [
"Apache-2.0"
] | 8,273 | 2015-02-24T22:10:50.000Z | 2022-03-31T21:19:27.000Z | examples/contrib/strimko2.py | AlohaChina/or-tools | 1ece0518104db435593a1a21882801ab6ada3e15 | [
"Apache-2.0"
] | 2,530 | 2015-03-05T04:27:21.000Z | 2022-03-31T06:13:02.000Z | examples/contrib/strimko2.py | AlohaChina/or-tools | 1ece0518104db435593a1a21882801ab6ada3e15 | [
"Apache-2.0"
] | 2,057 | 2015-03-04T15:02:02.000Z | 2022-03-30T02:29:27.000Z | # Copyright 2010 Hakan Kjellerstrand hakank@gmail.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 required by applicable law ... | 27.804196 | 97 | 0.631036 |
4159b809cb88e6b5acd34aaf59eb1130fb70a5b5 | 17,940 | py | Python | src/m4_sequences.py | LiamEnneking/21-Exam3Practice | 335928ad67caf5a070ebf1063fa50fbe71ac009f | [
"MIT"
] | null | null | null | src/m4_sequences.py | LiamEnneking/21-Exam3Practice | 335928ad67caf5a070ebf1063fa50fbe71ac009f | [
"MIT"
] | null | null | null | src/m4_sequences.py | LiamEnneking/21-Exam3Practice | 335928ad67caf5a070ebf1063fa50fbe71ac009f | [
"MIT"
] | null | null | null | """
PRACTICE Test 3.
This problem provides practice at:
*** SEQUENCES. ***
Authors: David Mutchler, Valerie Galluzzi, Mark Hays, Amanda Stouder,
their colleagues and Liam.
""" # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE.
########################################################################
# Students... | 40.865604 | 114 | 0.474638 |
e23ad3b91595e1ac297c4aca33cc50c88662c8b4 | 3,099 | py | Python | sui/dicewars/server/game/area.py | vmarcin/FIT-projects | 69e3e0f1f271aefd3135f92a681738a4f1a24395 | [
"MIT"
] | null | null | null | sui/dicewars/server/game/area.py | vmarcin/FIT-projects | 69e3e0f1f271aefd3135f92a681738a4f1a24395 | [
"MIT"
] | null | null | null | sui/dicewars/server/game/area.py | vmarcin/FIT-projects | 69e3e0f1f271aefd3135f92a681738a4f1a24395 | [
"MIT"
] | null | null | null | import logging
class Area(object):
"""Object representing a single area.
"""
def __init__(self, name, adjacent_areas):
"""
Parameters
----------
name : int
Identifier of the area
adjacent_areas : list of int
Names of adjacent areas
A... | 22.786765 | 96 | 0.500484 |
a9c9978436a702f197a1108091ca097435c6f40d | 1,008 | py | Python | Linked List/delete_middle.py | Anshir08/D.S.A. | 39d518a6edf0b9a9468c6b44e7795275de9b39e6 | [
"MIT"
] | null | null | null | Linked List/delete_middle.py | Anshir08/D.S.A. | 39d518a6edf0b9a9468c6b44e7795275de9b39e6 | [
"MIT"
] | null | null | null | Linked List/delete_middle.py | Anshir08/D.S.A. | 39d518a6edf0b9a9468c6b44e7795275de9b39e6 | [
"MIT"
] | null | null | null | from insertion import linkedList, node
def deleteMiddle(head):
if head is None:
return None
if head.next is None:
del head
return None
count = 0
copyhead = head
while copyhead:
count += 1
copyhead = copyhead.next
copyhead = head
... | 18.327273 | 50 | 0.536706 |
3c6b3ad8e91affe6af768061301deab46db634c2 | 5,041 | py | Python | discogs_client/tests/test_models.py | muce/va | 973adec835d6d10b2fb79163346cb1c2aee4035b | [
"MIT"
] | 1 | 2017-05-15T15:32:30.000Z | 2017-05-15T15:32:30.000Z | discogs_client/tests/test_models.py | muce/va | 973adec835d6d10b2fb79163346cb1c2aee4035b | [
"MIT"
] | null | null | null | discogs_client/tests/test_models.py | muce/va | 973adec835d6d10b2fb79163346cb1c2aee4035b | [
"MIT"
] | null | null | null | import unittest
from discogs_client.models import Artist, Release
from discogs_client.tests import DiscogsClientTestCase
from discogs_client.exceptions import ConfigurationError, HTTPError
class ModelsTestCase(DiscogsClientTestCase):
def test_artist(self):
"""Artists can be fetched and parsed"""
a ... | 33.384106 | 71 | 0.623289 |
f286e4df5951274517089948eb58b0cafbefaf7c | 22,312 | py | Python | aries_cloudagent/protocols/issue_credential/v1_0/routes.py | off-grid-block/aca-py-controllers | 98269181c392460f2fddc9f8d0cfb240f4f3acec | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/issue_credential/v1_0/routes.py | off-grid-block/aca-py-controllers | 98269181c392460f2fddc9f8d0cfb240f4f3acec | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/issue_credential/v1_0/routes.py | off-grid-block/aca-py-controllers | 98269181c392460f2fddc9f8d0cfb240f4f3acec | [
"Apache-2.0"
] | null | null | null | """Credential exchange admin routes."""
from aiohttp import web
from aiohttp_apispec import docs, request_schema, response_schema
from marshmallow import fields, Schema
from ....connections.models.connection_record import ConnectionRecord
from ....holder.base import BaseHolder
from ....messaging.credential_definition... | 31.469676 | 88 | 0.708946 |
69927072fb32826b173e2359ec82758fdb16f56b | 28 | py | Python | monster/__init__.py | ConnorSMaynes/monster | 55182a243d68c5e2392b36fe89c90a8e7c3f7048 | [
"MIT"
] | 2 | 2019-07-19T02:28:10.000Z | 2021-01-17T11:48:30.000Z | monster/__init__.py | ConnorSMaynes/monster | 55182a243d68c5e2392b36fe89c90a8e7c3f7048 | [
"MIT"
] | null | null | null | monster/__init__.py | ConnorSMaynes/monster | 55182a243d68c5e2392b36fe89c90a8e7c3f7048 | [
"MIT"
] | 3 | 2019-07-19T02:28:13.000Z | 2021-12-09T05:50:29.000Z | from .monster import Monster | 28 | 28 | 0.857143 |
666112bbb218859cb0654924f3b4ecab8f38180a | 11,479 | py | Python | utils3d.py | nsfzyzz/boundary_thickness | f47701b882a52f18cfa8614dac03fc58db1b2d87 | [
"MIT"
] | 21 | 2020-11-15T03:19:40.000Z | 2022-02-24T10:32:39.000Z | utils3d.py | nsfzyzz/boundary_thickness | f47701b882a52f18cfa8614dac03fc58db1b2d87 | [
"MIT"
] | null | null | null | utils3d.py | nsfzyzz/boundary_thickness | f47701b882a52f18cfa8614dac03fc58db1b2d87 | [
"MIT"
] | 1 | 2021-12-29T04:15:16.000Z | 2021-12-29T04:15:16.000Z | import numpy as np
import numpy.linalg as LA
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from tqdm import tqdm, trange
from torch.utils.data import TensorDataset
from plotly.subplots import make_subplots
import plotly.graph_objects as go
def visualize3D(vis_net, x, y, dir1, dir2, dir3, len1 = 1,... | 37.513072 | 147 | 0.566426 |
5fe536d1f281b3badb3873098e1d5423ca3dc557 | 3,254 | py | Python | sympy/integrals/tests/test_deltafunctions.py | shipci/sympy | 4b59927bed992b980c9b3faac01becb36feef26b | [
"BSD-3-Clause"
] | 319 | 2016-09-22T15:54:48.000Z | 2022-03-18T02:36:58.000Z | sympy/integrals/tests/test_deltafunctions.py | curzel-it/KiPyCalc | 909c783d5e6967ea58ca93f875106d8a8e3ca5db | [
"MIT"
] | 9 | 2016-11-03T21:56:41.000Z | 2020-08-09T19:27:37.000Z | sympy/integrals/tests/test_deltafunctions.py | curzel-it/KiPyCalc | 909c783d5e6967ea58ca93f875106d8a8e3ca5db | [
"MIT"
] | 27 | 2016-10-06T16:05:32.000Z | 2022-03-18T02:37:00.000Z | from sympy import cos, DiracDelta, Heaviside, Function, pi, S, sin, symbols
from sympy.integrals.deltafunctions import change_mul, deltaintegrate
f = Function("f")
x_1, x_2, x, y, z = symbols("x_1 x_2 x y z")
def test_change_mul():
assert change_mul(x, x) == x
assert change_mul(x*y, x) == (None, None)
as... | 45.194444 | 81 | 0.600184 |
8d413858e0a519d660419daa8f4f6c8af15bc8e9 | 2,715 | py | Python | src/pyconcepticon/commands/link.py | concepticon/pyconcepticon | bd336df18545b493f59ed8c22b636ded447dede1 | [
"Apache-2.0"
] | 5 | 2019-06-04T02:17:03.000Z | 2021-12-28T01:59:16.000Z | src/pyconcepticon/commands/link.py | armendk/pyconcepticon | 7764d4b0900a37a76a6cb6ff9bdc8348502fa51d | [
"Apache-2.0"
] | 36 | 2019-02-06T11:50:21.000Z | 2021-12-28T18:43:11.000Z | src/pyconcepticon/commands/link.py | armendk/pyconcepticon | 7764d4b0900a37a76a6cb6ff9bdc8348502fa51d | [
"Apache-2.0"
] | 5 | 2019-09-18T13:34:19.000Z | 2021-12-28T02:01:44.000Z | """
Link concepts to concept sets for a given concept list.
Notes
-----
If either CONCEPTICON_GLOSS or CONCEPTICON_ID is given in the list, the other is added.
"""
from pyconcepticon.util import rewrite, CS_GLOSS, CS_ID
from pyconcepticon.cli_util import add_conceptlist, get_conceptlist
def register(parser):
add... | 34.807692 | 87 | 0.535175 |
b0e54c30d504e4267b7883ac20e05a9b7a138409 | 1,095 | py | Python | fetchai/ledger/serialisation/__init__.py | devjsc/ledger-api-py | 5dba7ad97a53c52cdf1407fbce96330dcd961e0b | [
"Apache-2.0"
] | null | null | null | fetchai/ledger/serialisation/__init__.py | devjsc/ledger-api-py | 5dba7ad97a53c52cdf1407fbce96330dcd961e0b | [
"Apache-2.0"
] | null | null | null | fetchai/ledger/serialisation/__init__.py | devjsc/ledger-api-py | 5dba7ad97a53c52cdf1407fbce96330dcd961e0b | [
"Apache-2.0"
] | null | null | null | # ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# htt... | 35.322581 | 80 | 0.613699 |
cf1a1287c6362e0d1272d0d5ebcf0e2ec946aed7 | 1,076 | py | Python | lose/utils/ui/panels.py | brianbruggeman/lose-7drl | 8921b464e82c8c7e6bf7cfebd4e8a3a5e290ac38 | [
"Apache-2.0"
] | null | null | null | lose/utils/ui/panels.py | brianbruggeman/lose-7drl | 8921b464e82c8c7e6bf7cfebd4e8a3a5e290ac38 | [
"Apache-2.0"
] | null | null | null | lose/utils/ui/panels.py | brianbruggeman/lose-7drl | 8921b464e82c8c7e6bf7cfebd4e8a3a5e290ac38 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import tcod
from ..logger import get_logger
logger = get_logger(__name__)
__all__ = ['Panel']
class Panel(object):
"""Creates a panel on the screen.
Args:
width(int): Width of panel [default: 80]
height(int): height of panel [default: 50]
name(str): Title ... | 27.589744 | 87 | 0.60223 |
08d6d0eb6a83ca603b946ae37a261d62c4117b40 | 3,284 | py | Python | airflow/contrib/operators/sagemaker_base_operator.py | FlyrInc/airflow-1 | 74b22337b45a1eb25585d52e35694e6b0eb81f03 | [
"Apache-2.0"
] | 4 | 2018-12-14T05:14:02.000Z | 2022-01-23T15:48:13.000Z | airflow/contrib/operators/sagemaker_base_operator.py | FlyrInc/airflow-1 | 74b22337b45a1eb25585d52e35694e6b0eb81f03 | [
"Apache-2.0"
] | 4 | 2018-03-20T21:24:26.000Z | 2020-05-03T04:23:02.000Z | airflow/contrib/operators/sagemaker_base_operator.py | FlyrInc/airflow-1 | 74b22337b45a1eb25585d52e35694e6b0eb81f03 | [
"Apache-2.0"
] | 6 | 2020-06-09T02:16:58.000Z | 2021-12-27T15:46:32.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 32.514851 | 90 | 0.649513 |
58bd86ee33b168aeff1943eec548564e8725e449 | 1,770 | py | Python | dashboard/about/changelog/changelogView.py | DeFi-Analytics/DeFi-Analytics | 25fa0588758313c6a207848080a5f2d994316a24 | [
"MIT"
] | 11 | 2021-02-26T21:27:56.000Z | 2022-01-03T06:19:09.000Z | dashboard/about/changelog/changelogView.py | DeFi-Analytics/DeFi-Analytics | 25fa0588758313c6a207848080a5f2d994316a24 | [
"MIT"
] | 216 | 2021-02-27T12:09:59.000Z | 2022-03-28T19:44:37.000Z | dashboard/about/changelog/changelogView.py | DeFi-Analytics/DeFi-Analytics | 25fa0588758313c6a207848080a5f2d994316a24 | [
"MIT"
] | 2 | 2021-05-05T21:32:18.000Z | 2022-02-21T11:54:01.000Z | import dash_html_components as html
import dash_bootstrap_components as dbc
import dash_table
class changelogViewClass:
def getChangelogContent(self, data):
content = [dbc.Card(dbc.CardBody([dbc.Row(dbc.Col(self.createChangelogContent(data)))]))]
return content
@staticmethod
def createCh... | 36.122449 | 97 | 0.468927 |
9d2d695d13aeaef7961f4d7c9a839caa3a722bca | 966 | py | Python | circuitPython/examples/audio-playback/code.py | BRTSG-FOSS/pico-bteve | 1697b9a972ad5e9c2cecca6d560aa16cab725a61 | [
"MIT"
] | 1 | 2022-01-29T03:16:57.000Z | 2022-01-29T03:16:57.000Z | circuitPython/examples/audio-playback/code.py | BRTSG-FOSS/pico-brteve | 1697b9a972ad5e9c2cecca6d560aa16cab725a61 | [
"MIT"
] | 15 | 2021-09-22T08:36:08.000Z | 2022-01-26T08:51:42.000Z | circuitPython/examples/audio-playback/code.py | BRTSG-FOSS/pico-bteve | 1697b9a972ad5e9c2cecca6d560aa16cab725a61 | [
"MIT"
] | null | null | null | from brteve.brt_eve_bt817_8 import BrtEve
from brteve.brt_eve_rp2040 import BrtEveRP2040
from audio_playback.audio_playback import audio_playback
from audio_playback.widgets import widgets_dialog_yes_no
host = BrtEveRP2040()
eve = BrtEve(host)
eve.init(resolution="1280x800", touch="goodix")
# Store calibration setti... | 35.777778 | 120 | 0.805383 |
4a4986190e7752e118821d814da17723f52c42c0 | 95,977 | py | Python | google/cloud/aiplatform_v1/services/job_service/client.py | dizcology/python-aiplatform | 1a135775966c8a2303ded529eba514dcf9db7205 | [
"Apache-2.0"
] | 2 | 2021-10-02T02:25:44.000Z | 2021-11-17T10:35:01.000Z | google/cloud/aiplatform_v1/services/job_service/client.py | pompipo/python-aiplatform | 3612b05c62dfb46822cd2c1798fd47349dba33bc | [
"Apache-2.0"
] | 1 | 2021-03-02T18:25:00.000Z | 2021-03-02T18:25:00.000Z | google/cloud/aiplatform_v1/services/job_service/client.py | pompipo/python-aiplatform | 3612b05c62dfb46822cd2c1798fd47349dba33bc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 44.474977 | 171 | 0.630745 |
407d6d2b67b491bcc1a8273e814b22887cbb0276 | 3,089 | py | Python | tests/examples.py | dkedar7/fast_dash | 4e4c52801ed430cd84371451c12b4028704993a4 | [
"MIT"
] | 7 | 2022-01-31T12:47:48.000Z | 2022-03-29T23:33:22.000Z | tests/examples.py | dkedar7/fast_dash | 4e4c52801ed430cd84371451c12b4028704993a4 | [
"MIT"
] | 1 | 2022-03-22T20:38:38.000Z | 2022-03-22T20:38:38.000Z | tests/examples.py | dkedar7/fast_dash | 4e4c52801ed430cd84371451c12b4028704993a4 | [
"MIT"
] | null | null | null | from fast_dash import FastDash, Fastify
from fast_dash.Components import Text, Image, Upload, UploadImage, Slider, html, dcc
from fast_dash.utils import pil_to_b64
def example_1_simple_text_to_text():
"Fast Dash example 1. Simple text to text Fast Dash app"
## Define callback functions
def simple_text_to_... | 31.845361 | 152 | 0.62933 |
dd8ce911754937283f6257f3b09f87f5b6db5793 | 1,118 | py | Python | bootstrap_scripts/create_s3_buckets.py | heitorlessa/serverless-encryption-workshop | b2a42034aef02dc27463a857eccec9307a50ee3f | [
"Apache-2.0"
] | 4 | 2016-08-02T12:46:15.000Z | 2017-08-09T18:02:03.000Z | bootstrap_scripts/create_s3_buckets.py | heitorlessa/serverless-encryption-workshop | b2a42034aef02dc27463a857eccec9307a50ee3f | [
"Apache-2.0"
] | null | null | null | bootstrap_scripts/create_s3_buckets.py | heitorlessa/serverless-encryption-workshop | b2a42034aef02dc27463a857eccec9307a50ee3f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Creates/Remove S3 buckets and add prefix sample
from __future__ import print_function
import boto3
import argparse
s3 = boto3.resource('s3')
lambda_environments = ['DEV/', 'PROD/', 'STAGE/']
def create_s3(bucket_name):
"""Creates given S3 Bucket name and prefix sample for Lambda function... | 24.304348 | 77 | 0.653846 |
126900a675d6f5c209712e6fb37ada397fbd631b | 13,040 | py | Python | mesonbuild/compilers/cpp.py | juergenhoetzel/meson | d784b5772a55eadb88034bd1992adeaddfba28d0 | [
"Apache-2.0"
] | null | null | null | mesonbuild/compilers/cpp.py | juergenhoetzel/meson | d784b5772a55eadb88034bd1992adeaddfba28d0 | [
"Apache-2.0"
] | null | null | null | mesonbuild/compilers/cpp.py | juergenhoetzel/meson | d784b5772a55eadb88034bd1992adeaddfba28d0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2017 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agree... | 43.466667 | 119 | 0.550844 |
414b3ef829e8576d38f93ab890c8925b8db9f0eb | 964 | py | Python | medicare_appeals/tests/appeals_tests.py | 18F/medicare-appeals-prototyping | 51f7a4a2f9dee4a78ef8197d8a80ed255e3dcc56 | [
"CC0-1.0"
] | 1 | 2019-07-01T19:18:10.000Z | 2019-07-01T19:18:10.000Z | medicare_appeals/tests/appeals_tests.py | 18F/medicare-appeals-prototyping | 51f7a4a2f9dee4a78ef8197d8a80ed255e3dcc56 | [
"CC0-1.0"
] | 1 | 2019-03-07T00:36:56.000Z | 2019-03-07T00:36:56.000Z | medicare_appeals/tests/appeals_tests.py | 18F/medicare-appeals-prototyping | 51f7a4a2f9dee4a78ef8197d8a80ed255e3dcc56 | [
"CC0-1.0"
] | 1 | 2021-02-14T09:47:01.000Z | 2021-02-14T09:47:01.000Z | import pytest
from medicare_appeals.appeals import models
from medicare_appeals.tests import factories
@pytest.fixture(scope='function')
def build_an_appeal():
"""
Build a single appeal
"""
appeal = factories.AppealFactory()
@pytest.fixture(scope='function')
def build_two_appeals():
"""
Buil... | 23.512195 | 60 | 0.697095 |
98c141d070aae66f1073ca047bf1d5b224248ccd | 1,970 | py | Python | lifestream-utm/lifestream_utm/send_email.py | ds-vologdin/lifestream-utm | c353f2f8fe85b434e4444d834565baf5972270a7 | [
"MIT"
] | null | null | null | lifestream-utm/lifestream_utm/send_email.py | ds-vologdin/lifestream-utm | c353f2f8fe85b434e4444d834565baf5972270a7 | [
"MIT"
] | null | null | null | lifestream-utm/lifestream_utm/send_email.py | ds-vologdin/lifestream-utm | c353f2f8fe85b434e4444d834565baf5972270a7 | [
"MIT"
] | null | null | null | import smtplib
import os
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
from email.utils import formatdate
import logging
from settings.private_settings import SMTP_CONFIG
logger = logging.getLogger(__name__)
def s... | 31.269841 | 109 | 0.629949 |
0456210c07609c8174b4365207829ad12bc489cd | 359 | py | Python | 1-lab-basicDispatchConsumeEvent/work/lambda-functions/consume-function/app.py | rizasaputra/workshop-eventDrivenMicroservices | 46b4c9385eaa9d147ee294c57fb2ac1058126a18 | [
"Apache-2.0"
] | 36 | 2020-11-11T04:26:44.000Z | 2022-03-27T11:04:44.000Z | 1-lab-basicDispatchConsumeEvent/work/lambda-functions/consume-function/app.py | rizasaputra/workshop-eventDrivenMicroservices | 46b4c9385eaa9d147ee294c57fb2ac1058126a18 | [
"Apache-2.0"
] | 3 | 2021-04-28T11:31:12.000Z | 2021-06-22T08:24:14.000Z | 1-lab-basicDispatchConsumeEvent/work/lambda-functions/consume-function/app.py | donnieprakoso/workshop-eventDrivenMicroservices | eb3ca81b11043823288fa19525e880d7257b3ec9 | [
"Apache-2.0"
] | 18 | 2020-11-11T06:03:48.000Z | 2021-12-14T17:15:44.000Z | import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def handler(event, context):
try:
'''
[TASK] Logs event variable to Amazon CloudWatch Logs. This way we know that Producer emitted a message and this function will consume that event.
'''
except E... | 27.615385 | 153 | 0.649025 |
75069fc8c38fbf3e940430384d195bb6de5761bc | 824 | py | Python | models/others/linear_regression.py | wiseodd/bayesian-models | cb5d5d83318878d3e5e90d03957a5070ffa91690 | [
"BSD-3-Clause"
] | 232 | 2017-09-27T02:58:58.000Z | 2022-02-14T12:07:23.000Z | models/others/linear_regression.py | wiseodd/bayesian-models | cb5d5d83318878d3e5e90d03957a5070ffa91690 | [
"BSD-3-Clause"
] | 1 | 2019-03-07T05:13:03.000Z | 2019-03-07T05:13:03.000Z | models/others/linear_regression.py | wiseodd/bayesian-models | cb5d5d83318878d3e5e90d03957a5070ffa91690 | [
"BSD-3-Clause"
] | 75 | 2017-10-21T06:04:16.000Z | 2021-12-14T08:40:45.000Z | """
Linear Regression
-----------------
Probabilistic Linear Regression with toy data in 1D.
"""
import numpy as np
import scipy.stats as st
import matplotlib.pyplot as plt
# Generate data
M = 20
X = np.linspace(0, 2, num=M)
# X = np.array([5, 14, 19], dtype=np.float)
t_real = np.sin(X)
t = t_real + np.random.randn(... | 21.684211 | 69 | 0.644417 |
9cf9c4737532bfd36da82c406b52acf255217ffa | 106 | py | Python | build/lib/annotation_utils/old/util/labelme/__init__.py | HienDT27/annotation_utils | 1f4e95f4cfa08de5bbab20f90a6a75fba66a69b9 | [
"MIT"
] | 13 | 2020-01-28T04:45:22.000Z | 2022-03-10T03:35:49.000Z | build/lib/annotation_utils/old/util/labelme/__init__.py | HienDT27/annotation_utils | 1f4e95f4cfa08de5bbab20f90a6a75fba66a69b9 | [
"MIT"
] | 4 | 2020-02-14T08:56:03.000Z | 2021-05-21T10:38:30.000Z | build/lib/annotation_utils/old/util/labelme/__init__.py | HienDT27/annotation_utils | 1f4e95f4cfa08de5bbab20f90a6a75fba66a69b9 | [
"MIT"
] | 7 | 2020-04-10T07:56:25.000Z | 2021-12-17T11:19:23.000Z | from .labelme_utils import write_resized_image, write_resized_json, \
copy_annotation, move_annotation | 53 | 69 | 0.849057 |
e1a691f7725561450aab1f4551cbc26f1447d2b4 | 346 | py | Python | practice/lis.py | haandol/dojo | c29dc54614bdfaf79eb4862ed9fa25974a0f5654 | [
"MIT"
] | null | null | null | practice/lis.py | haandol/dojo | c29dc54614bdfaf79eb4862ed9fa25974a0f5654 | [
"MIT"
] | null | null | null | practice/lis.py | haandol/dojo | c29dc54614bdfaf79eb4862ed9fa25974a0f5654 | [
"MIT"
] | null | null | null | def solve(arr):
n = len(arr)
lis = [1 for _ in range(n)]
for i in range(1, n):
for j in range(0, i):
if arr[j] < arr[i] and lis[i] < 1 + lis[j]:
lis[i] = 1 + lis[j]
return max(lis)
arr = [3, 10, 2, 1, 20]
assert 3 == solve(arr)
arr = [3, 2]
assert 1 == solve(arr)
arr = [50, 3, 10, 7, 40, ... | 18.210526 | 49 | 0.508671 |
055bd14358b43bf9f154acb2939e153e036c927b | 48,493 | py | Python | ProjectFiles/bin/Release/2.80/scripts/addons/sequencer_kinoraw_tools/operators_extra_actions.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2019-07-08T15:51:14.000Z | 2019-07-08T15:51:14.000Z | ProjectFiles/bin/Release/2.80/scripts/addons/sequencer_kinoraw_tools/operators_extra_actions.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | ProjectFiles/bin/Release/2.80/scripts/addons/sequencer_kinoraw_tools/operators_extra_actions.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 37.216424 | 89 | 0.540181 |
32a23449344afef9c12ba745afcdde2a2f2b43ff | 71 | py | Python | rq_config.py | dmitrypol/dlm | 768bfe8c79f023822ca391e5ee5210fb40417332 | [
"MIT"
] | 10 | 2020-06-13T09:15:17.000Z | 2021-08-23T14:00:09.000Z | rq_config.py | dmitrypol/dlm | 768bfe8c79f023822ca391e5ee5210fb40417332 | [
"MIT"
] | null | null | null | rq_config.py | dmitrypol/dlm | 768bfe8c79f023822ca391e5ee5210fb40417332 | [
"MIT"
] | 1 | 2020-05-15T05:33:47.000Z | 2020-05-15T05:33:47.000Z | import os
REDIS_URL = f"redis://{os.environ.get('REDIS_HOST')}:6379/1"
| 23.666667 | 60 | 0.704225 |
4bca7ea1c751baeac4c6ef81d0bfe184a761381d | 12,359 | py | Python | python/rrc_simulation/gym_wrapper/envs/cube_env.py | prstolpe/rrc_simulation | b430fe4e575641cdd64945cf57d0dd67a0eea17a | [
"BSD-3-Clause"
] | null | null | null | python/rrc_simulation/gym_wrapper/envs/cube_env.py | prstolpe/rrc_simulation | b430fe4e575641cdd64945cf57d0dd67a0eea17a | [
"BSD-3-Clause"
] | null | null | null | python/rrc_simulation/gym_wrapper/envs/cube_env.py | prstolpe/rrc_simulation | b430fe4e575641cdd64945cf57d0dd67a0eea17a | [
"BSD-3-Clause"
] | null | null | null | """Gym environment for the Real Robot Challenge Phase 1 (Simulation)."""
import enum
import numpy as np
import gym
from rrc_simulation import TriFingerPlatform
from rrc_simulation import visual_objects
from rrc_simulation.tasks import move_cube
class RandomInitializer:
"""Initializer that samples random initial... | 36.243402 | 79 | 0.603528 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.