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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f5ddf0466f903b62327ed962a3e97704a2eedcd4 | 6,201 | py | Python | sdk/python/pulumi_azure_nextgen/synapse/v20190601preview/workspace_aad_admin.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/synapse/v20190601preview/workspace_aad_admin.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/synapse/v20190601preview/workspace_aad_admin.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 41.898649 | 259 | 0.648928 |
e40c945b21bef2dd14aaeb2e5f006b669d6ced87 | 824 | py | Python | amadeus/travel/analytics/air_traffic/_traveled.py | tsolakoua/amadeus-python | 56c0e5cb0510aab5a80646d07593d94c9cba2c69 | [
"MIT"
] | 125 | 2018-04-09T07:27:24.000Z | 2022-02-22T11:45:20.000Z | amadeus/travel/analytics/air_traffic/_traveled.py | tsolakoua/amadeus-python | 56c0e5cb0510aab5a80646d07593d94c9cba2c69 | [
"MIT"
] | 58 | 2018-03-29T14:58:01.000Z | 2022-03-17T10:18:07.000Z | amadeus/travel/analytics/air_traffic/_traveled.py | tsolakoua/amadeus-python | 56c0e5cb0510aab5a80646d07593d94c9cba2c69 | [
"MIT"
] | 58 | 2018-04-06T10:56:20.000Z | 2022-03-04T01:23:24.000Z | from amadeus.client.decorator import Decorator
class Traveled(Decorator, object):
def get(self, **params):
'''
Returns a list of air traffic reports, based on number of travelers.
.. code-block:: python
amadeus.travel.analytics.air_traffic.traveled.get(
origin... | 31.692308 | 76 | 0.588592 |
634848c475e6f5ce7fc277576abe9b2e777d9c9c | 3,528 | py | Python | poweredge_exporter.py | cermegno/prometheus-grafana-dell | 079a5369c44c2ab5e19358221687198b2c076b27 | [
"MIT"
] | null | null | null | poweredge_exporter.py | cermegno/prometheus-grafana-dell | 079a5369c44c2ab5e19358221687198b2c076b27 | [
"MIT"
] | null | null | null | poweredge_exporter.py | cermegno/prometheus-grafana-dell | 079a5369c44c2ab5e19358221687198b2c076b27 | [
"MIT"
] | null | null | null | from prometheus_client import start_http_server, Gauge, Counter, Enum
import requests
import time
import json
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
### Adjust this section to your environment
baseurl = "https://10.1.1.... | 38.769231 | 108 | 0.659014 |
c51f695f01dde1b6319f3730f536fa10591e7be7 | 3,282 | py | Python | simulation/simulation_exp4p.py | fengzhiyugithub/striatum-trival01 | 8368e4d8ebc4b54cb30f4b500b1758f4c57f4657 | [
"BSD-2-Clause"
] | 1 | 2020-10-12T09:39:24.000Z | 2020-10-12T09:39:24.000Z | simulation/simulation_exp4p.py | fengzhiyugithub/striatum-trival01 | 8368e4d8ebc4b54cb30f4b500b1758f4c57f4657 | [
"BSD-2-Clause"
] | null | null | null | simulation/simulation_exp4p.py | fengzhiyugithub/striatum-trival01 | 8368e4d8ebc4b54cb30f4b500b1758f4c57f4657 | [
"BSD-2-Clause"
] | null | null | null | import six
from six.moves import range, zip
from sklearn.naive_bayes import MultinomialNB
from sklearn.linear_model import LogisticRegression
from sklearn.multiclass import OneVsRestClassifier
import numpy as np
import matplotlib.pyplot as plt
from striatum.storage import MemoryHistoryStorage, MemoryModelStorage
from ... | 36.065934 | 76 | 0.695308 |
354bdfeed64563d9d273b7fdb6aea7d40c4530a5 | 241 | py | Python | products/urls.py | RawFlash/BabyShoesShop | 624ccbc921b847c6f7257a240c02a6c295fdf74e | [
"bzip2-1.0.6"
] | null | null | null | products/urls.py | RawFlash/BabyShoesShop | 624ccbc921b847c6f7257a240c02a6c295fdf74e | [
"bzip2-1.0.6"
] | null | null | null | products/urls.py | RawFlash/BabyShoesShop | 624ccbc921b847c6f7257a240c02a6c295fdf74e | [
"bzip2-1.0.6"
] | null | null | null | from django.urls import path, include
from django.contrib import admin
from products import views
urlpatterns = [
# url(r'^landing123/', views.landing, name='landing'),
path('product/<product_id>/', views.product, name='product'),
] | 30.125 | 65 | 0.721992 |
48ce48d2af7427a90c9c79d8407c9a618b9e4144 | 1,195 | py | Python | summarize_from_feedback/datasets/tldr.py | badrinath-newzera/openai-summary-inference | 8ad630942ee198b21cd98c9ba980eddc0e917f7f | [
"CC-BY-4.0"
] | null | null | null | summarize_from_feedback/datasets/tldr.py | badrinath-newzera/openai-summary-inference | 8ad630942ee198b21cd98c9ba980eddc0e917f7f | [
"CC-BY-4.0"
] | null | null | null | summarize_from_feedback/datasets/tldr.py | badrinath-newzera/openai-summary-inference | 8ad630942ee198b21cd98c9ba980eddc0e917f7f | [
"CC-BY-4.0"
] | null | null | null | import json
from summarize_from_feedback.utils import blobs
# ['id', 'subreddit', 'title', 'post', 'summary']
# t3_1ov8e0 -> id
# and k != "subreddit"
def tldr_filtered_generator(split):
assert split in ["test", "train", "valid"]
f = open('results_new.json', 'r')
datas = json.load(f)
datas = json.l... | 31.447368 | 138 | 0.645188 |
830523cfac5f1cfad3c51c7cc14f73f68ad6e7a6 | 386 | py | Python | misclientes/migrations/0048_auto_20190301_1753.py | mrbrazzi/django-misclientes | 8017cc67e243e4384c3f52ae73d06e16f8fb8d5b | [
"Apache-2.0"
] | null | null | null | misclientes/migrations/0048_auto_20190301_1753.py | mrbrazzi/django-misclientes | 8017cc67e243e4384c3f52ae73d06e16f8fb8d5b | [
"Apache-2.0"
] | null | null | null | misclientes/migrations/0048_auto_20190301_1753.py | mrbrazzi/django-misclientes | 8017cc67e243e4384c3f52ae73d06e16f8fb8d5b | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.6 on 2019-03-01 16:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('misclientes', '0047_auto_20190228_1859'),
]
operations = [
migrations.AlterModelOptions(
name='enterprise',
options={'permis... | 21.444444 | 76 | 0.611399 |
eefd1f2ff608b580f034f9b54b21c0301da64523 | 2,427 | py | Python | doc/conf.py | pietrobarbiero/dbgen | 5af33a815597049407ed9e8707d335b9a4379d64 | [
"Apache-2.0"
] | 1 | 2020-03-05T16:11:39.000Z | 2020-03-05T16:11:39.000Z | doc/conf.py | pietrobarbiero/dbgen | 5af33a815597049407ed9e8707d335b9a4379d64 | [
"Apache-2.0"
] | null | null | null | doc/conf.py | pietrobarbiero/dbgen | 5af33a815597049407ed9e8707d335b9a4379d64 | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.708333 | 79 | 0.668315 |
bd2a1406b3fd7c92c3ec9decf0fa49ffa2351b8d | 69 | py | Python | demo_api/gunicorn.conf.py | benedictleedm/sgnlp | 03f0fda8c517d9ca4baf737ce4c46b2495bbd3ba | [
"MIT"
] | 14 | 2021-08-02T01:52:18.000Z | 2022-01-14T10:16:02.000Z | demo_api/gunicorn.conf.py | benedictleedm/sgnlp | 03f0fda8c517d9ca4baf737ce4c46b2495bbd3ba | [
"MIT"
] | 29 | 2021-08-02T01:53:46.000Z | 2022-03-30T05:40:46.000Z | demo_api/gunicorn.conf.py | benedictleedm/sgnlp | 03f0fda8c517d9ca4baf737ce4c46b2495bbd3ba | [
"MIT"
] | 7 | 2021-08-02T01:54:19.000Z | 2022-01-07T06:37:45.000Z | bind = "0.0.0.0:8000"
wsgi_app = "api:app"
timeout = 180
workers = 1
| 13.8 | 21 | 0.637681 |
35d4df31319ed54a1745ff49fede5aa80ec61d49 | 975 | py | Python | packages/fetchai/skills/fetch_block/__init__.py | bryanchriswhite/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 1 | 2022-01-23T22:28:43.000Z | 2022-01-23T22:28:43.000Z | packages/fetchai/skills/fetch_block/__init__.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | null | null | null | packages/fetchai/skills/fetch_block/__init__.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# 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 ... | 37.5 | 80 | 0.613333 |
e487d51153c3283f7384e57dc38304c295eaf8a7 | 651 | py | Python | tracardi/process_engine/action/v1/connectors/mautic/add_points/model/config.py | bytepl/tracardi | e8fa4684fa6bd3d05165fe48aa925fc6c1e74923 | [
"MIT"
] | null | null | null | tracardi/process_engine/action/v1/connectors/mautic/add_points/model/config.py | bytepl/tracardi | e8fa4684fa6bd3d05165fe48aa925fc6c1e74923 | [
"MIT"
] | null | null | null | tracardi/process_engine/action/v1/connectors/mautic/add_points/model/config.py | bytepl/tracardi | e8fa4684fa6bd3d05165fe48aa925fc6c1e74923 | [
"MIT"
] | null | null | null | from pydantic import BaseModel, validator
from tracardi.domain.named_entity import NamedEntity
class Config(BaseModel):
source: NamedEntity
contact_id: str
points: str
@validator("contact_id")
def validate_contact_id(cls, value):
if value is None or len(value) == 0:
print(valu... | 28.304348 | 69 | 0.648233 |
91d4926a81751f9a3aa0bd5e2259b862da383f2c | 64,132 | py | Python | gym_env/env.py | lujiayou123/poker | da044d4a341933a2e77a316997e67c8404c2b130 | [
"MIT"
] | null | null | null | gym_env/env.py | lujiayou123/poker | da044d4a341933a2e77a316997e67c8404c2b130 | [
"MIT"
] | null | null | null | gym_env/env.py | lujiayou123/poker | da044d4a341933a2e77a316997e67c8404c2b130 | [
"MIT"
] | null | null | null | """Groupier functions"""
import logging
from enum import Enum
import time
import math
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from gym import Env
from gym.spaces import Discrete
from gym_env.rendering import PygletWindow, WHITE, RED, GREEN, BLUE
from tools.hand_evaluator import get_winne... | 46.880117 | 211 | 0.596036 |
3dccc572cf1b75750c4d8e70dd0e506c6937f81e | 28,910 | py | Python | tests/providers/test_person.py | valestel/faker | 48e0b6b8da004c753809fbd4fe8ccfeb4fad757e | [
"MIT"
] | null | null | null | tests/providers/test_person.py | valestel/faker | 48e0b6b8da004c753809fbd4fe8ccfeb4fad757e | [
"MIT"
] | null | null | null | tests/providers/test_person.py | valestel/faker | 48e0b6b8da004c753809fbd4fe8ccfeb4fad757e | [
"MIT"
] | null | null | null | import datetime
import re
import unittest
from unittest import mock
from faker import Faker
from faker.providers.person.ar_AA import Provider as ArProvider
from faker.providers.person.cs_CZ import Provider as CsCZProvider
from faker.providers.person.en import Provider as EnProvider
from faker.providers.person.en_IN i... | 34.873341 | 106 | 0.661882 |
950b1d539c0a52d35d7d715b262f182ea5ac04ca | 528 | py | Python | command.py | epichide/ExonDataSimulation | 813d3103953f93e7ee6b0bbef1749e8f06ac65f4 | [
"MIT"
] | null | null | null | command.py | epichide/ExonDataSimulation | 813d3103953f93e7ee6b0bbef1749e8f06ac65f4 | [
"MIT"
] | null | null | null | command.py | epichide/ExonDataSimulation | 813d3103953f93e7ee6b0bbef1749e8f06ac65f4 | [
"MIT"
] | null | null | null | import os
os.system("python ./simu.py -dep reference.depth 350")
os.system("python ./simu.py -reg")
os.system("python ./simu.py -mut")
os.system("python ./simu.py -read -R 111")
os.system("bwa mem ../fastq/GRCh38_latest_genomic.fna ../fastq/R1_111.fasrq ../fastq/R2_111.fastq > ../fastq/sam/444.sam")
os.system('samtool ... | 52.8 | 122 | 0.691288 |
c01327a21783b27578d7c1b7ec0907cdf60abcc1 | 4,790 | py | Python | test/test_pack.py | pgcudahy/sos | ee902841003c7630db501101038f370650955ef9 | [
"BSD-3-Clause"
] | 90 | 2019-06-25T15:33:22.000Z | 2022-03-31T03:50:58.000Z | test/test_pack.py | pgcudahy/sos | ee902841003c7630db501101038f370650955ef9 | [
"BSD-3-Clause"
] | 223 | 2019-06-24T13:47:38.000Z | 2022-03-29T21:37:10.000Z | test/test_pack.py | pgcudahy/sos | ee902841003c7630db501101038f370650955ef9 | [
"BSD-3-Clause"
] | 26 | 2019-06-27T19:24:23.000Z | 2022-03-24T03:41:37.000Z | #!/usr/bin/env python3
#
# Copyright (c) Bo Peng and the University of Texas MD Anderson Cancer Center
# Distributed under the terms of the 3-clause BSD License.
#
# import os
# import shutil
# import subprocess
# import unittest
#
#
# class TestPack(unittest.TestCase):
# def setUp(self):
# if os.path.isdir... | 36.564885 | 93 | 0.579958 |
1e3692bc86d11ad2df069f8ec5367b76f54a4cd4 | 1,760 | py | Python | server-code/data-logger.py | SuperChamp234/bridge-watcher | a86c2561c35dafa04673223beff5eecd2d60af62 | [
"MIT"
] | null | null | null | server-code/data-logger.py | SuperChamp234/bridge-watcher | a86c2561c35dafa04673223beff5eecd2d60af62 | [
"MIT"
] | null | null | null | server-code/data-logger.py | SuperChamp234/bridge-watcher | a86c2561c35dafa04673223beff5eecd2d60af62 | [
"MIT"
] | null | null | null | import paho.mqtt.client as mqttClient
import time
import json
def write_json(new_data, filename='~/bridge-watcher/my-app/build/data/bridgedata.json'):
with open(filename,'r+') as file:
# First we load existing data into a dict.
file_data = json.load(file)
# Join new_data with file_data i... | 36.666667 | 88 | 0.665341 |
9e5152556b85b4ba6d13e639cc1ffa88c73283ac | 30,673 | py | Python | tools/frontend-aurelia.py | Dev00355/fundamental-tools-copy-from-sap | 1857db103789dde84e9eb40105ecaf029a4cf360 | [
"Apache-2.0"
] | null | null | null | tools/frontend-aurelia.py | Dev00355/fundamental-tools-copy-from-sap | 1857db103789dde84e9eb40105ecaf029a4cf360 | [
"Apache-2.0"
] | null | null | null | tools/frontend-aurelia.py | Dev00355/fundamental-tools-copy-from-sap | 1857db103789dde84e9eb40105ecaf029a4cf360 | [
"Apache-2.0"
] | null | null | null | #!/home/pos/.virtualenvs/picoUI/bin/python
# SPDX-FileCopyrightText: 2014 SAP SE Srdjan Boskovic <srdjan.boskovic@sap.com>
#
# SPDX-License-Identifier: Apache-2.0
# -*- coding: utf-8 -*-
""" Parse 1 RFM metadata into UI7 elements
:param rfm name, Params, Fields
:return: RFM Parameters/Field View and Param... | 37.91471 | 119 | 0.52525 |
147cef560b5373deab3785dcce7db1b8472515a2 | 6,219 | py | Python | hybrid/ubuntu/hyb/bid/type2/len5/hybrid_len5_t2_train.py | 1130310223/Static-Dynamic-Attention | 1da223b06ae41f14575960e247fb13506ed8a124 | [
"MIT"
] | 1 | 2020-04-16T08:42:38.000Z | 2020-04-16T08:42:38.000Z | hybrid/ubuntu/hyb/bid/type2/len5/hybrid_len5_t2_train.py | 1130310223/Static-Dynamic-Attention | 1da223b06ae41f14575960e247fb13506ed8a124 | [
"MIT"
] | null | null | null | hybrid/ubuntu/hyb/bid/type2/len5/hybrid_len5_t2_train.py | 1130310223/Static-Dynamic-Attention | 1da223b06ae41f14575960e247fb13506ed8a124 | [
"MIT"
] | 1 | 2020-04-16T08:41:53.000Z | 2020-04-16T08:41:53.000Z | # -*- coding: utf-8 -*-
import sys
import os
import random
import re
import time
import torch
from torch.autograd import Variable
from torch import optim
import torch.nn as nn
#sys.path.append('../')
from hybrid_t2_model import Seq2Seq
from hybrid_data_utils import *
import psutil
proc = psutil.Process... | 37.920732 | 134 | 0.728413 |
7dc524e525d55fb89153722fb964fbd6893f2498 | 1,569 | py | Python | python/src/base/TextUtil/TextUtil.py | weiwei02/Technical--Documentation | d53d702b17cbeb9e4940764c6e4a4277382ec0cf | [
"Apache-2.0"
] | 2 | 2017-06-25T13:30:40.000Z | 2017-09-18T16:50:40.000Z | python/src/base/TextUtil/TextUtil.py | weiwei02/Technical--Documentation | d53d702b17cbeb9e4940764c6e4a4277382ec0cf | [
"Apache-2.0"
] | null | null | null | python/src/base/TextUtil/TextUtil.py | weiwei02/Technical--Documentation | d53d702b17cbeb9e4940764c6e4a4277382ec0cf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
该模块提供一些简单的字符串操作方法
:author Wang Weiwei <email>weiwei02@vip.qq.com / weiwei.wang@100credit.com</email>
:sine 2017/8/10
:version 1.0
"""
import string
def simplify(text, whitespace=string.whitespace, delete=""):
"""
将字符串中多余的空格给去掉
:param text: 原
字符串
:param ... | 21.202703 | 85 | 0.527087 |
33763811e3e4e8ff1c268b3f8d8d6a7f3ec04c81 | 24,325 | py | Python | nova/api/openstack/compute/volumes.py | cloudbase/nova | ddbbf5782759c5b437c8a7bbb9291d038bcf915b | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/volumes.py | cloudbase/nova | ddbbf5782759c5b437c8a7bbb9291d038bcf915b | [
"Apache-2.0"
] | 1 | 2016-04-04T18:41:59.000Z | 2016-04-04T18:41:59.000Z | nova/api/openstack/compute/volumes.py | cloudbase/nova | ddbbf5782759c5b437c8a7bbb9291d038bcf915b | [
"Apache-2.0"
] | 2 | 2015-12-04T23:51:46.000Z | 2016-06-07T20:01:59.000Z | # Copyright 2011 Justin Santa Barbara
# 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 requ... | 38.007813 | 79 | 0.630216 |
1554895f5b844fc6bab5aec316d6b0654541fc86 | 6,747 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/appengine/admin/tools/conversion/yaml_schema_v1.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/appengine/admin/tools/conversion/yaml_schema_v1.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/appengine/admin/tools/conversion/yaml_schema_v1.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.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... | 48.539568 | 87 | 0.680006 |
83e29d4bef87b47e796227dcefb85fed59ecc32c | 21,009 | py | Python | src/scripts/slurm_status.py | yongleyuan/BLAH | bf1defb3447c8e3535a04feaa1171a4ee9c3592f | [
"Apache-2.0"
] | null | null | null | src/scripts/slurm_status.py | yongleyuan/BLAH | bf1defb3447c8e3535a04feaa1171a4ee9c3592f | [
"Apache-2.0"
] | null | null | null | src/scripts/slurm_status.py | yongleyuan/BLAH | bf1defb3447c8e3535a04feaa1171a4ee9c3592f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# File: slurm_status.py
#
# Author: Brian Bockelman (bbockelm@cse.unl.edu)
# Jaime Frey (jfrey@cs.wisc.edu)
#
# Copyright (c) University of Nebraska-Lincoln. 2012
# University of Wisconsin-Madison. 2016
#
# Licensed under the Apache License, Version 2.0 (the "Licen... | 35.608475 | 236 | 0.597839 |
d4902ccc3cc928e23f292f3d700a7a75cec4673d | 258 | py | Python | isimip_data/core/templatetags/core_tags.py | ISI-MIP/isimip-data | a0e4772362cc60db91e7689ec397840dcaaacddb | [
"MIT"
] | 3 | 2020-02-10T10:13:17.000Z | 2021-12-21T09:10:50.000Z | isimip_data/core/templatetags/core_tags.py | ISI-MIP/isimip-data | a0e4772362cc60db91e7689ec397840dcaaacddb | [
"MIT"
] | 17 | 2020-02-10T16:09:12.000Z | 2021-07-02T09:03:37.000Z | isimip_data/core/templatetags/core_tags.py | ISI-MIP/isimip-data | a0e4772362cc60db91e7689ec397840dcaaacddb | [
"MIT"
] | null | null | null | from django import template
from django.template.defaultfilters import stringfilter
register = template.Library()
@register.filter(is_safe=True)
@stringfilter
def split_br(string):
return [paragraph for paragraph in string.split('<br>') if paragraph]
| 23.454545 | 73 | 0.790698 |
43e93b823f866ba3f9bc569af7cf0fbaf08d0c13 | 70,896 | py | Python | src/sage/rings/polynomial/multi_polynomial_element.py | qedhandle/sage | 8453ffb849b047893b6c61dd09176a84c9133342 | [
"BSL-1.0"
] | null | null | null | src/sage/rings/polynomial/multi_polynomial_element.py | qedhandle/sage | 8453ffb849b047893b6c61dd09176a84c9133342 | [
"BSL-1.0"
] | null | null | null | src/sage/rings/polynomial/multi_polynomial_element.py | qedhandle/sage | 8453ffb849b047893b6c61dd09176a84c9133342 | [
"BSL-1.0"
] | null | null | null | """
Generic Multivariate Polynomials
AUTHORS:
- David Joyner: first version
- William Stein: use dict's instead of lists
- Martin Albrecht malb@informatik.uni-bremen.de: some functions added
- William Stein (2006-02-11): added better __div__ behavior.
- Kiran S. Kedlaya (2006-02-12): added Macaulay2 analogues of ... | 31.551402 | 210 | 0.503329 |
4dff5924aeb4fc0a0db852c13369fb3f7aec59ce | 13,767 | py | Python | oneArch.py | orashi/DeeperDeblur | 3707ae147753bb9c5a8be2215eccee3ea5113cee | [
"MIT"
] | null | null | null | oneArch.py | orashi/DeeperDeblur | 3707ae147753bb9c5a8be2215eccee3ea5113cee | [
"MIT"
] | null | null | null | oneArch.py | orashi/DeeperDeblur | 3707ae147753bb9c5a8be2215eccee3ea5113cee | [
"MIT"
] | null | null | null | import argparse
import os
import random
from math import log10
import numpy as np
import torch.backends.cudnn as cudnn
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler
import torchvision.utils as vutils
from visdom import Visdom
from data.oneData import CreateDataLoader
from models.oneModel... | 41.592145 | 120 | 0.54696 |
611a02228f5b0068bb071834d7d230b587cd4328 | 38,354 | py | Python | src/replay_analyzerServer.py | m-lab/wehe_desktop | d10b17e8d2d5618a1b3b7d41166dac0f186215e5 | [
"Apache-2.0"
] | 6 | 2020-03-07T04:38:26.000Z | 2021-09-17T06:43:06.000Z | src/replay_analyzerServer.py | m-lab/wehe_desktop | d10b17e8d2d5618a1b3b7d41166dac0f186215e5 | [
"Apache-2.0"
] | 2 | 2019-03-20T16:23:03.000Z | 2019-09-20T20:41:11.000Z | src/replay_analyzerServer.py | m-lab/wehe_desktop | d10b17e8d2d5618a1b3b7d41166dac0f186215e5 | [
"Apache-2.0"
] | 3 | 2019-04-27T20:43:05.000Z | 2020-08-07T21:36:22.000Z | '''
#######################################################################################################
#######################################################################################################
Copyright 2018 Northeastern University
Licensed under the Apache License, Version 2.0 (the "License");
you ... | 40.077325 | 172 | 0.611201 |
71cfffc9c5a2db3409d002ebd2f5ecab5b28c167 | 1,489 | py | Python | tests/test_shift_intensityd.py | madil90/MONAI | 2f1c7a5d1b47c8dd21681dbe1b67213aa3278cd7 | [
"Apache-2.0"
] | 1 | 2021-08-20T01:54:26.000Z | 2021-08-20T01:54:26.000Z | tests/test_shift_intensityd.py | madil90/MONAI | 2f1c7a5d1b47c8dd21681dbe1b67213aa3278cd7 | [
"Apache-2.0"
] | null | null | null | tests/test_shift_intensityd.py | madil90/MONAI | 2f1c7a5d1b47c8dd21681dbe1b67213aa3278cd7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in wri... | 36.317073 | 82 | 0.701813 |
fe0d3912343da8cc3e72cad486a38a82ef3060b4 | 3,321 | py | Python | nmma/pbilby/utils.py | DavidIbarr/nmma | 109fdd57add52cfea3553df8346981d6a117a7e7 | [
"MIT"
] | 1 | 2022-02-12T18:06:50.000Z | 2022-02-12T18:06:50.000Z | nmma/pbilby/utils.py | DavidIbarr/nmma | 109fdd57add52cfea3553df8346981d6a117a7e7 | [
"MIT"
] | 10 | 2022-02-08T18:18:22.000Z | 2022-03-10T13:11:03.000Z | nmma/pbilby/utils.py | DavidIbarr/nmma | 109fdd57add52cfea3553df8346981d6a117a7e7 | [
"MIT"
] | 12 | 2022-02-07T21:15:16.000Z | 2022-03-31T18:26:06.000Z | import bilby_pipe
import logging
import os
def turn_off_forbidden_option(input, forbidden_option, prog):
# NOTE Only support boolean option
if getattr(input, forbidden_option, False):
logger = logging.getLogger(prog)
logger.info(f"Turning off {forbidden_option}")
setattr(input, forbidd... | 32.881188 | 84 | 0.627823 |
69071cfdc4a036d6576e8a68c92a7e253dc44965 | 1,942 | py | Python | web/api/netcdf.py | wdias/export-netcdf-binary | 848cc28b617055d3dae2eda96da0abbecc283293 | [
"Apache-2.0"
] | null | null | null | web/api/netcdf.py | wdias/export-netcdf-binary | 848cc28b617055d3dae2eda96da0abbecc283293 | [
"Apache-2.0"
] | null | null | null | web/api/netcdf.py | wdias/export-netcdf-binary | 848cc28b617055d3dae2eda96da0abbecc283293 | [
"Apache-2.0"
] | null | null | null | import logging
from flask import Blueprint, request, Response, stream_with_context
import requests
from datetime import datetime, timedelta
bp = Blueprint('ascii_grid', __name__)
logger = logging.getLogger(__name__)
DATE_TIME_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
ADAPTER_GRID = 'http://adapter-grid.default.svc.cluster.local'... | 47.365854 | 181 | 0.714727 |
75dc6b28dd39fba164cd6fc95ba71ba244b2e4f7 | 2,930 | py | Python | examples/ode/case_4_model.py | KennedyPutraKusumo/py-DED | c5742c29cae66542960060f19d65b446d532b477 | [
"MIT"
] | 2 | 2020-05-19T14:06:41.000Z | 2021-09-09T16:11:53.000Z | examples/ode/case_4_model.py | KennedyPutraKusumo/py-DED | c5742c29cae66542960060f19d65b446d532b477 | [
"MIT"
] | 2 | 2020-04-28T02:36:36.000Z | 2021-08-23T09:36:13.000Z | examples/ode/case_4_model.py | KennedyPutraKusumo/py-DED | c5742c29cae66542960060f19d65b446d532b477 | [
"MIT"
] | 2 | 2020-10-10T18:43:27.000Z | 2020-11-22T19:41:05.000Z | from pyomo import environ as po
from pyomo import dae as pod
from matplotlib import pyplot as plt
import numpy as np
import logging
logging.getLogger("pyomo.core").setLevel(logging.ERROR)
def create_model(spt):
norm_spt = spt / np.max(spt)
m = po.ConcreteModel()
""" Sets """
m.i = po.Set(initialize=... | 23.253968 | 99 | 0.516382 |
f5a9bb5517831a981a3d118ec89e3586ea5938c9 | 20,535 | py | Python | ceres/server/ws_connection.py | yjiangnan/ceres-combineharvester | ed32d5e2564cd0082fa5bf5733e707f06abc2045 | [
"Apache-2.0"
] | null | null | null | ceres/server/ws_connection.py | yjiangnan/ceres-combineharvester | ed32d5e2564cd0082fa5bf5733e707f06abc2045 | [
"Apache-2.0"
] | null | null | null | ceres/server/ws_connection.py | yjiangnan/ceres-combineharvester | ed32d5e2564cd0082fa5bf5733e707f06abc2045 | [
"Apache-2.0"
] | null | null | null | import asyncio
import logging
import time
import traceback
from typing import Any, Callable, Dict, List, Optional
from aiohttp import WSCloseCode, WSMessage, WSMsgType
from ceres.cmds.init_funcs import chia_full_version_str
from ceres.protocols.protocol_message_types import ProtocolMessageTypes
from ceres.protocols.s... | 41.737805 | 132 | 0.606623 |
370f9e65b1ed7d8b9651d10c3bd27966e2683fe5 | 584 | py | Python | src/blog/urls.py | pv45412/Try-Django | f266d05849b1924c2616ba03641626356e0e0c82 | [
"MIT"
] | 1,110 | 2018-07-02T21:28:21.000Z | 2022-03-29T11:28:23.000Z | src/blog/urls.py | pv45412/Try-Django | f266d05849b1924c2616ba03641626356e0e0c82 | [
"MIT"
] | 5 | 2018-11-06T20:54:44.000Z | 2021-08-07T08:37:51.000Z | src/blog/urls.py | pv45412/Try-Django | f266d05849b1924c2616ba03641626356e0e0c82 | [
"MIT"
] | 876 | 2018-07-04T08:50:47.000Z | 2022-03-31T03:50:47.000Z | from django.urls import path
from .views import (
ArticleCreateView,
ArticleDeleteView,
ArticleDetailView,
ArticleListView,
ArticleUpdateView,
)
app_name = 'articles'
urlpatterns = [
path('', ArticleListView.as_view(), name='article-list'),
path('create/', ArticleCreateView.as_view(), ... | 30.736842 | 81 | 0.690068 |
d76cf122ac20c200f1c2dac18f29b19b7ee80a3a | 169 | py | Python | templado/admin.py | nnkps/templado | 660bb430b06d34286ecb9d21ae88279277bf92fc | [
"BSD-2-Clause"
] | null | null | null | templado/admin.py | nnkps/templado | 660bb430b06d34286ecb9d21ae88279277bf92fc | [
"BSD-2-Clause"
] | 3 | 2020-02-11T21:28:48.000Z | 2021-06-10T17:24:02.000Z | templado/admin.py | nnkps/templado | 660bb430b06d34286ecb9d21ae88279277bf92fc | [
"BSD-2-Clause"
] | 2 | 2015-08-14T12:49:31.000Z | 2015-08-19T21:17:56.000Z | from django.contrib import admin
# Register your models here.
from models import ReportTemplate, Report
admin.site.register(ReportTemplate)
admin.site.register(Report) | 24.142857 | 41 | 0.828402 |
9d7a5cb56504fb02890d7a1676e97c4179a0a642 | 445 | py | Python | kratos/apps/log/migrations/0004_log_complete_at.py | cipher-ops/backend-kts | 7ea54d7f56bcb0da54b901ac8f3cfbfbb0b12319 | [
"MIT"
] | 1 | 2020-11-30T09:53:40.000Z | 2020-11-30T09:53:40.000Z | kratos/apps/log/migrations/0004_log_complete_at.py | cipher-ops/backend-kts | 7ea54d7f56bcb0da54b901ac8f3cfbfbb0b12319 | [
"MIT"
] | null | null | null | kratos/apps/log/migrations/0004_log_complete_at.py | cipher-ops/backend-kts | 7ea54d7f56bcb0da54b901ac8f3cfbfbb0b12319 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-10-20 11:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('log', '0003_auto_20201019_1721'),
]
operations = [
migrations.AddField(
model_name='log',
name='complete_at',
... | 22.25 | 77 | 0.6 |
36f17431a8fe25fc78d7e90856dcdd568bb873d2 | 1,374 | py | Python | geonode/geonode/qgis_server/migrations/0005_auto_20170823_0341.py | ttungbmt/BecaGIS_GeoPortal | 6c05f9fc020ec4ccf600ba2503a06c2231443920 | [
"MIT"
] | null | null | null | geonode/geonode/qgis_server/migrations/0005_auto_20170823_0341.py | ttungbmt/BecaGIS_GeoPortal | 6c05f9fc020ec4ccf600ba2503a06c2231443920 | [
"MIT"
] | null | null | null | geonode/geonode/qgis_server/migrations/0005_auto_20170823_0341.py | ttungbmt/BecaGIS_GeoPortal | 6c05f9fc020ec4ccf600ba2503a06c2231443920 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 3 ... | 33.512195 | 98 | 0.618632 |
44c6f7905b30c7a63a5f28c0228ffd80da80085d | 48,729 | py | Python | floorplan_utils.py | marcotinacci/FloorNet | 9765dfb120ff2f586919823a06817e78ef13474b | [
"MIT"
] | 156 | 2018-04-05T11:57:51.000Z | 2022-03-17T11:04:25.000Z | floorplan_utils.py | liu115/FloorNet | f75dc2a933348b12db8f91a9f7e35cfe2dc080f2 | [
"MIT"
] | 23 | 2018-04-07T22:51:01.000Z | 2022-03-25T19:51:06.000Z | floorplan_utils.py | liu115/FloorNet | f75dc2a933348b12db8f91a9f7e35cfe2dc080f2 | [
"MIT"
] | 48 | 2018-04-07T11:37:53.000Z | 2022-01-03T21:36:16.000Z | import numpy as np
from skimage import measure
import cv2
import copy
from utils import *
NUM_WALL_CORNERS = 13
NUM_CORNERS = 21
CORNER_RANGES = {'wall': (0, 13), 'opening': (13, 17), 'icon': (17, 21)}
MAX_NUM_CORNERS = 300
NUM_FINAL_ICONS = 10
NUM_FINAL_ROOMS = 15
NUM_ICONS = 13
NUM_ROOMS = 16
HEIGHT=256
WIDTH=256
N... | 39.974569 | 220 | 0.590429 |
3fc745f5db9e3516f67d93fe77be28482e348d51 | 2,543 | py | Python | app/api/endpoints/transfer.py | justincc/RDSDS-Server | ed59110a9e56d19944c87464f682ce49111ad1e4 | [
"Apache-2.0"
] | null | null | null | app/api/endpoints/transfer.py | justincc/RDSDS-Server | ed59110a9e56d19944c87464f682ce49111ad1e4 | [
"Apache-2.0"
] | 1 | 2020-08-11T10:48:16.000Z | 2020-08-11T10:48:16.000Z | app/api/endpoints/transfer.py | justincc/RDSDS-Server | ed59110a9e56d19944c87464f682ce49111ad1e4 | [
"Apache-2.0"
] | 2 | 2020-10-13T14:22:59.000Z | 2020-11-13T16:50:54.000Z |
from fastapi import APIRouter, Depends
from starlette.requests import Request
from starlette.responses import JSONResponse
from app.models.transfer import TransferBase, TransferType, TransferResponse
from app.business.oauth import auth_request
from app.models.objects import Error
from app.business import transf... | 37.397059 | 140 | 0.685018 |
e39b2046ea911ce697feef72c54f48d8486e5b52 | 7,652 | py | Python | merfishdecoder/apps/run_extract_barcodes.py | r3fang/MERlin | 2ee81a4e18c3fe406d91ee6ce65ca38b69ee9d68 | [
"MIT"
] | null | null | null | merfishdecoder/apps/run_extract_barcodes.py | r3fang/MERlin | 2ee81a4e18c3fe406d91ee6ce65ca38b69ee9d68 | [
"MIT"
] | null | null | null | merfishdecoder/apps/run_extract_barcodes.py | r3fang/MERlin | 2ee81a4e18c3fe406d91ee6ce65ca38b69ee9d68 | [
"MIT"
] | null | null | null | import os
import sys
import pickle
import pandas as pd
import numpy as np
from merfishdecoder.core import zplane
from merfishdecoder.util import utilities
from merfishdecoder.util import barcoder
from merfishdecoder.util import decoder
def run_job_archieve(dataSetName: str = None,
fov: int = None,
... | 30.365079 | 84 | 0.592133 |
b177f522cf0e2dd2aba4d522881c9ed055cc5fa2 | 7,558 | py | Python | mmdet/core/anchor/anchor_target_bi.py | latstars/mmdetectionCV2019 | 79575ad41f79c191be30f1e24feffc39aac3ca1c | [
"Apache-2.0"
] | 3 | 2020-01-25T14:20:24.000Z | 2021-10-17T17:39:53.000Z | mmdet/core/anchor/anchor_target_bi.py | latstars/mmdetectionCV2019 | 79575ad41f79c191be30f1e24feffc39aac3ca1c | [
"Apache-2.0"
] | null | null | null | mmdet/core/anchor/anchor_target_bi.py | latstars/mmdetectionCV2019 | 79575ad41f79c191be30f1e24feffc39aac3ca1c | [
"Apache-2.0"
] | null | null | null | import torch
from ..bbox import PseudoSampler, assign_and_sample, bbox2delta, build_assigner
from ..utils import multi_apply
def anchor_target_bi(anchor_list,
valid_flag_list,
gt_bboxes_list,
gt_bboxes_visible_list,
img_metas,
... | 39.160622 | 89 | 0.616698 |
0b029ecbcb619730ffb0e6631d7b1557d8d9c255 | 19 | py | Python | src/osfa/__init__.py | FreehandBlock51/OSFA | 13b6f8e6a11020e3205e0c89cb6e095edfbe402a | [
"MIT"
] | 1 | 2022-02-02T03:29:44.000Z | 2022-02-02T03:29:44.000Z | src/osfa/__init__.py | FreehandBlock51/OSFA | 13b6f8e6a11020e3205e0c89cb6e095edfbe402a | [
"MIT"
] | 3 | 2022-02-02T00:58:45.000Z | 2022-02-10T20:13:04.000Z | src/osfa/__init__.py | FreehandBlock51/OSFA | 13b6f8e6a11020e3205e0c89cb6e095edfbe402a | [
"MIT"
] | 1 | 2022-02-02T00:55:58.000Z | 2022-02-02T00:55:58.000Z | from .osfa import * | 19 | 19 | 0.736842 |
0b832fc627a13d4c6eaec4e360b433d6ba6a875b | 6,102 | py | Python | clean_data.py | borovik135/VisSatSatelliteStereo | e591e8753c48e231d2c5cce74d37df2252c4ed93 | [
"BSD-3-Clause"
] | 37 | 2019-11-22T14:55:36.000Z | 2022-03-27T07:52:18.000Z | clean_data.py | borovik135/VisSatSatelliteStereo | e591e8753c48e231d2c5cce74d37df2252c4ed93 | [
"BSD-3-Clause"
] | 11 | 2020-02-10T16:23:25.000Z | 2022-03-12T00:47:32.000Z | clean_data.py | borovik135/VisSatSatelliteStereo | e591e8753c48e231d2c5cce74d37df2252c4ed93 | [
"BSD-3-Clause"
] | 14 | 2020-03-19T06:19:06.000Z | 2022-02-16T07:59:38.000Z | # ===============================================================================================================
# Copyright (c) 2019, Cornell University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that
# the following conditions... | 45.2 | 115 | 0.643559 |
016d9976eb320e81ff9aea647dd3fb92ffbe2043 | 1,395 | py | Python | cssTkinter/__init__.py | rug-gui/cssTk | 8159bf0892aa84fc0e42c1a6dec276ec615e63a5 | [
"MIT"
] | 4 | 2021-11-19T15:14:32.000Z | 2022-01-23T17:56:51.000Z | cssTkinter/__init__.py | rug-gui/cssTk | 8159bf0892aa84fc0e42c1a6dec276ec615e63a5 | [
"MIT"
] | 1 | 2021-11-19T15:16:04.000Z | 2021-11-19T15:20:45.000Z | cssTkinter/__init__.py | rug-gui/cssTk | 8159bf0892aa84fc0e42c1a6dec276ec615e63a5 | [
"MIT"
] | null | null | null |
class Element(object):
def __init__(self, canvas, bs_element=None, declarations=None, canvas_ids=[]):
self.canvas=canvas
self.canvas_ids=canvas_ids
self.declarations = declarations
self.bs_element = bs_element
if self.bs_element:
self.bs_element.cssTkin... | 30.326087 | 83 | 0.637993 |
3ef0a208cf92c42e597f91b9053d5f6bfdedb656 | 605 | py | Python | utils/config.py | npurson/pytorch-lightning-template | 6a7972242a8b287f861e6a0139fbf38cc954b061 | [
"MIT"
] | 3 | 2022-03-03T02:27:06.000Z | 2022-03-31T08:14:26.000Z | utils/config.py | npurson/pytorch-lightning-template | 6a7972242a8b287f861e6a0139fbf38cc954b061 | [
"MIT"
] | null | null | null | utils/config.py | npurson/pytorch-lightning-template | 6a7972242a8b287f861e6a0139fbf38cc954b061 | [
"MIT"
] | null | null | null | class ConfigDict(dict):
"""
Access-by-attribute, case-insensitive dictionary
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
for k, v in list(self.items()):
if not k.islower() and k.isupper():
self.pop(k)
self[k.lower... | 31.842105 | 69 | 0.557025 |
60e7ae0e594695adafb9d1a1776143bbf5a31e22 | 6,946 | py | Python | nevergrad/functions/rl/agents.py | kentwar/nevergrad | caf2059df7cc0110f1a476b6f0620fb03afd0093 | [
"MIT"
] | null | null | null | nevergrad/functions/rl/agents.py | kentwar/nevergrad | caf2059df7cc0110f1a476b6f0620fb03afd0093 | [
"MIT"
] | null | null | null | nevergrad/functions/rl/agents.py | kentwar/nevergrad | caf2059df7cc0110f1a476b6f0620fb03afd0093 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import warnings
import operator
import site
import glob
import ctypes
import copy as _copy
from typing import Dict, Any, ... | 37.956284 | 134 | 0.658077 |
cba843daea3f6711edbbce3034e7c53105b7547a | 403 | py | Python | src/idea/migrations/0008_idea_tags.py | micha31r/The-Impossible | 7a79dea3169907eb93107107f4003c5813de58dc | [
"MIT"
] | null | null | null | src/idea/migrations/0008_idea_tags.py | micha31r/The-Impossible | 7a79dea3169907eb93107107f4003c5813de58dc | [
"MIT"
] | 2 | 2020-04-15T03:57:42.000Z | 2020-06-06T01:43:34.000Z | src/the_impossible/live/migrations/idea/migrations/0008_idea_tags.py | micha31r/The-Impossible | 7a79dea3169907eb93107107f4003c5813de58dc | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2020-04-25 00:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('idea', '0007_tag'),
]
operations = [
migrations.AddField(
model_name='idea',
name='tags',
field=models.M... | 21.210526 | 91 | 0.588089 |
6f942623aab87a359f177e7618b058c1922ae87c | 301 | py | Python | contrib/spendfrom/setup.py | fujicoin/fujicoin-bitcore | bd4219c284e716c2326ba450cc3288ca691cd8b3 | [
"MIT"
] | null | null | null | contrib/spendfrom/setup.py | fujicoin/fujicoin-bitcore | bd4219c284e716c2326ba450cc3288ca691cd8b3 | [
"MIT"
] | null | null | null | contrib/spendfrom/setup.py | fujicoin/fujicoin-bitcore | bd4219c284e716c2326ba450cc3288ca691cd8b3 | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(name='btcspendfrom',
version='1.0',
description='Command-line utility for fujicoin "coin control"',
author='Gavin Andresen',
author_email='gavin@fujicoinfoundation.org',
requires=['jsonrpc'],
scripts=['spendfrom.py'],
)
| 30.1 | 69 | 0.66113 |
d50318508f3f855c2f3abc206c7eab2e3355b732 | 1,114 | py | Python | samples/broker_start.py | artemisw/mqtt_broker | be50891e762e874319cca7298e1f563e4336761e | [
"MIT"
] | null | null | null | samples/broker_start.py | artemisw/mqtt_broker | be50891e762e874319cca7298e1f563e4336761e | [
"MIT"
] | null | null | null | samples/broker_start.py | artemisw/mqtt_broker | be50891e762e874319cca7298e1f563e4336761e | [
"MIT"
] | null | null | null | import logging
import asyncio
import os
from hbmqtt.broker import Broker
logger = logging.getLogger(__name__)
config = {
'listeners': {
'default': {
'type': 'tcp',
'bind': '0.0.0.0:1883',
},
'ws-mqtt': {
'bind': '127.0.0.1:8080',
'type': 'ws'... | 24.755556 | 93 | 0.572711 |
724dc466ff4e6d3d86e3997834f25c86ad2a5ce7 | 9,946 | py | Python | train_LAS.py | maxsampson/kpconv-pdal | 1b5ccd5308b4500b73f4d1cc2e877a3587e06181 | [
"MIT"
] | null | null | null | train_LAS.py | maxsampson/kpconv-pdal | 1b5ccd5308b4500b73f4d1cc2e877a3587e06181 | [
"MIT"
] | null | null | null | train_LAS.py | maxsampson/kpconv-pdal | 1b5ccd5308b4500b73f4d1cc2e877a3587e06181 | [
"MIT"
] | null | null | null | #
#
# 0=================================0
# | Kernel Point Convolutions |
# 0=================================0
#
#
# ----------------------------------------------------------------------------------------------------------------------
#
# Callable script to start a training on an LAS dataset... | 31.08125 | 120 | 0.544138 |
532b8ca4ab967b4af24a6b69a35409f008bff4bb | 675 | py | Python | tests/test_decorated_func.py | i-trofimtschuk/flask-hintful | f9c09cf48bf1dc930ba6353d3e9146e5cc073fd7 | [
"MIT"
] | 10 | 2019-08-14T01:18:37.000Z | 2022-03-09T17:02:56.000Z | tests/test_decorated_func.py | i-trofimtschuk/flask-hintful | f9c09cf48bf1dc930ba6353d3e9146e5cc073fd7 | [
"MIT"
] | 2 | 2020-05-25T19:51:43.000Z | 2022-03-10T18:54:20.000Z | tests/test_decorated_func.py | i-trofimtschuk/flask-hintful | f9c09cf48bf1dc930ba6353d3e9146e5cc073fd7 | [
"MIT"
] | 2 | 2022-03-08T19:13:15.000Z | 2022-03-17T20:10:53.000Z | from functools import wraps
def test_decorated_func(api):
'''Should be able to able to follow wrapped funcs
'''
def some_decorator(func):
@wraps(func)
def decorator(*args, **kwargs):
return func(*args, **kwargs)
return decorator
@api.route('/test')
@some_decor... | 27 | 78 | 0.645926 |
29dec298fc564d6d221db84acb2883dcd9a575e1 | 2,025 | py | Python | custom_components/phoniebox/__init__.py | c0un7-z3r0/hass-phoniebox | 7d9c6f05342f4ac49e3fcdb361f39243b260a2ca | [
"MIT"
] | 2 | 2022-01-25T10:25:45.000Z | 2022-01-27T10:41:43.000Z | custom_components/phoniebox/__init__.py | c0un7-z3r0/hass-phoniebox | 7d9c6f05342f4ac49e3fcdb361f39243b260a2ca | [
"MIT"
] | 19 | 2022-01-26T22:34:18.000Z | 2022-03-15T23:58:50.000Z | custom_components/phoniebox/__init__.py | c0un7-z3r0/hass-phoniebox | 7d9c6f05342f4ac49e3fcdb361f39243b260a2ca | [
"MIT"
] | null | null | null | """
Custom integration to integrate Phoniebox with Home Assistant.
For more details about this integration, please refer to
https://github.com/c0un7-z3r0/hass-phoniebox
"""
import asyncio
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import Config, HomeAssistant
from .const import CONF... | 31.153846 | 79 | 0.705679 |
77e9b3908332e8e4d6ba55296bc00138efd25457 | 11,526 | py | Python | packages/main/src/RPA/Netsuite.py | amisol/rpaframework | b1ee8a745a8e4d7bd41fa7765b26ab02b90cfb57 | [
"Apache-2.0"
] | 518 | 2020-05-29T11:39:34.000Z | 2022-03-31T22:04:08.000Z | packages/main/src/RPA/Netsuite.py | aikarjal/rpaframework | cd0599b33b7fcca3d43ea45116a43fc7507b73c9 | [
"Apache-2.0"
] | 316 | 2020-05-29T06:09:28.000Z | 2022-03-31T12:00:33.000Z | packages/main/src/RPA/Netsuite.py | aikarjal/rpaframework | cd0599b33b7fcca3d43ea45116a43fc7507b73c9 | [
"Apache-2.0"
] | 99 | 2020-05-27T20:23:54.000Z | 2022-03-26T02:57:35.000Z | from functools import wraps
import itertools
import logging
from netsuitesdk import NetSuiteConnection
from netsuitesdk.internal.client import NetSuiteClient
from netsuitesdk.internal.utils import PaginatedSearch
from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError
from RPA.core.helpers import required_e... | 33.603499 | 96 | 0.629186 |
6b0a7901310e56500b1ddee61931f394b159c569 | 357 | py | Python | recursion/0070_climbing_stairs.py | MartinMa28/Algorithms_review | 3f2297038c00f5a560941360ca702e6868530f34 | [
"MIT"
] | null | null | null | recursion/0070_climbing_stairs.py | MartinMa28/Algorithms_review | 3f2297038c00f5a560941360ca702e6868530f34 | [
"MIT"
] | null | null | null | recursion/0070_climbing_stairs.py | MartinMa28/Algorithms_review | 3f2297038c00f5a560941360ca702e6868530f34 | [
"MIT"
] | null | null | null | class Solution:
def __init__(self):
self.cache = {}
def climbStairs(self, n: int) -> int:
if n in self.cache:
return self.cache[n]
if n < 2:
self.cache[n] = 1
return 1
self.cache[n] = self.climbStairs(n - 1) + self.climbStair... | 25.5 | 73 | 0.487395 |
e53a843f7f3ccc56f176d830db1a14f5e9928a9f | 992 | py | Python | tests/test_middlewares.py | Reyvel/django-shift-work | 834f198221550c8de5428d46cc2d4560b5925a9b | [
"MIT"
] | null | null | null | tests/test_middlewares.py | Reyvel/django-shift-work | 834f198221550c8de5428d46cc2d4560b5925a9b | [
"MIT"
] | null | null | null | tests/test_middlewares.py | Reyvel/django-shift-work | 834f198221550c8de5428d46cc2d4560b5925a9b | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.conf import settings
from django.utils import timezone
from freezegun import freeze_time
from datetime import datetime
from unittest.mock import MagicMock
import pytz
from django_shift_work import middlewares
class TestDjango_shift_work(TestCase):
def setUp(self):
... | 26.810811 | 91 | 0.640121 |
c0ab0be898622bbe67b0a03fe2ec281f0e450c3c | 11,695 | py | Python | simulator/dpdp_competition/src/utils/checker.py | ZhuYQi/xingtian | 623b15c76aea48b089a451ce4d81980e6c5ac292 | [
"MIT"
] | null | null | null | simulator/dpdp_competition/src/utils/checker.py | ZhuYQi/xingtian | 623b15c76aea48b089a451ce4d81980e6c5ac292 | [
"MIT"
] | null | null | null | simulator/dpdp_competition/src/utils/checker.py | ZhuYQi/xingtian | 623b15c76aea48b089a451ce4d81980e6c5ac292 | [
"MIT"
] | null | null | null | # Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | 44.808429 | 121 | 0.609748 |
c1dd4274eb7321fffd083c2e5b6fb1ce608c5f73 | 639 | py | Python | apps/shortener/migrations/0002_auto_20200824_0612.py | ShAlireza/Yektanet | 9e638395b85346b7536cf422c514ae7762faa9b4 | [
"MIT"
] | null | null | null | apps/shortener/migrations/0002_auto_20200824_0612.py | ShAlireza/Yektanet | 9e638395b85346b7536cf422c514ae7762faa9b4 | [
"MIT"
] | null | null | null | apps/shortener/migrations/0002_auto_20200824_0612.py | ShAlireza/Yektanet | 9e638395b85346b7536cf422c514ae7762faa9b4 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-08-24 06:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shortener', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='shortenedurl',
name='suggested_path',
... | 25.56 | 78 | 0.599374 |
7474b5fa613fb35bf166005d7188f12545be41ba | 1,452 | py | Python | config/settings/local.py | anhlt59/django_refactor | 1b1d86af9f732a000e30feb7644f6ca60b6e516a | [
"MIT"
] | null | null | null | config/settings/local.py | anhlt59/django_refactor | 1b1d86af9f732a000e30feb7644f6ca60b6e516a | [
"MIT"
] | null | null | null | config/settings/local.py | anhlt59/django_refactor | 1b1d86af9f732a000e30feb7644f6ca60b6e516a | [
"MIT"
] | null | null | null | from .base import * # noqa
# GENERAL
# ------------------------------------------------------------------------------
DEBUG = True
ALLOWED_HOSTS = ["*"]
# django-debug-toolbar
# ------------------------------------------------------------------------------
INSTALLED_APPS += [
"debug_toolbar",
"widget_tweaks"... | 25.034483 | 80 | 0.559917 |
a072b8b0f0197bf1d8626194fbb3c0287394562f | 6,268 | py | Python | tests/unit/test_signals.py | ksamuel/postscriptum | d6eecb944069e26a5e5c98703267d579ee077716 | [
"MIT"
] | null | null | null | tests/unit/test_signals.py | ksamuel/postscriptum | d6eecb944069e26a5e5c98703267d579ee077716 | [
"MIT"
] | null | null | null | tests/unit/test_signals.py | ksamuel/postscriptum | d6eecb944069e26a5e5c98703267d579ee077716 | [
"MIT"
] | null | null | null | import signal
from unittest.mock import Mock
from signal import Signals
import pytest
from postscriptum.utils import IS_UNIX, IS_WINDOWS
from postscriptum.signals import (
signals_from_names,
SIGNAL_HANDLERS_HISTORY,
register_signals_handler,
restore_previous_signals_handlers,
)
@pytest.mark.skipi... | 36.022989 | 115 | 0.739151 |
e8163cfdf2d7fa0a32158347c9c5f81ab0a3df6a | 1,759 | py | Python | tests/conftest.py | SolomidHero/speech-regeneration-enhancer | eb43907ff085d68a707ff7bc3af14e93ff66fd65 | [
"MIT"
] | 8 | 2021-03-27T00:17:17.000Z | 2022-01-26T05:26:19.000Z | tests/conftest.py | SolomidHero/speech-regeneration-enhancer | eb43907ff085d68a707ff7bc3af14e93ff66fd65 | [
"MIT"
] | 1 | 2021-09-26T02:29:21.000Z | 2021-09-27T08:56:13.000Z | tests/conftest.py | SolomidHero/speech-regeneration-enhancer | eb43907ff085d68a707ff7bc3af14e93ff66fd65 | [
"MIT"
] | 1 | 2021-03-26T12:30:14.000Z | 2021-03-26T12:30:14.000Z | # here we make fixtures of toy data
# real parameters are stored and accessed from config
import pytest
import librosa
import os
import numpy as np
from hydra.experimental import compose, initialize
@pytest.fixture(scope="session")
def cfg():
with initialize(config_path="../", job_name="test_app"):
config = ... | 25.867647 | 77 | 0.74133 |
349f43eb239b577b74f308fb70ae2335a55a5370 | 944 | py | Python | app.py | camiloibanez/web-scraping-challenge | 60d18027dc967e856b5d95c9d547367eb764b081 | [
"ADSL"
] | 1 | 2020-08-18T12:03:07.000Z | 2020-08-18T12:03:07.000Z | app.py | camiloibanez/web-scraping-challenge | 60d18027dc967e856b5d95c9d547367eb764b081 | [
"ADSL"
] | null | null | null | app.py | camiloibanez/web-scraping-challenge | 60d18027dc967e856b5d95c9d547367eb764b081 | [
"ADSL"
] | null | null | null | from flask import Flask, render_template, redirect
import pymongo
app = Flask(__name__)
conn = "mongodb+srv://Client1:QEPI88Emag3yxyvU@mars-scraped-info.0hpmq.mongodb.net/mars_db?retryWrites=true&w=majority"
client = pymongo.MongoClient(conn)
db = client.mars_db
@app.route("/")
def index():
results = db.scrape... | 24.205128 | 119 | 0.705508 |
f102a02898ade01f081994385e8cb1cefbac37bc | 3,619 | py | Python | app/controllers/accounts.py | Studio-Link-old/webapp | 78a7f75c7a7837efa737f5a6f9a9b70e28d98664 | [
"BSD-2-Clause"
] | 6 | 2015-01-08T00:50:08.000Z | 2017-08-03T12:57:14.000Z | app/controllers/accounts.py | Studio-Link-old/webapp | 78a7f75c7a7837efa737f5a6f9a9b70e28d98664 | [
"BSD-2-Clause"
] | 7 | 2015-01-05T21:26:07.000Z | 2016-01-18T07:21:01.000Z | app/controllers/accounts.py | Studio-Link-old/webapp | 78a7f75c7a7837efa737f5a6f9a9b70e28d98664 | [
"BSD-2-Clause"
] | 2 | 2015-01-24T11:01:42.000Z | 2015-01-28T15:50:13.000Z | # -*- encoding: utf-8; py-indent-offset: 4 -*-
# +--------------------------------------------------------------------------+
# | _____ __ ___ __ _ __ |
# | / ___// /___ ______/ (_)___ / / (_)___ / /__ |
# | \__ \/ __/ / / / __ / / __ \ ... | 36.555556 | 108 | 0.53081 |
07aef6e6612b0a0e793593f19c001fd4d524a632 | 6,634 | py | Python | bin/batch_conversion.py | mondalspandan/DeepJetCore | 1fbbf488eee695f28538c65365693829a4b1400b | [
"Apache-2.0"
] | null | null | null | bin/batch_conversion.py | mondalspandan/DeepJetCore | 1fbbf488eee695f28538c65365693829a4b1400b | [
"Apache-2.0"
] | null | null | null | bin/batch_conversion.py | mondalspandan/DeepJetCore | 1fbbf488eee695f28538c65365693829a4b1400b | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
from argparse import ArgumentParser
from pdb import set_trace
import subprocess
import os
parser = ArgumentParser('program to convert root tuples to traindata format')
parser.add_argument("infile", help="set input sample description (output from the check.py script)", metavar="FILE")
parser.add_argu... | 33.505051 | 133 | 0.708924 |
1cb12c087b525be3556bbfb04cd751afb499dfac | 756 | py | Python | tests/test_config.py | Stoom/client-python | bf8e2db7b54c6657717b963333e1ca8e8acce3f1 | [
"MIT"
] | null | null | null | tests/test_config.py | Stoom/client-python | bf8e2db7b54c6657717b963333e1ca8e8acce3f1 | [
"MIT"
] | 3 | 2021-04-05T02:27:32.000Z | 2021-04-05T03:43:34.000Z | tests/test_config.py | Stoom/client-python | bf8e2db7b54c6657717b963333e1ca8e8acce3f1 | [
"MIT"
] | null | null | null | # pylint:disable=missing-function-docstring
import pytest
from incognitus_client import IncognitusConfig
def test_config__sets_tenant_id():
config = IncognitusConfig("abc", "def")
assert config.tenant_id == "abc"
def test_config__sets_application_id():
config = IncognitusConfig("abc", "def")
asse... | 23.625 | 56 | 0.731481 |
32119ee56d947cbee394346bf3e52d6d3fb85422 | 1,780 | py | Python | nicos_mlz/kws3/setups/ls340.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_mlz/kws3/setups/ls340.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2021-08-18T10:55:42.000Z | 2021-08-18T10:55:42.000Z | nicos_mlz/kws3/setups/ls340.py | ISISComputingGroup/nicos | 94cb4d172815919481f8c6ee686f21ebb76f2068 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
description = "Setup for the LakeShore 340 temperature controller"
group = "optional"
includes = ["alias_T"]
tango_base = "tango://phys.kws3.frm2:10000/kws3"
tango_ls340 = tango_base + "/ls340"
devices = dict(
T_ls340 = device("nicos.devices.tango.TemperatureController",
descript... | 27.384615 | 67 | 0.556742 |
9eb21104afcd04d6c9c512722905ae606fd60b0c | 1,609 | py | Python | display/ATOLED1_XPRO-128x32/module.py | rbryson74/gfx | 656a3b443187c91e19cb78551a74a29ab0691de4 | [
"0BSD"
] | null | null | null | display/ATOLED1_XPRO-128x32/module.py | rbryson74/gfx | 656a3b443187c91e19cb78551a74a29ab0691de4 | [
"0BSD"
] | null | null | null | display/ATOLED1_XPRO-128x32/module.py | rbryson74/gfx | 656a3b443187c91e19cb78551a74a29ab0691de4 | [
"0BSD"
] | null | null | null | # coding: utf-8
##############################################################################
# Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
#
# Subject to your compliance with these terms, you may use Microchip software
# and any derivatives exclusively with Microchip products. It is your
# resp... | 57.464286 | 131 | 0.709758 |
e0be7b9b8eaacfeccb4957aae305855b472b15e2 | 3,001 | py | Python | vega/core/evaluator/evaluator.py | qixiuai/vega | 3e6588ea4aedb03e3594a549a97ffdb86adb88d1 | [
"MIT"
] | null | null | null | vega/core/evaluator/evaluator.py | qixiuai/vega | 3e6588ea4aedb03e3594a549a97ffdb86adb88d1 | [
"MIT"
] | null | null | null | vega/core/evaluator/evaluator.py | qixiuai/vega | 3e6588ea4aedb03e3594a549a97ffdb86adb88d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the... | 37.049383 | 72 | 0.679773 |
9d7d9a5f6c899a713f7cb84302381f17c226c78a | 25,567 | py | Python | src/ion/util/preload.py | scionrep/scioncc_new | 086be085b69711ee24c4c86ed42f2109ca0db027 | [
"BSD-2-Clause"
] | 2 | 2015-10-05T20:36:35.000Z | 2018-11-21T11:45:24.000Z | src/ion/util/preload.py | scionrep/scioncc_new | 086be085b69711ee24c4c86ed42f2109ca0db027 | [
"BSD-2-Clause"
] | 21 | 2015-03-18T14:39:32.000Z | 2016-07-01T17:16:29.000Z | src/ion/util/preload.py | scionrep/scioncc_new | 086be085b69711ee24c4c86ed42f2109ca0db027 | [
"BSD-2-Clause"
] | 12 | 2015-03-18T10:53:49.000Z | 2018-06-21T11:19:57.000Z | #!/usr/bin/env python
"""Utility to bulk load resources into the system, e.g. for initial preload"""
__author__ = 'Michael Meisinger'
import json
import yaml
import re
import os
from pyon.core import MSG_HEADER_ACTOR, MSG_HEADER_ROLES, MSG_HEADER_VALID
from pyon.core.bootstrap import get_service_registry
from pyon.... | 45.33156 | 135 | 0.606993 |
36f8af0e316e9fcd58ebd2fae1981fb5bcd562ac | 5,422 | py | Python | tests/test_builder.py | wilhelmer/lunr.py | f455dfd84616d49c6d47ec3d4f5d3441228faba9 | [
"MIT"
] | null | null | null | tests/test_builder.py | wilhelmer/lunr.py | f455dfd84616d49c6d47ec3d4f5d3441228faba9 | [
"MIT"
] | null | null | null | tests/test_builder.py | wilhelmer/lunr.py | f455dfd84616d49c6d47ec3d4f5d3441228faba9 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from builtins import str
import pytest
from lunr.builder import Builder
from lunr.token_set import TokenSet
from lunr.index import Index
from lunr.vector import Vector
def _assert_deep_keys(dict_, keys):
d = dict_
for key in keys.split("."):
d_keys_as_str = [... | 29.791209 | 83 | 0.634821 |
608b2ab05c753bd6a568f1f76678fb6e7af44286 | 8,908 | py | Python | .history/pages/intro_20220303161551.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/pages/intro_20220303161551.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/pages/intro_20220303161551.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | """
Off Multipage Cheatsheet
https://github.com/daniellewisDL/streamlit-cheat-sheet
@daniellewisDL : https://github.com/daniellewisDL
"""
import streamlit as st
from pathlib import Path
import base64
from modules.toc import *
# Initial page config
st.set_page_config(
page_title='Code Compendium Intro Page',
... | 27.24159 | 206 | 0.653907 |
0cd549d67b1e0191ee9b21133b4a2a23e265d5c3 | 1,072 | py | Python | Guessing_Game.py | 224alpha/Python | e413cc5a53751191df2ce146f061a6460f6661e0 | [
"MIT"
] | null | null | null | Guessing_Game.py | 224alpha/Python | e413cc5a53751191df2ce146f061a6460f6661e0 | [
"MIT"
] | null | null | null | Guessing_Game.py | 224alpha/Python | e413cc5a53751191df2ce146f061a6460f6661e0 | [
"MIT"
] | null | null | null | import random
a = comGuess = random.randint(0, 100) # a and comGuess is initialised with a random number between 0 and 100
while True: # loop will run until encountered with the break statement(user enters the right answer)
userGuess = int(input("Enter your guessed no. b/w 0-100:")) # user input for guess... | 53.6 | 212 | 0.688433 |
a387680839dfcd1d35c2aa419260ca85929f7d39 | 2,590 | py | Python | hw/ip/otbn/dv/otbnsim/sim/decode.py | y-srini/opentitan | b46a08d07671c9d6c020e54fb44424f1611c43a0 | [
"Apache-2.0"
] | null | null | null | hw/ip/otbn/dv/otbnsim/sim/decode.py | y-srini/opentitan | b46a08d07671c9d6c020e54fb44424f1611c43a0 | [
"Apache-2.0"
] | null | null | null | hw/ip/otbn/dv/otbnsim/sim/decode.py | y-srini/opentitan | b46a08d07671c9d6c020e54fb44424f1611c43a0 | [
"Apache-2.0"
] | 1 | 2022-01-27T08:49:59.000Z | 2022-01-27T08:49:59.000Z | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
'''Code to load instruction words into a simulator'''
import struct
from typing import List, Optional, Iterator
from .constants import ErrBits
from .isa import INSNS_FILE... | 35 | 78 | 0.702703 |
d7c051818740014092db03de2bcd9da455fe5973 | 56,729 | py | Python | nova/api/openstack/compute/plugins/v3/servers.py | bdelliott/nova | 3912d7aae21dfff5a42dd71bd45ef5c5f3b1a82b | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/plugins/v3/servers.py | bdelliott/nova | 3912d7aae21dfff5a42dd71bd45ef5c5f3b1a82b | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/plugins/v3/servers.py | bdelliott/nova | 3912d7aae21dfff5a42dd71bd45ef5c5f3b1a82b | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 OpenStack Foundation
# Copyright 2011 Piston Cloud Computing, 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.apach... | 41.7125 | 79 | 0.606921 |
f3e4186e4ce0f54a933c82a0961ce39e8d414054 | 1,940 | py | Python | tools/dealData.py | adnappp/trackerByDetection | e05297c8f50298ed375492178101927ef6d816d7 | [
"MIT"
] | null | null | null | tools/dealData.py | adnappp/trackerByDetection | e05297c8f50298ed375492178101927ef6d816d7 | [
"MIT"
] | 1 | 2018-12-27T03:44:55.000Z | 2019-01-08T02:58:52.000Z | tools/dealData.py | adnappp/trackerByDetection | e05297c8f50298ed375492178101927ef6d816d7 | [
"MIT"
] | 1 | 2019-09-19T06:10:02.000Z | 2019-09-19T06:10:02.000Z | import os
import random
'''这个文件的功能主要是在已有数据集选取训练集,验证集,测试集,这几个txt文件里面存放的是xml和image文件的名称,如00001'''
trainval_percent = 0.66
train_percent = 0.5
xmlfilepath = '/home/chenxingli/dengtaAI/my-tf-faster-rcnn/data/VOCdevkit2007/VOC2007/Annotations'
#这个地方imagpath也没用到,只需要xml或者image中一个就可以,可以去掉
imagefilepath = '/home/chenxingli/den... | 42.173913 | 123 | 0.743299 |
872271437a8e958bdf3fb85aa67438fe8d412690 | 140 | py | Python | crud/apps.py | OuroborosD/03-PiggoV2 | 0fdabfeca3a29cf0cfb87f120506ad517ee75ce6 | [
"MIT"
] | null | null | null | crud/apps.py | OuroborosD/03-PiggoV2 | 0fdabfeca3a29cf0cfb87f120506ad517ee75ce6 | [
"MIT"
] | 18 | 2021-07-01T08:35:13.000Z | 2021-07-25T08:18:09.000Z | crud/apps.py | OuroborosD/03-PiggoV2 | 0fdabfeca3a29cf0cfb87f120506ad517ee75ce6 | [
"MIT"
] | 1 | 2021-07-13T05:12:14.000Z | 2021-07-13T05:12:14.000Z | from django.apps import AppConfig
class CrudConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'crud'
| 20 | 56 | 0.75 |
f4d11b25edc600cf5f80b9b468ac4f591e23463b | 2,490 | py | Python | src/data_standardization/tests/test_standardization_util.py | nsteins/crash-model | 521a63e48a561298e694432d74caa3c385f913b6 | [
"MIT"
] | 54 | 2018-06-21T18:48:34.000Z | 2020-04-15T23:07:20.000Z | src/data_standardization/tests/test_standardization_util.py | nsteins/crash-model | 521a63e48a561298e694432d74caa3c385f913b6 | [
"MIT"
] | 172 | 2018-06-14T17:33:41.000Z | 2020-06-15T16:45:15.000Z | src/data_standardization/tests/test_standardization_util.py | nsteins/crash-model | 521a63e48a561298e694432d74caa3c385f913b6 | [
"MIT"
] | 25 | 2017-02-13T21:45:07.000Z | 2018-06-13T19:41:38.000Z | from .. import standardization_util
import json
import os
import pytz
TEST_FP = os.path.dirname(os.path.abspath(__file__))
def test_parse_date():
timezone = pytz.timezone('America/New_York')
assert standardization_util.parse_date(
'01/08/2009 08:53:00 PM', timezone) == '2009-01-08T20:53:00-05:00'
... | 27.362637 | 76 | 0.618876 |
eebc5a5c9aed284c2058c643d59182a108bcaffc | 4,467 | py | Python | napatrackmater/napari_animation/_qt/animation_widget.py | kapoorlabs/NapaTrackMater | ff1c5203ac589dff415edc0eb4388c40b3610b61 | [
"BSD-3-Clause"
] | null | null | null | napatrackmater/napari_animation/_qt/animation_widget.py | kapoorlabs/NapaTrackMater | ff1c5203ac589dff415edc0eb4388c40b3610b61 | [
"BSD-3-Clause"
] | null | null | null | napatrackmater/napari_animation/_qt/animation_widget.py | kapoorlabs/NapaTrackMater | ff1c5203ac589dff415edc0eb4388c40b3610b61 | [
"BSD-3-Clause"
] | null | null | null | from qtpy.QtWidgets import QWidget, QLabel, QVBoxLayout, QLineEdit, QPushButton
from ..animation import Animation
from ..easing import Easing
from .frame_widget import FrameWidget
class AnimationWidget(QWidget):
"""Widget for interatviely making animations using the napari viewer.
Parameters
----------
... | 35.452381 | 126 | 0.67786 |
372cfe1e798bc9902725696c98e6b1c98d500260 | 80 | py | Python | location_field/__init__.py | Gerleff/django-location-field | 092e7e352146f54f602b50b53ae0cd3f82860db3 | [
"MIT"
] | 443 | 2015-01-12T12:33:30.000Z | 2022-03-31T07:23:23.000Z | location_field/__init__.py | Gerleff/django-location-field | 092e7e352146f54f602b50b53ae0cd3f82860db3 | [
"MIT"
] | 104 | 2015-03-24T09:38:32.000Z | 2022-03-22T20:20:49.000Z | location_field/__init__.py | Gerleff/django-location-field | 092e7e352146f54f602b50b53ae0cd3f82860db3 | [
"MIT"
] | 122 | 2015-02-22T20:17:00.000Z | 2022-03-23T10:22:45.000Z | __version__ = '2.1.0'
default_app_config = 'location_field.apps.DefaultConfig'
| 20 | 56 | 0.7875 |
187dfd78347d1a89cf64c3aa57db110366569837 | 2,459 | py | Python | flask-backend/misc/cards-update/generate_precons.py | rafauke/vdb | bdbdaa1f762dd741f7462a959bf618306699c33b | [
"MIT"
] | null | null | null | flask-backend/misc/cards-update/generate_precons.py | rafauke/vdb | bdbdaa1f762dd741f7462a959bf618306699c33b | [
"MIT"
] | null | null | null | flask-backend/misc/cards-update/generate_precons.py | rafauke/vdb | bdbdaa1f762dd741f7462a959bf618306699c33b | [
"MIT"
] | null | null | null | import json
import re
bundles = {
"V5": {
"PM": {},
"PN": {},
"PTo": {},
"PTr": {},
"PV": {},
},
"SP": {
"LB": {},
"PwN": {},
"DoF": {},
"PoS": {},
},
"HttBR": {
"A": {},
"B": {},
},
"KoTR": {
"A... | 18.628788 | 138 | 0.286295 |
f4ff95010fc0e089bb479262a5173199f1835ed6 | 4,169 | py | Python | sonic/venv2/Lib/site-packages/pip/_internal/network/utils.py | yoyomonem/sonic-pygame | 5449ff862f03265473b7647583ccc48d9103a284 | [
"MIT"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | sonic/venv2/Lib/site-packages/pip/_internal/network/utils.py | yoyomonem/sonic-pygame | 5449ff862f03265473b7647583ccc48d9103a284 | [
"MIT"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | sonic/venv2/Lib/site-packages/pip/_internal/network/utils.py | yoyomonem/sonic-pygame | 5449ff862f03265473b7647583ccc48d9103a284 | [
"MIT"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response
from pip._internal.exceptions import NetworkConnectionError
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
if MYPY_CHECK_RUNNING:
from typing import Dict, Iterator
# The following comments and HTTP headers were originally added by
# ... | 42.540816 | 71 | 0.66131 |
0edbb03569cb5450efa52e225bd7629acb947758 | 875 | py | Python | frameworks/helloworld/tests/test_web_url.py | krisis/dcos-commons | 715d27f3e43a5e25b8ecb4beed97333b136fdd9a | [
"Apache-2.0"
] | 1 | 2021-01-06T21:14:00.000Z | 2021-01-06T21:14:00.000Z | frameworks/helloworld/tests/test_web_url.py | krisis/dcos-commons | 715d27f3e43a5e25b8ecb4beed97333b136fdd9a | [
"Apache-2.0"
] | null | null | null | frameworks/helloworld/tests/test_web_url.py | krisis/dcos-commons | 715d27f3e43a5e25b8ecb4beed97333b136fdd9a | [
"Apache-2.0"
] | null | null | null | import pytest
import sdk_install as install
import sdk_plan as plan
import sdk_utils
from tests.config import (
PACKAGE_NAME
)
def setup_module(module):
install.uninstall(PACKAGE_NAME)
options = {
"service": {
"spec_file": "examples/web-url.yml"
}
}
# this config pro... | 23.026316 | 67 | 0.697143 |
e10122890681340aa2f7c3ff925d1133a8e22023 | 540 | py | Python | 04 Row iteration vs column iteration demo.py | jpmaldonado/python4finance | d21f772e79f9b1b10ecc71c69d088c69c3bea1fc | [
"MIT"
] | null | null | null | 04 Row iteration vs column iteration demo.py | jpmaldonado/python4finance | d21f772e79f9b1b10ecc71c69d088c69c3bea1fc | [
"MIT"
] | null | null | null | 04 Row iteration vs column iteration demo.py | jpmaldonado/python4finance | d21f772e79f9b1b10ecc71c69d088c69c3bea1fc | [
"MIT"
] | null | null | null | from timeit import timeit
setup = """
import numpy as np
a = np.arange(100000000).reshape(10000, 10000)
def contiguous_sum(x):
for i in range(x.shape[0]):
x[i].sum()
def non_contiguous_sum(x):
for i in range(x.shape[-1]):
x[:, i].sum()
"""
n=100
time_contiguous = timeit('contiguous_sum(a)', setup=setup, number... | 28.421053 | 80 | 0.707407 |
b68b3e48dfc886d0a87e5df68b1c04d5a707ad2e | 553 | py | Python | words.py | Sandeep6262/Hangman | 0a7cc2d1f4a9bf4ff01039fb178f215135e5c070 | [
"Apache-2.0"
] | null | null | null | words.py | Sandeep6262/Hangman | 0a7cc2d1f4a9bf4ff01039fb178f215135e5c070 | [
"Apache-2.0"
] | null | null | null | words.py | Sandeep6262/Hangman | 0a7cc2d1f4a9bf4ff01039fb178f215135e5c070 | [
"Apache-2.0"
] | null | null | null | import string
import random
def load_words():
"""
Ye function kaafi jayada words ko load karne mai help karega
"""
WORDLIST_FILENAME = "words.txt"
inFile = open(WORDLIST_FILENAME,'r')
line = inFile.readline()
word_list = string.split(line)
return word_list
def choose_word():
"""
... | 23.041667 | 64 | 0.674503 |
e4e008f705f98888e5802250f36f268eb2509ecd | 436 | py | Python | lazy.py | rrmhearts/python-playground | 0dd938280bbfa3a21a876d34c66112593809af3d | [
"MIT"
] | null | null | null | lazy.py | rrmhearts/python-playground | 0dd938280bbfa3a21a876d34c66112593809af3d | [
"MIT"
] | null | null | null | lazy.py | rrmhearts/python-playground | 0dd938280bbfa3a21a876d34c66112593809af3d | [
"MIT"
] | null | null | null | def Naturals(n):
yield n
yield from Naturals(n+1)
s = Naturals(1)
print("Natural #s", next(s), next(s), next(s), next(s))
def sieve(s):
n = next(s)
yield n
yield from sieve(i for i in s if i%n != 0)
p = sieve(Naturals(2))
print("Prime #s", next(p), next(p), next(p), \
next(p), next(p), next(p)... | 18.956522 | 55 | 0.573394 |
05b1cda5a72ba39ab16147f144157d3bc1f68537 | 8,161 | py | Python | pysmartt/smartt_client.py | s10i/smartt_client_python | 16dc8b0ba77b760e21262c6ff410e4f91b6af25c | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2016-12-05T01:30:02.000Z | 2016-12-05T01:30:02.000Z | pysmartt/smartt_client.py | s10i/smartt_client_python | 16dc8b0ba77b760e21262c6ff410e4f91b6af25c | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pysmartt/smartt_client.py | s10i/smartt_client_python | 16dc8b0ba77b760e21262c6ff410e4f91b6af25c | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-05-29T01:02:03.000Z | 2019-05-29T01:02:03.000Z |
# Standard library imports
import socket
import ssl
import select
# Local imports
from smartt_simple_protocol import SmarttSimpleProtocol
from smartt_client_functions import setupSmarttFunctions
class SmarttClientException(BaseException):
pass
###################################################################... | 35.482609 | 90 | 0.539762 |
c0180712169827517723e6047746595f1fe08c8f | 56,172 | py | Python | lib/anitraintools.py | vwcruzeiro/ANI-Tools | bc44c65589148b6e6dd8065d63e73ead00d8ac9d | [
"MIT"
] | null | null | null | lib/anitraintools.py | vwcruzeiro/ANI-Tools | bc44c65589148b6e6dd8065d63e73ead00d8ac9d | [
"MIT"
] | null | null | null | lib/anitraintools.py | vwcruzeiro/ANI-Tools | bc44c65589148b6e6dd8065d63e73ead00d8ac9d | [
"MIT"
] | null | null | null | import hdnntools as hdt
import pyanitools as pyt
import pyNeuroChem as pync
from pyNeuroChem import cachegenerator as cg
import numpy as np
from scipy.integrate import quad
import pandas as pd
from time import sleep
import subprocess
import random
import re
import os
from multiprocessing import Process
import shut... | 41.825763 | 288 | 0.470875 |
247970d5deb8e0d2edd1cdde14bc56163e22c0b6 | 3,918 | py | Python | probe/modules/metadata/yara/plugin.py | quarkslab/irma | 29d8baa4e27bacaf7aa9dd570c16e5268ae6237c | [
"Apache-2.0"
] | 248 | 2015-01-08T09:36:44.000Z | 2022-01-12T10:29:21.000Z | probe/modules/metadata/yara/plugin.py | quarkslab/irma | 29d8baa4e27bacaf7aa9dd570c16e5268ae6237c | [
"Apache-2.0"
] | 50 | 2015-01-09T08:31:57.000Z | 2022-03-30T10:41:13.000Z | probe/modules/metadata/yara/plugin.py | quarkslab/irma | 29d8baa4e27bacaf7aa9dd570c16e5268ae6237c | [
"Apache-2.0"
] | 74 | 2015-01-05T09:11:21.000Z | 2022-03-29T02:16:54.000Z | #
# Copyright (c) 2013-2018 Quarkslab.
# This file is part of IRMA project.
#
# 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 in the top-level directory
# of this distribution and at:
#
# http:... | 33.487179 | 75 | 0.595712 |
5c529be7de1e08e946abd08ba3b7a5b69b284f14 | 76 | py | Python | flux/__init__.py | j-fdion/cyme | ee9d1c106bc27e4514d661285e2515f19c3db6e9 | [
"MIT"
] | null | null | null | flux/__init__.py | j-fdion/cyme | ee9d1c106bc27e4514d661285e2515f19c3db6e9 | [
"MIT"
] | null | null | null | flux/__init__.py | j-fdion/cyme | ee9d1c106bc27e4514d661285e2515f19c3db6e9 | [
"MIT"
] | null | null | null | """ Outils lies au flux de materiel. """
from . import machine, bt_machine
| 19 | 40 | 0.697368 |
0160bc3fe6da8685fd8bbf8d88c3da9f60954c6b | 6,361 | py | Python | lib/models/multiple_correct_mcq_multee_esim.py | StonyBrookNLP/multee | ab78ca6708bee810c584e83e5ec61ab324bf9802 | [
"Apache-2.0"
] | 27 | 2019-04-24T00:31:18.000Z | 2021-07-08T07:54:47.000Z | lib/models/multiple_correct_mcq_multee_esim.py | StonyBrookNLP/multee | ab78ca6708bee810c584e83e5ec61ab324bf9802 | [
"Apache-2.0"
] | 1 | 2019-05-10T15:15:05.000Z | 2019-06-07T00:42:03.000Z | lib/models/multiple_correct_mcq_multee_esim.py | StonyBrookNLP/multee | ab78ca6708bee810c584e83e5ec61ab324bf9802 | [
"Apache-2.0"
] | 5 | 2019-04-24T05:55:32.000Z | 2021-06-16T13:28:51.000Z | from typing import Dict, Optional, List
import copy
import re
from overrides import overrides
import torch
from allennlp.common import Params
from allennlp.data import Vocabulary
from allennlp.models.model import Model
from allennlp.modules import FeedForward
from allennlp.modules import Seq2SeqEncoder, SimilarityFun... | 49.310078 | 109 | 0.656972 |
36409369acd3a63587e34036e6239a81008ce0f9 | 6,077 | py | Python | src/m8_still_more_mutation.py | callahrs/SequencesAndMutation | 88bbb3fc44984f5a029f75f4d7080fd274662200 | [
"MIT"
] | null | null | null | src/m8_still_more_mutation.py | callahrs/SequencesAndMutation | 88bbb3fc44984f5a029f75f4d7080fd274662200 | [
"MIT"
] | null | null | null | src/m8_still_more_mutation.py | callahrs/SequencesAndMutation | 88bbb3fc44984f5a029f75f4d7080fd274662200 | [
"MIT"
] | null | null | null | """
This module lets you practice MUTATION of lists.
In this module, you mutate by DELETING elements of a list.
Authors: David Mutchler, Amanda Stouder, Chandan Rupakheti, Katie Dion,
Claude Anderson, Delvin Defoe, Curt Clifton, their colleagues,
and Riley Callahan.
""" # Done: 1. PUT YOUR NAME ... | 37.745342 | 73 | 0.530031 |
22f0dc850272634d0dd10d548d658874d07cb3a6 | 8,418 | py | Python | epson_printer/epsonprinter.py | alex071995/python-epson-printer | 7d89b2f21bc76d2cc4d5ad548e19a356ca92fbc5 | [
"MIT"
] | 48 | 2015-02-13T19:58:40.000Z | 2022-01-13T21:03:35.000Z | epson_printer/epsonprinter.py | alex071995/python-epson-printer | 7d89b2f21bc76d2cc4d5ad548e19a356ca92fbc5 | [
"MIT"
] | 12 | 2015-01-03T11:24:48.000Z | 2018-05-08T13:38:23.000Z | epson_printer/epsonprinter.py | alex071995/python-epson-printer | 7d89b2f21bc76d2cc4d5ad548e19a356ca92fbc5 | [
"MIT"
] | 25 | 2015-02-06T21:50:01.000Z | 2022-01-13T22:25:13.000Z | from __future__ import division
import math
import io
import base64
import numpy as np
import usb.core
from functools import wraps
from PIL import Image
ESC = 27
GS = 29
FULL_PAPER_CUT = [
GS,
86, # V
0] # \0
UNDERLINE_OFF = [
ESC,
45, # -
0]
BOLD_ON = [
ESC,
69, # E
1]
B... | 25.432024 | 124 | 0.570919 |
6c8cf9e1323a6a7451e292a1d5c7c3ed8dc2528c | 176 | py | Python | scripts/item/consume_2434601.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/item/consume_2434601.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/item/consume_2434601.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | # Transparent Damage Skins
success = sm.addDamageSkin(2434601)
if success:
sm.chat("The Transparent Damage Skins has been added to your account's damage skin collection.")
| 35.2 | 100 | 0.778409 |
05aa638fcb804a3f163b28a5c089553d716d2d19 | 1,287 | py | Python | gcloud/taskflow3/migrations/0002_taskflowinstance_template_source.py | gangh/bk-sops | 29f4b4915be42650c2eeee637e0cf798e4066f09 | [
"Apache-2.0"
] | 1 | 2019-12-23T07:23:35.000Z | 2019-12-23T07:23:35.000Z | gcloud/taskflow3/migrations/0002_taskflowinstance_template_source.py | bk-sops/bk-sops | 9f5950b13473bf7b5032528b20016b7a571bb3cd | [
"Apache-2.0"
] | 9 | 2020-02-12T03:15:49.000Z | 2021-06-10T22:04:51.000Z | gcloud/taskflow3/migrations/0002_taskflowinstance_template_source.py | bk-sops/bk-sops | 9f5950b13473bf7b5032528b20016b7a571bb3cd | [
"Apache-2.0"
] | 1 | 2022-01-17T11:32:05.000Z | 2022-01-17T11:32:05.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 40.21875 | 218 | 0.729604 |
a63e9b71542f477b6076f63231e379cc54465f49 | 42,617 | py | Python | acoular/grids.py | ishine/acoular | 4d790517adb38dc012b1f06966262b94f3625358 | [
"BSD-3-Clause"
] | 294 | 2015-03-24T09:19:12.000Z | 2022-03-11T02:59:11.000Z | acoular/grids.py | ishine/acoular | 4d790517adb38dc012b1f06966262b94f3625358 | [
"BSD-3-Clause"
] | 45 | 2015-11-06T15:15:22.000Z | 2022-03-18T07:05:30.000Z | acoular/grids.py | ishine/acoular | 4d790517adb38dc012b1f06966262b94f3625358 | [
"BSD-3-Clause"
] | 100 | 2015-05-05T15:18:57.000Z | 2022-03-21T09:48:05.000Z | # -*- coding: utf-8 -*-
#pylint: disable-msg=E0611, E1101, C0103, R0901, R0902, R0903, R0904, W0232
#------------------------------------------------------------------------------
# Copyright (c) 2007-2021, Acoular Development Team.
#------------------------------------------------------------------------------
"""Impl... | 34.011971 | 106 | 0.557524 |
3c3aa3e7d642d29a59713e659adec8638bd57a74 | 218 | py | Python | tests/test_eth.py | polyswarm/polyswarmd | b732d60f0f829cc355c1f938bbe6de69f9985098 | [
"MIT"
] | 14 | 2018-04-16T18:04:23.000Z | 2019-11-26T06:39:23.000Z | tests/test_eth.py | polyswarm/polyswarmd | b732d60f0f829cc355c1f938bbe6de69f9985098 | [
"MIT"
] | 227 | 2018-04-03T01:10:34.000Z | 2021-03-25T21:49:58.000Z | tests/test_eth.py | polyswarm/polyswarmd | b732d60f0f829cc355c1f938bbe6de69f9985098 | [
"MIT"
] | 2 | 2018-04-23T18:37:47.000Z | 2021-04-26T10:58:39.000Z | from .utils import heck
def test_get_nonce(client, token_address):
response = client.get('/nonce', query_string={'account': token_address}).json
assert response == heck({'result': heck.UINT, 'status': 'OK'})
| 31.142857 | 81 | 0.701835 |
5263c4d9aa384574b85287d2a21b9455044d170c | 3,361 | py | Python | Lib/site-packages/chainer/functions/array/select_item.py | km-t/dcpython | c0fcd5557691004d7d9d22a662d90e52ecc5f34f | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/site-packages/chainer/functions/array/select_item.py | km-t/dcpython | c0fcd5557691004d7d9d22a662d90e52ecc5f34f | [
"CNRI-Python-GPL-Compatible"
] | 11 | 2020-01-28T22:49:05.000Z | 2022-03-11T23:50:27.000Z | Lib/site-packages/chainer/functions/array/select_item.py | km-t/dcpython | c0fcd5557691004d7d9d22a662d90e52ecc5f34f | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | import numpy
import six
import chainer
from chainer import backend
from chainer.backends import cuda
from chainer import function_node
from chainer.utils import type_check
class SelectItem(function_node.FunctionNode):
"""Select elements stored in given indices."""
def check_type_forward(self, in_types):
... | 28.974138 | 77 | 0.528117 |
a93a2174e6f94a762b488bad5f32b936500c5034 | 906 | py | Python | vn.rpc/testClient.py | AuthenticBladeRunner/PyTrader | d58bd5999fc29852106462bb5d1afa72e3f3f496 | [
"MIT"
] | null | null | null | vn.rpc/testClient.py | AuthenticBladeRunner/PyTrader | d58bd5999fc29852106462bb5d1afa72e3f3f496 | [
"MIT"
] | null | null | null | vn.rpc/testClient.py | AuthenticBladeRunner/PyTrader | d58bd5999fc29852106462bb5d1afa72e3f3f496 | [
"MIT"
] | null | null | null | # encoding: UTF-8
from time import sleep
from vnrpc import RpcClient
########################################################################
class TestClient(RpcClient):
""""""
#----------------------------------------------------------------------
def __init__(self, reqAddress, subAddress... | 27.454545 | 76 | 0.428256 |
8c1a571b7aa8054e093f5f89f618c466b7200845 | 547 | py | Python | deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/MESA/pack_invert.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 210 | 2016-04-09T14:26:00.000Z | 2022-03-25T18:36:19.000Z | deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/MESA/pack_invert.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 72 | 2016-09-04T09:30:19.000Z | 2022-03-27T17:06:53.000Z | deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/MESA/pack_invert.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 64 | 2016-04-09T14:26:49.000Z | 2022-03-21T11:19:47.000Z | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import ctypes
_... | 34.1875 | 113 | 0.798903 |
1d1f7a33ec6070a282e2ace9158fb1cc6911f94d | 590 | py | Python | tests/barebones/conf.py | choldgraf/sphinx-basic-ng | 678a10d27891ae1df58c584d0a55775204308cff | [
"MIT"
] | null | null | null | tests/barebones/conf.py | choldgraf/sphinx-basic-ng | 678a10d27891ae1df58c584d0a55775204308cff | [
"MIT"
] | null | null | null | tests/barebones/conf.py | choldgraf/sphinx-basic-ng | 678a10d27891ae1df58c584d0a55775204308cff | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# Full list of options can be found in the Sphinx documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
#
# -- Project information -----------------------------------------------------
#
project = "sphinx-basic-ng demo"
copyright = ... | 23.6 | 78 | 0.530508 |
969991e574cc708ffe66eb6888e60dfbc0111492 | 3,276 | py | Python | setup.py | zopefoundation/z3c.wizard | 3dba9adf3f2173a50708163aa9cc42f6917bba5a | [
"ZPL-2.1"
] | 1 | 2019-05-22T04:20:44.000Z | 2019-05-22T04:20:44.000Z | setup.py | zopefoundation/z3c.wizard | 3dba9adf3f2173a50708163aa9cc42f6917bba5a | [
"ZPL-2.1"
] | 3 | 2020-11-08T09:37:22.000Z | 2020-12-17T07:00:18.000Z | setup.py | zopefoundation/z3c.wizard | 3dba9adf3f2173a50708163aa9cc42f6917bba5a | [
"ZPL-2.1"
] | 1 | 2019-01-08T15:56:42.000Z | 2019-01-08T15:56:42.000Z | ##############################################################################
#
# Copyright (c) 2007 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 32.117647 | 78 | 0.54304 |
22e7466d6b3191a9641d99d3cb8324e0c8053dee | 7,191 | py | Python | blueair/cli.py | thedjinn/blueair-py | 6b10a3f7c2a13560af682ceef8c631b249bb41ed | [
"MIT"
] | 1 | 2021-12-19T02:07:17.000Z | 2021-12-19T02:07:17.000Z | blueair/cli.py | aijayadams/blueair-py | 8887748d26c5ea1add1afaa287d8cbf04d692c6c | [
"MIT"
] | 1 | 2021-12-18T14:35:04.000Z | 2021-12-18T14:35:04.000Z | blueair/cli.py | aijayadams/blueair-py | 8887748d26c5ea1add1afaa287d8cbf04d692c6c | [
"MIT"
] | 2 | 2021-02-20T02:11:00.000Z | 2021-06-14T05:55:07.000Z | """This module contains the Blueair command line client."""
import argparse
import coloredlogs # type: ignore
import logging
import matplotlib
import matplotlib.pyplot as pyplot
import pandas as pd
import tzlocal
from datetime import datetime, timedelta, timezone
from itertools import chain, groupby
from time import... | 38.25 | 145 | 0.675428 |
5f1e5899162cb0de5b5191babaad037fed445f63 | 547 | py | Python | homeworks/BurgersEquation/templates/plot_error.py | padomu/NPDECODES | d2bc5b0d2d5e76e4d5b8ab6948c82f902211182e | [
"MIT"
] | 15 | 2019-04-29T11:28:56.000Z | 2022-03-22T05:10:58.000Z | homeworks/BurgersEquation/templates/plot_error.py | padomu/NPDECODES | d2bc5b0d2d5e76e4d5b8ab6948c82f902211182e | [
"MIT"
] | 12 | 2020-02-29T15:05:58.000Z | 2022-02-21T13:51:07.000Z | homeworks/BurgersEquation/templates/plot_error.py | padomu/NPDECODES | d2bc5b0d2d5e76e4d5b8ab6948c82f902211182e | [
"MIT"
] | 26 | 2020-01-09T15:59:23.000Z | 2022-03-24T16:27:33.000Z | from numpy import genfromtxt
from matplotlib.pyplot import figure, legend, loglog, savefig, xlabel, ylabel
from sys import argv
input_file = str(argv[1])
output_file = str(argv[2])
data = genfromtxt(input_file, delimiter=',')
h = data[0]
error_short = data[1]
error_long = data[2]
x = [0.01, 0.1]
fig = figure()
logl... | 21.88 | 77 | 0.685558 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.