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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
81c4dabb1b151d6e6f2c39ffb1b3787cc781ba9f | 2,591 | py | Python | mne/commands/mne_browse_raw.py | Anevar/mne-python | 15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb | [
"BSD-3-Clause"
] | 2 | 2015-09-27T20:33:49.000Z | 2020-04-22T19:10:56.000Z | mne/commands/mne_browse_raw.py | Anevar/mne-python | 15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb | [
"BSD-3-Clause"
] | null | null | null | mne/commands/mne_browse_raw.py | Anevar/mne-python | 15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb | [
"BSD-3-Clause"
] | 1 | 2018-09-15T09:45:38.000Z | 2018-09-15T09:45:38.000Z | #!/usr/bin/env python
"""Browse raw data
You can do for example:
$ mne browse_raw --raw sample_audvis_raw.fif --proj sample_audvis_ecg_proj.fif --eve sample_audvis_raw-eve.fif
"""
# Authors : Eric Larson, PhD
import sys
import mne
if __name__ == '__main__':
import matplotlib.pyplot as plt
from mne.comma... | 33.649351 | 110 | 0.575068 |
b77c5293a121a4da2ce5a38914424fb508f2c690 | 1,662 | py | Python | sdk/python/pulumi_azure_nextgen/authorization/v20170601preview/__init__.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/authorization/v20170601preview/__init__.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/authorization/v20170601preview/__init__.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! ***
# Export this package's modules as members:
from ._enums import *
from .get_policy_assignment import *
from .get_policy_set_definition import *
from .g... | 39.571429 | 112 | 0.72503 |
0d2558f04d2d8ed68125d71c2345026a86d2fbdf | 511 | py | Python | algorithms/912.Sort-an-Array/Python/solution_8.py | hopeness/leetcode | 496455fa967f0704d729b4014f92f52b1d69d690 | [
"MIT"
] | null | null | null | algorithms/912.Sort-an-Array/Python/solution_8.py | hopeness/leetcode | 496455fa967f0704d729b4014f92f52b1d69d690 | [
"MIT"
] | null | null | null | algorithms/912.Sort-an-Array/Python/solution_8.py | hopeness/leetcode | 496455fa967f0704d729b4014f92f52b1d69d690 | [
"MIT"
] | null | null | null | """
https://leetcode.com/problems/sort-an-array/submissions/
"""
from typing import List
# Counting Sort
class Solution:
def sortArray(self, nums: List[int]) -> List[int]:
minNum = min(nums)
maxNum = max(nums)
count = [0] * (maxNum-minNum+1)
for num in nums:
count[num-... | 22.217391 | 56 | 0.495108 |
55e45e755637a47be6c6962e1c358e3c1350d530 | 885 | py | Python | estofadora/client/admin.py | delete/estofadora | 2f46ba65fb0e376361ff47c86ea7a62c50b6c91b | [
"MIT"
] | 6 | 2016-04-13T21:30:30.000Z | 2017-09-29T04:47:07.000Z | estofadora/client/admin.py | delete/estofadora | 2f46ba65fb0e376361ff47c86ea7a62c50b6c91b | [
"MIT"
] | 13 | 2016-04-13T23:52:09.000Z | 2020-06-05T18:25:13.000Z | estofadora/client/admin.py | delete/estofadora | 2f46ba65fb0e376361ff47c86ea7a62c50b6c91b | [
"MIT"
] | 1 | 2016-06-24T13:48:26.000Z | 2016-06-24T13:48:26.000Z | # coding: utf-8
from django.utils.datetime_safe import datetime
from django.contrib import admin
from estofadora.client.models import Client
class ClientAdmin(admin.ModelAdmin):
list_display = ('name', 'adress', 'email', 'telephone1', 'is_active')
search_fields = ('name', 'adress', 'email', 'telephone1', 'tel... | 30.517241 | 75 | 0.705085 |
9c2d26affaad30ae18e3a3a20701fb774ede4fa8 | 8,879 | py | Python | async_io/rest/rest_client.py | vnpy/vnpy_lab | 370ec82d65584eac28a00ec34b839ad790bee414 | [
"MIT"
] | 12 | 2019-02-16T20:03:23.000Z | 2022-01-28T02:37:56.000Z | async_io/rest/rest_client.py | vnpy/vnpy_lab | 370ec82d65584eac28a00ec34b839ad790bee414 | [
"MIT"
] | 1 | 2019-03-08T04:57:11.000Z | 2019-03-12T01:21:56.000Z | async_io/rest/rest_client.py | vnpy/vnpy_lab | 370ec82d65584eac28a00ec34b839ad790bee414 | [
"MIT"
] | 9 | 2019-02-24T03:35:05.000Z | 2021-12-21T08:55:59.000Z | import asyncio
import sys
import traceback
from datetime import datetime
from enum import Enum
from typing import Any, Callable, Optional, Union
import aiohttp
import requests
from vnpy.api.asyncio.async_executor import create_async_task, loop, start_asyncio, stop_asyncio, \
wait_for_async_task, wrap_as_sync
cl... | 28.921824 | 125 | 0.549499 |
84b414d025ee0e4708ca40fdbca814eb43c5689e | 3,482 | py | Python | atlantic_server/atl/views.py | matteli/atlantic_server | d2c77fa172600ee304ebcf86df8242f466f5fb81 | [
"MIT"
] | 4 | 2019-08-08T12:46:27.000Z | 2019-11-09T19:24:38.000Z | atlantic_server/atl/views.py | matteli/atlantic_server | d2c77fa172600ee304ebcf86df8242f466f5fb81 | [
"MIT"
] | 1 | 2019-10-21T12:10:39.000Z | 2019-10-21T16:35:41.000Z | atlantic_server/atl/views.py | matteli/atlantic_server | d2c77fa172600ee304ebcf86df8242f466f5fb81 | [
"MIT"
] | null | null | null | from django.db.models import Max
from rest_framework.permissions import (
IsAdminUser,
IsAuthenticatedOrReadOnly,
BasePermission,
SAFE_METHODS,
)
from rest_framework import viewsets
from rest_framework.generics import get_object_or_404
from django_filters import rest_framework as filters
from ..com.m... | 30.814159 | 88 | 0.697013 |
54804d8b4ba22b874b729e8cd255ea3f5763936d | 3,040 | py | Python | bddm/trainer/ema.py | tencent-ailab/bddm | 8c3f807e84f0ebf1a4942a990f369a92cba79c61 | [
"Apache-2.0"
] | 76 | 2022-03-25T08:28:34.000Z | 2022-03-31T07:44:25.000Z | bddm/trainer/ema.py | shaun95/bddm | c78786e6de6b58c7c6ac4f97e22fe08b99a4d88a | [
"Apache-2.0"
] | 1 | 2022-03-29T15:49:16.000Z | 2022-03-29T15:49:16.000Z | bddm/trainer/ema.py | shaun95/bddm | c78786e6de6b58c7c6ac4f97e22fe08b99a4d88a | [
"Apache-2.0"
] | 10 | 2022-03-25T14:26:18.000Z | 2022-03-30T03:11:10.000Z | #!/bin/env python
# -*- coding: utf-8 -*-
########################################################################
#
# EMA Helper Class
#
# Author: Max W. Y. Lam (maxwylam@tencent.com)
# Copyright (c) 2021Tencent. All Rights Reserved
#
########################################################################
import... | 29.230769 | 81 | 0.549013 |
3c944ec620bb6c6969b969051697d0f0912516c2 | 2,517 | py | Python | .travis/pipeline_configs/default_classification.py | usc-isi-i2/dsbox-cleaning | 3cb5146dbf89f0ea2f8bf71a843eb1cfa63f7917 | [
"MIT"
] | 7 | 2017-06-28T18:36:46.000Z | 2018-01-27T01:40:29.000Z | .travis/pipeline_configs/default_classification.py | usc-isi-i2/dsbox-cleaning | 3cb5146dbf89f0ea2f8bf71a843eb1cfa63f7917 | [
"MIT"
] | 47 | 2017-06-09T19:25:19.000Z | 2019-04-12T08:50:32.000Z | .travis/pipeline_configs/default_classification.py | usc-isi-i2/dsbox-cleaning | 3cb5146dbf89f0ea2f8bf71a843eb1cfa63f7917 | [
"MIT"
] | 7 | 2017-09-25T20:30:45.000Z | 2018-10-11T18:34:30.000Z | class config:
config = {'sampling_step': {'primitive': 'd3m.primitives.data_preprocessing.DoNothingForDataset.DSBOX', 'hyperparameters': {}}, 'denormalize_step': {'primitive': 'd3m.primitives.data_transformation.denormalize.Common', 'hyperparameters': {}}, 'to_dataframe_step': {'primitive': 'd3m.primitives.data_tra... | 629.25 | 2,434 | 0.769567 |
59ac93d7a03868bcd419cdd7953b07cc579178c7 | 3,332 | py | Python | rich/measure.py | DarkCode01/rich | c4287eff031d03addac79fd9035e146c7d868b78 | [
"MIT"
] | 2 | 2021-05-11T19:27:06.000Z | 2021-05-12T06:08:08.000Z | rich/measure.py | DarkCode01/rich | c4287eff031d03addac79fd9035e146c7d868b78 | [
"MIT"
] | 2 | 2020-05-09T12:42:28.000Z | 2020-05-09T14:44:04.000Z | rich/measure.py | DarkCode01/rich | c4287eff031d03addac79fd9035e146c7d868b78 | [
"MIT"
] | 1 | 2020-08-14T13:47:25.000Z | 2020-08-14T13:47:25.000Z | from operator import itemgetter
from typing import Iterable, NamedTuple, TYPE_CHECKING, Union
from . import errors
from .protocol import is_renderable
from .segment import Segment
if TYPE_CHECKING:
from .console import Console, RenderableType
class Measurement(NamedTuple):
"""Stores the minimum and maximum ... | 33.32 | 111 | 0.641657 |
1809598bc7900c9e8aea2a8501895b78deca3282 | 11,772 | py | Python | dedup/imgproc.py | Kahsolt/pic-dedup | 91bc2b6e979b57719103b5c62b859311bd37fdd0 | [
"WTFPL"
] | null | null | null | dedup/imgproc.py | Kahsolt/pic-dedup | 91bc2b6e979b57719103b5c62b859311bd37fdd0 | [
"WTFPL"
] | null | null | null | dedup/imgproc.py | Kahsolt/pic-dedup | 91bc2b6e979b57719103b5c62b859311bd37fdd0 | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python3
import logging
import pickle
import gzip
from io import BytesIO
import numpy as np
from enum import IntEnum
from PIL import Image, ImageFilter, ImageDraw, ImageFont
from .settings import *
from .models import *
__all__ = ['SimRatioMatrix', 'Feature', 'pkl', 'HWRatio', 'resize_by_h... | 32.163934 | 129 | 0.581804 |
7993d32d8ff416580b9094c58d11cba7702453d0 | 19,025 | py | Python | test/api/test_zone.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | test/api/test_zone.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | test/api/test_zone.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | import os
import uuid
import random
import unittest
from langcodes import Language
from spaceone.core import config
from spaceone.core import pygrpc
from spaceone.core import utils
from spaceone.core.unittest.runner import RichTestRunner
from google.protobuf.json_format import MessageToDict
def random_string():
r... | 30.537721 | 113 | 0.538449 |
77c9c8e314362593a96866983edaaa8fca59361f | 18,126 | py | Python | vispy/visuals/line/line.py | gouarin/vispy | 877433e83b9b77e6f7d1105918364122cb8503a7 | [
"BSD-3-Clause"
] | null | null | null | vispy/visuals/line/line.py | gouarin/vispy | 877433e83b9b77e6f7d1105918364122cb8503a7 | [
"BSD-3-Clause"
] | null | null | null | vispy/visuals/line/line.py | gouarin/vispy | 877433e83b9b77e6f7d1105918364122cb8503a7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
Line visual implementing Agg- and GL-based drawing modes.
"""
from __future__ import division
import numpy as np
from ... import gloo, glsl
from ...color import Color, C... | 33.504621 | 78 | 0.538894 |
3da841c408558ef9e411343cb7fb2fefe5145b2f | 7,197 | py | Python | python/pyspark/mllib/tests/test_feature.py | ChenWeiye83/spark | 1f1d98c6facd556b70f457184231b5af78de8d53 | [
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 11 | 2020-01-29T10:29:53.000Z | 2022-02-10T09:52:54.000Z | python/pyspark/mllib/tests/test_feature.py | ChenWeiye83/spark | 1f1d98c6facd556b70f457184231b5af78de8d53 | [
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 7 | 2017-05-08T23:53:03.000Z | 2020-11-25T01:31:17.000Z | python/pyspark/mllib/tests/test_feature.py | ChenWeiye83/spark | 1f1d98c6facd556b70f457184231b5af78de8d53 | [
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14 | 2015-10-31T14:19:10.000Z | 2022-01-31T05:52:41.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... | 37.290155 | 96 | 0.575657 |
1f5aec8ca76efa6d7c1a543fd5da9d15f87af8c6 | 4,405 | py | Python | DNA_mRNA_Protein.py | KapileshP/DNA_to_mRNA_to_Protein | a478ee07159a001dcd3f3c6101a86b76f63d5fd1 | [
"BSD-3-Clause"
] | 1 | 2021-03-23T17:02:14.000Z | 2021-03-23T17:02:14.000Z | DNA_mRNA_Protein.py | KapileshP/DNA_to_mRNA_to_Protein | a478ee07159a001dcd3f3c6101a86b76f63d5fd1 | [
"BSD-3-Clause"
] | null | null | null | DNA_mRNA_Protein.py | KapileshP/DNA_to_mRNA_to_Protein | a478ee07159a001dcd3f3c6101a86b76f63d5fd1 | [
"BSD-3-Clause"
] | null | null | null | # ---------- About this Program ----------
"""
Name: DNA to mRNA to Protein
Creator: Kapilesh Pennichetty
Description: DNA to mRNA to Protein is a program created by Kapilesh Pennichetty to assist in converting a DNA sequence to an mRNA sequence and amino acids (protein) through the processes of transcription and trans... | 34.414063 | 395 | 0.48286 |
e00aa77cde159d454b7a79cbef95975588f6f984 | 8,779 | py | Python | public/data/userguides/v0.1.0/_downloads/8bbb158ade27efed48c2b55ccd020566/tutorial5.py | libcellml/website-src | a9563941e0dd3b5dcfee922ab53f4adeb891047c | [
"CC0-1.0"
] | null | null | null | public/data/userguides/v0.1.0/_downloads/8bbb158ade27efed48c2b55ccd020566/tutorial5.py | libcellml/website-src | a9563941e0dd3b5dcfee922ab53f4adeb891047c | [
"CC0-1.0"
] | 39 | 2020-06-04T01:20:53.000Z | 2021-11-03T10:06:44.000Z | public/data/userguides/v0.1.0/_downloads/8bbb158ade27efed48c2b55ccd020566/tutorial5.py | libcellml/website-src | a9563941e0dd3b5dcfee922ab53f4adeb891047c | [
"CC0-1.0"
] | 3 | 2020-11-24T21:54:09.000Z | 2021-01-25T20:41:27.000Z | """
TUTORIAL 6: Annotating a mystery model
This tutorial is a guide to playing Marco Polo using libCellML.
By the time you have worked through this tutorial you will be able to:
- Parse a CellML file into a Model instance
- Determine the type of item with a given id
- Use the Annotator class to ... | 43.034314 | 109 | 0.581729 |
1340ad2e5ae4bf633cfdbb1ca3cca321b7b72c71 | 4,568 | py | Python | software/multifluids_icferst/examples/rotating_channel/channel_tools.py | msc-acse/acse-9-independent-research-project-Wade003 | cfcba990d52ccf535171cf54c0a91b184db6f276 | [
"MIT"
] | 2 | 2020-05-11T02:39:46.000Z | 2020-05-11T03:08:38.000Z | software/multifluids_icferst/examples/rotating_channel/channel_tools.py | msc-acse/acse-9-independent-research-project-Wade003 | cfcba990d52ccf535171cf54c0a91b184db6f276 | [
"MIT"
] | null | null | null | software/multifluids_icferst/examples/rotating_channel/channel_tools.py | msc-acse/acse-9-independent-research-project-Wade003 | cfcba990d52ccf535171cf54c0a91b184db6f276 | [
"MIT"
] | 2 | 2020-05-21T22:50:19.000Z | 2020-10-28T17:16:31.000Z | import os
from fluidity_tools import stat_parser
from sympy import *
from numpy import array,max,abs
meshtemplate='''
Point(1) = {0, 0, 0, <dx>};
Extrude {0, 1, 0} {
Point{1};Layers{<layers>};
}
Point(3) = {1, 0, 0, <dx>};
Extrude {0, 1, 0} {
Point{3};Layers{<layers>};
}
Line(3)={1,3};
Line(4)={2,4};
Line Loop(5) ... | 23.91623 | 90 | 0.618651 |
d22a85ba4ce9958f33e5b4028a2f13fd0087570a | 247 | py | Python | app/__init__.py | JenBanks8585/Music-Recommender | 01145671ac71c9c711b659fce43cac9cca08df25 | [
"MIT"
] | null | null | null | app/__init__.py | JenBanks8585/Music-Recommender | 01145671ac71c9c711b659fce43cac9cca08df25 | [
"MIT"
] | null | null | null | app/__init__.py | JenBanks8585/Music-Recommender | 01145671ac71c9c711b659fce43cac9cca08df25 | [
"MIT"
] | null | null | null | import os
from flask import Flask
from app.appli import appli
def create_app():
app = Flask(__name__)
app.register_blueprint(appli)
return app
if __name__ == '__main__':
my_app = create_app()
my_app.run(debug=True) | 10.73913 | 33 | 0.676113 |
c2f78477f6b57f03d20bac4f3b02ccd87416c9af | 4,753 | py | Python | cnn.py | zhongxinghong/PKUElectiveCaptcha | 1152dfee5b451c203799952b19fad9918ed96a41 | [
"MIT"
] | 20 | 2019-04-05T11:20:24.000Z | 2022-02-22T02:41:58.000Z | cnn.py | zhongxinghong/PKUElectiveCaptcha | 1152dfee5b451c203799952b19fad9918ed96a41 | [
"MIT"
] | 5 | 2020-02-15T11:06:55.000Z | 2022-03-11T23:40:05.000Z | cnn.py | zhongxinghong/PKUElectiveCaptcha | 1152dfee5b451c203799952b19fad9918ed96a41 | [
"MIT"
] | 8 | 2019-07-03T15:00:52.000Z | 2021-09-28T06:19:29.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: cnn.py
# Created Date: Wednesday, January 8th 2020, 6:12:20 pm
# Author: Rabbit
# -------------------------
# Copyright (c) 2020 Rabbit
# --------------------------------------------------------------------
###
import os
import joblib
from tqdm import tqdm
impo... | 28.981707 | 96 | 0.605723 |
1f15a29ba709af52537148ab0aae29ad516ac9b0 | 1,420 | py | Python | configs/lunarlander_v2/dqn.py | FurkanArslan/rl_algorithms | f6c61e02e181510c212a6ef7b4598338205e4bf7 | [
"MIT"
] | null | null | null | configs/lunarlander_v2/dqn.py | FurkanArslan/rl_algorithms | f6c61e02e181510c212a6ef7b4598338205e4bf7 | [
"MIT"
] | null | null | null | configs/lunarlander_v2/dqn.py | FurkanArslan/rl_algorithms | f6c61e02e181510c212a6ef7b4598338205e4bf7 | [
"MIT"
] | null | null | null | """Config for DQN on LunarLander-v2.
- Author: Kyunghwan Kim
- Contact: kh.kim@medipixel.io
"""
from rl_algorithms.common.helper_functions import identity
agent = dict(
type="DQNAgent",
hyper_params=dict(
gamma=0.99,
tau=5e-3,
buffer_size=int(1e5), # openai baselines: int(1e4)
... | 29.583333 | 70 | 0.560563 |
02a1a95cc7c83e93ec4d01be5426e8b7701bef90 | 521 | py | Python | user/migrations/0011_auto_20200706_2345.py | sa-y-an/Qriosity2.0 | f0a46533881a6a7f8cd548eadbc72570396b1141 | [
"Apache-2.0"
] | null | null | null | user/migrations/0011_auto_20200706_2345.py | sa-y-an/Qriosity2.0 | f0a46533881a6a7f8cd548eadbc72570396b1141 | [
"Apache-2.0"
] | 2 | 2020-06-30T16:28:26.000Z | 2020-07-25T21:35:31.000Z | user/migrations/0011_auto_20200706_2345.py | sa-y-an/Qriosity2.0 | f0a46533881a6a7f8cd548eadbc72570396b1141 | [
"Apache-2.0"
] | 4 | 2021-06-16T09:53:15.000Z | 2021-09-18T07:40:31.000Z | # Generated by Django 3.0.7 on 2020-07-06 18:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0010_solved'),
]
operations = [
migrations.RenameField(
model_name='solved',
old_name='player',
... | 21.708333 | 61 | 0.556622 |
dff6bd171abec46756ab8e3e679d7b052224f7d8 | 942 | py | Python | test_suite.py | tdcosim/TDcoSim | 0fd0cd1eea1136c82c9de982a88ca640e5e6a935 | [
"BSD-3-Clause"
] | 18 | 2019-06-21T17:43:17.000Z | 2022-02-27T21:14:50.000Z | test_suite.py | alkaidone/TDcoSim | 19519d54550bc68b28e43f95495a81aa2ef4164f | [
"BSD-3-Clause"
] | 33 | 2019-09-26T17:14:58.000Z | 2022-02-02T20:28:34.000Z | test_suite.py | alkaidone/TDcoSim | 19519d54550bc68b28e43f95495a81aa2ef4164f | [
"BSD-3-Clause"
] | 7 | 2019-09-10T20:15:05.000Z | 2022-02-21T05:03:37.000Z | import unittest
import os
import sys
from tests.model.psse.test_psse_model import TestPSSEModel
from tests.model.opendss.model.test_opendss_interface import TestOpenDSSInterface
from tests.model.opendss.model.pvderaggregation.model.test_pvder_aggregated_model import TestPVDERAggregatedModel
from tests.model.opendss.m... | 28.545455 | 113 | 0.809979 |
cbb63db27f0c56ff2b879c1fed2b2523e3f70970 | 1,771 | py | Python | TEST/progress_bar.py | louisyoungx/tcp_transfer_server | e6f0e639a884caa65daa218bc32b9ef7711d6d31 | [
"MIT"
] | null | null | null | TEST/progress_bar.py | louisyoungx/tcp_transfer_server | e6f0e639a884caa65daa218bc32b9ef7711d6d31 | [
"MIT"
] | null | null | null | TEST/progress_bar.py | louisyoungx/tcp_transfer_server | e6f0e639a884caa65daa218bc32b9ef7711d6d31 | [
"MIT"
] | null | null | null | # import time
# import datetime
#
#
# class Progress(object):
# startTime = time.time()
# left_sign = '█'
# # left_sign = '░'
# # right_sign = '-'
# right_sign = ' '
# lens = 20
# delay = 0.05
#
# def __init__(self, total, name='Progress'):
# self.count = 0
# self.total =... | 32.796296 | 112 | 0.549972 |
9bdc5311eb4d2c465cadab88d5d2411167eb711d | 577 | py | Python | flask/flask_fundamentals/hello_flask/test.py | fatimaalheeh/python_stack | 9ba84e6dc030a65494f105152a97f0a38aa2e4f3 | [
"MIT"
] | null | null | null | flask/flask_fundamentals/hello_flask/test.py | fatimaalheeh/python_stack | 9ba84e6dc030a65494f105152a97f0a38aa2e4f3 | [
"MIT"
] | null | null | null | flask/flask_fundamentals/hello_flask/test.py | fatimaalheeh/python_stack | 9ba84e6dc030a65494f105152a97f0a38aa2e4f3 | [
"MIT"
] | null | null | null | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def hello_world():#default route
return 'hello!'
@app.route('/success/<name>') #'/success--/--<name>' the / can be replaced with any character -,$, , , . , .....
def success(name):#return a value from URL
print(name)
return 'He... | 28.85 | 113 | 0.665511 |
c07a446e3cf6dc6938e22665b2d01c689ff6ce6f | 495 | py | Python | menus/typeIDs.py | fsanges/neMenuManager | 733a281b1e0217ff24bc2fe9adf74c97a4715a2b | [
"Apache-2.0"
] | 1 | 2021-01-28T05:11:55.000Z | 2021-01-28T05:11:55.000Z | menus/typeIDs.py | fsanges/neMenuManager | 733a281b1e0217ff24bc2fe9adf74c97a4715a2b | [
"Apache-2.0"
] | null | null | null | menus/typeIDs.py | fsanges/neMenuManager | 733a281b1e0217ff24bc2fe9adf74c97a4715a2b | [
"Apache-2.0"
] | null | null | null | ###########################
## COMMON
COMMONNODENAME = None
UTILS_MENUNAME = "UTILS"
UTILSID = 1
UTILS_ISRADIAL = True
UTILS_RADIALPOS = "N"
COPYID = 10
COPY_MENUNAME = "copyNodes"
PASTEID = 11
PASTE_MENUNAME = "pasteNodes"
###########################
## HERMITE
HA_NODENAME = "jd_hermiteArrayCrv"
HASOUTH = 100
HAS... | 17.068966 | 40 | 0.674747 |
5c617bb8021316e0a627997fab45f2d1e7fddf5b | 10,396 | py | Python | notify/drivers/sfdc.py | boris-42/notify | d13f4840f1c6f8b888ea906c107e37f2607872b1 | [
"Apache-2.0"
] | 1 | 2016-12-06T08:24:58.000Z | 2016-12-06T08:24:58.000Z | notify/drivers/sfdc.py | boris-42/notify | d13f4840f1c6f8b888ea906c107e37f2607872b1 | [
"Apache-2.0"
] | 21 | 2016-12-06T05:27:34.000Z | 2016-12-30T16:28:22.000Z | notify/drivers/sfdc.py | boris-42/notify | d13f4840f1c6f8b888ea906c107e37f2607872b1 | [
"Apache-2.0"
] | 3 | 2016-12-05T09:17:16.000Z | 2017-01-10T12:15:36.000Z | # Copyright 2016: Mirantis 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 b... | 37.803636 | 78 | 0.564833 |
92a8f3b12ecd974ca347db051b9ab338d4d858a4 | 1,295 | py | Python | freeze_graph.py | smartinfrastructurelab/yolov3_marking | 7485695e1d168e1550d2b7beeb470088f716ab65 | [
"MIT"
] | null | null | null | freeze_graph.py | smartinfrastructurelab/yolov3_marking | 7485695e1d168e1550d2b7beeb470088f716ab65 | [
"MIT"
] | null | null | null | freeze_graph.py | smartinfrastructurelab/yolov3_marking | 7485695e1d168e1550d2b7beeb470088f716ab65 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# coding=utf-8
#================================================================
# Copyright (C) 2019 * Ltd. All rights reserved.
#
# Editor : VIM
# File name : freeze_graph.py
# Author : YunYang1994
# Created date: 2019-03-20 15:57:33
# Description :
#
#==================... | 30.116279 | 109 | 0.641699 |
f2f1ba4eeb291db85d118c86c2e8bf2638aa983a | 1,714 | py | Python | mod/units/eat_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 1 | 2015-06-28T15:26:52.000Z | 2015-06-28T15:26:52.000Z | mod/units/eat_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | null | null | null | mod/units/eat_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 6 | 2015-03-20T16:36:22.000Z | 2021-08-28T07:58:18.000Z | # -*- coding: utf-8 -*-
# @Date : 2015-05-28
import tornado.web
from ..models.eat import Eat
from config import eat_token
import datetime,time
from sqlalchemy.orm.exc import NoResultFound
class EatHandler(tornado.web.RequestHandler):
@property
def db(self):
return self.application.db
... | 32.961538 | 81 | 0.446908 |
a3aca4d7ee9aae5bc4c2a6fab6a68d398be58be0 | 87 | py | Python | act/sampledownloader.py | RiS3-Lab/FICS- | 82c8abef52ca943946b7e82a16998cf67f1d2049 | [
"Apache-2.0"
] | 37 | 2020-12-04T09:15:50.000Z | 2022-03-28T13:33:29.000Z | act/sampledownloader.py | RiS3-Lab/FICS- | 82c8abef52ca943946b7e82a16998cf67f1d2049 | [
"Apache-2.0"
] | 7 | 2020-12-03T08:14:31.000Z | 2021-11-24T14:14:03.000Z | act/sampledownloader.py | RiS3-Lab/FICS- | 82c8abef52ca943946b7e82a16998cf67f1d2049 | [
"Apache-2.0"
] | 19 | 2020-12-04T08:43:31.000Z | 2022-03-28T13:33:27.000Z |
from act import Act
class SampleDownloader(Act):
def start(self):
pass
| 9.666667 | 28 | 0.643678 |
17abf275726b66bfe331eb8b87bb16994c6426fc | 12,512 | py | Python | archive/QT_GUI.py | MikeDT/bdm-whack-a-mole | 33b52008b2fae231b604c0af959df57e25dee61f | [
"MIT"
] | null | null | null | archive/QT_GUI.py | MikeDT/bdm-whack-a-mole | 33b52008b2fae231b604c0af959df57e25dee61f | [
"MIT"
] | null | null | null | archive/QT_GUI.py | MikeDT/bdm-whack-a-mole | 33b52008b2fae231b604c0af959df57e25dee61f | [
"MIT"
] | 1 | 2021-09-26T14:12:20.000Z | 2021-09-26T14:12:20.000Z | # -*- coding: utf-8 -*-
"""
main
====
Typical GUI screen, adapted from prior pyqt work
Attributes:
na
Todo:
* clean up docstrings (ideally to sphinx format, but to numpy/scipy
minimally)
Related projects:
Adapted from initial toy project https://github.com/sonlexqt/whack-a-mole
which is under MI... | 37.573574 | 79 | 0.618047 |
88e26be885932305fd1477f5ad0bcd6952a67a57 | 31,074 | py | Python | airflow/executors/kubernetes_executor.py | alexlshon/airflow | 8eddc8b5019890a712810b8e5b1185997adb9bf4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-07-30T17:14:05.000Z | 2021-08-03T13:51:25.000Z | airflow/executors/kubernetes_executor.py | alexlshon/airflow | 8eddc8b5019890a712810b8e5b1185997adb9bf4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2021-06-28T20:57:42.000Z | 2022-02-26T02:11:11.000Z | airflow/executors/kubernetes_executor.py | alexlshon/airflow | 8eddc8b5019890a712810b8e5b1185997adb9bf4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2021-05-21T21:26:34.000Z | 2021-10-05T16:57:57.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... | 42.801653 | 109 | 0.621066 |
e83fcfeda19ba29af519ff0ecbd798cdefc5ddbb | 395 | py | Python | garrus/metrics/brier.py | sleep3r/garrus | 28096ca0d6166117be23e740a68831396ba92a7e | [
"Apache-2.0"
] | 13 | 2021-04-06T15:00:41.000Z | 2021-06-12T21:27:46.000Z | garrus/metrics/brier.py | sleep3r/garrus | 28096ca0d6166117be23e740a68831396ba92a7e | [
"Apache-2.0"
] | null | null | null | garrus/metrics/brier.py | sleep3r/garrus | 28096ca0d6166117be23e740a68831396ba92a7e | [
"Apache-2.0"
] | 1 | 2021-04-26T04:25:59.000Z | 2021-04-26T04:25:59.000Z | import numpy as np
from garrus.core import BaseMetric
class Brier(BaseMetric):
"""
Brier score.
$$ Brier = -\frac{1}{m} \sum_{j=1}^{m} (y_{j}-b_{j})^{2}) $$
"""
def _compute(self, confidences: np.ndarray, accuracies: np.ndarray, **kwargs) -> float:
brier_score = np.mean(np.sum((confiden... | 24.6875 | 91 | 0.607595 |
0599058c61373022c61e25e8e27299d0be79f9ff | 1,106 | py | Python | graph/measures/core/edge_based.py | mazlo/lodcc | dcc3403fe7785c9dc73f09154f397c0ff42f1920 | [
"MIT"
] | 2 | 2018-12-09T16:34:22.000Z | 2021-02-18T23:45:29.000Z | graph/measures/core/edge_based.py | mazlo/lodcc | dcc3403fe7785c9dc73f09154f397c0ff42f1920 | [
"MIT"
] | null | null | null | graph/measures/core/edge_based.py | mazlo/lodcc | dcc3403fe7785c9dc73f09154f397c0ff42f1920 | [
"MIT"
] | 1 | 2018-04-30T08:25:09.000Z | 2018-04-30T08:25:09.000Z | import logging
from graph_tool import GraphView
from graph_tool.topology import edge_reciprocity, label_largest_component, pseudo_diameter
log = logging.getLogger( __name__ )
def f_reciprocity( D, stats, options={ 'features': [] } ):
""""""
if 'reciprocity' in options['features']:
stats['reciprocity... | 33.515152 | 90 | 0.653707 |
b3357a82d8b5e91f593eefcfe0b448703fb2dbca | 12,756 | py | Python | applications/tensorflow2/fastspeech2/preprocessor/text.py | payoto/graphcore_examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | [
"MIT"
] | 260 | 2019-11-18T01:50:00.000Z | 2022-03-28T23:08:53.000Z | applications/tensorflow2/fastspeech2/preprocessor/text.py | payoto/graphcore_examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | [
"MIT"
] | 27 | 2020-01-28T23:07:50.000Z | 2022-02-14T15:37:06.000Z | applications/tensorflow2/fastspeech2/preprocessor/text.py | payoto/graphcore_examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | [
"MIT"
] | 56 | 2019-11-18T02:13:12.000Z | 2022-02-28T14:36:09.000Z | # Copyright (c) 2021 Graphcore Ltd. All Rights Reserved.
# Copyright 2020 TensorFlowTTS Team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | 28.72973 | 101 | 0.570947 |
2a4aa82aae79a672f3f411f0e355cf082e8cfed4 | 836 | py | Python | application/utils.py | sisayie/goeasy-project | df8f3fafd17e92fd5638854f15628c1d447e5198 | [
"MIT"
] | 1 | 2020-01-21T15:03:10.000Z | 2020-01-21T15:03:10.000Z | application/utils.py | sisayie/goeasy-project | df8f3fafd17e92fd5638854f15628c1d447e5198 | [
"MIT"
] | 1 | 2019-10-31T16:01:12.000Z | 2019-10-31T16:01:12.000Z | application/utils.py | sisayie/goeasy-project | df8f3fafd17e92fd5638854f15628c1d447e5198 | [
"MIT"
] | 1 | 2019-10-15T09:54:57.000Z | 2019-10-15T09:54:57.000Z | #from flask import json
import datetime as dtm
from datetime import datetime
'''
response = current_app.response_class(
json.dumps(new_sorted, sort_keys=False),
mimetype=current_app.config['JSONIFY_MIMETYPE'])
'''
def date_format(value: str) -> int:
if str.isdigit(value):
return value
... | 30.962963 | 65 | 0.598086 |
2c766db4b91ddf71dcf7051911ce70a68f09ec49 | 1,569 | py | Python | src/aks-preview/setup.py | ganga1980/azure-cli-extensions | cf3c2660a92aa349576f440365d6e65570287c12 | [
"MIT"
] | null | null | null | src/aks-preview/setup.py | ganga1980/azure-cli-extensions | cf3c2660a92aa349576f440365d6e65570287c12 | [
"MIT"
] | null | null | null | src/aks-preview/setup.py | ganga1980/azure-cli-extensions | cf3c2660a92aa349576f440365d6e65570287c12 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... | 34.866667 | 94 | 0.601657 |
92e798cb1ff189b3bdd4446b5b35ffa71a932669 | 4,056 | py | Python | openbb_terminal/cryptocurrency/defi/coindix_model.py | 23errg/GamestonkTerminal | 826cd8a723d8e2b810c51bf8266c09e8e55059c4 | [
"MIT"
] | null | null | null | openbb_terminal/cryptocurrency/defi/coindix_model.py | 23errg/GamestonkTerminal | 826cd8a723d8e2b810c51bf8266c09e8e55059c4 | [
"MIT"
] | null | null | null | openbb_terminal/cryptocurrency/defi/coindix_model.py | 23errg/GamestonkTerminal | 826cd8a723d8e2b810c51bf8266c09e8e55059c4 | [
"MIT"
] | null | null | null | """Coindix model"""
__docformat__ = "numpy"
import logging
from typing import Optional
import pandas as pd
import requests
from openbb_terminal.decorators import log_start_end
logger = logging.getLogger(__name__)
VAULTS_FILTERS = ["name", "chain", "protocol", "apy", "tvl", "risk", "link"]
CHAINS = [
"ethereum"... | 25.35 | 114 | 0.57643 |
0a31cb8c9acf0ba8043889b9e23f25c08f962356 | 4,793 | py | Python | third_party/graphy/graphy/backends/google_chart_api/util_test.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | third_party/graphy/graphy/backends/google_chart_api/util_test.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | third_party/graphy/graphy/backends/google_chart_api/util_test.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 698 | 2015-06-02T19:18:35.000Z | 2022-03-29T16:57:15.000Z | #!/usr/bin/python2.4
#
# Copyright 2008 Google 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 law o... | 31.953333 | 78 | 0.660129 |
7d0e47d032f890656380d2c2f4771fdac6df7be8 | 18,243 | py | Python | cirq-core/cirq/ops/gateset.py | allen91wu/Cirq | c33bd9bd6d08650f41b0db5cf69abb3daed72a8f | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/ops/gateset.py | allen91wu/Cirq | c33bd9bd6d08650f41b0db5cf69abb3daed72a8f | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/ops/gateset.py | allen91wu/Cirq | c33bd9bd6d08650f41b0db5cf69abb3daed72a8f | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 40.812081 | 100 | 0.634654 |
c9fba3fcb2ba9c221ea83bbe9ecefb9c07dd8e5d | 5,841 | py | Python | src/sentry/api/endpoints/project_key_details.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 1 | 2019-08-28T11:03:13.000Z | 2019-08-28T11:03:13.000Z | src/sentry/api/endpoints/project_key_details.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 1 | 2021-05-09T11:43:43.000Z | 2021-05-09T11:43:43.000Z | src/sentry/api/endpoints/project_key_details.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from django.db.models import F
from rest_framework import serializers, status
from rest_framework.response import Response
from sentry import features
from sentry.api.base import DocSection
from sentry.api.bases.project import ProjectEndpoint
from sentry.api.exceptions import Re... | 34.767857 | 98 | 0.617189 |
e5de1e4bc2ab8e6333611c82c68decb9a633d0dd | 9,920 | py | Python | sketchpy/vijay.py | itsamansharmahub/sketchpy | 24974bc24283b4fa5863ed18104f62e514719006 | [
"MIT"
] | 12 | 2022-02-13T07:15:55.000Z | 2022-03-29T10:43:40.000Z | sketchpy/vijay.py | itsamansharmahub/sketchpy | 24974bc24283b4fa5863ed18104f62e514719006 | [
"MIT"
] | 2 | 2022-03-29T10:43:28.000Z | 2022-03-31T08:45:17.000Z | sketchpy/vijay.py | itsamansharmahub/sketchpy | 24974bc24283b4fa5863ed18104f62e514719006 | [
"MIT"
] | 6 | 2022-03-01T14:47:55.000Z | 2022-03-30T03:44:58.000Z | import turtle as tu
class vijay:
def __init__(self):
self.dress = [(149, 348),(152, 344),(151, 333),(144, 335),(137, 337),(103, 372),(101, 378),(67, 389),(59, 389),(53, 391),(8, 404),(17, 440),(37, 487),(65, 523),(80, 544),(98, 570),(124, 601),(164, 620),(201, 646),(222, 660),(236, 665),(262, 663),(3... | 107.826087 | 2,832 | 0.51371 |
6b124b91a85415ca48455c1aa848ee45cf190c37 | 2,099 | bzl | Python | tools/cpp/toolchain_utils.bzl | obruns/bazel | 654f36408319719d3a90849b2bd21bd3efd62d7a | [
"Apache-2.0"
] | 16,989 | 2015-09-01T19:57:15.000Z | 2022-03-31T23:54:00.000Z | tools/cpp/toolchain_utils.bzl | FreyaVPN/bazel | b4cc44c978bc0e25b6652b66018b6aad12bff820 | [
"Apache-2.0"
] | 12,562 | 2015-09-01T09:06:01.000Z | 2022-03-31T22:26:20.000Z | tools/cpp/toolchain_utils.bzl | FreyaVPN/bazel | b4cc44c978bc0e25b6652b66018b6aad12bff820 | [
"Apache-2.0"
] | 3,707 | 2015-09-02T19:20:01.000Z | 2022-03-31T17:06:14.000Z | # pylint: disable=g-bad-file-header
# Copyright 2016 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | 40.365385 | 158 | 0.736541 |
cff1655afc0969c1d89b5c9960a3a07ffd808580 | 2,753 | py | Python | app/model/tecnico.py | MacosPrintes001/webservice-paem | fa992e4bda40eaae3b585cee2ad2b65685104cc3 | [
"Apache-2.0"
] | null | null | null | app/model/tecnico.py | MacosPrintes001/webservice-paem | fa992e4bda40eaae3b585cee2ad2b65685104cc3 | [
"Apache-2.0"
] | null | null | null | app/model/tecnico.py | MacosPrintes001/webservice-paem | fa992e4bda40eaae3b585cee2ad2b65685104cc3 | [
"Apache-2.0"
] | null | null | null | from ..database import db
from .usuario import UsuarioModel
from .campus import CampusModel
from .base_model import BaseHasNameModel
from datetime import date
from app.model import campus
class TecnicoModel(BaseHasNameModel, db.Model):
__tablename__ = "tecnico"
id_tecnico = db.Column(db.Integer, primary_key... | 36.223684 | 101 | 0.626952 |
ab1ff678be9132753baa3bfdecbc7e9abd6e0fbc | 3,160 | py | Python | dataset/grid_dataset.py | archettialberto/neural_weighted_a_star | a7172f1de81ad5cc7e301031f271ded3e93a2283 | [
"MIT"
] | 2 | 2021-09-21T10:22:07.000Z | 2021-09-22T08:35:28.000Z | dataset/grid_dataset.py | archettialberto/neural_weighted_a_star | a7172f1de81ad5cc7e301031f271ded3e93a2283 | [
"MIT"
] | null | null | null | dataset/grid_dataset.py | archettialberto/neural_weighted_a_star | a7172f1de81ad5cc7e301031f271ded3e93a2283 | [
"MIT"
] | null | null | null | import os
from abc import ABC, abstractmethod
from pathlib import Path
import numpy as np
import torch
class GridDataset(torch.utils.data.Dataset, ABC):
def __init__(self, path, prefix, normalize_input=False):
super().__init__()
self.path = Path(path)
if prefix not in ["train", "val", "te... | 31.287129 | 84 | 0.573101 |
09600d4e623e9ff68379179aeacabd3a91d19005 | 18,821 | py | Python | nltk-drt/nltk_drt/temporaldrt.py | prodotiscus/nltk-drt | 6029f1357369b124758e86020734a55574a6a15a | [
"Apache-2.0"
] | 2 | 2021-12-28T09:02:57.000Z | 2022-01-04T07:02:31.000Z | nltk-drt/nltk_drt/temporaldrt.py | prodotiscus/nltk-drt | 6029f1357369b124758e86020734a55574a6a15a | [
"Apache-2.0"
] | 5 | 2022-03-20T23:11:29.000Z | 2022-03-20T23:30:03.000Z | nltk-drt/nltk_drt/temporaldrt.py | prodotiscus/nltk-drt | 6029f1357369b124758e86020734a55574a6a15a | [
"Apache-2.0"
] | null | null | null | """
Temporal extension of presuppdrt
"""
__author__ = "Peter Makarov, Alex Kislev, Emma Li"
__version__ = "1.0"
__date__ = "Tue, 24 Aug 2010"
#import presuppdrt as drt
from . import presuppdrt as drt
from nltk.sem.logic import Variable
from .presuppdrt import DrsDrawer
from .presuppdrt import AnaphoraResolutionExcept... | 49.528947 | 224 | 0.673397 |
81bf9bf3789a01465ed8ba22520b4eb32d25f97c | 2,530 | py | Python | dataview/base.py | joshloyal/DataView | 28fa57ff421115638244d59dccfaf5b3403be765 | [
"MIT"
] | null | null | null | dataview/base.py | joshloyal/DataView | 28fa57ff421115638244d59dccfaf5b3403be765 | [
"MIT"
] | null | null | null | dataview/base.py | joshloyal/DataView | 28fa57ff421115638244d59dccfaf5b3403be765 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import division
from dataview import data_types as types
from dataview.wrappers import DataViewMeta, registry
import dataview.data_utils as data_utils
class DataSchema(object):
def __init__(self):
self._schema... | 25.816327 | 80 | 0.652569 |
3a56f8b6053685f14e23dc861c1b60df270e79ee | 1,263 | py | Python | tests/test_exceptions.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | 1 | 2020-08-09T19:45:14.000Z | 2020-08-09T19:45:14.000Z | tests/test_exceptions.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | tests/test_exceptions.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | import pytest
from quart import Response
from quart.exceptions import (
abort, HTTPException, HTTPStatusException, MethodNotAllowed, RedirectRequired,
)
def test_abort() -> None:
with pytest.raises(HTTPStatusException):
abort(400)
def test_abort_with_arguments() -> None:
with pytest.raises(HTTP... | 30.071429 | 84 | 0.710214 |
e1a465054049af20afafe140f6baf9a5b62d8d2f | 3,583 | py | Python | app/migrations/0001_initial.py | wzy916/wzy | 5e491cc45c896fb1da79c63bae0e3fc3414a916e | [
"Apache-2.0"
] | null | null | null | app/migrations/0001_initial.py | wzy916/wzy | 5e491cc45c896fb1da79c63bae0e3fc3414a916e | [
"Apache-2.0"
] | null | null | null | app/migrations/0001_initial.py | wzy916/wzy | 5e491cc45c896fb1da79c63bae0e3fc3414a916e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-11-02 14:55
from __future__ import unicode_literals
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
... | 58.737705 | 329 | 0.636896 |
c2250eae7426360d53301a6dd4d1d8eef075d052 | 9,910 | py | Python | src/twisted/python/logfile.py | muelli/twisted | eacc5964187aebf5c34fa255c7e0a3700eaab15a | [
"MIT",
"Unlicense"
] | null | null | null | src/twisted/python/logfile.py | muelli/twisted | eacc5964187aebf5c34fa255c7e0a3700eaab15a | [
"MIT",
"Unlicense"
] | null | null | null | src/twisted/python/logfile.py | muelli/twisted | eacc5964187aebf5c34fa255c7e0a3700eaab15a | [
"MIT",
"Unlicense"
] | null | null | null | # -*- test-case-name: twisted.test.test_logfile -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
A rotating, browsable log file.
"""
# System Imports
import os
import glob
import time
import stat
from twisted.python import threadable
class BaseLogFile:
"""
The base class f... | 29.147059 | 86 | 0.571443 |
1ffddb09b20613df8c2908659e50fdb99e83aaf5 | 154 | py | Python | discoursesimplification/utils/ner/ner_string_parse_exception.py | kkatsamaktsis/PyDiscourseSimplification | 18d247894355b4b51f5abcced86e7a7292b17ac0 | [
"MIT"
] | null | null | null | discoursesimplification/utils/ner/ner_string_parse_exception.py | kkatsamaktsis/PyDiscourseSimplification | 18d247894355b4b51f5abcced86e7a7292b17ac0 | [
"MIT"
] | null | null | null | discoursesimplification/utils/ner/ner_string_parse_exception.py | kkatsamaktsis/PyDiscourseSimplification | 18d247894355b4b51f5abcced86e7a7292b17ac0 | [
"MIT"
] | null | null | null | class NERStringParseException(Exception):
def __init__(self, msg: str):
self.msg = msg
def __str__(self):
return repr(self.msg)
| 19.25 | 41 | 0.642857 |
e5a39e62eb6f9e077c98e8ae8ea5ae8624d9d248 | 6,602 | py | Python | GUI/Dialog/DMachineSetup/SWSlot/PWSlot22/PWSlot22.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | GUI/Dialog/DMachineSetup/SWSlot/PWSlot22/PWSlot22.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | GUI/Dialog/DMachineSetup/SWSlot/PWSlot22/PWSlot22.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""@package pyleecan.GUI.Dialog.DMachineSetup.SWSlot.PWSlot22.PWSlot22
SlotW22 Setup Page
@date Created on Wed Jul 15 14:30:54 2015
@copyright (C) 2015-2016 EOMYS ENGINEERING.
@author pierre_b
@todo unittest it
"""
import PyQt5.QtCore
from numpy import pi
from PyQt5.QtCore import pyqtSignal
fro... | 31.438095 | 87 | 0.59694 |
39e28d42fe135820bba22eeaff4cc916538f20af | 6,084 | py | Python | tests/core/test_db_validation.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | null | null | null | tests/core/test_db_validation.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | null | null | null | tests/core/test_db_validation.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | null | null | null | import random
import sqlite3
from contextlib import closing
from pathlib import Path
from typing import List
import aiosqlite
import pytest
from chia.cmds.db_validate_func import validate_v2
from chia.consensus.blockchain import Blockchain
from chia.consensus.default_constants import DEFAULT_CONSTANTS
from chia.conse... | 36.214286 | 118 | 0.686391 |
1e0782ac0b99c9becdfe0cb3df4dfe5172d9bc26 | 5,537 | py | Python | spinup/algos/sac/core.py | mksmsrkn/spinningup_pytorch | 1b1176126f293e44e0c2990cfda409b1e42409c9 | [
"MIT"
] | null | null | null | spinup/algos/sac/core.py | mksmsrkn/spinningup_pytorch | 1b1176126f293e44e0c2990cfda409b1e42409c9 | [
"MIT"
] | null | null | null | spinup/algos/sac/core.py | mksmsrkn/spinningup_pytorch | 1b1176126f293e44e0c2990cfda409b1e42409c9 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torch import nn
from torch.distributions import Normal
from gym.spaces import Box
EPS = 1e-8
LOG_STD_MAX = 2
LOG_STD_MIN = -20
class MLP(nn.Module):
def __init__(self, in_dim, hidden_sizes=(64,64), activation=nn.Tanh,
output_activation=None, output_scaler=1, d... | 42.267176 | 100 | 0.635543 |
9bce82e2e3685f04cd4f12d2d573cfc0cf576253 | 9,737 | py | Python | docsrc/conf.py | markusritschel/oceanpack | 53028431babda6fbea9d691ee6a4a94c99ada0c0 | [
"MIT"
] | null | null | null | docsrc/conf.py | markusritschel/oceanpack | 53028431babda6fbea9d691ee6a4a94c99ada0c0 | [
"MIT"
] | 5 | 2021-09-22T08:18:14.000Z | 2021-10-20T23:44:58.000Z | docsrc/conf.py | markusritschel/oceanpack | 53028431babda6fbea9d691ee6a4a94c99ada0c0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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 configuration values have a default; values that are commented out
# serve to show the default.
import os
impo... | 33.926829 | 122 | 0.701243 |
5ae35ac86029b8ada9c2fe8afaa3450b20066cbb | 586 | py | Python | Largest Rectangle in Histogram.py | AmanCSE-1/Campus-Coding-Test | 46c84d12353ac9628826e9e1f792f24ff3b37689 | [
"MIT"
] | null | null | null | Largest Rectangle in Histogram.py | AmanCSE-1/Campus-Coding-Test | 46c84d12353ac9628826e9e1f792f24ff3b37689 | [
"MIT"
] | null | null | null | Largest Rectangle in Histogram.py | AmanCSE-1/Campus-Coding-Test | 46c84d12353ac9628826e9e1f792f24ff3b37689 | [
"MIT"
] | null | null | null | ''' Given an array of integers heights representing the histogram's bar height where the width of each bar is 1,
return the area of the largest rectangle in the histogram. '''
## Public Test Case : Input: heights = [2,1,5,6,2,3]
# Output: 10
## Public Test Case : Input: heights = [2,4]
# ... | 26.636364 | 113 | 0.609215 |
1a436cebcf9557154a13f98baba8b64f33119dbf | 1,318 | py | Python | backend/group/migrations/0002_auto_20200812_2011.py | cjc7373/hackergame | 86971b4cf8a2761044d417b4c8bd934c3309d6fd | [
"MIT"
] | 2 | 2020-07-12T13:11:43.000Z | 2020-07-14T08:12:17.000Z | backend/group/migrations/0002_auto_20200812_2011.py | cjc7373/hackergame | 86971b4cf8a2761044d417b4c8bd934c3309d6fd | [
"MIT"
] | 1 | 2020-08-13T13:56:18.000Z | 2020-09-29T12:39:08.000Z | backend/group/migrations/0002_auto_20200812_2011.py | cjc7373/hackergame | 86971b4cf8a2761044d417b4c8bd934c3309d6fd | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-08-12 12:11
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('group'... | 34.684211 | 184 | 0.640364 |
36a010f2afd265dca702e0d08bbd791ca2be7e3e | 3,335 | py | Python | bring_container_to_current_workspace.py | sainathadapa/sway-wm-multi-disp-scripts | 7106852596046434acf4c98b29c8e1258351d7a1 | [
"MIT"
] | null | null | null | bring_container_to_current_workspace.py | sainathadapa/sway-wm-multi-disp-scripts | 7106852596046434acf4c98b29c8e1258351d7a1 | [
"MIT"
] | null | null | null | bring_container_to_current_workspace.py | sainathadapa/sway-wm-multi-disp-scripts | 7106852596046434acf4c98b29c8e1258351d7a1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import subprocess
import sys
import anytree as at
import necessaryFuncs as nf
def create_tree(root_json, root_node):
con_name = root_json['name']
if con_name is None:
con_name = 'container'
if con_name in ['__i3', 'topdock', 'bottomdock']:
return None
... | 31.462264 | 86 | 0.629685 |
1ec6f3cd1be5fdefd1236b9bb0677f1e8daec04a | 5,664 | py | Python | install/linux_x86_64/pt/fteproxy/Crypto/Random/Fortuna/FortunaAccumulator.py | getlantern/lantern-archive | 8d311928e8ab38fb1b206b0156b90c82e67a4d87 | [
"Apache-2.0"
] | 4 | 2015-08-14T17:34:32.000Z | 2017-03-18T16:52:46.000Z | install/linux_x86_64/pt/fteproxy/Crypto/Random/Fortuna/FortunaAccumulator.py | getlantern/lantern-archive | 8d311928e8ab38fb1b206b0156b90c82e67a4d87 | [
"Apache-2.0"
] | 1 | 2015-04-21T19:54:40.000Z | 2015-04-21T19:54:40.000Z | install/linux_x86_64/pt/fteproxy/Crypto/Random/Fortuna/FortunaAccumulator.py | getlantern/lantern-archive | 8d311928e8ab38fb1b206b0156b90c82e67a4d87 | [
"Apache-2.0"
] | 7 | 2015-11-28T02:36:40.000Z | 2020-09-27T23:19:24.000Z | # -*- coding: ascii -*-
#
# FortunaAccumulator.py : Fortuna's internal accumulator
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to ... | 36.541935 | 130 | 0.644951 |
6a8e765b09ea0be03f643bfc64049368d6cb7090 | 1,594 | py | Python | blueapps/account/views.py | springborland/bk-sops | a9057672c10efb5f2414a805a30ead4092429c76 | [
"Apache-2.0"
] | 1 | 2021-05-19T04:31:34.000Z | 2021-05-19T04:31:34.000Z | blueapps/account/views.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | blueapps/account/views.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 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... | 26.566667 | 115 | 0.702008 |
67ceb22f6fc15ceaabad393c5275b72bc6eebc2a | 2,640 | py | Python | Stack/test4.py | CrazyIdeaDream/DataStructuresandAlgorithms | 5a102a6b82c30f1190e68523356a7d31224fe086 | [
"MIT"
] | null | null | null | Stack/test4.py | CrazyIdeaDream/DataStructuresandAlgorithms | 5a102a6b82c30f1190e68523356a7d31224fe086 | [
"MIT"
] | null | null | null | Stack/test4.py | CrazyIdeaDream/DataStructuresandAlgorithms | 5a102a6b82c30f1190e68523356a7d31224fe086 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-#
# -------------------------------------------------------------------------------
# Name: ch5
# Author: xiaohuo
# Date: 2020/3/29
# Prohect_Name: data_structure
# IEDA_Name: PyCharm
# Create_Time: 21:57
# --------------------------------------------------------... | 25.631068 | 111 | 0.55303 |
a5c23d0d28d2204f5b49ddb1619089cf5895c5a4 | 5,592 | py | Python | UINotifier.py | tom66/scopeapp | b3364d2cebc0e6b8c5eb2ae5befdd29d15655a36 | [
"MIT"
] | 6 | 2020-11-29T21:13:37.000Z | 2022-03-19T23:57:39.000Z | UINotifier.py | tom66/scopeapp | b3364d2cebc0e6b8c5eb2ae5befdd29d15655a36 | [
"MIT"
] | null | null | null | UINotifier.py | tom66/scopeapp | b3364d2cebc0e6b8c5eb2ae5befdd29d15655a36 | [
"MIT"
] | 11 | 2021-12-13T01:03:19.000Z | 2022-02-21T03:35:43.000Z | """
This file is part of YAOS and is licenced under the MIT licence.
"""
import gettext
gettext.bindtextdomain('yaosapp', '/lang')
gettext.textdomain('yaosapp')
_ = gettext.gettext
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import time
# Y-offset for notifications
NOTIF... | 33.48503 | 102 | 0.574034 |
9e69293922399cc77129d71c42c0f32db30d3ba2 | 9,574 | py | Python | twisted/web/proxy.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 3 | 2020-06-20T23:31:06.000Z | 2021-01-11T02:17:16.000Z | twisted/web/proxy.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 1 | 2022-03-04T17:40:22.000Z | 2022-03-04T17:40:22.000Z | twisted/web/proxy.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 3 | 2018-11-09T03:38:09.000Z | 2020-02-24T06:26:10.000Z | # -*- test-case-name: twisted.web.test.test_proxy -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Simplistic HTTP proxy support.
This comes in two main variants - the Proxy and the ReverseProxy.
When a Proxy is in use, a browser trying to connect to a server (say,
www.yahoo.com) will ... | 31.493421 | 79 | 0.644454 |
ba6637585495e5bc4217d21e9ccf27c9e52accab | 308 | py | Python | cycada/models/models.py | peterzcc/cycada_release | bfd1a9dd01bdb2a956cad13b01f3e305930b7d09 | [
"BSD-2-Clause"
] | 532 | 2018-07-09T00:37:32.000Z | 2022-03-09T15:10:07.000Z | cycada/models/models.py | ckevin4747/cycada_review | aac0c4724d704165738bfad9684fbffa9337c211 | [
"BSD-2-Clause"
] | 41 | 2018-07-16T07:20:34.000Z | 2021-12-10T21:20:23.000Z | cycada/models/models.py | ckevin4747/cycada_review | aac0c4724d704165738bfad9684fbffa9337c211 | [
"BSD-2-Clause"
] | 143 | 2018-07-09T13:10:17.000Z | 2022-02-15T14:24:29.000Z | import torch
models = {}
def register_model(name):
def decorator(cls):
models[name] = cls
return cls
return decorator
def get_model(name, num_cls=10, **args):
net = models[name](num_cls=num_cls, **args)
if torch.cuda.is_available():
net = net.cuda()
return net
| 19.25 | 47 | 0.623377 |
119717f67ac7909897b317e8efee531437b001d5 | 2,144 | py | Python | src/alice_bob_unfair.py | plug-obp/plug-remote-python | 9b57989e3536b34fbbd7d6cafbc674ff6f4686eb | [
"MIT"
] | null | null | null | src/alice_bob_unfair.py | plug-obp/plug-remote-python | 9b57989e3536b34fbbd7d6cafbc674ff6f4686eb | [
"MIT"
] | null | null | null | src/alice_bob_unfair.py | plug-obp/plug-remote-python | 9b57989e3536b34fbbd7d6cafbc674ff6f4686eb | [
"MIT"
] | 1 | 2020-01-28T13:44:52.000Z | 2020-01-28T13:44:52.000Z | from soup_language import *
from language_server import server
def alice_bob_unfair():
init, wait, critical = 0, 1, 2
def alice():
def i2wa(env):
env['flag_alice'] = True
env['alice'] = wait
i2w = Behavior(lambda env: env['alice'] == init, i2wa, "alice_wantsIn")
... | 25.52381 | 79 | 0.5 |
88a69fbefb737fd3a11fb8fbdb0bd3b73fc2de77 | 894 | py | Python | isi_sdk_8_2_1/test/test_auth_wellknowns.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/test/test_auth_wellknowns.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/test/test_auth_wellknowns.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_1
from i... | 21.804878 | 85 | 0.702461 |
9b5c034738d6fdc5105fc3ccc6cd8c300161401f | 179,840 | py | Python | pyuvdata/utils.py | e-koch/pyuvdata | ac36067f195c75127b28f02479eda1eb7a3400ed | [
"BSD-2-Clause"
] | null | null | null | pyuvdata/utils.py | e-koch/pyuvdata | ac36067f195c75127b28f02479eda1eb7a3400ed | [
"BSD-2-Clause"
] | null | null | null | pyuvdata/utils.py | e-koch/pyuvdata | ac36067f195c75127b28f02479eda1eb7a3400ed | [
"BSD-2-Clause"
] | null | null | null | # -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""Commonly used utility functions."""
import re
import copy
import warnings
from collections.abc import Iterable
from copy import deepcopy
import numpy as np
from scipy.spatial.distance... | 38.190699 | 88 | 0.616454 |
48999c30f6ce3553bc46c4455cd9c9d9aeb16c39 | 1,244 | py | Python | gui menubarandtabs.py | Annonymous-error/general-codes | 06c8833a92e73331e5269b44e57c3f5efa284d7a | [
"Apache-2.0"
] | 1 | 2020-11-07T14:48:25.000Z | 2020-11-07T14:48:25.000Z | gui menubarandtabs.py | Annonymous-error/general-codes | 06c8833a92e73331e5269b44e57c3f5efa284d7a | [
"Apache-2.0"
] | null | null | null | gui menubarandtabs.py | Annonymous-error/general-codes | 06c8833a92e73331e5269b44e57c3f5efa284d7a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue May 5 00:05:41 2020
tabs in gui app
menu baar tutuorial
@author: Ayush Gupta
"""
import tkinter as tk
from tkinter import ttk
win=tk.Tk()
win.title('menubar with tabs')
############################
nb=ttk.Notebook(win)
page1=ttk.Frame(nb)
page2=ttk.Frame(n... | 22.618182 | 57 | 0.663987 |
cd47ae390791dbd92ab2b6ff6007182b0cdd5681 | 519 | py | Python | source/plugins/Patches/patch_to_cpp.py | supahas/PDA-Loader | ced7fa54ce3e82be7d93e5ffe3725a1f2d402830 | [
"MIT"
] | null | null | null | source/plugins/Patches/patch_to_cpp.py | supahas/PDA-Loader | ced7fa54ce3e82be7d93e5ffe3725a1f2d402830 | [
"MIT"
] | null | null | null | source/plugins/Patches/patch_to_cpp.py | supahas/PDA-Loader | ced7fa54ce3e82be7d93e5ffe3725a1f2d402830 | [
"MIT"
] | null | null | null | import os
from sys import argv
from textwrap import wrap
run, filename = argv
with open(filename,'r') as f:
lines = f.readlines()
for line in lines:
if (line.startswith("#") | line.startswith("\n") | line.startswith("\r")):
continue
if (line.startswith("//")):
print(" " + line)
continue
line = line.replac... | 23.590909 | 75 | 0.595376 |
0a838ff39522937305d0403755825aba6fc50232 | 27 | py | Python | to_nwb/extensions/buzsaki_meta/__init__.py | mpompolas/to_nwb | 1317f0ee0f4d80dde451d60d8eb5c6a544e214fe | [
"BSD-3-Clause"
] | 1 | 2020-03-31T20:02:01.000Z | 2020-03-31T20:02:01.000Z | to_nwb/extensions/buzsaki_meta/__init__.py | mpompolas/to_nwb | 1317f0ee0f4d80dde451d60d8eb5c6a544e214fe | [
"BSD-3-Clause"
] | 2 | 2020-08-27T18:16:04.000Z | 2020-09-08T18:43:34.000Z | to_nwb/extensions/buzsaki_meta/__init__.py | mpompolas/to_nwb | 1317f0ee0f4d80dde451d60d8eb5c6a544e214fe | [
"BSD-3-Clause"
] | 5 | 2018-04-04T21:27:23.000Z | 2019-04-01T13:40:00.000Z | from .buzsaki_meta import * | 27 | 27 | 0.814815 |
ea3e9e055b5acce4350c24000227b29c84761f1f | 593 | py | Python | Python Files/timeit_code3.py | gerryjenkinslb/cs22-slides-and-py-files | 9474f7a2e50d57afa13edc3b13c008f7295da747 | [
"MIT"
] | 28 | 2019-07-05T04:00:45.000Z | 2022-02-16T09:43:50.000Z | Python Files/timeit_code3.py | gerryjenkinslb/cs22-slides-and-py-files | 9474f7a2e50d57afa13edc3b13c008f7295da747 | [
"MIT"
] | null | null | null | Python Files/timeit_code3.py | gerryjenkinslb/cs22-slides-and-py-files | 9474f7a2e50d57afa13edc3b13c008f7295da747 | [
"MIT"
] | 22 | 2018-10-24T04:42:05.000Z | 2022-02-04T08:17:27.000Z | from timeit import Timer
def build_list(n):
return list(range(n)) # create list of 1 to n
def access(l): # do access at 0 n//2 and n-1
l[0] # we do three access to get a little more of the actual time and
l[n//2] # get average of times at different places in list
l[n-1]
n = 100
t1 = Timer("acc... | 21.178571 | 77 | 0.615514 |
d10190acc4b9fba9ef9b16aa49796a2eb17d2413 | 643 | py | Python | src/tests/test_pass.py | bspeagle/py_git_diff | 1674afc1dfac0408372e11945f4a36b297b77e66 | [
"MIT"
] | null | null | null | src/tests/test_pass.py | bspeagle/py_git_diff | 1674afc1dfac0408372e11945f4a36b297b77e66 | [
"MIT"
] | null | null | null | src/tests/test_pass.py | bspeagle/py_git_diff | 1674afc1dfac0408372e11945f4a36b297b77e66 | [
"MIT"
] | null | null | null | '''
Passing tests
'''
import os
from typing import Any
import pytest
from helpers.github import API
api = API()
pass_token = Any
pass_org = os.getenv('PASS_ORG')
pass_repo = os.getenv('PASS_REPO')
def test_pass_auth(token):
'''
Pass 'auth' to Github
'''
pass_token = token
api.authenticate(pass_... | 14.953488 | 40 | 0.659409 |
4941df9f3a7fa873ac43e8a2222e5c2fb6c2f6b7 | 596 | py | Python | unrest/settings.py | chriscauley/django-unrest | dd1078afe2333654d60f57d35ff5f5e990587155 | [
"MIT"
] | null | null | null | unrest/settings.py | chriscauley/django-unrest | dd1078afe2333654d60f57d35ff5f5e990587155 | [
"MIT"
] | null | null | null | unrest/settings.py | chriscauley/django-unrest | dd1078afe2333654d60f57d35ff5f5e990587155 | [
"MIT"
] | null | null | null | # usage: (in project settings file)
# from unrest.settings import get_secret_key
# SECRET_KEY = get_secret_key(BASE_DIR)
import os
from django.core.management.utils import get_random_secret_key
def get_secret_key(BASE_DIR):
key_path = os.path.join(BASE_DIR, 'settings', '.secret_key')
if os.path.exists(key_pat... | 31.368421 | 64 | 0.674497 |
63bec2f2c75a4cde03f846d677da00ef2c00fed3 | 212 | py | Python | source/guiComponents/tkinterImage.py | staujd02/Pi-RFID-Video-Player | 613d5a9355b660afb5414b3f4a9dad219b69fc36 | [
"Apache-2.0"
] | 1 | 2020-02-15T15:21:03.000Z | 2020-02-15T15:21:03.000Z | source/guiComponents/tkinterImage.py | staujd02/Pi-RFID-Video-Player | 613d5a9355b660afb5414b3f4a9dad219b69fc36 | [
"Apache-2.0"
] | 8 | 2019-12-14T16:31:13.000Z | 2021-05-22T23:06:35.000Z | source/guiComponents/tkinterImage.py | staujd02/Pi-RFID-Video-Player | 613d5a9355b660afb5414b3f4a9dad219b69fc36 | [
"Apache-2.0"
] | null | null | null | from PIL import Image
from PIL import ImageTk
class TkinterImage(object):
def __init__(self, path):
self.path = path
def getImage(self):
return ImageTk.PhotoImage(Image.open(self.path)) | 21.2 | 56 | 0.693396 |
99692f7ef577cebc4657de1c0837a81201c08b11 | 4,307 | py | Python | combine.py | online-behaviour/2017-election | b6c0b8a52336c26909b8c852de55d18d38a4cbfb | [
"Apache-2.0"
] | null | null | null | combine.py | online-behaviour/2017-election | b6c0b8a52336c26909b8c852de55d18d38a4cbfb | [
"Apache-2.0"
] | null | null | null | combine.py | online-behaviour/2017-election | b6c0b8a52336c26909b8c852de55d18d38a4cbfb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3 -W all
"""
combine: combine results of different machine learners
usage: combine -T train-file [ -t test-file] [-m]
note: expected input line format: gold-label label-1 label-2 ...
20180118 erikt(at)xs4all.nl
"""
import getopt
import sys
COMMAND = sys.argv[0]
USAGE = "usage: "+COMMA... | 35.891667 | 148 | 0.604829 |
66cd9dc73bd4b8abd066dbd225712f192e4a22a0 | 6,187 | py | Python | pr_copula/main_copula_density.py | edfong/MP | 276ed8d7bb36d635ff2647c8a45622b5636b6087 | [
"MIT"
] | 5 | 2021-05-03T20:48:05.000Z | 2022-03-17T10:38:13.000Z | pr_copula/main_copula_density.py | edfong/MP | 276ed8d7bb36d635ff2647c8a45622b5636b6087 | [
"MIT"
] | null | null | null | pr_copula/main_copula_density.py | edfong/MP | 276ed8d7bb36d635ff2647c8a45622b5636b6087 | [
"MIT"
] | null | null | null | from scipy.optimize import minimize
from collections import namedtuple
import time
import numpy as np
from tqdm import tqdm
#import jax
import jax.numpy as jnp
from jax import vmap
from jax.random import permutation,PRNGKey,split
#import package functions
from . import copula_density_functions as mvcd
from . import s... | 37.271084 | 142 | 0.700501 |
e4d8dda3bd4f6cca99d7c3f442ebbf596879b689 | 10,802 | py | Python | docker/docker.py | 1105042987/Dominant-Patterns | 713b535e80aff0f04e20d1ef56d005e183a5d8a5 | [
"MIT"
] | 1 | 2021-06-14T12:01:24.000Z | 2021-06-14T12:01:24.000Z | docker/docker.py | 1105042987/Dominant-Patterns | 713b535e80aff0f04e20d1ef56d005e183a5d8a5 | [
"MIT"
] | null | null | null | docker/docker.py | 1105042987/Dominant-Patterns | 713b535e80aff0f04e20d1ef56d005e183a5d8a5 | [
"MIT"
] | null | null | null | import os,sys
base = sys.path[0]
sys.path.append(os.path.abspath(os.path.join(base, "..")))
import torch
import shutil
import importlib
import traceback
from tqdm import tqdm
from os.path import join as PJOIN
from tensorboardX import SummaryWriter
from collections import Iterator
from docker.tool import meter,yellow
im... | 43.732794 | 126 | 0.548324 |
66800340d7cba567183c954d93c4fc6b8b67f7d6 | 4,743 | py | Python | src/gen_types.py | mdda/libgpuarray | 5e9d33b3ad80684158938c2937a81161939992eb | [
"0BSD"
] | null | null | null | src/gen_types.py | mdda/libgpuarray | 5e9d33b3ad80684158938c2937a81161939992eb | [
"0BSD"
] | null | null | null | src/gen_types.py | mdda/libgpuarray | 5e9d33b3ad80684158938c2937a81161939992eb | [
"0BSD"
] | null | null | null | import sys
from mako import exceptions
from mako.template import Template
TYPEMAP = {}
i = 0
def add_type(name, C, sz):
global i
TYPEMAP[i] = ("ga_"+name, sz), name, C
i+=1
add_type("bool", "uint8_t", 1)
add_type("byte", "int8_t", 1)
add_type("ubyte", "uint8_t", 1)
for name, sz in [("short", 2), ("int"... | 20.097458 | 108 | 0.623445 |
8fa24ae6d5eb659820e0717b905bfaa4ebcc1041 | 2,855 | py | Python | bluebrain/repo-patches/packages/highfive/package.py | BlueBrain/Spack | dc328512c70e182f3c24bb0ce64fa3586482bdf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | bluebrain/repo-patches/packages/highfive/package.py | BlueBrain/Spack | dc328512c70e182f3c24bb0ce64fa3586482bdf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | bluebrain/repo-patches/packages/highfive/package.py | BlueBrain/Spack | dc328512c70e182f3c24bb0ce64fa3586482bdf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Highfive(CMakePackage):
"""HighFive - Header only C++ HDF5 interface"""
homepage = "... | 43.923077 | 93 | 0.663398 |
87f104de1a8187ad8950a53a846e75efe66643e9 | 8,822 | py | Python | test/master_buffering_test.py | AndyDiamondstein/vitess | 295c300cd22c109f8be7a454c03c96c6b8e3b55c | [
"BSD-3-Clause"
] | 1 | 2021-03-14T10:04:18.000Z | 2021-03-14T10:04:18.000Z | test/master_buffering_test.py | AndyDiamondstein/vitess | 295c300cd22c109f8be7a454c03c96c6b8e3b55c | [
"BSD-3-Clause"
] | null | null | null | test/master_buffering_test.py | AndyDiamondstein/vitess | 295c300cd22c109f8be7a454c03c96c6b8e3b55c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
"""Tests that VTGate buffers master traffic when expected."""
import logging
import struct
import unittest
from vtdb import keyrange
from vtdb import vtgate_client
import environment
import tablet
import utils
shard_0_master = tablet.Tablet()
shard_0_replica1 = tablet.Tablet(... | 30.525952 | 79 | 0.705622 |
d391615f7d107a542df2e89a464951c787492df4 | 2,031 | py | Python | dbd-course-recommender/course_recommender/users/views.py | singh-priyank/DBMS_Course | 6538cd7bc2172b8a54c6c71776a2f5ad4daeeb32 | [
"MIT"
] | 1 | 2020-11-13T12:37:28.000Z | 2020-11-13T12:37:28.000Z | dbd-course-recommender/course_recommender/users/views.py | singh-priyank/DBMS_Course | 6538cd7bc2172b8a54c6c71776a2f5ad4daeeb32 | [
"MIT"
] | 1 | 2020-11-17T07:17:29.000Z | 2021-04-23T20:39:59.000Z | dbd-course-recommender/course_recommender/users/views.py | singh-priyank/DBMS_Course | 6538cd7bc2172b8a54c6c71776a2f5ad4daeeb32 | [
"MIT"
] | null | null | null | import random
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, redirect, render
from course.models import *
from course.services import get_enrolled_subjects, get_recommmendations
fr... | 34.423729 | 86 | 0.658296 |
d02e72b10c35810edfb8a5c886165edc4f25669c | 49 | py | Python | src/test/python/testSmvUserLib/library/submod/lib2.py | ninjapapa/SMV2 | 42cf9f176c3ec0bed61f66fbf859c18d97027dd6 | [
"Apache-2.0"
] | null | null | null | src/test/python/testSmvUserLib/library/submod/lib2.py | ninjapapa/SMV2 | 42cf9f176c3ec0bed61f66fbf859c18d97027dd6 | [
"Apache-2.0"
] | 34 | 2022-02-26T04:27:34.000Z | 2022-03-29T23:05:47.000Z | src/test/python/testSmvUserLib/library/submod/lib2.py | ninjapapa/SMV2 | 42cf9f176c3ec0bed61f66fbf859c18d97027dd6 | [
"Apache-2.0"
] | null | null | null | # dummy library file
def mylib2method():
pass
| 9.8 | 20 | 0.714286 |
07981c9f0e60589441b17283bb042ff17a222e56 | 772 | py | Python | Gabaritos/Caderno-05-gabarito.py | AnabeatrizMacedo241/Python-101 | 3aca95ece3b81456d87c5b8e08937d585fd79845 | [
"MIT"
] | 3 | 2021-07-12T16:25:44.000Z | 2021-07-27T15:11:59.000Z | Gabaritos/Caderno-05-gabarito.py | AnabeatrizMacedo241/Python-101 | 3aca95ece3b81456d87c5b8e08937d585fd79845 | [
"MIT"
] | null | null | null | Gabaritos/Caderno-05-gabarito.py | AnabeatrizMacedo241/Python-101 | 3aca95ece3b81456d87c5b8e08937d585fd79845 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 25 15:42:54 2021
@author: anabeatrizmacedo
"""
1.
x = -1
if x < 0:
raise Exception("Número menor do que zero")
2.
def num():
try:
num1 = int(input("Digite um número: "))
except:
print ("Você não digitou... | 19.794872 | 68 | 0.536269 |
a22bb709482ef5114348f71048b11e4cea94cccf | 15,280 | py | Python | resources/lib/globals.py | vascobraga41/plugin.video.netflix | d0be74cc8c0d51c19c606751bd212ff09254e5d1 | [
"MIT"
] | null | null | null | resources/lib/globals.py | vascobraga41/plugin.video.netflix | d0be74cc8c0d51c19c606751bd212ff09254e5d1 | [
"MIT"
] | null | null | null | resources/lib/globals.py | vascobraga41/plugin.video.netflix | d0be74cc8c0d51c19c606751bd212ff09254e5d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix)
Copyright (C) 2018 Caphm (original implementation module)
Global addon constants
SPDX-License-Identifier: MIT
See LICENSES/MIT.md for more information.
"""
# Everything that is to be globally accessible must be ... | 49.771987 | 120 | 0.561846 |
35cb851b2012138dbd38efc6b931fe490f309b19 | 3,193 | py | Python | createPriorities.py | AndrewBuck/cosmic | f59771eb4c5c8a8e6a940bb118d34bdeac278894 | [
"Unlicense"
] | null | null | null | createPriorities.py | AndrewBuck/cosmic | f59771eb4c5c8a8e6a940bb118d34bdeac278894 | [
"Unlicense"
] | null | null | null | createPriorities.py | AndrewBuck/cosmic | f59771eb4c5c8a8e6a940bb118d34bdeac278894 | [
"Unlicense"
] | null | null | null | import os
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cosmic.settings")
django.setup()
from cosmicapp.models import *
#--------------------------------------------------------------------------------
#TODO: This table needs a constraint that name/priority is unique for all rows.
priority, create... | 24.007519 | 81 | 0.671156 |
488edec88defea0e937efa99117fa95b823ce223 | 40,523 | py | Python | src/generation/cil/cil_generator.py | harry1911/CoolCompiler | 0eb4636bb50341d94f757b36d2362e9d03959046 | [
"MIT"
] | null | null | null | src/generation/cil/cil_generator.py | harry1911/CoolCompiler | 0eb4636bb50341d94f757b36d2362e9d03959046 | [
"MIT"
] | null | null | null | src/generation/cil/cil_generator.py | harry1911/CoolCompiler | 0eb4636bb50341d94f757b36d2362e9d03959046 | [
"MIT"
] | null | null | null |
from general import visitor
from general import ast_hierarchy as ast_cool
from general import cil_hierarchy as ast_cil
from .dataTypesCollector import TypesCollector
from .context import Scope, ObjecContext, Defaults
from collections import OrderedDict
class CilGeneratorVisitor:
def __init__(self, astCool, envi... | 37.871963 | 125 | 0.665795 |
0c3538e560d86ee8d3781c58a35fffad78aa69e7 | 2,495 | py | Python | aries_cloudagent/protocols/introduction/messages/tests/test_invitation.py | euroledger/aries-cloudagent-python | caf457276b19df374c16c2890e1c7e4914f46254 | [
"Apache-2.0"
] | 2 | 2020-02-26T14:22:44.000Z | 2021-05-06T20:13:36.000Z | aries_cloudagent/protocols/introduction/messages/tests/test_invitation.py | euroledger/aries-cloudagent-python | caf457276b19df374c16c2890e1c7e4914f46254 | [
"Apache-2.0"
] | 6 | 2021-03-10T20:05:19.000Z | 2022-02-27T05:41:09.000Z | aries_cloudagent/protocols/introduction/messages/tests/test_invitation.py | euroledger/aries-cloudagent-python | caf457276b19df374c16c2890e1c7e4914f46254 | [
"Apache-2.0"
] | 4 | 2020-02-19T23:02:11.000Z | 2021-11-18T11:33:43.000Z | from unittest import mock, TestCase
from asynctest import TestCase as AsyncTestCase
from ....connections.messages.connection_invitation import ConnectionInvitation
from ..invitation import Invitation
from ...message_types import INVITATION, PROTOCOL_PACKAGE
class TestConfig:
label = "Label"
did = "did:sov:Q... | 34.178082 | 87 | 0.703808 |
480467f865fae8ba1e2bc45837c26434d52917dc | 446 | py | Python | src/tagger.py | bamdadsabbagh/tagger | c34eb031dd4fe4a0c5ecb228eb32ddfd73983214 | [
"MIT"
] | 1 | 2020-11-30T15:40:36.000Z | 2020-11-30T15:40:36.000Z | src/tagger.py | bamdadsabbagh/tagger | c34eb031dd4fe4a0c5ecb228eb32ddfd73983214 | [
"MIT"
] | 30 | 2020-07-09T10:21:26.000Z | 2022-02-04T16:12:24.000Z | src/tagger.py | bamdadsabbagh/tagger | c34eb031dd4fe4a0c5ecb228eb32ddfd73983214 | [
"MIT"
] | null | null | null | # components
from env import *
from tagger_write_none import TaggerWriteNone
from tagger_write_data import TaggerWriteData
# packages
import style
def Tagger(files, discogs):
if discogs is None:
TaggerWriteNone(files)
return
print(style.blue(discogs['json'].get('artists_sort') + ' - ' + disc... | 20.272727 | 97 | 0.692825 |
f53592aec332b6e3174c1c82cd9c1c6d0bc00753 | 5,541 | py | Python | azure-mgmt-network/azure/mgmt/network/models/express_route_circuit.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:16:34.000Z | 2018-11-09T06:16:34.000Z | azure-mgmt-network/azure/mgmt/network/models/express_route_circuit.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | null | null | null | azure-mgmt-network/azure/mgmt/network/models/express_route_circuit.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:17:41.000Z | 2018-11-09T06:17:41.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 50.372727 | 354 | 0.697708 |
7f4f23677f52a4a2abda5cc382a1b8d695e0fe04 | 1,361 | py | Python | services/rank.py | openghg/openghg | 9a05dd6fe3cee6123898b8f390cfaded08dbb408 | [
"Apache-2.0"
] | 5 | 2021-03-02T09:04:07.000Z | 2022-01-25T09:58:16.000Z | services/rank.py | openghg/openghg | 9a05dd6fe3cee6123898b8f390cfaded08dbb408 | [
"Apache-2.0"
] | 229 | 2020-09-30T15:08:39.000Z | 2022-03-31T14:23:55.000Z | services/rank.py | openghg/openghg | 9a05dd6fe3cee6123898b8f390cfaded08dbb408 | [
"Apache-2.0"
] | null | null | null | from typing import Dict
from openghg.store.base import Datasource
from openghg.store import ObsSurface
def set_rank(args: Dict) -> None:
obs = ObsSurface.load()
rank = args["rank"]
uuid = args["uuid"]
dateranges = args["dateranges"]
overwrite = args["overwrite"]
obs.set_rank(uuid=uuid, rank=... | 26.686275 | 125 | 0.67083 |
9aee0c7c10977c3c7dab04f0ca3dce82cf079338 | 903 | py | Python | swagger-iu/swagger-demo.py | donwany/momo | 1974169f6b62ecae54870da29a1114f493d7d03d | [
"Apache-2.0"
] | 2 | 2020-02-27T06:00:23.000Z | 2021-06-25T09:39:42.000Z | swagger-iu/swagger-demo.py | donwany/momo | 1974169f6b62ecae54870da29a1114f493d7d03d | [
"Apache-2.0"
] | null | null | null | swagger-iu/swagger-demo.py | donwany/momo | 1974169f6b62ecae54870da29a1114f493d7d03d | [
"Apache-2.0"
] | 3 | 2020-07-15T16:50:09.000Z | 2021-06-22T18:55:49.000Z | # http://127.0.0.1:5000/apidocs/
from flask import Flask
from flasgger import Swagger
from flask_restful import Api, Resource
app = Flask(__name__)
api = Api(app)
swagger = Swagger(app)
class Username(Resource):
def get(self, username):
"""
This examples uses FlaskRESTful Resource
It works a... | 23.153846 | 58 | 0.568106 |
9ba4dd14143fc987bf7e6b489bdc2c0be3b46ad2 | 165 | py | Python | server/views.py | JBris/vue-python-graphql | ba208130f572f29c7f427784c1e6997f4168ee01 | [
"MIT"
] | 7 | 2020-06-08T02:57:33.000Z | 2021-05-06T12:03:29.000Z | server/views.py | JBris/vue-aiohttp-graphql | ba208130f572f29c7f427784c1e6997f4168ee01 | [
"MIT"
] | 2 | 2021-03-10T14:11:41.000Z | 2022-02-13T10:30:37.000Z | server/views.py | JBris/vue-aiohttp-graphql | ba208130f572f29c7f427784c1e6997f4168ee01 | [
"MIT"
] | 2 | 2020-06-21T09:38:28.000Z | 2020-07-15T03:29:19.000Z | from aiohttp import web
async def index(request):
res = { "message": "Please use the /graphql and /graphiql endpoints." }
return web.json_response(data=res) | 33 | 75 | 0.715152 |
e49ea48691e81ca6ce760e0c1c94afe0fc152645 | 7,660 | py | Python | clientsForLIne/client5.py | Aliced3645/DataCenterMarketing | 67bc485e73cf538498a89b28465afb822717affb | [
"Apache-2.0"
] | 1 | 2015-05-23T00:07:36.000Z | 2015-05-23T00:07:36.000Z | clientsForLIne/client5.py | Aliced3645/DataCenterMarketing | 67bc485e73cf538498a89b28465afb822717affb | [
"Apache-2.0"
] | null | null | null | clientsForLIne/client5.py | Aliced3645/DataCenterMarketing | 67bc485e73cf538498a89b28465afb822717affb | [
"Apache-2.0"
] | null | null | null | import threading
from scapy.all import *
import os
import subprocess
import json
import argparse
import random
import socket
from struct import *
import datetime
import pcapy
import sys
import time
parser = argparse.ArgumentParser(description='Client')
parser.add_argument('-interface', dest='interface', action='store... | 34.349776 | 1,038 | 0.637598 |
b242016f050e49a669400dabcfb71654c057e11f | 2,026 | py | Python | test/pypendency/test_relations.py | Taschenbergerm/pypendency | d941f584cabd0e6acc56ec3df43be174198ae4b7 | [
"Apache-2.0"
] | null | null | null | test/pypendency/test_relations.py | Taschenbergerm/pypendency | d941f584cabd0e6acc56ec3df43be174198ae4b7 | [
"Apache-2.0"
] | 1 | 2021-06-23T15:05:40.000Z | 2021-06-23T15:05:40.000Z | test/pypendency/test_relations.py | Taschenbergerm/pypendency | d941f584cabd0e6acc56ec3df43be174198ae4b7 | [
"Apache-2.0"
] | null | null | null | import uuid
import pytest
from pypendency.models.generics import BaseNode, Relation, Direction
def test_relation_hash():
external_node_id_1 = str(uuid.uuid4())
external_node_id_2 = str(uuid.uuid4())
node1 = BaseNode("E1",
slug="e1",
type="Service",
... | 31.169231 | 91 | 0.564166 |
e0bad462716adf9a18c7a6fdad8a8b9c1f5000c7 | 240 | py | Python | python/testData/refactoring/extractmethod/OutNotEmptyStatements2.after.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/refactoring/extractmethod/OutNotEmptyStatements2.after.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/refactoring/extractmethod/OutNotEmptyStatements2.after.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | def f():
a = 1
a, result = sum_squares(a)
print("Sum of squares: " + a + " = " + result)
def sum_squares(a_new):
result = 0
while a_new < 10:
result += a_new * a_new
a_new += 1
return a_new, result
| 18.461538 | 50 | 0.525 |
a910d63f982eeeb59e30b7de828f8fb26a71917d | 680 | py | Python | Chapter09/combining/join.py | PacktPublishing/Hands-On-Reactive-Programming-with-Python | d9da4f3f070695508bb36ef9d97f1212ecaf6fab | [
"MIT"
] | 56 | 2018-06-28T05:04:36.000Z | 2022-02-06T18:36:29.000Z | Chapter09/combining/join.py | azataiot/Hands-On-Reactive-Programming-with-Python | d9da4f3f070695508bb36ef9d97f1212ecaf6fab | [
"MIT"
] | 2 | 2019-08-19T03:51:49.000Z | 2019-09-25T09:00:57.000Z | Chapter09/combining/join.py | azataiot/Hands-On-Reactive-Programming-with-Python | d9da4f3f070695508bb36ef9d97f1212ecaf6fab | [
"MIT"
] | 18 | 2018-09-16T05:50:13.000Z | 2022-01-02T19:59:04.000Z | import rx
import rx.operators as ops
from rx.subject import Subject
import time
numbers1 = Subject()
numbers2 = Subject()
numbers1.pipe(
ops.join(
numbers2,
lambda i: rx.just(True).pipe(ops.delay(200)),
lambda i: rx.just(True).pipe(ops.delay(300)),
),
ops.starmap(lambda i, j: i + j... | 21.935484 | 59 | 0.667647 |
d791f03f450e7dcaa0e4ac6b88bfc692434452fe | 1,542 | py | Python | YoutubeDownloader/putload/views.py | hilton-edeir/Youtube-Downloader | d2f013aa4cc28e40e6fd8be1af3693a8f2b7d174 | [
"MIT"
] | null | null | null | YoutubeDownloader/putload/views.py | hilton-edeir/Youtube-Downloader | d2f013aa4cc28e40e6fd8be1af3693a8f2b7d174 | [
"MIT"
] | null | null | null | YoutubeDownloader/putload/views.py | hilton-edeir/Youtube-Downloader | d2f013aa4cc28e40e6fd8be1af3693a8f2b7d174 | [
"MIT"
] | null | null | null | from django.contrib import messages
from django.shortcuts import render
from pytube import YouTube
def home(request):
if request.method == "POST":
try:
link = request.POST['yt_link']
video = YouTube(link)
return render(request, "video.html", {"video": video, "link": li... | 31.469388 | 99 | 0.639429 |
525c9d0e6428a6636ba78bbdc7f955b0ffd9b37c | 2,891 | py | Python | http_server_root/dashboard.py | andycavatorta/pinball | f718982ed76521090f5eee5fb5a25cd3e8ce5ce4 | [
"MIT"
] | 1 | 2021-04-01T17:33:48.000Z | 2021-04-01T17:33:48.000Z | http_server_root/dashboard.py | andycavatorta/pinball | f718982ed76521090f5eee5fb5a25cd3e8ce5ce4 | [
"MIT"
] | null | null | null | http_server_root/dashboard.py | andycavatorta/pinball | f718982ed76521090f5eee5fb5a25cd3e8ce5ce4 | [
"MIT"
] | null | null | null | import datetime
from http.server import HTTPServer, SimpleHTTPRequestHandler
import json
import os
import queue
import time
import threading
import socketserver
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
tb_path = os.path.dirname(os.path.realpath(__file__))
clients = []
class SimpleChat(WebSoc... | 33.616279 | 116 | 0.665168 |
f59412f444a3cd43690841dd8e6e5e7768a13216 | 3,294 | py | Python | GeneTools/nanoarg/mapping_table.py | gaarangoa/genomic-scripts | e7ebcd61d6b1b7d8e89899fae19df6d6ebe311e0 | [
"BSD-2-Clause"
] | null | null | null | GeneTools/nanoarg/mapping_table.py | gaarangoa/genomic-scripts | e7ebcd61d6b1b7d8e89899fae19df6d6ebe311e0 | [
"BSD-2-Clause"
] | null | null | null | GeneTools/nanoarg/mapping_table.py | gaarangoa/genomic-scripts | e7ebcd61d6b1b7d8e89899fae19df6d6ebe311e0 | [
"BSD-2-Clause"
] | null | null | null | import click
import json
import logging
import pandas as pd
from tqdm import tqdm
import sys
origins = {
1:'ARGs',
2:'MGEs',
4:'MRGs',
3:'Functional Genes'
}
pathogens = {
1352: 'Enterococcus faecium',
1280: 'Staphylococcus aureus',
573: 'Klebsiella pneumonia',
470: 'Acinetobacter baum... | 26.352 | 125 | 0.563752 |
d1c76e27d4ca05a30048c993fb168157bce0d15f | 874 | py | Python | buggy_python_code.py | ppochop/pv080_buggy_python | a61f08ea3d0f9e632c3eacb3460f876a7117af9a | [
"MIT"
] | null | null | null | buggy_python_code.py | ppochop/pv080_buggy_python | a61f08ea3d0f9e632c3eacb3460f876a7117af9a | [
"MIT"
] | 1 | 2021-05-12T07:22:43.000Z | 2021-05-12T07:34:35.000Z | buggy_python_code.py | pernitz/kryptocviko | ac36930c41dea7ce6f3861c0f5e273c001a3c58b | [
"MIT"
] | null | null | null | # contains bunch of buggy examples
# taken from https://hackernoon.com/10-common-security-gotchas-in-python-and-how-to-avoid-them-e19fbe265e03
import cPickle
import subprocess
import base64
import subprocess
import flask
# Input injection
def transcode_file(request, filename):
command = 'ffmpeg -i "{so... | 24.971429 | 108 | 0.688787 |
b2c6c0cda29db0893eaf7fa5e01cff592736cf89 | 123 | py | Python | padasip/misc/__init__.py | huangshunliang/padasip | b44c2815000dd4d1b855c49e469072e919df15cd | [
"MIT"
] | 194 | 2016-08-28T09:23:19.000Z | 2022-03-30T02:55:22.000Z | padasip/misc/__init__.py | huangshunliang/padasip | b44c2815000dd4d1b855c49e469072e919df15cd | [
"MIT"
] | 14 | 2016-11-15T13:33:53.000Z | 2022-02-04T13:41:12.000Z | padasip/misc/__init__.py | huangshunliang/padasip | b44c2815000dd4d1b855c49e469072e919df15cd | [
"MIT"
] | 41 | 2016-12-07T19:40:25.000Z | 2022-02-24T21:32:19.000Z | from padasip.misc.error_evaluation import MSE, RMSE, MAE, logSE
from padasip.misc.error_evaluation import get_mean_error
| 24.6 | 63 | 0.837398 |
842867ac8128e68e7708ca621b29fddc5a1441bb | 1,552 | py | Python | assets/img/posts/Resize.py | jmtorrente/sleek | 2a959260334ff025ace244be6e46ebda3de5e2ec | [
"MIT"
] | null | null | null | assets/img/posts/Resize.py | jmtorrente/sleek | 2a959260334ff025ace244be6e46ebda3de5e2ec | [
"MIT"
] | null | null | null | assets/img/posts/Resize.py | jmtorrente/sleek | 2a959260334ff025ace244be6e46ebda3de5e2ec | [
"MIT"
] | null | null | null | ################################################################################################
# Name: Image_Resize
# Desc: Compress image file using python
# Date: 2019-02-10
# Author: jmtorrented
################################################################################################
from PIL import Image
f... | 38.8 | 96 | 0.571521 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.