hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8f7ea6d5267262a12e6e6f99f41e72ecd1174365 | 19,951 | py | Python | API/src/main/resources/Lib/sikuli/Sikuli.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/sikuli/Sikuli.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/sikuli/Sikuli.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
from __future__ import with_statement
from org.sikuli.basics import Debug as JDebug
class Debug(JDebug):
pass
Debug.log(3, "Jython: sikuli: Sikuli: starting init")
import time
#import __builtin__
# import __main__
import sys
import os
import inspec... | 29.777612 | 118 | 0.689138 |
94ab2a5665865f02bbbf4de10877a372833ffe93 | 560 | py | Python | train_ricord1a_timm-regnetx_002_median_blur.py | BrunoKrinski/segtool | cb604b5f38104c43a76450136e37c3d1c4b6d275 | [
"MIT"
] | null | null | null | train_ricord1a_timm-regnetx_002_median_blur.py | BrunoKrinski/segtool | cb604b5f38104c43a76450136e37c3d1c4b6d275 | [
"MIT"
] | null | null | null | train_ricord1a_timm-regnetx_002_median_blur.py | BrunoKrinski/segtool | cb604b5f38104c43a76450136e37c3d1c4b6d275 | [
"MIT"
] | null | null | null | import os
ls=["python main.py --configs configs/train_ricord1a_unetplusplus_timm-regnetx_002_fold0_median_blur.yml",
"python main.py --configs configs/train_ricord1a_unetplusplus_timm-regnetx_002_fold1_median_blur.yml",
"python main.py --configs configs/train_ricord1a_unetplusplus_timm-regnetx_002_fold2_median_blur.ym... | 50.909091 | 106 | 0.851786 |
4607f49d4b818c9f26dafaae47bca242c5863cea | 7,684 | py | Python | tests/test_dsl_basic.py | mk864mk864/heterocl | 112031948af3653e30fd414e210a8f5a938579e9 | [
"Apache-2.0"
] | 5 | 2019-11-09T14:30:47.000Z | 2020-10-30T04:47:47.000Z | tests/test_dsl_basic.py | mk864mk864/heterocl | 112031948af3653e30fd414e210a8f5a938579e9 | [
"Apache-2.0"
] | null | null | null | tests/test_dsl_basic.py | mk864mk864/heterocl | 112031948af3653e30fd414e210a8f5a938579e9 | [
"Apache-2.0"
] | 2 | 2019-10-01T18:01:09.000Z | 2020-09-15T02:36:59.000Z | import heterocl as hcl
import numpy as np
def _test_logic_op(op):
def kernel(A, B):
return hcl.compute(A.shape,
lambda x: hcl.select(op(A[x]>5, B[x]>5), 0, 1))
A = hcl.placeholder((10,))
B = hcl.placeholder((10,))
s = hcl.create_schedule([A, B], kernel)
f = hcl.build(s)
... | 21.463687 | 74 | 0.528891 |
0c4ff7a9963f51976cbb29982aebc28a1fa53f27 | 2,432 | py | Python | tests/base/test_status.py | siddhartha18101/PyDP | a3748d2d973a51d5e26de4a89cd0f09c77c36665 | [
"Apache-2.0"
] | null | null | null | tests/base/test_status.py | siddhartha18101/PyDP | a3748d2d973a51d5e26de4a89cd0f09c77c36665 | [
"Apache-2.0"
] | null | null | null | tests/base/test_status.py | siddhartha18101/PyDP | a3748d2d973a51d5e26de4a89cd0f09c77c36665 | [
"Apache-2.0"
] | 1 | 2020-05-29T20:46:25.000Z | 2020-05-29T20:46:25.000Z | import pytest # type: ignore
import pydp as dp # type: ignore
# TODO: Check whether we should delete status public bindings or return status to the user
pytestmark = pytest.mark.skip(reason="we do not return status to the user.")
class TestStatus:
def test_hello(self):
i = 1
assert 1 == i
... | 34.742857 | 90 | 0.626234 |
6fb046de7a294b470c3f3b62e6636fe4e8f17142 | 4,189 | py | Python | Socketer/Client.py | mingotang/Socketer | e1be98a262583848006a9352164e19ad3d50141e | [
"MIT"
] | null | null | null | Socketer/Client.py | mingotang/Socketer | e1be98a262583848006a9352164e19ad3d50141e | [
"MIT"
] | null | null | null | Socketer/Client.py | mingotang/Socketer | e1be98a262583848006a9352164e19ad3d50141e | [
"MIT"
] | null | null | null | # -*- encoding: UTF-8 -*-
import socket
import time
from queue import Queue, Empty
from threading import Thread, Lock
from Socketer.utils import get_logger, SocketConstants
class SocketClient(SocketConstants):
def __init__(self, host: str, port: int = 33331, bufsize: int = 1024,
time_out: floa... | 33.246032 | 100 | 0.612557 |
e2eeadf211ba737e34ae5b361d5ac1dc21c2a867 | 650 | py | Python | HapoItakAddEscapeToDoubleQuotation.py | seiichisan/HapoItak | 0a871d89d468fb1956469095feae6f7e715278e8 | [
"MIT"
] | null | null | null | HapoItakAddEscapeToDoubleQuotation.py | seiichisan/HapoItak | 0a871d89d468fb1956469095feae6f7e715278e8 | [
"MIT"
] | null | null | null | HapoItakAddEscapeToDoubleQuotation.py | seiichisan/HapoItak | 0a871d89d468fb1956469095feae6f7e715278e8 | [
"MIT"
] | null | null | null | import sublime, sublime_plugin, re
from .util import string_util
from .util import sublime_view_util
############################################################################
# ダブルクォーテーションに対してエスケープシーケンスを付与します。
############################################################################
class HapoItakAddEscapeToDoub... | 40.625 | 78 | 0.612308 |
be72c1940723ea9f1e22a3b81d2b34ad67a57f4f | 7,120 | py | Python | tensorflow/python/kernel_tests/softmax_op_test.py | ryorda/tensorflow-viennacl | 054b515feec0a3fca4cfb1f29adbf423c9027c3a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/python/kernel_tests/softmax_op_test.py | hamzabekkouri/tensorflow | d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f | [
"Apache-2.0"
] | 48 | 2016-07-26T00:11:55.000Z | 2022-02-23T13:36:33.000Z | tensorflow/python/kernel_tests/softmax_op_test.py | hamzabekkouri/tensorflow | d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2015 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... | 36.142132 | 80 | 0.601124 |
79df1533e3f392d2f0776cacf16f1750bcebe658 | 381 | py | Python | southpark-search/pods/text_loader.py | YueLiu-jina/examples | ca3ce78b9d03ba0565963d7bca7f9167ad5a4518 | [
"Apache-2.0"
] | null | null | null | southpark-search/pods/text_loader.py | YueLiu-jina/examples | ca3ce78b9d03ba0565963d7bca7f9167ad5a4518 | [
"Apache-2.0"
] | null | null | null | southpark-search/pods/text_loader.py | YueLiu-jina/examples | ca3ce78b9d03ba0565963d7bca7f9167ad5a4518 | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
from typing import Dict
from jina.executors.crafters import BaseDocCrafter
class TextExtractor(BaseDocCrafter):
def craft(self, text: str, *args, **kwargs) -> Dict:
*_, s = text.split('[SEP]')
r... | 29.307692 | 74 | 0.695538 |
1a055b6b8d0498da422b7eee8f42ec0577d91983 | 5,504 | py | Python | src/attention_neuro/basic_layers.py | matln/Attentive-Filtering-Network | 4ef1cf34c078309dc2557c451972bd0d06dc9348 | [
"MIT"
] | 49 | 2018-12-12T09:01:59.000Z | 2021-05-30T14:17:45.000Z | src/attention_neuro/basic_layers.py | matln/Attentive-Filtering-Network | 4ef1cf34c078309dc2557c451972bd0d06dc9348 | [
"MIT"
] | 7 | 2018-12-28T04:36:06.000Z | 2020-06-17T01:59:52.000Z | src/attention_neuro/basic_layers.py | matln/Attentive-Filtering-Network | 4ef1cf34c078309dc2557c451972bd0d06dc9348 | [
"MIT"
] | 23 | 2018-11-12T16:46:30.000Z | 2021-06-08T02:09:38.000Z | from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.init import kaiming_normal_, xavier_normal_
from torch.autograd import Function
## for complex_attention_network
class LocalAttenBlock(nn.Module):
def __init__(self, in_channels, dilation=1):
... | 34.616352 | 122 | 0.579397 |
ac0aa9ab1cba0d6002f543fefa198e0d42f13120 | 1,764 | py | Python | aliyun-python-sdk-snsuapi/aliyunsdksnsuapi/request/v20180709/MobileStopSpeedUpRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-snsuapi/aliyunsdksnsuapi/request/v20180709/MobileStopSpeedUpRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-snsuapi/aliyunsdksnsuapi/request/v20180709/MobileStopSpeedUpRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.75 | 84 | 0.777778 |
796359e7e4c331e89be249bbc29413f7271b9fe9 | 8,957 | py | Python | 02-flask_project/info/modules/news/views.py | Wingxy/Python_Study | ab02b51f24214a4f797994b7c358f5aa51451dd9 | [
"MIT"
] | null | null | null | 02-flask_project/info/modules/news/views.py | Wingxy/Python_Study | ab02b51f24214a4f797994b7c358f5aa51451dd9 | [
"MIT"
] | 5 | 2021-03-18T20:31:06.000Z | 2022-03-11T23:20:26.000Z | 02-flask_project/info/modules/news/views.py | Wingxy/Python_Study | ab02b51f24214a4f797994b7c358f5aa51451dd9 | [
"MIT"
] | null | null | null | import flask
from info import db
from info.models import User, News, Comment, CommentLike
from info.utils import constants
from info.utils.common import user_login_data
from info.utils.response_code import RET
from . import news_blu
@news_blu.route('/<int:news_id>')
@user_login_data
def news_detail(news_id):
use... | 32.452899 | 101 | 0.64765 |
30f3c92f62a2200375f637f4703845a9f34200ee | 1,231 | py | Python | 2018/python3/day2/day2.py | zakora/elixir-aoc2017 | 216e92cef370081cc0792102e0b40dd3a518d8bf | [
"Unlicense"
] | null | null | null | 2018/python3/day2/day2.py | zakora/elixir-aoc2017 | 216e92cef370081cc0792102e0b40dd3a518d8bf | [
"Unlicense"
] | null | null | null | 2018/python3/day2/day2.py | zakora/elixir-aoc2017 | 216e92cef370081cc0792102e0b40dd3a518d8bf | [
"Unlicense"
] | null | null | null | from collections import defaultdict
from sys import stdin
def count_letters(boxid):
res = defaultdict(lambda: 0)
for letter in boxid:
res[letter] += 1
return res
def has_ntuple(boxid, n):
"""Returns true if at least a tuple 'n' letters in the box ID"""
counts = count_letters(boxid)
re... | 25.122449 | 68 | 0.607636 |
b9e3ef4ea81e3d552aceb3399fe7e9eaaea40def | 98 | py | Python | app/community/apps.py | LeanidHreska/artistify-backend | 4b3b4c5072dc9c676d2e98fe4c569b66c32bff0b | [
"MIT"
] | null | null | null | app/community/apps.py | LeanidHreska/artistify-backend | 4b3b4c5072dc9c676d2e98fe4c569b66c32bff0b | [
"MIT"
] | null | null | null | app/community/apps.py | LeanidHreska/artistify-backend | 4b3b4c5072dc9c676d2e98fe4c569b66c32bff0b | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CommunityConfig(AppConfig):
name = "community"
| 16.333333 | 34 | 0.72449 |
8cf20165f3f1fe3cf9c69ce59aa2f10f069189e9 | 1,804 | py | Python | lib/galaxy/model/migrate/versions/0148_add_checksum_table.py | pcm32/galaxy | d566ed9b8b67aec270b92ad5ef443d972f598fa1 | [
"CC-BY-3.0"
] | 1 | 2016-04-15T11:52:45.000Z | 2016-04-15T11:52:45.000Z | lib/galaxy/model/migrate/versions/0148_add_checksum_table.py | pcm32/galaxy | d566ed9b8b67aec270b92ad5ef443d972f598fa1 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/model/migrate/versions/0148_add_checksum_table.py | pcm32/galaxy | d566ed9b8b67aec270b92ad5ef443d972f598fa1 | [
"CC-BY-3.0"
] | null | null | null | """
Migration script to add dataset source and hash tables.
"""
from __future__ import print_function
import logging
from sqlalchemy import Column, ForeignKey, Integer, MetaData, Table, TEXT
from galaxy.model.custom_types import JSONType
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
metadata = Meta... | 27.753846 | 86 | 0.711197 |
de70336ae833c73f38b310e58f9b41cdfd210595 | 21,171 | py | Python | coralillo/fields.py | categulario/norm | 232d3e25dcce2a1f698b429ecdedf5f8ee33c340 | [
"MIT"
] | 1 | 2017-09-02T00:40:33.000Z | 2017-09-02T00:40:33.000Z | coralillo/fields.py | categulario/coralillo | 232d3e25dcce2a1f698b429ecdedf5f8ee33c340 | [
"MIT"
] | 17 | 2017-08-22T16:52:03.000Z | 2017-08-30T17:23:56.000Z | coralillo/fields.py | categulario/norm | 232d3e25dcce2a1f698b429ecdedf5f8ee33c340 | [
"MIT"
] | 4 | 2018-05-15T18:10:10.000Z | 2020-09-01T08:58:55.000Z | from . import datamodel
from .datamodel import debyte_string
from .errors import MissingFieldError, InvalidFieldError, ReservedFieldError, NotUniqueFieldError, DeleteRestrictedError
from .hashing import make_password, is_hashed
from coralillo.queryset import QuerySet
from importlib import import_module
import datetime
... | 27.856579 | 151 | 0.613008 |
0785d80b1eb6e3e8f394c079208db04c349afbb0 | 2,372 | py | Python | mango/idsjsontokenlookup.py | neilfutureftr/mango-explorer | d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed | [
"MIT"
] | 1 | 2021-09-09T20:49:46.000Z | 2021-09-09T20:49:46.000Z | mango/idsjsontokenlookup.py | neilfutureftr/mango-explorer | d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed | [
"MIT"
] | null | null | null | mango/idsjsontokenlookup.py | neilfutureftr/mango-explorer | d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed | [
"MIT"
] | 2 | 2021-09-09T20:49:50.000Z | 2021-11-05T21:41:41.000Z | # # ⚠ Warning
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA... | 42.357143 | 127 | 0.674115 |
3540924c31357e680752a7735d0fe5a1a5ff7a72 | 69,468 | py | Python | tensorflow/python/keras/engine/network_test.py | laoma023012/TensorFlow-practice | 2b02167307eca3950cc7e49c7c50510ff5ccb92e | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/engine/network_test.py | laoma023012/TensorFlow-practice | 2b02167307eca3950cc7e49c7c50510ff5ccb92e | [
"Apache-2.0"
] | 58 | 2021-11-22T05:41:28.000Z | 2022-01-19T01:33:40.000Z | tensorflow/python/keras/engine/network_test.py | laoma023012/TensorFlow-practice | 2b02167307eca3950cc7e49c7c50510ff5ccb92e | [
"Apache-2.0"
] | null | null | null | # 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... | 35.93792 | 80 | 0.663082 |
16809d83a8a7594fdaf3f2a49352542c78dc6d52 | 16,421 | py | Python | src/riip/material.py | mnishida/RII_Pandas | e20ea03ef1b0b13ca18f2c4cbbbc5a8ac0961e3a | [
"MIT"
] | 1 | 2021-08-04T05:09:16.000Z | 2021-08-04T05:09:16.000Z | src/riip/material.py | mnishida/RII_Pandas | e20ea03ef1b0b13ca18f2c4cbbbc5a8ac0961e3a | [
"MIT"
] | 4 | 2021-08-16T07:15:10.000Z | 2021-09-04T08:47:47.000Z | src/riip/material.py | mnishida/RII_Pandas | e20ea03ef1b0b13ca18f2c4cbbbc5a8ac0961e3a | [
"MIT"
] | 1 | 2021-08-04T05:09:13.000Z | 2021-08-04T05:09:13.000Z | from __future__ import annotations
import abc
from collections.abc import Callable, Sequence
from logging import getLogger
from typing import Optional
import numpy as np
from numpy.typing import ArrayLike
from pandas import DataFrame, Series
from scipy.interpolate import interp1d
from scipy.special import wofz
impor... | 35.54329 | 126 | 0.545886 |
6114970c51b27a977983fe651e59cb6736c9235c | 8,409 | py | Python | utils/lovasz_losses.py | SIAAAAAA/C3-SemiSeg | b2e2489b828661660d9842785e831293bab5cd47 | [
"MIT"
] | 5 | 2021-11-12T11:21:23.000Z | 2022-03-08T01:58:12.000Z | utils/lovasz_losses.py | SIAAAAAA/C3-SemiSeg | b2e2489b828661660d9842785e831293bab5cd47 | [
"MIT"
] | 1 | 2022-03-12T08:06:56.000Z | 2022-03-12T08:06:56.000Z | utils/lovasz_losses.py | SIAAAAAA/C3-SemiSeg | b2e2489b828661660d9842785e831293bab5cd47 | [
"MIT"
] | null | null | null | """
Lovasz-Softmax and Jaccard hinge loss in PyTorch
Maxim Berman 2018 ESAT-PSI KU Leuven (MIT License)
https://github.com/bermanmaxim/LovaszSoftmax/blob/master/pytorch/lovasz_losses.py
"""
from __future__ import print_function, division
import torch
from torch.autograd import Variable
import torch.nn.functional as F... | 33.106299 | 118 | 0.601855 |
518499b2e10933c93cc8e38291beb556da758814 | 7,255 | py | Python | main.py | itsmesingh/tg-channel-watcher | 86f77b451417b03b260b67d51e4f97bb360afd16 | [
"MIT"
] | null | null | null | main.py | itsmesingh/tg-channel-watcher | 86f77b451417b03b260b67d51e4f97bb360afd16 | [
"MIT"
] | null | null | null | main.py | itsmesingh/tg-channel-watcher | 86f77b451417b03b260b67d51e4f97bb360afd16 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import logging
import re
import sys
from configparser import ConfigParser, NoOptionError, NoSectionError
from telethon import TelegramClient, utils
from telethon.errors import InviteHashInvalidError, UsernameNotOccupiedError
from telethon.tl.functions.channels import (JoinChannelRequest,
... | 37.205128 | 77 | 0.580703 |
78ecfebd2fd6b1ba858009b34e25f4a70794e8d7 | 6,027 | py | Python | aqt/jax/imagenet/models.py | mengdong/google-research | 7f4622f24125f7e9d6d03662aa0fbeb51bd3374a | [
"Apache-2.0"
] | 7 | 2021-06-15T05:54:29.000Z | 2022-02-21T06:57:06.000Z | aqt/jax/imagenet/models.py | SeuTao/google-research | 8a2b28219c26b65139287773296d48afe8445618 | [
"Apache-2.0"
] | 12 | 2021-08-25T16:15:31.000Z | 2022-02-10T05:10:37.000Z | aqt/jax/imagenet/models.py | SeuTao/google-research | 8a2b28219c26b65139287773296d48afe8445618 | [
"Apache-2.0"
] | 5 | 2021-11-25T07:40:17.000Z | 2022-03-22T11:13:39.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 28.295775 | 88 | 0.644599 |
42327828c968779f4f480801e8fe567aec6f5239 | 81 | py | Python | Dangerous/Golismero/tests/unittest/golismero/api/text/__init__.py | JeyZeta/Dangerous- | 824ea6b571eda98bb855f176361e9b35dfda578e | [
"MIT"
] | null | null | null | Dangerous/Golismero/tests/unittest/golismero/api/text/__init__.py | JeyZeta/Dangerous- | 824ea6b571eda98bb855f176361e9b35dfda578e | [
"MIT"
] | null | null | null | Dangerous/Golismero/tests/unittest/golismero/api/text/__init__.py | JeyZeta/Dangerous- | 824ea6b571eda98bb855f176361e9b35dfda578e | [
"MIT"
] | 1 | 2018-07-04T18:35:16.000Z | 2018-07-04T18:35:16.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
if __name__ == '__main__':
pass
| 10.125 | 26 | 0.54321 |
1b6edea6e33ac356df2df1dd716c1e32da6e569b | 76,572 | py | Python | thetis/utility.py | jhill1/thetis | 1be5d28d5d0d7248f2bbce4986b3e886116e103a | [
"MIT"
] | null | null | null | thetis/utility.py | jhill1/thetis | 1be5d28d5d0d7248f2bbce4986b3e886116e103a | [
"MIT"
] | null | null | null | thetis/utility.py | jhill1/thetis | 1be5d28d5d0d7248f2bbce4986b3e886116e103a | [
"MIT"
] | null | null | null | """
Utility functions and classes for 3D hydrostatic ocean model
"""
from __future__ import absolute_import
from firedrake import *
import os
import numpy as np
import sys
from .physical_constants import physical_constants
from pyop2.profiling import timed_region, timed_function, timed_stage # NOQA
from mpi4py import ... | 38.459066 | 151 | 0.609257 |
325350d090134c0cec1f96112c6493dd452e57a2 | 1,307 | py | Python | Days/Day 6 - Probably a Fire Hazard/Part 2.py | jamesjiang52/Advent-of-Code-2015 | 29c19eb11d9bde532bc2609c5b970a0a6924d11b | [
"MIT"
] | null | null | null | Days/Day 6 - Probably a Fire Hazard/Part 2.py | jamesjiang52/Advent-of-Code-2015 | 29c19eb11d9bde532bc2609c5b970a0a6924d11b | [
"MIT"
] | null | null | null | Days/Day 6 - Probably a Fire Hazard/Part 2.py | jamesjiang52/Advent-of-Code-2015 | 29c19eb11d9bde532bc2609c5b970a0a6924d11b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 3 10:46:03 2018
@author: James Jiang
"""
all_lines = [line.rstrip('\n') for line in open('Data.txt')]
all_instructions = [line.split(' ') for line in all_lines]
for instruction in all_instructions:
if instruction[0] == 'turn':
del instruction[0]
del ins... | 31.119048 | 69 | 0.559296 |
aa30712802e5f5011b5f23bcfe838965697156a1 | 1,807 | py | Python | envs/babyai/oracle/cartesian_corrections.py | AliengirlLiv/babyai | 51421ee11538bf110c5b2d0c84a15f783d854e7d | [
"MIT"
] | 2 | 2022-02-24T08:47:48.000Z | 2022-03-23T09:44:22.000Z | envs/babyai/oracle/cartesian_corrections.py | AliengirlLiv/babyai | 51421ee11538bf110c5b2d0c84a15f783d854e7d | [
"MIT"
] | null | null | null | envs/babyai/oracle/cartesian_corrections.py | AliengirlLiv/babyai | 51421ee11538bf110c5b2d0c84a15f783d854e7d | [
"MIT"
] | 1 | 2021-12-27T19:03:38.000Z | 2021-12-27T19:03:38.000Z | import numpy as np
import pickle as pkl
from envs.babyai.oracle.teacher import Teacher
class CartesianCorrections(Teacher):
def __init__(self, *args, obs_size=None, **kwargs):
self.obs_size = obs_size
super(CartesianCorrections, self).__init__(*args, **kwargs)
def empty_feedback(self):
... | 36.877551 | 110 | 0.623132 |
190d901411149d4da50c78bdf174d3766f8529f2 | 5,697 | py | Python | biosteam/units/_batch_crystallizer.py | yoelcortes/biosteam | 8d90788f87efb3b23428387d79097817962cad97 | [
"MIT"
] | 29 | 2019-03-01T04:47:43.000Z | 2020-02-23T01:34:40.000Z | biosteam/units/_batch_crystallizer.py | yoelcortes/biosteam | 8d90788f87efb3b23428387d79097817962cad97 | [
"MIT"
] | 15 | 2019-11-01T13:57:50.000Z | 2020-02-28T06:40:46.000Z | biosteam/units/_batch_crystallizer.py | yoelcortes/biosteam | 8d90788f87efb3b23428387d79097817962cad97 | [
"MIT"
] | 4 | 2019-06-05T15:39:04.000Z | 2020-01-08T20:42:04.000Z | # -*- coding: utf-8 -*-
# BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules
# Copyright (C) 2020-2021, Yoel Cortes-Pena <yoelcortes@gmail.com>
#
# This module is under the UIUC open-source license. See
# github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt
# for license details... | 30.961957 | 104 | 0.579077 |
8dd59caece24412078f7fe4d8587aacf246f59d3 | 196,292 | py | Python | ironic/conductor/manager.py | armohamm/ironic | 21093ca886ed736a7a25bf5e71e05d41e132fd2f | [
"Apache-2.0"
] | null | null | null | ironic/conductor/manager.py | armohamm/ironic | 21093ca886ed736a7a25bf5e71e05d41e132fd2f | [
"Apache-2.0"
] | null | null | null | ironic/conductor/manager.py | armohamm/ironic | 21093ca886ed736a7a25bf5e71e05d41e132fd2f | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Hewlett-Packard Development Company, L.P.
# Copyright 2013 International Business Machines Corporation
# 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 Li... | 47.505324 | 79 | 0.589092 |
994ea1b111ac391fe9630b4c8c17b55bfdc45fd2 | 16,310 | py | Python | airflow/models/dagrun.py | srivignessh/airflow | e9a413dc5a8adbab3050742c5c863f1f3d06cffa | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2019-10-03T21:38:59.000Z | 2019-10-04T00:39:03.000Z | airflow/models/dagrun.py | srivignessh/airflow | e9a413dc5a8adbab3050742c5c863f1f3d06cffa | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 7 | 2019-03-27T07:58:14.000Z | 2020-02-12T17:42:33.000Z | airflow/models/dagrun.py | harman-pall/airflow | a55b2762ac6dfe26f040d78650ffeebae5f4caf0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2018-11-01T22:36:10.000Z | 2019-11-23T13:36:53.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
#... | 36.569507 | 100 | 0.603004 |
11f16a089d406fea4345d58f22a1c3f0cc998d71 | 64 | py | Python | SimpleConditions/01.excellentResult.py | SpleefDinamix/SoftuniPythonProgrammingBasics | c4a2a84a85e1b55f1ef9f4967a756fa2d39061a7 | [
"MIT"
] | null | null | null | SimpleConditions/01.excellentResult.py | SpleefDinamix/SoftuniPythonProgrammingBasics | c4a2a84a85e1b55f1ef9f4967a756fa2d39061a7 | [
"MIT"
] | null | null | null | SimpleConditions/01.excellentResult.py | SpleefDinamix/SoftuniPythonProgrammingBasics | c4a2a84a85e1b55f1ef9f4967a756fa2d39061a7 | [
"MIT"
] | null | null | null | grade = float(input())
if grade >= 5.5:
print("Excellent!") | 16 | 23 | 0.59375 |
6a0d66cd8225de8936f9b247b0acde65ad0a9311 | 19,763 | py | Python | yahoo/yahoo.py | kwangphys/qmtrader | 1ac121520e39fa021f842b9d2d1811e4d40178fc | [
"MIT"
] | 1 | 2020-08-10T16:33:09.000Z | 2020-08-10T16:33:09.000Z | yahoo/yahoo.py | kwangphys/qmtrader | 1ac121520e39fa021f842b9d2d1811e4d40178fc | [
"MIT"
] | null | null | null | yahoo/yahoo.py | kwangphys/qmtrader | 1ac121520e39fa021f842b9d2d1811e4d40178fc | [
"MIT"
] | null | null | null | import numpy as np
import datetime
import json
import re
from selenium import webdriver
import bs4 as bs
from yahoo.utils import parse_table
from selenium.common.exceptions import TimeoutException
def parse_float(s):
if s == 'N/A' or s == '-' or s[0] == '∞':
return np.nan
s = s.replace(',', '')
su... | 38.374757 | 246 | 0.509993 |
8f906426dcb094ca10d81abd943accacfc8ff441 | 1,915 | py | Python | beerpy/carbonate.py | MrLeeh/beerpy | 1bbec29a39b01a9d8e54c475de29c768dfd27597 | [
"MIT"
] | null | null | null | beerpy/carbonate.py | MrLeeh/beerpy | 1bbec29a39b01a9d8e54c475de29c768dfd27597 | [
"MIT"
] | null | null | null | beerpy/carbonate.py | MrLeeh/beerpy | 1bbec29a39b01a9d8e54c475de29c768dfd27597 | [
"MIT"
] | null | null | null | """
carbonate.py - Module for calculating the beer carbonation
Copyright (c) 2015 by Stefan Lehmann,
licensed under the MIT license
Typical carbonate concentrations for common beer types are listed in the table
below [1]_.
============= ========== ==========
sort min. (g/l) max. (g/l)
============= ========... | 26.232877 | 78 | 0.629243 |
822014e3228341e4bcd93e610e5f1e046abcb3e0 | 1,992 | py | Python | indicators/migrations/0092_auto_20201214_1357.py | mercycorps/toladata | 4d5f9b45905a81af9981b586690e020d5b3bfc60 | [
"Apache-2.0"
] | null | null | null | indicators/migrations/0092_auto_20201214_1357.py | mercycorps/toladata | 4d5f9b45905a81af9981b586690e020d5b3bfc60 | [
"Apache-2.0"
] | 268 | 2020-03-31T15:46:59.000Z | 2022-03-31T18:01:08.000Z | indicators/migrations/0092_auto_20201214_1357.py | mercycorps/toladata | 4d5f9b45905a81af9981b586690e020d5b3bfc60 | [
"Apache-2.0"
] | 1 | 2021-01-05T01:58:24.000Z | 2021-01-05T01:58:24.000Z | # Generated by Django 2.2.14 on 2020-12-14 21:57
from django.db import migrations, models
import multiselectfield.db.fields
class Migration(migrations.Migration):
dependencies = [
('indicators', '0091_merge_20201123_1610'),
]
operations = [
migrations.AddField(
model_name='i... | 79.68 | 1,050 | 0.736948 |
f891c46d5153c68ecd547236528908ba8a9e9184 | 7,181 | py | Python | scripts/cnn_trainer.py | Zhang-Hongda/cnn_hgr | c00d3492625c47b85714e0467f32978f64478589 | [
"MIT"
] | null | null | null | scripts/cnn_trainer.py | Zhang-Hongda/cnn_hgr | c00d3492625c47b85714e0467f32978f64478589 | [
"MIT"
] | null | null | null | scripts/cnn_trainer.py | Zhang-Hongda/cnn_hgr | c00d3492625c47b85714e0467f32978f64478589 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import json
import cv2
import os
import argparse
import gestures_recorder as gr
import keras
from keras.preprocessing.image import array_to_img, img_to_array, load_img
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from k... | 34.859223 | 172 | 0.70603 |
331bfb09829f6902197bffd423ea67a8449d5e21 | 3,613 | py | Python | cloudentries/hostpool/query/client.py | CloudChef/CloudEntries | a890e2eb96cc537db131e7ca8a0e6e1edc0b6ebd | [
"Apache-2.0"
] | null | null | null | cloudentries/hostpool/query/client.py | CloudChef/CloudEntries | a890e2eb96cc537db131e7ca8a0e6e1edc0b6ebd | [
"Apache-2.0"
] | null | null | null | cloudentries/hostpool/query/client.py | CloudChef/CloudEntries | a890e2eb96cc537db131e7ca8a0e6e1edc0b6ebd | [
"Apache-2.0"
] | 1 | 2021-03-26T05:45:00.000Z | 2021-03-26T05:45:00.000Z | # Copyright (c) 2021 Qianyun, Inc. All rights reserved.
from cloudchef_integration.tasks.cloud_resources.hostpool.utils import LinuxClient, WindowsClient, PhysicalMachineClient
from . import constants
class HostClient(object):
def __init__(self, config, params):
"""
:param config:
{
... | 44.060976 | 120 | 0.622198 |
e06140ef55b2980527a5eb511f77248a68b4194d | 4,256 | py | Python | RT-Hemispheres-PCBS.py | mariepareau/PCBS_PAREAU-Reaction-Time-between-two-hemispheres | 625d483f5767a8a72e0daeac3f972c182f63d2e8 | [
"MIT"
] | null | null | null | RT-Hemispheres-PCBS.py | mariepareau/PCBS_PAREAU-Reaction-Time-between-two-hemispheres | 625d483f5767a8a72e0daeac3f972c182f63d2e8 | [
"MIT"
] | null | null | null | RT-Hemispheres-PCBS.py | mariepareau/PCBS_PAREAU-Reaction-Time-between-two-hemispheres | 625d483f5767a8a72e0daeac3f972c182f63d2e8 | [
"MIT"
] | null | null | null |
import random
import numpy as np
import expyriment
from expyriment import stimuli, design, control
exp = design.Experiment("Projet PCBS")
control.initialize(exp)
screen_size = exp.screen.surface.get_size()
user_device = exp.keyboard
## Création de la fonction display-circle
def display_circle(n, block, expected):
... | 34.885246 | 133 | 0.640038 |
57ba3b1f655b08b957a5ca2337ab7b73042887f2 | 1,124 | py | Python | prediction.py | adityabisoi/automatic-license-plate-recognition | 6acacd55e6636ebcc9e262e4183af0c7b773e29c | [
"FTL"
] | 1 | 2020-02-19T09:46:06.000Z | 2020-02-19T09:46:06.000Z | prediction.py | adityabisoi/automatic-license-plate-recognition | 6acacd55e6636ebcc9e262e4183af0c7b773e29c | [
"FTL"
] | null | null | null | prediction.py | adityabisoi/automatic-license-plate-recognition | 6acacd55e6636ebcc9e262e4183af0c7b773e29c | [
"FTL"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 20 07:38:03 2019
@author: devastator
"""
import os
import segmentation
from sklearn.externals import joblib
# load the model
current_dir = os.path.dirname(os.path.realpath(__file__))
model_dir = os.path.join(current_dir, 'models/svc/svc.pkl')
mode... | 26.139535 | 67 | 0.768683 |
cb4206d6a67417a12933106dda2ce3821f028b86 | 7,650 | py | Python | benchmark/goal_suite.py | CEA-LIST/LearningByCheating | c2e5de315bc15dba0154ce6997f52cc98406704c | [
"MIT"
] | 7 | 2021-05-20T09:27:50.000Z | 2021-08-29T02:01:36.000Z | benchmark/goal_suite.py | CEA-LIST/LearningByCheating | c2e5de315bc15dba0154ce6997f52cc98406704c | [
"MIT"
] | null | null | null | benchmark/goal_suite.py | CEA-LIST/LearningByCheating | c2e5de315bc15dba0154ce6997f52cc98406704c | [
"MIT"
] | null | null | null | from pathlib import Path
import queue
import numpy as np
import carla
import math
from PythonAPI.agents.navigation.local_planner import RoadOption, LocalPlannerNew, LocalPlannerOld
from .base_suite import BaseSuite
def from_file(poses_txt):
pairs_file = Path(__file__).parent / poses_txt
pairs = pairs_fil... | 32.415254 | 132 | 0.606536 |
5a179d4e20382b17891cc477b1494936c11f3a21 | 5,386 | py | Python | sets/mindstorms-ev3/education-expansion/elephant/main.py | AntoniLuongPham/Pybricks-Projects | b5e83cfdb088198426430573284c453230781873 | [
"MIT"
] | 60 | 2020-04-02T10:03:06.000Z | 2022-02-20T00:40:35.000Z | sets/mindstorms-ev3/education-expansion/elephant/main.py | AntoniLuongPham/Pybricks-Projects | b5e83cfdb088198426430573284c453230781873 | [
"MIT"
] | 50 | 2020-03-26T12:42:11.000Z | 2022-03-11T07:08:31.000Z | sets/mindstorms-ev3/education-expansion/elephant/main.py | AntoniLuongPham/Pybricks-Projects | b5e83cfdb088198426430573284c453230781873 | [
"MIT"
] | 43 | 2020-04-23T02:56:58.000Z | 2022-03-16T10:04:59.000Z | #!/usr/bin/env pybricks-micropython
"""
Example LEGO® MINDSTORMS® EV3 Elephant Program
----------------------------------------------
This program requires LEGO® EV3 MicroPython v2.0.
Download: https://education.lego.com/en-us/support/mindstorms-ev3/python-for-ev3
Building instructions can be found at:
https://educa... | 32.059524 | 96 | 0.669328 |
5b9ece127f9afd6c67e7d2beba6e4a2fa994e8b4 | 10,562 | py | Python | tests/BlazingSQLTest/EndToEndTests/columnBasisTest.py | millerhooks/blazingsql | 2c452187c6dc347aa5dc92de020268e614ee6147 | [
"Apache-2.0"
] | null | null | null | tests/BlazingSQLTest/EndToEndTests/columnBasisTest.py | millerhooks/blazingsql | 2c452187c6dc347aa5dc92de020268e614ee6147 | [
"Apache-2.0"
] | null | null | null | tests/BlazingSQLTest/EndToEndTests/columnBasisTest.py | millerhooks/blazingsql | 2c452187c6dc347aa5dc92de020268e614ee6147 | [
"Apache-2.0"
] | null | null | null | from DataBase import createSchema as cs
from Configuration import Settings as Settings
from Runner import runTest
from Utils import Execution
import pyblazing
from blazingsql import BlazingContext
from Utils import gpuMemory, test_name, skip_test, init_context
from pynvml import *
from blazingsql import DataType
from C... | 43.644628 | 198 | 0.553778 |
df735a772e9dad439ec9ab4f8d8a19ccf7e02073 | 4,107 | py | Python | problems/can_construct.py | shreyansh96/dynamic-programming | 1d0d50ce992d2b56054e860d460a02e9442c64ba | [
"MIT"
] | 2 | 2020-12-05T21:57:02.000Z | 2020-12-07T09:49:49.000Z | problems/can_construct.py | shreyansh96/dynamic-programming | 1d0d50ce992d2b56054e860d460a02e9442c64ba | [
"MIT"
] | 1 | 2020-12-17T16:51:54.000Z | 2020-12-17T16:51:54.000Z | problems/can_construct.py | shreyansh96/dynamic-programming | 1d0d50ce992d2b56054e860d460a02e9442c64ba | [
"MIT"
] | 1 | 2021-04-29T04:30:06.000Z | 2021-04-29T04:30:06.000Z | """
Problem Statement:
Write a function canConstruct(target, wordBank) that accepts a target string and an array of strings.
The function should return a boolean indicating whether or not the target can be constructed by
concatenating elements of the wordbank array.
You may reuse elements of 'wordbank' as many times a... | 31.592308 | 101 | 0.562211 |
713594566bc3b2443c79d1e79d22a9c7dda80d84 | 60,640 | py | Python | python/ccxt/async_support/upbit.py | z-brain/ccxt | dde32cfb5e0e2e2889ead60687d6fd0fdf5e3f02 | [
"MIT"
] | 4 | 2021-01-10T09:14:17.000Z | 2022-02-15T19:09:52.000Z | python/ccxt/async_support/upbit.py | z-brain/ccxt | dde32cfb5e0e2e2889ead60687d6fd0fdf5e3f02 | [
"MIT"
] | null | null | null | python/ccxt/async_support/upbit.py | z-brain/ccxt | dde32cfb5e0e2e2889ead60687d6fd0fdf5e3f02 | [
"MIT"
] | 4 | 2021-06-02T16:40:35.000Z | 2022-03-14T04:50:31.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import A... | 41.965398 | 465 | 0.46504 |
fc469a7c10b537a3d7845377cc5f5357653d6f4e | 2,572 | py | Python | tests/naturerec_model/data_exchange/test_sightings_export_helper.py | davewalker5/NatureRecorderPy | 53b3c2a589986f91bc78999f40a6dc55f61afe36 | [
"MIT"
] | null | null | null | tests/naturerec_model/data_exchange/test_sightings_export_helper.py | davewalker5/NatureRecorderPy | 53b3c2a589986f91bc78999f40a6dc55f61afe36 | [
"MIT"
] | null | null | null | tests/naturerec_model/data_exchange/test_sightings_export_helper.py | davewalker5/NatureRecorderPy | 53b3c2a589986f91bc78999f40a6dc55f61afe36 | [
"MIT"
] | null | null | null | import unittest
import datetime
import csv
from src.naturerec_model.model import create_database, Gender
from src.naturerec_model.logic import create_category
from src.naturerec_model.logic import create_species
from src.naturerec_model.logic import create_location
from src.naturerec_model.logic import create_sighting
... | 42.866667 | 119 | 0.667963 |
2cffacb11f70b71b52e6848359e2427e49e3d5b2 | 3,850 | py | Python | contrib/macdeploy/custom_dsstore.py | thehomosapien/dclr | dba88f2ad6359addaa66f1875792cc8c4f30d686 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | thehomosapien/dclr | dba88f2ad6359addaa66f1875792cc8c4f30d686 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | thehomosapien/dclr | dba88f2ad6359addaa66f1875792cc8c4f30d686 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Copyright (c) 2017 The Raven Core developers
# Copyright (c) 2018 The DCLRcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __fut... | 61.111111 | 1,817 | 0.727013 |
8d1ec4a359de29fd26f72890aadcedf943bfda74 | 2,612 | py | Python | data/p4VQE/R4/benchmark/startQiskit_Class474.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_Class474.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_Class474.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=13
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 28.391304 | 118 | 0.638591 |
9707b5ceb479d9b4252fbdd926d8d96bb616513a | 3,005 | py | Python | tests/unit/states/test_rabbitmq_policy.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 5 | 2017-02-07T05:39:29.000Z | 2020-06-13T02:07:33.000Z | tests/unit/states/test_rabbitmq_policy.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | tests/unit/states/test_rabbitmq_policy.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 11 | 2017-01-26T19:36:29.000Z | 2021-12-11T07:54:16.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: Jayesh Kariya <jayeshk@saltstack.com>
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import skipIf, TestCase
from tes... | 34.54023 | 84 | 0.534775 |
0946f7eccf95273a9d3eac3970569f8f8482d588 | 10,732 | py | Python | bucky3/linux.py | smarkets/bucky3 | 7bca15c28d3e55027b831923c43a811da9d62ecb | [
"Apache-2.0"
] | null | null | null | bucky3/linux.py | smarkets/bucky3 | 7bca15c28d3e55027b831923c43a811da9d62ecb | [
"Apache-2.0"
] | null | null | null | bucky3/linux.py | smarkets/bucky3 | 7bca15c28d3e55027b831923c43a811da9d62ecb | [
"Apache-2.0"
] | 1 | 2022-03-26T12:11:29.000Z | 2022-03-26T12:11:29.000Z |
import os
import re
import platform
import bucky3.module as module
class ProcfsReader:
INTERFACE_FIELDS = ('rx_bytes', 'rx_packets', 'rx_errors', 'rx_dropped',
None, None, None, None,
'tx_bytes', 'tx_packets', 'tx_errors', 'tx_dropped')
def read_interfaces(se... | 43.274194 | 112 | 0.523481 |
8a00773b256eef200c35b94b50813d593a4dabc7 | 5,155 | py | Python | distributions/tests/test_model_flavors.py | forcedotcom/distributions | 5f2d7fdfa2f4d34e5b01ac395d03fc61df4652d4 | [
"BSD-3-Clause"
] | 22 | 2015-01-05T16:52:32.000Z | 2020-09-03T17:53:22.000Z | distributions/tests/test_model_flavors.py | afcarl/distributions | 8d4d8eebbcec14fa9f4c314425f127e1316d9951 | [
"BSD-3-Clause"
] | 2 | 2015-02-10T03:55:34.000Z | 2016-05-04T05:48:16.000Z | distributions/tests/test_model_flavors.py | afcarl/distributions | 8d4d8eebbcec14fa9f4c314425f127e1316d9951 | [
"BSD-3-Clause"
] | 8 | 2015-01-13T21:42:04.000Z | 2019-12-12T08:39:11.000Z | # Copyright (c) 2014, Salesforce.com, 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... | 37.627737 | 77 | 0.667895 |
5071fdaaf331a0713fac6ad5e4407055ab298af5 | 22,488 | py | Python | tensorflow/python/layers/base.py | indiewebconsulting/mind-tensorflow | 15ac248a9b883033b723d6fd6eb4335102c5780e | [
"Apache-2.0"
] | 2 | 2019-05-08T10:02:57.000Z | 2019-05-08T10:02:59.000Z | tensorflow/python/layers/base.py | gurkangokdemir/tensorflow | 2e6446f8a9be31c59080b643d04f9b463c4201cf | [
"Apache-2.0"
] | null | null | null | tensorflow/python/layers/base.py | gurkangokdemir/tensorflow | 2e6446f8a9be31c59080b643d04f9b463c4201cf | [
"Apache-2.0"
] | 2 | 2020-03-25T12:52:20.000Z | 2020-08-11T09:31:43.000Z | # Copyright 2015 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... | 38.572899 | 80 | 0.681875 |
26adf11456ea9b4e6a76af7b3910b8cbd6e0922f | 7,638 | py | Python | python/deprecated/test.py | MarkTakken/KataGo | 0d469e01c14f0a0056649276a683064ed9c5a508 | [
"MIT"
] | null | null | null | python/deprecated/test.py | MarkTakken/KataGo | 0d469e01c14f0a0056649276a683064ed9c5a508 | [
"MIT"
] | 1 | 2022-03-03T00:44:18.000Z | 2022-03-03T01:31:59.000Z | python/deprecated/test.py | MarkTakken/KataGoTF2MacOS | 7fdbf6b49cd0c56c18e9f2f107a14905ad1761b1 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import os
import argparse
import traceback
import random
import math
import time
import logging
import h5py
import contextlib
import json
import tensorflow as tf
import numpy as np
import data
from board import Board
from model import Model, Target_vars, Metrics
#Command and args--------... | 34.561086 | 144 | 0.72231 |
fb9027a6a027ffe3d5769b5dfe0ee348e1ab801a | 2,415 | py | Python | Chess/ChessMain.py | ksu-is/Chess-Game-GUI | 43d5c70b119cdc6e8ec6c955d00571eef924f5d8 | [
"MIT"
] | null | null | null | Chess/ChessMain.py | ksu-is/Chess-Game-GUI | 43d5c70b119cdc6e8ec6c955d00571eef924f5d8 | [
"MIT"
] | null | null | null | Chess/ChessMain.py | ksu-is/Chess-Game-GUI | 43d5c70b119cdc6e8ec6c955d00571eef924f5d8 | [
"MIT"
] | 1 | 2021-07-24T22:38:21.000Z | 2021-07-24T22:38:21.000Z |
import pygame as p
from Engine import *
from GUI import *
p.init()
clock = p.time.Clock()
win = p.display.set_mode((500, 500))
p.display.set_caption('My-PyChess')
# Initialize chess variables
side = 0
board = (
[[1, 7, "p"], [2, 7, "p"], [3, 7, "p"], [4, 7, "p"],
[5, 7, "p"], [6, 7, "p"], [7, 7, "p... | 31.363636 | 75 | 0.474534 |
d91e7f14236ec43d9605460087e437b665cf6206 | 1,799 | py | Python | examples/chart_clustered.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | examples/chart_clustered.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | examples/chart_clustered.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | #######################################################################
#
# A demo of a clustered category chart in XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright 2013-2021, John McNamara, jmcnamara@cpan.org
#
from xlsxwriter.workbook import Workbook
workbook = Workbook('chart_clustered.xlsx')
works... | 29.983333 | 78 | 0.60756 |
4ae51417cae5991be09b6c0cd49b4e9d9121064d | 7,584 | py | Python | venv/Lib/site-packages/pandas/tests/extension/test_integer.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/extension/test_integer.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/extension/test_integer.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | """
This file contains a minimal set of tests for compliance with the extension
array interface test suite, and should contain no other tests.
The test suite for the full functionality of the array is located in
`pandas/tests/arrays/`.
The tests in this file are inherited from the BaseExtensionTests, and only
m... | 29.395349 | 83 | 0.633307 |
061e7c2e4611f3ef772fd9172c2765ce4d48d88e | 796 | py | Python | antistasi_logbook/gui/widgets/data_view_widget/type_fields/__init__.py | Giddius/Antistasi_Logbook | b2b520db1a54df484984876c7dfdb724703fed77 | [
"MIT"
] | 2 | 2022-01-12T22:45:56.000Z | 2022-03-10T14:23:36.000Z | antistasi_logbook/gui/widgets/data_view_widget/type_fields/__init__.py | Giddius/Antistasi_Logbook | b2b520db1a54df484984876c7dfdb724703fed77 | [
"MIT"
] | null | null | null | antistasi_logbook/gui/widgets/data_view_widget/type_fields/__init__.py | Giddius/Antistasi_Logbook | b2b520db1a54df484984876c7dfdb724703fed77 | [
"MIT"
] | null | null | null |
from importlib import import_module, util
from .base_type_field import TypeFieldProtocol
import inspect
from typing import Any, Optional
from .standard_type_fields import BoolTypeField, StringTypeField, IntTypeField, ListTypeField, FloatTypeField, DictTypeField
from .special_type_fields import URLTypeField, PathTypeFi... | 36.181818 | 135 | 0.824121 |
22131fafa375dce62704366750bc3465378e742c | 2,058 | py | Python | scripts/fuzzing/test/cipd_test.py | casey/fuchsia | 2b965e9a1e8f2ea346db540f3611a5be16bb4d6b | [
"BSD-3-Clause"
] | null | null | null | scripts/fuzzing/test/cipd_test.py | casey/fuchsia | 2b965e9a1e8f2ea346db540f3611a5be16bb4d6b | [
"BSD-3-Clause"
] | null | null | null | scripts/fuzzing/test/cipd_test.py | casey/fuchsia | 2b965e9a1e8f2ea346db540f3611a5be16bb4d6b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import shutil
import unittest
import tempfile
import test_env
from lib.cipd import Cipd
from lib.fuzzer import Fuzzer
fro... | 28.985915 | 79 | 0.613217 |
ad8e0894e7ea1c67181fe0c33199769344cb25f5 | 3,730 | py | Python | HTML_IMDB.py | joshglenen/Rating-Recalculator | f4ef2e169994512eaeb0b6b0801737fddf274963 | [
"MIT"
] | null | null | null | HTML_IMDB.py | joshglenen/Rating-Recalculator | f4ef2e169994512eaeb0b6b0801737fddf274963 | [
"MIT"
] | null | null | null | HTML_IMDB.py | joshglenen/Rating-Recalculator | f4ef2e169994512eaeb0b6b0801737fddf274963 | [
"MIT"
] | null | null | null | # python script that recalculates rating of imdb listing
# coded using python 3.6 with Spyder by Josh Glenen on 2017
import requests
import math
from bs4 import BeautifulSoup # html parser
# temporary algorithm to determine better score
def adjustExtremes(num10, num1, numPos, numNeg, numTotal):
if numTotal <= 0... | 29.370079 | 106 | 0.563807 |
29477dc26641b0e0decf8619577c9b80b3965bc7 | 307 | py | Python | examples/serialrx/send.py | AlexShiLucky/nuttx-apps | 2bafb70ce1e7af96640c501d3ce3d2a2bf29c9e5 | [
"Apache-2.0"
] | 15 | 2017-07-21T07:26:56.000Z | 2022-01-11T17:51:02.000Z | examples/serialrx/send.py | AlexShiLucky/nuttx-apps | 2bafb70ce1e7af96640c501d3ce3d2a2bf29c9e5 | [
"Apache-2.0"
] | 11 | 2017-10-22T09:45:51.000Z | 2019-05-28T23:25:29.000Z | examples/serialrx/send.py | AlexShiLucky/nuttx-apps | 2bafb70ce1e7af96640c501d3ce3d2a2bf29c9e5 | [
"Apache-2.0"
] | 7 | 2017-07-21T07:27:10.000Z | 2021-04-01T20:06:21.000Z |
import sys
from time import sleep
f = open(sys.argv[1], "w")
s = ""
while len(s) < 11520:
s += "1"
print("Sending to %s" % sys.argv[1])
while(True):
f.write(s);
f.flush();
#for i in range(len(s)):
# f.write(s[i])
# f.flush()
# #sleep(0.050)
sys.stdout.write(".")
sys.stdout.flush()
| 14.619048 | 36 | 0.553746 |
05431f655bb216734a889320de581755833c17f7 | 7,711 | py | Python | docs/conf.py | orlp/pyflat | 06f3afa1e905aded583910197448c28894e7a1f2 | [
"Zlib"
] | null | null | null | docs/conf.py | orlp/pyflat | 06f3afa1e905aded583910197448c28894e7a1f2 | [
"Zlib"
] | null | null | null | docs/conf.py | orlp/pyflat | 06f3afa1e905aded583910197448c28894e7a1f2 | [
"Zlib"
] | null | null | null | # -*- coding: utf-8 -*-
#
# pyflat documentation build configuration file, created by
# sphinx-quickstart on Tue Oct 16 21:42:21 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | 31.73251 | 80 | 0.713396 |
b774ef96300984ca980f77a5fa79cca9d4e38fe7 | 5,255 | py | Python | tests/modularinput/test_event.py | wcastello/splunk-sdk-python | 96039f1a1f0a02756d5796afa284e684eab30523 | [
"Apache-2.0"
] | 1 | 2020-07-13T01:22:14.000Z | 2020-07-13T01:22:14.000Z | tests/modularinput/test_event.py | wcastello/splunk-sdk-python | 96039f1a1f0a02756d5796afa284e684eab30523 | [
"Apache-2.0"
] | null | null | null | tests/modularinput/test_event.py | wcastello/splunk-sdk-python | 96039f1a1f0a02756d5796afa284e684eab30523 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2011-2015 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 33.259494 | 106 | 0.639581 |
282abf513c575f16a8d587513c57dd65f06ac723 | 1,179 | py | Python | ZenPacks/CERIT_SC/LinuxMonitorAdvanced/modeler/plugins/CERIT_SC/cmd/linux/lsb_release.py | vholer/ZenPacks.CERIT_SC.LinuxMonitorAdvanced | b90c56082b7a16cb62cbc003ff328b8140eaa1bb | [
"MIT"
] | null | null | null | ZenPacks/CERIT_SC/LinuxMonitorAdvanced/modeler/plugins/CERIT_SC/cmd/linux/lsb_release.py | vholer/ZenPacks.CERIT_SC.LinuxMonitorAdvanced | b90c56082b7a16cb62cbc003ff328b8140eaa1bb | [
"MIT"
] | null | null | null | ZenPacks/CERIT_SC/LinuxMonitorAdvanced/modeler/plugins/CERIT_SC/cmd/linux/lsb_release.py | vholer/ZenPacks.CERIT_SC.LinuxMonitorAdvanced | b90c56082b7a16cb62cbc003ff328b8140eaa1bb | [
"MIT"
] | null | null | null | import re
from Products.DataCollector.plugins.CollectorPlugin import CommandPlugin
from Products.DataCollector.plugins.DataMaps import MultiArgs
class lsb_release(CommandPlugin):
maptype = "DeviceMap"
compname = ""
command = 'lsb_release -id'
oses = ['Linux']
def condition(self, device, log):
... | 32.75 | 77 | 0.562341 |
c84737826a3a2cb2d59cd3668b8012565a15625a | 2,780 | py | Python | models/game.py | LFT/SI_PBF_Helper | c3c1b363927ef386fe8ae01d9fd77f577afbba2f | [
"MIT"
] | null | null | null | models/game.py | LFT/SI_PBF_Helper | c3c1b363927ef386fe8ae01d9fd77f577afbba2f | [
"MIT"
] | null | null | null | models/game.py | LFT/SI_PBF_Helper | c3c1b363927ef386fe8ae01d9fd77f577afbba2f | [
"MIT"
] | null | null | null | from models.player import Player
from starting_data import get_spirit
import random
import constants
class Game:
def __init__(self, name, fear_stack):
self.name = name
self.players = dict()
self.started = False
# Todo: init with data
# Power
self.available_minor_powe... | 36.103896 | 87 | 0.627338 |
5ec93a8d07e505a0c375a9b239ae688889950639 | 1,010 | py | Python | tensornetwork/visualization/graphviz_test.py | khanhgithead/TensorNetwork | e12580f1749493dbe05f474d2fecdec4eaba73c5 | [
"Apache-2.0"
] | 1,681 | 2019-04-30T21:07:24.000Z | 2022-03-31T14:51:19.000Z | tensornetwork/visualization/graphviz_test.py | khanhgithead/TensorNetwork | e12580f1749493dbe05f474d2fecdec4eaba73c5 | [
"Apache-2.0"
] | 671 | 2019-05-04T22:01:20.000Z | 2022-03-31T16:02:55.000Z | tensornetwork/visualization/graphviz_test.py | khanhgithead/TensorNetwork | e12580f1749493dbe05f474d2fecdec4eaba73c5 | [
"Apache-2.0"
] | 394 | 2019-04-29T03:24:26.000Z | 2022-03-11T14:16:21.000Z | # Copyright 2019 The TensorNetwork 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 ... | 34.827586 | 74 | 0.754455 |
3b387c4b34aa4e48af0d4fc0a15436fca196fc09 | 21,801 | py | Python | TEDscraper/TEDscraper.py | corralm/TED-Talks-Scraper | bfc5940ad805d3d0c689472e3e134a9d9dda36f7 | [
"MIT"
] | 8 | 2020-05-08T13:40:02.000Z | 2021-09-13T17:23:47.000Z | TEDscraper/TEDscraper.py | corralm/TED-Talks-Scraper | bfc5940ad805d3d0c689472e3e134a9d9dda36f7 | [
"MIT"
] | 3 | 2020-05-09T19:17:49.000Z | 2020-10-14T23:08:13.000Z | TEDscraper/TEDscraper.py | corralm/TED-Talks-Scraper | bfc5940ad805d3d0c689472e3e134a9d9dda36f7 | [
"MIT"
] | 5 | 2020-09-13T11:28:27.000Z | 2021-07-24T01:54:12.000Z | #!/usr/bin/env python
# coding: utf-8
# # TEDscraper Notebook
# In[ ]:
import random
import re
import time
from bs4 import BeautifulSoup
import pandas as pd
import requests
from fake_useragent import UserAgent
# ## Soup Maker
# In[ ]:
class SoupMaker:
"""Make soup objects and put your machine to sleep."""... | 38.517668 | 87 | 0.55502 |
a19657566cf4a77ee634d6cb078fd246ac4303da | 3,223 | py | Python | setup.py | hmaarrfk/tifffile-1 | 025b5e0e0046a4dd0990852fe423c262f5338d72 | [
"BSD-3-Clause"
] | 1 | 2020-05-04T02:02:59.000Z | 2020-05-04T02:02:59.000Z | setup.py | hmaarrfk/tifffile-1 | 025b5e0e0046a4dd0990852fe423c262f5338d72 | [
"BSD-3-Clause"
] | null | null | null | setup.py | hmaarrfk/tifffile-1 | 025b5e0e0046a4dd0990852fe423c262f5338d72 | [
"BSD-3-Clause"
] | null | null | null | # tifffile/setup.py
"""Tifffile package setuptools script."""
import sys
import re
from setuptools import setup
buildnumber = ''
with open('tifffile/tifffile.py') as fh:
code = fh.read()
version = re.search(r"__version__ = '(.*?)'", code).groups()[0]
version += ('.' + buildnumber) if buildnumber else ''
desc... | 25.377953 | 69 | 0.525287 |
38b4ae0217962f5caffdba52ddc5683e6f13f460 | 564 | py | Python | 2018/day_05.py | Wattleninja/Advent-of-Code | 447eacda55887dbbb5722428140892751a1c2b27 | [
"MIT"
] | null | null | null | 2018/day_05.py | Wattleninja/Advent-of-Code | 447eacda55887dbbb5722428140892751a1c2b27 | [
"MIT"
] | null | null | null | 2018/day_05.py | Wattleninja/Advent-of-Code | 447eacda55887dbbb5722428140892751a1c2b27 | [
"MIT"
] | null | null | null | from string import ascii_lowercase
def react(s):
stack = []
for char in s:
if stack and stack[-1] == char.swapcase():
stack.pop()
else:
stack.append(char)
return ''.join(stack)
def main():
with open('inputs/05.in') as f:
data = f.read().strip()
pr... | 18.8 | 77 | 0.549645 |
de62571545a56f76d50f45a5ffe9d3c158c13102 | 2,682 | py | Python | huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/model/delete_port_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/model/delete_port_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/model/delete_port_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class DeletePortRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value ... | 24.381818 | 74 | 0.527218 |
f20102dd19817ea9b8d99b4dff5fc4a4cd59cadc | 2,294 | py | Python | prepare_flight_data.py | felix-roc/ds-projects-ML | 3068040aac4843ab4e1beba21a942cddfa1b19c1 | [
"MIT"
] | null | null | null | prepare_flight_data.py | felix-roc/ds-projects-ML | 3068040aac4843ab4e1beba21a942cddfa1b19c1 | [
"MIT"
] | null | null | null | prepare_flight_data.py | felix-roc/ds-projects-ML | 3068040aac4843ab4e1beba21a942cddfa1b19c1 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
def fix_airport(df:pd.DataFrame) -> pd.DataFrame:
"""Berlin Schönefeld is referenced as SXF in the zindi data, but only
exists as BER in the airports data. Therefore we replace SXF with BER
Args:
df (pd.DataFrame): dataframe containing the zindi data
Re... | 35.84375 | 87 | 0.666085 |
cb55ba930660a4088736192662abb8bf9e721035 | 676 | py | Python | arrays/two_number_sum.py | maanavshah/coding-interview | 4c842cdbc6870da79684635f379966d1caec2162 | [
"MIT"
] | null | null | null | arrays/two_number_sum.py | maanavshah/coding-interview | 4c842cdbc6870da79684635f379966d1caec2162 | [
"MIT"
] | null | null | null | arrays/two_number_sum.py | maanavshah/coding-interview | 4c842cdbc6870da79684635f379966d1caec2162 | [
"MIT"
] | null | null | null | # O(nlogn) time - sorting time | O(n) space
def twoNumberSum(array, targetSum):
array.sort()
leftIndex = 0
rightIndex = len(array) - 1
while leftIndex < rightIndex:
currentSum = array[leftIndex] + array[rightIndex]
if currentSum == targetSum:
return[array[leftIndex], array[ri... | 27.04 | 57 | 0.58432 |
5eb175318ff0c7dd1f610844789ac09024b5c50a | 36 | py | Python | ra-gym/ra_gym/envs/__init__.py | RickyMexx/DeepRL-LTLf | 24cb3ac49e5bb9e07c37644d7226201ccb2b59a4 | [
"Apache-2.0"
] | 6 | 2020-12-07T23:47:44.000Z | 2022-02-14T13:27:45.000Z | ra-gym/ra_gym/envs/__init__.py | RickyMexx/DeepRL-LTLf | 24cb3ac49e5bb9e07c37644d7226201ccb2b59a4 | [
"Apache-2.0"
] | 1 | 2021-05-06T11:38:33.000Z | 2021-05-10T18:06:33.000Z | ra-gym/ra_gym/envs/__init__.py | RickyMexx/DeepRL-LTLf | 24cb3ac49e5bb9e07c37644d7226201ccb2b59a4 | [
"Apache-2.0"
] | 1 | 2021-01-09T02:32:10.000Z | 2021-01-09T02:32:10.000Z | from ra_gym.envs.ra_env import RAEnv | 36 | 36 | 0.861111 |
c20cad15dbcd229788438bf5b90e935bba0e3cfe | 1,873 | py | Python | examples/painter.py | ChronoMonochrome/pyOlcPixelGameEngine | 42444e35dfe80f380cbaa0e3bf5df642f3c89364 | [
"BSD-3-Clause"
] | 3 | 2020-04-12T22:09:06.000Z | 2021-12-11T20:49:27.000Z | examples/painter.py | ChronoMonochrome/pyOlcPixelGameEngine | 42444e35dfe80f380cbaa0e3bf5df642f3c89364 | [
"BSD-3-Clause"
] | null | null | null | examples/painter.py | ChronoMonochrome/pyOlcPixelGameEngine | 42444e35dfe80f380cbaa0e3bf5df642f3c89364 | [
"BSD-3-Clause"
] | 1 | 2021-12-11T21:04:21.000Z | 2021-12-11T21:04:21.000Z | import olc
import random
from os import path
from PIL import Image
class Paint(olc.PixelGameEngine):
def __init__(self):
olc.PixelGameEngine.__init__(self)
self.sAppName = "|| {} ||".format(path.basename(__file__))
self._paintColor = olc.Pixel.WHITE
self._clearColor = olc.Pixel.BLA... | 28.815385 | 112 | 0.580886 |
464968d46af36f1c0c8b39003fbc1cf2fd2b9d82 | 844 | py | Python | Missions_to_Mars/app.py | dlg410/web-scraping-challenge | bd3c590260a6aba45b2ec956c56c01292d06a5a3 | [
"ADSL"
] | null | null | null | Missions_to_Mars/app.py | dlg410/web-scraping-challenge | bd3c590260a6aba45b2ec956c56c01292d06a5a3 | [
"ADSL"
] | null | null | null | Missions_to_Mars/app.py | dlg410/web-scraping-challenge | bd3c590260a6aba45b2ec956c56c01292d06a5a3 | [
"ADSL"
] | null | null | null | from flask import Flask, render_template, redirect
from flask_pymongo import PyMongo
import pymongo
import scrape_mars
app = Flask(__name__, template_folder='template')
#conn = 'mongodb://localhost:27017'
#client = pymongo.MongoClient(conn)
#db = client.mars_db
app.config['MONGO_URI'] = "mongodb://localhost:27017/m... | 24.114286 | 63 | 0.702607 |
8ee27b891ffd67e937d08d6c6b7346a12c62d219 | 15,097 | py | Python | doc/conf.py | jpeach/trafficserver | 8cf3b52a413cc8f8eb056cc85ff5d4da0df12ba9 | [
"Apache-2.0"
] | null | null | null | doc/conf.py | jpeach/trafficserver | 8cf3b52a413cc8f8eb056cc85ff5d4da0df12ba9 | [
"Apache-2.0"
] | null | null | null | doc/conf.py | jpeach/trafficserver | 8cf3b52a413cc8f8eb056cc85ff5d4da0df12ba9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Apache Traffic Server documentation build configuration file, created by
# sphinx-quickstart on Mon Mar 4 06:23:15 2013.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional ... | 32.677489 | 94 | 0.723521 |
b7a4d7d683668e9355fa04a8116bd367f30bc8a2 | 748 | py | Python | static/audio-files/encode_script.py | Kshitij031998/TinyTales-AlexaSkill | 1d1c942acc18db6ba7d20e88893b1e9188d19664 | [
"MIT"
] | null | null | null | static/audio-files/encode_script.py | Kshitij031998/TinyTales-AlexaSkill | 1d1c942acc18db6ba7d20e88893b1e9188d19664 | [
"MIT"
] | null | null | null | static/audio-files/encode_script.py | Kshitij031998/TinyTales-AlexaSkill | 1d1c942acc18db6ba7d20e88893b1e9188d19664 | [
"MIT"
] | 1 | 2019-10-12T17:35:01.000Z | 2019-10-12T17:35:01.000Z | #
# ffmpeg -i <input-file> -ac 2 -codec:a libmp3lame -b:a 48k -ar 16000 <output-file>
#
import os
from os import listdir
from os.path import isfile, join
onlyfiles = [f for f in listdir('./') if isfile(join('./', f))]
onlyfiles = [x for x in onlyfiles if '.wav' == x[-4:].lower()]
print("\n================{0} .wav Aud... | 32.521739 | 134 | 0.61631 |
96a504d8ce173a5a9e5bb23704c0b4296acd8d05 | 25,480 | py | Python | sdks/python/apache_beam/runners/portability/stager_test.py | jxub/beam | 8222fcc978a54d98d385c108fb5fcf7615d74829 | [
"Apache-2.0"
] | 35 | 2016-09-22T22:53:14.000Z | 2020-02-13T15:12:21.000Z | sdks/python/apache_beam/runners/portability/stager_test.py | jxub/beam | 8222fcc978a54d98d385c108fb5fcf7615d74829 | [
"Apache-2.0"
] | 71 | 2018-05-23T22:20:02.000Z | 2019-04-30T15:37:46.000Z | sdks/python/apache_beam/runners/portability/stager_test.py | jxub/beam | 8222fcc978a54d98d385c108fb5fcf7615d74829 | [
"Apache-2.0"
] | 88 | 2016-11-27T02:16:11.000Z | 2020-02-28T05:10:26.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 39.381762 | 80 | 0.678414 |
0b3963c63ed1877c12683ef9458a7f962df91e0e | 3,243 | py | Python | finder.py | giuseppebrb/Pynder | a47defc08ff497096a1fe507ab5d7b01997b69ef | [
"MIT"
] | 3 | 2017-11-11T01:19:57.000Z | 2021-07-07T15:44:32.000Z | finder.py | giuseppebrb/Pynder | a47defc08ff497096a1fe507ab5d7b01997b69ef | [
"MIT"
] | null | null | null | finder.py | giuseppebrb/Pynder | a47defc08ff497096a1fe507ab5d7b01997b69ef | [
"MIT"
] | null | null | null | import os
import fnmatch
import smtplib
import email.mime.application
import sys
import subprocess
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from pathlib import Path
home = str(Path.home()) # Return a string representing the user’s home directory
fileFound = 0 # Number of f... | 35.25 | 120 | 0.716929 |
0c997a770255a960654a7cf0506a129e73d92b91 | 1,844 | py | Python | pyconfig.py | kryv/FLAME | b85ae4fb465c572cee348ee023f73ac4c5864dcd | [
"MIT"
] | null | null | null | pyconfig.py | kryv/FLAME | b85ae4fb465c572cee348ee023f73ac4c5864dcd | [
"MIT"
] | null | null | null | pyconfig.py | kryv/FLAME | b85ae4fb465c572cee348ee023f73ac4c5864dcd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Emit a file suitible to include() in a CMakeLists.txt file
with information from a python interpreter
Compatible for python 2.6 -> 3.4
"""
from __future__ import print_function
import sys, os
if len(sys.argv)<2:
out = sys.stdout
else:
out = open(sys.argv[1], 'w')
from distutils.sy... | 32.350877 | 105 | 0.746204 |
7c716a72ca55a063693d738907d6447e5d970dcb | 6,168 | py | Python | visualize.py | boychaboy/beep-explainer | e1db01a47e24bf25cd803e3e096ceb82f93fb8a1 | [
"MIT"
] | null | null | null | visualize.py | boychaboy/beep-explainer | e1db01a47e24bf25cd803e3e096ceb82f93fb8a1 | [
"MIT"
] | null | null | null | visualize.py | boychaboy/beep-explainer | e1db01a47e24bf25cd803e3e096ceb82f93fb8a1 | [
"MIT"
] | null | null | null | """
Generate tabular layouts by taking the outputs of hierarchical explanations
as inputs. Output sample:
https://openreview.net/pdf?id=BkxRRkSKwr, Appendix C
"""
import argparse
import json
import os
import pickle
import matplotlib.font_manager as fm
import matplotlib.pyplot as plt
import numpy as np
path = "/usr/s... | 32.983957 | 110 | 0.545396 |
f0e682d215f58e8d22f6a21f4e615a366780d3fc | 15,868 | py | Python | neutron/agent/l3/ha_router.py | p0i0/openstack-neutron | df2ee28ae9a43cc511482bd6ece5396eb1288814 | [
"Apache-2.0"
] | null | null | null | neutron/agent/l3/ha_router.py | p0i0/openstack-neutron | df2ee28ae9a43cc511482bd6ece5396eb1288814 | [
"Apache-2.0"
] | null | null | null | neutron/agent/l3/ha_router.py | p0i0/openstack-neutron | df2ee28ae9a43cc511482bd6ece5396eb1288814 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 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 ... | 40.070707 | 79 | 0.656163 |
82f192538e2763ef0605030a58e11685873b954a | 766 | py | Python | solutions/solution206.py | Satily/leetcode_python_solution | 3f05fff7758d650469862bc28df9e4aa7b1d3203 | [
"MIT"
] | 3 | 2018-11-22T10:31:09.000Z | 2019-05-05T15:53:48.000Z | solutions/solution206.py | Satily/leetcode_python_solution | 3f05fff7758d650469862bc28df9e4aa7b1d3203 | [
"MIT"
] | null | null | null | solutions/solution206.py | Satily/leetcode_python_solution | 3f05fff7758d650469862bc28df9e4aa7b1d3203 | [
"MIT"
] | null | null | null | from data_structure import ListNode, build_link_list, ds_print
class Solution:
def reverseList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if head is None or head.next is None:
return head
p, q, r = head, head.next, head.next.next
... | 28.37037 | 70 | 0.574413 |
fd0bf14bdc0b1baaa5354aae9692e6cf8d32019f | 1,581 | py | Python | src/twitter_analysis_tools/twitter/get_tweets.py | dmmolitor/twitter_analysis_tools | 0599b6c1a5093ea2fb916d5fb05df92786ab6a61 | [
"MIT"
] | 1 | 2020-05-03T18:02:16.000Z | 2020-05-03T18:02:16.000Z | src/twitter_analysis_tools/twitter/get_tweets.py | dmmolitor/twitter_analysis_tools | 0599b6c1a5093ea2fb916d5fb05df92786ab6a61 | [
"MIT"
] | null | null | null | src/twitter_analysis_tools/twitter/get_tweets.py | dmmolitor/twitter_analysis_tools | 0599b6c1a5093ea2fb916d5fb05df92786ab6a61 | [
"MIT"
] | 1 | 2020-05-03T18:01:22.000Z | 2020-05-03T18:01:22.000Z | """Iterables for streaming tweets from files."""
from twitter_analysis_tools.fileio import LinesFromGzipFiles
from twitter_analysis_tools.twitter import clean_text, tweet_info
from twitter_analysis_tools.utils import Pipeline, negate
class TweetsFromFiles(Pipeline):
"""Iterate over tweets from the given .jsonl.g... | 30.403846 | 79 | 0.71284 |
2d5309a6389d6d953c0e3884f900e8543e80031c | 446 | py | Python | setup.py | prathits012/songData | 8f42cacc55f5a62d22e968619d134f5771781f64 | [
"MIT"
] | null | null | null | setup.py | prathits012/songData | 8f42cacc55f5a62d22e968619d134f5771781f64 | [
"MIT"
] | 1 | 2021-01-05T04:11:14.000Z | 2021-01-05T04:11:14.000Z | setup.py | prathits012/songData | 8f42cacc55f5a62d22e968619d134f5771781f64 | [
"MIT"
] | 1 | 2021-01-05T04:01:38.000Z | 2021-01-05T04:01:38.000Z |
from setuptools import setup
setup(
name="songDatawebsite",
version="0.1.0",
packages=["website"],
include_package_data=True,
install_requires=[
"arrow",
"bs4",
"Flask",
"html5validator",
"nodeenv",
"pycodestyle",
"pydocstyle",
"pylin... | 17.84 | 30 | 0.511211 |
d76501bf0b6860e5336bfa2dd88229d7b7e845af | 3,005 | py | Python | module/encoder.py | liurenfeng007/DSRE | 7b3b257c68b1991b8b12c817a245af022a5fbeaa | [
"MIT"
] | null | null | null | module/encoder.py | liurenfeng007/DSRE | 7b3b257c68b1991b8b12c817a245af022a5fbeaa | [
"MIT"
] | null | null | null | module/encoder.py | liurenfeng007/DSRE | 7b3b257c68b1991b8b12c817a245af022a5fbeaa | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class _CNN(nn.Module):
def __init__(self, opt):
super(_CNN, self).__init__()
self.opt = opt
self.in_channels = 1
self.out_channels = self.opt.hidden_size
self.in_height = self.opt.sent_max_length
self.in_width = self.opt.word_dim + ... | 36.646341 | 117 | 0.614309 |
d53960f5a1633c51278a41270ff14d192edf602e | 339 | py | Python | accounts/admin.py | sammiearchie77/fpt-bank | 93c4a9b8ec3e88470fcdcaa2b41a5249cd6797a0 | [
"MIT"
] | null | null | null | accounts/admin.py | sammiearchie77/fpt-bank | 93c4a9b8ec3e88470fcdcaa2b41a5249cd6797a0 | [
"MIT"
] | null | null | null | accounts/admin.py | sammiearchie77/fpt-bank | 93c4a9b8ec3e88470fcdcaa2b41a5249cd6797a0 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import BankAccountType, User, UserAddress, UserBankAccount
admin.site.register(BankAccountType)
admin.site.register(User)
admin.site.register(UserAddress)
@admin.register(UserBankAccount)
class UserBankAccountAdmin(admin.ModelAdmin):
list_display = ['accoun... | 28.25 | 72 | 0.787611 |
54bd28162ac1a6b47b340641e4a6691c777202ba | 5,693 | py | Python | DebugShell/avalon-mm-modular-test.py | microelectron/Avalon-nano-firmware | 1bdcc6b51e6365e3617640bfa149e7cd3f13f590 | [
"Unlicense"
] | null | null | null | DebugShell/avalon-mm-modular-test.py | microelectron/Avalon-nano-firmware | 1bdcc6b51e6365e3617640bfa149e7cd3f13f590 | [
"Unlicense"
] | null | null | null | DebugShell/avalon-mm-modular-test.py | microelectron/Avalon-nano-firmware | 1bdcc6b51e6365e3617640bfa149e7cd3f13f590 | [
"Unlicense"
] | 1 | 2022-02-05T16:34:17.000Z | 2022-02-05T16:34:17.000Z | #!/usr/bin/env python2.7
# This simple script was for test A3255 modular. there are 128 cores in one A3255 chip.
# If all cores are working the number should be 0.
# If some of them not working the number is the broken cores count.
from serial import Serial
from optparse import OptionParser
import binascii
import sys... | 34.92638 | 113 | 0.638679 |
111ee178642786e9c088584365f4afc3115c1981 | 5,751 | py | Python | python_api/primitive/component/module/encoder/hashencoder/hashgrid.py | openNGP/openNGP | 085d6e2f94fcdc5c1c15a62027d31b31398842bb | [
"MIT"
] | 3 | 2022-03-04T09:16:20.000Z | 2022-03-19T02:57:01.000Z | python_api/primitive/component/module/encoder/hashencoder/hashgrid.py | openNGP/openNGP | 085d6e2f94fcdc5c1c15a62027d31b31398842bb | [
"MIT"
] | 2 | 2022-03-08T10:54:47.000Z | 2022-03-11T08:58:18.000Z | python_api/primitive/component/module/encoder/hashencoder/hashgrid.py | openNGP/openNGP | 085d6e2f94fcdc5c1c15a62027d31b31398842bb | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Function
from torch.autograd.function import once_differentiable
from torch.cuda.amp import custom_bwd, custom_fwd
from .backend import _backend
class _hash_encode(Function):
@staticmethod
@custom_fwd(cast_inputs=torch.half)
... | 40.5 | 229 | 0.653278 |
6d4d3e5c64dc4f0b8f6fc209848dca3c855ffad2 | 3,448 | py | Python | depth/visual.py | alantess/vigilant-driving | 3a48efc3feae435df1a2ffe9d39b01023021edc8 | [
"MIT"
] | 2 | 2021-04-21T05:56:14.000Z | 2022-01-29T23:19:04.000Z | depth/visual.py | alantess/vigilant-driving | 3a48efc3feae435df1a2ffe9d39b01023021edc8 | [
"MIT"
] | null | null | null | depth/visual.py | alantess/vigilant-driving | 3a48efc3feae435df1a2ffe9d39b01023021edc8 | [
"MIT"
] | 3 | 2021-06-03T07:42:41.000Z | 2022-01-17T05:15:57.000Z | import torch
import cv2
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
from network import *
import matplotlib.pyplot as plt
def imshow_grid(img_a, img_b, disparity, directory, count=0):
resize = transforms.Resize((360,640))
img_a, img_b, disparity = img_a.cpu(), img_b.cpu(), dispa... | 30.245614 | 88 | 0.649072 |
54fa0e96cbd7d6efcc09a66824dd847be314d233 | 6,217 | py | Python | geometry/eolearn/geometry/superpixel.py | dreampedia20/eo-learn | f4994a1d6e910ba5d6ad877726ac2367048a44a1 | [
"MIT"
] | 1 | 2019-04-08T02:26:40.000Z | 2019-04-08T02:26:40.000Z | geometry/eolearn/geometry/superpixel.py | dreampedia20/eo-learn | f4994a1d6e910ba5d6ad877726ac2367048a44a1 | [
"MIT"
] | 1 | 2019-11-27T09:44:40.000Z | 2019-11-27T09:44:40.000Z | geometry/eolearn/geometry/superpixel.py | dreampedia20/eo-learn | f4994a1d6e910ba5d6ad877726ac2367048a44a1 | [
"MIT"
] | 1 | 2019-01-30T09:08:23.000Z | 2019-01-30T09:08:23.000Z | """
Module for super-pixel segmentation
Credits:
Copyright (c) 2017-2019 Matej Aleksandrov, Matej Batič, Andrej Burja, Eva Erzin (Sinergise)
Copyright (c) 2017-2019 Grega Milčinski, Matic Lubej, Devis Peresutti, Jernej Puc, Tomislav Slijepčević (Sinergise)
Copyright (c) 2017-2019 Blaž Sovdat, Jovan Višnjić, Anže Zupan... | 44.407143 | 119 | 0.705002 |
6e7e07cc605b13103516496f1be0545e6594a422 | 25,223 | py | Python | version_v6_for_eval_multitemplate/qatm_pytorch_v2.py | mayanks888/QATM_pytorch_ros2 | 936ff265e4c0f0cbfa63855e07a95e15b2b0e336 | [
"MIT"
] | null | null | null | version_v6_for_eval_multitemplate/qatm_pytorch_v2.py | mayanks888/QATM_pytorch_ros2 | 936ff265e4c0f0cbfa63855e07a95e15b2b0e336 | [
"MIT"
] | null | null | null | version_v6_for_eval_multitemplate/qatm_pytorch_v2.py | mayanks888/QATM_pytorch_ros2 | 936ff265e4c0f0cbfa63855e07a95e15b2b0e336 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import matplotlib.pyplot as plt
from pathlib import Path
from seaborn import color_palette
import pandas as pd
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from torchvision import models, transforms, utils
import copy
from utils import *
from PIL im... | 37.202065 | 165 | 0.552036 |
9cc2f2658b119fd29397c1ba4bdfc93a556b50f0 | 31,294 | py | Python | startup/43-ESM_utilities.py | NSLS-II-ESM-1/profile_collection | 0d76664420550da6e89c49eb1c47a04eb3019322 | [
"BSD-3-Clause"
] | 1 | 2021-01-08T10:06:46.000Z | 2021-01-08T10:06:46.000Z | startup/43-ESM_utilities.py | NSLS-II-ESM-1/profile_collection | 0d76664420550da6e89c49eb1c47a04eb3019322 | [
"BSD-3-Clause"
] | 13 | 2019-09-24T19:32:18.000Z | 2021-06-15T21:30:59.000Z | startup/43-ESM_utilities.py | NSLS-II-ESM-1/profile_collection | 0d76664420550da6e89c49eb1c47a04eb3019322 | [
"BSD-3-Clause"
] | 1 | 2019-09-24T18:15:26.000Z | 2019-09-24T18:15:26.000Z | import IPython
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
import scipy.optimize as opt
import os
from bluesky.plans import scan, adaptive_scan, spiral_fermat, spiral,scan_nd
from bluesky.plan_stubs import abs_set, mv
from bluesky.preprocessors import ba... | 37.254762 | 143 | 0.591359 |
667c65a44a74cf4e60de12023b49c9fdf54a0c4b | 5,435 | py | Python | mtuq/graphics/uq/double_couple.py | thurinj/mtuq | 8c539ac9da4c0e7eb72c5218b7818107c44fecc7 | [
"BSD-2-Clause"
] | 23 | 2019-09-20T16:51:05.000Z | 2022-03-28T18:09:56.000Z | mtuq/graphics/uq/double_couple.py | thurinj/mtuq | 8c539ac9da4c0e7eb72c5218b7818107c44fecc7 | [
"BSD-2-Clause"
] | 14 | 2019-09-25T06:06:43.000Z | 2022-03-10T18:05:46.000Z | mtuq/graphics/uq/double_couple.py | thurinj/mtuq | 8c539ac9da4c0e7eb72c5218b7818107c44fecc7 | [
"BSD-2-Clause"
] | 6 | 2019-12-13T12:55:28.000Z | 2022-02-03T18:10:30.000Z | #
# graphics/uq/double_couple.py - uncertainty quantification of double couple sources
#
import numpy as np
from matplotlib import pyplot
from pandas import DataFrame
from xarray import DataArray
from mtuq.graphics._gmt import read_cpt
from mtuq.grid_search import MTUQDataArray, MTUQDataFrame
from mtuq.util import fu... | 25.516432 | 84 | 0.637167 |
8476cf00cfe75f5886d22b0bad25ba7ccab05c66 | 134 | py | Python | odoo-13.0/addons/account_test/report/__init__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/account_test/report/__init__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/account_test/report/__init__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import report_account_test
| 26.8 | 74 | 0.731343 |
441efe5783f4dec75b2eca6593bcb2313e13571e | 600 | py | Python | Curso_Python_3_UDEMY/banco_dados/incluir_varios_contatos.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | Curso_Python_3_UDEMY/banco_dados/incluir_varios_contatos.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | Curso_Python_3_UDEMY/banco_dados/incluir_varios_contatos.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | from mysql.connector.errors import ProgrammingError
from db import nova_conexao
sql = 'INSERT INTO CONTATOS (NOME, TEL) VALUES (%s, %s)'
args = (
('Danilo','94955-2951'),
('Maria','97757-0961'),
('Allanys','96659-5697'),
('Scarlett','94122-2526'),
('Ohara','93345-5556'),
('Mel','95525-3011'),
)... | 25 | 56 | 0.603333 |
54e11aa4481541a79acb8c723cf5271c68f285f7 | 2,213 | py | Python | aliyun-python-sdk-rds/aliyunsdkrds/request/v20140815/DescribeOssDownloadsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-rds/aliyunsdkrds/request/v20140815/DescribeOssDownloadsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-rds/aliyunsdkrds/request/v20140815/DescribeOssDownloadsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"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... | 36.278689 | 78 | 0.777225 |
18b8062a1a75eb7397a1680cdf89766b420646e7 | 1,283 | py | Python | plugins/amires/src/amires/render.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | 2 | 2015-01-26T07:15:19.000Z | 2015-11-09T13:42:11.000Z | plugins/freeswitch/src/clacks/phone/render.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | null | null | null | plugins/freeswitch/src/clacks/phone/render.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | null | null | null | # This file is part of the clacks framework.
#
# http://clacks-project.org
#
# Copyright:
# (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de
#
# License:
# GPL-2: http://www.gnu.org/licenses/gpl-2.0.html
#
# See the LICENSE file in the project's top-level directory for details.
import cgi
def mr(data):
... | 27.297872 | 75 | 0.643024 |
db638527686bdd0dd3e06099699d6c8b878d696c | 2,517 | py | Python | unit_04/main1.py | janusnic/21v-pyqt | 8ee3828e1c6e6259367d6cedbd63b9057cf52c24 | [
"MIT"
] | null | null | null | unit_04/main1.py | janusnic/21v-pyqt | 8ee3828e1c6e6259367d6cedbd63b9057cf52c24 | [
"MIT"
] | null | null | null | unit_04/main1.py | janusnic/21v-pyqt | 8ee3828e1c6e6259367d6cedbd63b9057cf52c24 | [
"MIT"
] | 2 | 2019-11-14T15:04:22.000Z | 2021-10-31T07:34:46.000Z | # -*- coding: utf-8 -*-
# пример без использования дизайнера, все Gui определяется тут
from PyQt4 import QtCore
from PyQt4 import QtGui
# создадим "алиас" для этого метода, чтобы писать меньше кода
fromUtf8 = QtCore.QString.fromUtf8
class Ui(QtGui.QWidget):
def __init__(self, parent=None):
super(Ui,self)._... | 39.952381 | 82 | 0.653159 |
c87006c3c73bc84132e205750ef94d896cf7ef26 | 2,533 | py | Python | Test.py | JohnnyKaime/Epic7_Shop_Refresh | 7f26f206e0db85efc0c81f0875b8e3795973be09 | [
"Unlicense"
] | null | null | null | Test.py | JohnnyKaime/Epic7_Shop_Refresh | 7f26f206e0db85efc0c81f0875b8e3795973be09 | [
"Unlicense"
] | null | null | null | Test.py | JohnnyKaime/Epic7_Shop_Refresh | 7f26f206e0db85efc0c81f0875b8e3795973be09 | [
"Unlicense"
] | null | null | null | #Dependency Python ofc
#pip install pywin32
#pip install Pillow
#pip install keyboard
#pip install pyautogui
#pip install opencv-python
import win32gui, win32api, win32con, pyautogui, sys, time, keyboard, time
#def click(x,y):
#win32gui.SetCursorPos((x,y))
#win32api.mouse_event(win32con.MOUSEEVENT... | 31.6625 | 100 | 0.636005 |
1f793aceca8b4b35f9c37048849f73528c05496c | 287 | py | Python | part_2/week_14/bubbleSort.py | eduardovivi/Intro-to-Computer-Science-with-Python-Part-1-and-2-IME-USP-Coursera | af65ba8af0f07bcc36c4bc03ee23023b829966dc | [
"MIT"
] | 16 | 2019-06-27T23:03:54.000Z | 2022-03-05T00:22:37.000Z | part_2/week_14/bubbleSort.py | eduardovivi/Intro-to-Computer-Science-with-Python-Part-1-and-2-IME-USP-Coursera | af65ba8af0f07bcc36c4bc03ee23023b829966dc | [
"MIT"
] | null | null | null | part_2/week_14/bubbleSort.py | eduardovivi/Intro-to-Computer-Science-with-Python-Part-1-and-2-IME-USP-Coursera | af65ba8af0f07bcc36c4bc03ee23023b829966dc | [
"MIT"
] | 16 | 2019-09-23T13:44:31.000Z | 2021-11-16T17:20:37.000Z | def bubble_sort(lista):
for passnum in range(len(lista)-1,0,-1):
for i in range(passnum):
if lista[i]>lista[i+1]:
temp = lista[i]
lista[i] = lista[i+1]
lista[i+1] = temp
print(lista)
return lista | 31.888889 | 44 | 0.470383 |
cf16052a192638fc295dffb2b44650a5c2a3a88a | 1,992 | py | Python | sis/student.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | sis/student.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | sis/student.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | # vim:set et sw=4 ts=4:
import logging
import sys
import jmespath
from . import sis
# logging
logging.basicConfig(stream=sys.stdout, level=logging.WARNING)
logger = logging.getLogger(__name__)
# Various SIS endpoints
students_url = "https://apis.berkeley.edu/sis/v2/students"
async def get_academic_statuses(app_id,... | 29.731343 | 71 | 0.626004 |
e02a69d3ae14a57321f77eab7bbbda72bdf824c6 | 3,913 | py | Python | code/gits_profile.py | raksha1207/GITS | f9be9da92f02d868d3eb875964affeea78ac6a3d | [
"MIT"
] | null | null | null | code/gits_profile.py | raksha1207/GITS | f9be9da92f02d868d3eb875964affeea78ac6a3d | [
"MIT"
] | null | null | null | code/gits_profile.py | raksha1207/GITS | f9be9da92f02d868d3eb875964affeea78ac6a3d | [
"MIT"
] | null | null | null | import subprocess
import re
from subprocess import PIPE
def gits_set_profile(args):
"""
Function that prints hello message
to user console
"""
# print(args.email)
# print("Hello from GITS Commandline Tools-Profile")
try:
# check regex
check_val = check(args.email)
#... | 37.266667 | 69 | 0.477894 |
19ee8f2e3803bc89f51c9be30c80f5f56f79ac4d | 3,468 | py | Python | CSIKit/tools/batch_graph.py | serrhini/CSIKit | 1cc9ecb2c0444622b258e9de48841366cbbc667b | [
"MIT"
] | null | null | null | CSIKit/tools/batch_graph.py | serrhini/CSIKit | 1cc9ecb2c0444622b258e9de48841366cbbc667b | [
"MIT"
] | null | null | null | CSIKit/tools/batch_graph.py | serrhini/CSIKit | 1cc9ecb2c0444622b258e9de48841366cbbc667b | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from CSIKit.util.csitools import get_CSI
from CSIKit.util.filters import bandpass, hampel, running_mean
from CSIKit.reader import get_reader
DEFAULT_PATH = "./data/intel/misc/log.all_csi.6.7.6.dat"
# DEFAULT_PATH = "./data/pi/walk_1597159475.pcap"
class BatchGraph:
... | 29.142857 | 104 | 0.581315 |
6c4fa73c11843f4bf26a726aeee3fc685c8dbf10 | 9,162 | py | Python | vertex/tcpdfa.py | twisted/vertex | feb591aa1b9a3b2b8fdcf53e4962dad2a0bc38ca | [
"MIT"
] | 56 | 2015-01-09T03:52:07.000Z | 2021-09-26T22:17:06.000Z | vertex/tcpdfa.py | DalavanCloud/vertex | feb591aa1b9a3b2b8fdcf53e4962dad2a0bc38ca | [
"MIT"
] | 34 | 2015-03-05T02:57:48.000Z | 2017-05-23T22:34:13.000Z | vertex/tcpdfa.py | DalavanCloud/vertex | feb591aa1b9a3b2b8fdcf53e4962dad2a0bc38ca | [
"MIT"
] | 17 | 2015-04-17T02:03:16.000Z | 2021-11-12T03:31:07.000Z | # -*- test-case-name: vertex.test.test_ptcp -*-
# Copyright 2005 Divmod, Inc. See LICENSE file for details
from automat import MethodicalMachine
class TCP(object):
"""
A L{TCP} represents a single connection's TCP-over-UDP state machine.
"""
_machine = MethodicalMachine()
def __init__(self, im... | 23.859375 | 79 | 0.549116 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.