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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1cf20d41825b12529c428a35401ff7178dc73a6f | 4,315 | py | Python | logistic_regression_predict.py | JRMeyer/tensorflow-tutorial | dbbf65bc7e4516a61d27d30954bf59e1477e28f3 | [
"MIT"
] | 54 | 2016-02-01T16:45:00.000Z | 2021-05-14T03:50:32.000Z | logistic_regression_predict.py | JRMeyer/tensorflow-tutorial | dbbf65bc7e4516a61d27d30954bf59e1477e28f3 | [
"MIT"
] | 3 | 2017-02-20T14:09:38.000Z | 2020-06-09T18:38:34.000Z | logistic_regression_predict.py | JRMeyer/tensorflow-tutorial | dbbf65bc7e4516a61d27d30954bf59e1477e28f3 | [
"MIT"
] | 33 | 2016-02-23T20:20:02.000Z | 2021-06-29T21:06:13.000Z | import numpy as np
import tensorflow as tf
import tarfile
import os
def csv_to_numpy_array(filePath, delimiter):
return np.genfromtxt(filePath, delimiter=delimiter, dtype=None)
def import_data():
if "data" not in os.listdir(os.getcwd()):
# Untar directory of data if we haven't already
tarObjec... | 32.689394 | 208 | 0.673465 |
cd54172cf1f4cdc52fe76d965cbcefb43775cf21 | 4,202 | py | Python | test/test_cli/test_restore_state.py | brenting/SMAC3 | f628d8b83f9f1803054d6e39bce7a51ab033dff1 | [
"BSD-3-Clause"
] | 51 | 2019-02-01T19:43:37.000Z | 2022-03-16T09:07:03.000Z | test/test_cli/test_restore_state.py | brenting/SMAC3 | f628d8b83f9f1803054d6e39bce7a51ab033dff1 | [
"BSD-3-Clause"
] | 2 | 2019-02-23T18:54:22.000Z | 2019-11-09T01:30:32.000Z | test/test_cli/test_restore_state.py | brenting/SMAC3 | f628d8b83f9f1803054d6e39bce7a51ab033dff1 | [
"BSD-3-Clause"
] | 35 | 2019-02-08T02:00:31.000Z | 2022-03-01T23:17:00.000Z | import os
import sys
import unittest
from nose.plugins.attrib import attr
import shutil
import numpy as np
from unittest import mock
from ConfigSpace.hyperparameters import UniformFloatHyperparameter
from smac.configspace import ConfigurationSpace
from smac.smac_cli import SMACCLI
from smac.scenario.scenario import... | 37.185841 | 89 | 0.627082 |
6064ac97074de63384e40a5e63bc24fce3c4130d | 824 | py | Python | tests/view/test_headless_view.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 3 | 2021-01-17T23:32:07.000Z | 2022-01-30T14:49:16.000Z | tests/view/test_headless_view.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-01-17T13:37:56.000Z | 2021-04-14T12:28:49.000Z | tests/view/test_headless_view.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-04-02T14:53:38.000Z | 2021-04-20T11:10:17.000Z | import unittest
from datetime import datetime
from chillow.model.cell import Cell
from chillow.model.direction import Direction
from chillow.model.game import Game
from chillow.model.player import Player
from chillow.view.headless_view import HeadlessView
class HeadlessViewTest(unittest.TestCase):
def setUp(sel... | 28.413793 | 78 | 0.661408 |
805a4bdcc21f5ea55bb7475e812f845fb5e667c9 | 2,226 | py | Python | data/cirq_new/cirq_program/startCirq_noisy626.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy626.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy626.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=19
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
def make_circuit(n: int, input_qubit):
c = cirq.Ci... | 32.735294 | 77 | 0.688679 |
8d84d15aa74edafe4471d61442c042b7f6b81d68 | 1,623 | py | Python | chatBotStable/g4.py | JKhan01/SM446_TeamXYZ | 721ba3694bb5d8ecc4cb36f5ad158fabcd8c5f7e | [
"Apache-2.0"
] | null | null | null | chatBotStable/g4.py | JKhan01/SM446_TeamXYZ | 721ba3694bb5d8ecc4cb36f5ad158fabcd8c5f7e | [
"Apache-2.0"
] | null | null | null | chatBotStable/g4.py | JKhan01/SM446_TeamXYZ | 721ba3694bb5d8ecc4cb36f5ad158fabcd8c5f7e | [
"Apache-2.0"
] | null | null | null | # Gmail initial file
import pickle
import os
from google_auth_oauthlib.flow import Flow, InstalledAppFlow
from googleapiclient.discovery import build
from googleapiclient.http import MediaFileUpload, MediaIoBaseDownload
from google.auth.transport.requests import Request
def Create_Service(client_secret_file, api_n... | 33.122449 | 88 | 0.693777 |
363808b57456ad700729f20b060dfa939e78f8d6 | 6,521 | py | Python | migrations/dynamodb-migrations/2021-10-15T17:30:00Z-update-old-experiment-gem2s-params.py | ivababukova/iac | c4acbbaf82b51189db8238366b2f2620a1902790 | [
"MIT"
] | 13 | 2020-12-07T14:43:33.000Z | 2021-12-19T10:09:13.000Z | migrations/dynamodb-migrations/2021-10-15T17:30:00Z-update-old-experiment-gem2s-params.py | ivababukova/iac | c4acbbaf82b51189db8238366b2f2620a1902790 | [
"MIT"
] | 19 | 2020-09-12T09:59:54.000Z | 2022-01-03T13:11:36.000Z | migrations/dynamodb-migrations/2021-10-15T17:30:00Z-update-old-experiment-gem2s-params.py | ivababukova/iac | c4acbbaf82b51189db8238366b2f2620a1902790 | [
"MIT"
] | 6 | 2022-02-23T20:41:51.000Z | 2022-03-16T19:30:34.000Z | import sys
import boto3
from datetime import datetime
import hashlib
import json
from collections import OrderedDict
### Background
# This is a new script to ammmend script `2021-08-04T10:06:50Z-migrate-sampleids-to-experiment.py`
# Insert endpoint_url='http://localhost:4566' as the 2nd param to test with localstack
... | 31.809756 | 121 | 0.651894 |
665d9e9a4b412e9c5775f96cf0de67bef89b538c | 718 | py | Python | setup.py | AlexFlipnote/pug_watcher.py | fdbee921685ef48a1f6e10d0b05ea633b69a4f56 | [
"Apache-2.0"
] | 4 | 2021-05-30T14:28:57.000Z | 2021-09-13T06:10:33.000Z | setup.py | AlexFlipnote/pug_watcher.py | fdbee921685ef48a1f6e10d0b05ea633b69a4f56 | [
"Apache-2.0"
] | null | null | null | setup.py | AlexFlipnote/pug_watcher.py | fdbee921685ef48a1f6e10d0b05ea633b69a4f56 | [
"Apache-2.0"
] | null | null | null | import re
from setuptools import setup
version = ""
with open("pug_watcher/__init__.py") as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
requirements = []
with open("requirements.txt") as f:
requirements = f.read().splitlines()
setup(
name="pug-wat... | 23.933333 | 99 | 0.650418 |
b93a856e4a71f5d83eafe9086f5cdbba7ed728cd | 8,416 | py | Python | deepswarm/storage.py | tatonka21/DeepSwarm | a0e85ff296c2496a2a46e017a05bbd3980b4150b | [
"MIT"
] | 312 | 2019-05-03T13:01:48.000Z | 2022-01-19T18:07:05.000Z | deepswarm/storage.py | tatonka21/DeepSwarm | a0e85ff296c2496a2a46e017a05bbd3980b4150b | [
"MIT"
] | 10 | 2019-05-20T15:37:43.000Z | 2021-09-02T18:40:43.000Z | deepswarm/storage.py | tatonka21/DeepSwarm | a0e85ff296c2496a2a46e017a05bbd3980b4150b | [
"MIT"
] | 40 | 2019-05-03T16:37:09.000Z | 2022-03-02T06:40:34.000Z | # Copyright (c) 2019 Edvinas Byla
# Licensed under MIT License
import hashlib
import pickle
from datetime import datetime
from . import base_path, cfg, left_cost_is_better
class Storage:
"""Class responsible for backups and weight reuse."""
DIR = {
"MODEL": "models",
"OBJECT": "objects",
... | 37.07489 | 89 | 0.617277 |
abe27a28993d80adf65798e82876526da69c6a03 | 3,478 | py | Python | analyzr/settings.py | Rakib1508/django-analyzr | 2d62c896755b1422cbcc6e95ee6da45bc05f6384 | [
"MIT"
] | null | null | null | analyzr/settings.py | Rakib1508/django-analyzr | 2d62c896755b1422cbcc6e95ee6da45bc05f6384 | [
"MIT"
] | null | null | null | analyzr/settings.py | Rakib1508/django-analyzr | 2d62c896755b1422cbcc6e95ee6da45bc05f6384 | [
"MIT"
] | null | null | null | """
Django settings for analyzr project.
Generated by 'django-admin startproject' using Django 3.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib... | 25.762963 | 91 | 0.684589 |
b1a497dff483ceff136f1199a11aa070443b5378 | 5,684 | py | Python | rasa/core/policies/policy.py | ntent/rasa | a7df9c1ecddb8cd03b090b4cd3e0229e78fd6f98 | [
"Apache-2.0"
] | 5 | 2019-06-06T08:59:15.000Z | 2020-01-19T10:56:45.000Z | rasa/core/policies/policy.py | RakibulAsheeque/rasa | 7d3804cd081c73d78ab5e973f95a55845eed1e89 | [
"Apache-2.0"
] | 21 | 2019-12-16T17:37:54.000Z | 2020-07-06T06:19:04.000Z | rasa/core/policies/policy.py | RakibulAsheeque/rasa | 7d3804cd081c73d78ab5e973f95a55845eed1e89 | [
"Apache-2.0"
] | 4 | 2019-05-19T21:19:32.000Z | 2021-01-06T14:26:37.000Z | import copy
import logging
import tensorflow as tf
from typing import Any, List, Optional, Text, Dict, Callable
import rasa.utils.common
from rasa.core.domain import Domain
from rasa.core.featurizers import (
MaxHistoryTrackerFeaturizer,
BinarySingleStateFeaturizer,
)
from rasa.core.featurizers import TrackerF... | 32.666667 | 87 | 0.66045 |
b55f0898bedb1e6879fff8c664628ff16a865646 | 1,194 | py | Python | dsp/half_filt.py | FelixVi/Bedrock | 82072341902048e5b37022512909d209efb243d6 | [
"RSA-MD"
] | 17 | 2019-09-29T14:52:18.000Z | 2022-03-28T21:16:25.000Z | dsp/half_filt.py | FelixVi/Bedrock | 82072341902048e5b37022512909d209efb243d6 | [
"RSA-MD"
] | null | null | null | dsp/half_filt.py | FelixVi/Bedrock | 82072341902048e5b37022512909d209efb243d6 | [
"RSA-MD"
] | 4 | 2019-12-04T17:30:38.000Z | 2021-11-01T01:52:13.000Z | import argparse
import numpy
from numpy import sqrt, mean
def make_check():
y = numpy.loadtxt("half_filt.dat")
npt = len(y)
print('read %d points, expected 245' % npt)
ix = numpy.arange(npt)
s = numpy.sin((ix+3.0)*.0081*2*16)
lf1 = numpy.polyfit(s, y, 1)
oamp = abs(lf1[0])
print('actua... | 29.85 | 75 | 0.586265 |
5e12986f17c229acc51a1088d0c0f79b694489cd | 3,375 | py | Python | predictor.py | Shirhe-Lyh/deep_image_matting | 7fa84f94a21ab7e95df78f9f7fb5c46adf98cc2c | [
"Apache-2.0"
] | 23 | 2018-11-22T09:33:04.000Z | 2021-03-26T08:42:08.000Z | predictor.py | Shirhe-Lyh/deep_image_matting | 7fa84f94a21ab7e95df78f9f7fb5c46adf98cc2c | [
"Apache-2.0"
] | 3 | 2019-01-02T08:35:14.000Z | 2019-03-29T11:17:19.000Z | predictor.py | Shirhe-Lyh/deep_image_matting | 7fa84f94a21ab7e95df78f9f7fb5c46adf98cc2c | [
"Apache-2.0"
] | 10 | 2019-02-16T03:21:48.000Z | 2022-02-09T03:02:20.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 11 11:49:09 2018
@author: shirhe-lyh
"""
import os
import tensorflow as tf
class Predictor(object):
"""Classify images to predifined classes."""
def __init__(self,
frozen_inference_graph_path,
gpu_index=Non... | 38.352273 | 80 | 0.599407 |
f8c0dc603472f4bf1ee4ce4eeeb2609c5d41f70d | 3,916 | py | Python | model/customized_similarity_model.py | RayTzeng/s3m-membership-inference | ec1ed9438afc4fd3d7a55fd10e6065d2ecc861c4 | [
"MIT"
] | 9 | 2021-11-03T11:27:50.000Z | 2022-03-14T00:25:45.000Z | model/customized_similarity_model.py | RayTzeng/s3m-membership-inference | ec1ed9438afc4fd3d7a55fd10e6065d2ecc861c4 | [
"MIT"
] | null | null | null | model/customized_similarity_model.py | RayTzeng/s3m-membership-inference | ec1ed9438afc4fd3d7a55fd10e6065d2ecc861c4 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.nn.utils.rnn import pad_sequence
class SelfAttentionPooling(nn.Module):
"""
Implementation of SelfAttentionPooling
Original Paper: Self-Attention Encoding and Pooling for Speaker Recognition
https://arxiv.org/pdf/2008.01077v1.pdf
"""
def __init__(... | 31.837398 | 91 | 0.61236 |
7225083df9a8e6bd642f8b20386109fdcd499050 | 1,538 | py | Python | img_metadata_lib/metadata.py | Austin-Schmidli/Image-Metadata-API | 73e7f9cbcd397d6aefe53a75dbb9ff4e6a924f7d | [
"MIT"
] | null | null | null | img_metadata_lib/metadata.py | Austin-Schmidli/Image-Metadata-API | 73e7f9cbcd397d6aefe53a75dbb9ff4e6a924f7d | [
"MIT"
] | null | null | null | img_metadata_lib/metadata.py | Austin-Schmidli/Image-Metadata-API | 73e7f9cbcd397d6aefe53a75dbb9ff4e6a924f7d | [
"MIT"
] | null | null | null | import json
import exifread
def restructure(metadata: dict) -> dict:
"""Restructures a flat metadata dictionary into one composed of objects by Image File Directory (IFD)
Uses the first word of each key to form the IFD objects
"""
new_metadata = {}
for (key, value) in metadata.items():
... | 30.76 | 105 | 0.626138 |
7e7f8df5327611fdd74f89fc9b2f0bd2d3fb3a56 | 2,443 | py | Python | code/venv/lib/python3.8/site-packages/datadog_api_client/v2/model/incident_team_included_items.py | Valisback/hiring-engineers | 7196915dd5a429ae27c21fa43d527f0332e662ed | [
"Apache-2.0"
] | null | null | null | code/venv/lib/python3.8/site-packages/datadog_api_client/v2/model/incident_team_included_items.py | Valisback/hiring-engineers | 7196915dd5a429ae27c21fa43d527f0332e662ed | [
"Apache-2.0"
] | null | null | null | code/venv/lib/python3.8/site-packages/datadog_api_client/v2/model/incident_team_included_items.py | Valisback/hiring-engineers | 7196915dd5a429ae27c21fa43d527f0332e662ed | [
"Apache-2.0"
] | null | null | null | # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from datadog_api_client.v2.model_utils import (
ModelComposed,
cached_property... | 31.727273 | 108 | 0.665984 |
6699edb5964530e7e352497de43ff1e154b52a1d | 425 | py | Python | tools/wptserve/wptserve/sslutils/__init__.py | caub/wpt | ee2e69bfb1d44c4013a8ce94ca6932f86d63aa31 | [
"BSD-3-Clause"
] | 1 | 2022-03-19T09:43:35.000Z | 2022-03-19T09:43:35.000Z | tools/wptserve/wptserve/sslutils/__init__.py | caub/wpt | ee2e69bfb1d44c4013a8ce94ca6932f86d63aa31 | [
"BSD-3-Clause"
] | 1 | 2021-12-13T19:49:45.000Z | 2021-12-13T19:49:45.000Z | tools/wptserve/wptserve/sslutils/__init__.py | caub/wpt | ee2e69bfb1d44c4013a8ce94ca6932f86d63aa31 | [
"BSD-3-Clause"
] | null | null | null | from .base import NoSSLEnvironment
from .openssl import OpenSSLEnvironment
from .pregenerated import PregeneratedSSLEnvironment
environments = {"none": NoSSLEnvironment,
"openssl": OpenSSLEnvironment,
"pregenerated": PregeneratedSSLEnvironment}
def get_cls(name):
try:
retu... | 28.333333 | 61 | 0.701176 |
24fb84e5b76038ff47f51bdd55bb0ea10db6fa76 | 963 | py | Python | tests/test_data/test_dataset/test_cocodataset.py | riskycheng/pytorch.nanodet | 8e14a7f89e484f6b462a83e24afa1047c02cd80c | [
"Apache-2.0"
] | 1 | 2021-07-30T03:29:23.000Z | 2021-07-30T03:29:23.000Z | tests/test_data/test_dataset/test_cocodataset.py | wealook/nanodet | 359d3f9c95eefbad759308e1f57520d25a98055a | [
"Apache-2.0"
] | null | null | null | tests/test_data/test_dataset/test_cocodataset.py | wealook/nanodet | 359d3f9c95eefbad759308e1f57520d25a98055a | [
"Apache-2.0"
] | null | null | null | import pytest
from nanodet.data.dataset import CocoDataset, build_dataset
def test_cocodataset():
cfg = dict(
name="CocoDataset",
img_path="./tests/data",
ann_path="./tests/data/dummy_coco.json",
input_size=[320, 320], # [w,h]
keep_ratio=True,
use_instance_mask=Tr... | 30.09375 | 86 | 0.603323 |
f3d2bee05132ef78f8553d583955151709f98e72 | 11,793 | py | Python | superset/views/base.py | raghul-selsoft/incubator-superset | 92abe2e4b0efacb4bcc21e8bb6823cb095896a2b | [
"Apache-2.0"
] | null | null | null | superset/views/base.py | raghul-selsoft/incubator-superset | 92abe2e4b0efacb4bcc21e8bb6823cb095896a2b | [
"Apache-2.0"
] | null | null | null | superset/views/base.py | raghul-selsoft/incubator-superset | 92abe2e4b0efacb4bcc21e8bb6823cb095896a2b | [
"Apache-2.0"
] | null | null | null | # pylint: disable=C,R,W
from datetime import datetime
import functools
import logging
import traceback
from flask import abort, flash, g, get_flashed_messages, redirect, Response
from flask_appbuilder import BaseView, ModelView
from flask_appbuilder.actions import action
from flask_appbuilder.models.sqla.filters impor... | 32.577348 | 89 | 0.641143 |
bdda36bc7306b2083c1f4648222655ec39ad7244 | 1,668 | py | Python | currencyconverter/sign.py | yueow/cryptoconverter-microservice | a76ee419239e20f9940350f81993b2aecdb4139a | [
"MIT"
] | null | null | null | currencyconverter/sign.py | yueow/cryptoconverter-microservice | a76ee419239e20f9940350f81993b2aecdb4139a | [
"MIT"
] | null | null | null | currencyconverter/sign.py | yueow/cryptoconverter-microservice | a76ee419239e20f9940350f81993b2aecdb4139a | [
"MIT"
] | null | null | null | import hmac
from functools import wraps
from django.conf import settings
class SignVerifyError(Exception):
pass
# Request does not have 'Sign' in headers
class SignRequestEmpty(SignVerifyError):
pass
# 'Sign' does not match
class SignDoesNotMatch(SignVerifyError):
pass
# Generate HMAC 'Sign'
def genera... | 30.327273 | 114 | 0.705036 |
1021eb881b7f50fa0e3f8b22947bedc9e3416673 | 15,355 | py | Python | pyscf/cc/eom_gccsd.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 2 | 2019-05-28T05:25:56.000Z | 2019-11-09T02:16:43.000Z | pyscf/cc/eom_gccsd.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 2 | 2019-09-16T17:58:31.000Z | 2019-09-22T17:26:01.000Z | pyscf/cc/eom_gccsd.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 1 | 2019-11-09T02:13:16.000Z | 2019-11-09T02:13:16.000Z | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | 33.380435 | 83 | 0.577727 |
f9a26b42fed82c1543f4b81c16d5bc8f43f911d9 | 12,033 | py | Python | deutschland/jobsuche/model/job_search_response_auswahl.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/jobsuche/model/job_search_response_auswahl.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/jobsuche/model/job_search_response_auswahl.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | """
Bundesagentur für Arbeit: Jobsuche API
Die größte Stellendatenbank Deutschlands durchsuchen, Details zu Stellenanzeigen und Informationen über Arbeitgeber abrufen. <br><br> Die Authentifizierung funktioniert per OAuth 2 Client Credentials mit JWTs. Folgende Client-Credentials können dafür verwendet werden:... | 43.129032 | 405 | 0.566608 |
5e29e942c96d5e06c4b2519ea670fd7829d775a4 | 40,566 | py | Python | sdk/python/pulumi_aws/alb/listener.py | rapzo/pulumi-aws | 390a098221315d98a54ba97d1559e750dc3053b7 | [
"ECL-2.0",
"Apache-2.0"
] | 260 | 2018-06-18T14:57:00.000Z | 2022-03-29T11:41:03.000Z | sdk/python/pulumi_aws/alb/listener.py | rapzo/pulumi-aws | 390a098221315d98a54ba97d1559e750dc3053b7 | [
"ECL-2.0",
"Apache-2.0"
] | 1,154 | 2018-06-19T20:38:20.000Z | 2022-03-31T19:48:16.000Z | sdk/python/pulumi_aws/alb/listener.py | rapzo/pulumi-aws | 390a098221315d98a54ba97d1559e750dc3053b7 | [
"ECL-2.0",
"Apache-2.0"
] | 115 | 2018-06-28T03:20:27.000Z | 2022-03-29T11:41:06.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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, overload
from .. import... | 44.529089 | 258 | 0.6237 |
e1fb5cb431a5f274e61cd65b4964c085b1f6715e | 2,502 | py | Python | examples/issue_asset.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | null | null | null | examples/issue_asset.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | 27 | 2022-01-12T10:55:38.000Z | 2022-03-28T01:38:24.000Z | examples/issue_asset.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | null | null | null | """
This example shows how to issue assets on the Stellar network.
# See: https://developers.stellar.org/docs/issuing-assets/
"""
from stellar_sdk.asset import Asset
from stellar_sdk.keypair import Keypair
from stellar_sdk.network import Network
from stellar_sdk.server import Server
from stellar_sdk.transaction_build... | 35.742857 | 88 | 0.792566 |
21c5d89c63d7a0a6d605058bcfb5a6dfa42f3298 | 29 | py | Python | public/assets/pythonscript.py | meiningerj/FoundationLearning | 45170408c041b1f41902eefde07b6493a6e337e1 | [
"Apache-2.0"
] | null | null | null | public/assets/pythonscript.py | meiningerj/FoundationLearning | 45170408c041b1f41902eefde07b6493a6e337e1 | [
"Apache-2.0"
] | null | null | null | public/assets/pythonscript.py | meiningerj/FoundationLearning | 45170408c041b1f41902eefde07b6493a6e337e1 | [
"Apache-2.0"
] | null | null | null | import sys
exec(sys.argv[1])
| 9.666667 | 17 | 0.724138 |
98853e5c7a15b881c9223305e874379f3945b318 | 2,064 | py | Python | bin/githubapi.py | eddo888/Steppenwolf | 71a00515e1a8cc21a0a402977bacf20e7929c7cc | [
"MIT"
] | null | null | null | bin/githubapi.py | eddo888/Steppenwolf | 71a00515e1a8cc21a0a402977bacf20e7929c7cc | [
"MIT"
] | null | null | null | bin/githubapi.py | eddo888/Steppenwolf | 71a00515e1a8cc21a0a402977bacf20e7929c7cc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# PYTHON_ARGCOMPLETE_OK
import os, re, sys
from github import Github
from Argumental.Argue import Argue
from Spanners.Squirrel import Squirrel
args=Argue()
squirrel=Squirrel()
@args.command(single=True)
class GitHubAPI(object):
@args.property(default='github.com')
def hostname(self): ret... | 24.282353 | 81 | 0.667636 |
46d23587683846f898e87b5fa2f97d6d2c9778e2 | 19,685 | py | Python | pandas/core/nanops.py | nipunreddevil/pandas | 08b1b3edf9d470e804226927701954a39a73ab98 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2021-07-06T23:36:28.000Z | 2021-07-06T23:36:28.000Z | pandas/core/nanops.py | thorwhalen/pandas | bfd5348d824a721dd0d896bb06e63e4ad801ba51 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/nanops.py | thorwhalen/pandas | bfd5348d824a721dd0d896bb06e63e4ad801ba51 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | from pandas import compat
import sys
import itertools
import functools
import numpy as np
from pandas.core.common import isnull, notnull, _values_from_object, is_float
import pandas.core.common as com
import pandas.lib as lib
import pandas.algos as algos
import pandas.hashtable as _hash
import pandas.tslib as tslib
... | 28.948529 | 87 | 0.576988 |
0c362cc89037e609498fbae05681c48872b002c0 | 1,460 | py | Python | Module03/assignment3-1.py | kholt90/DataStruct | acc42358f27ec4bac15b87e2bfd53b5843d592b6 | [
"Unlicense"
] | null | null | null | Module03/assignment3-1.py | kholt90/DataStruct | acc42358f27ec4bac15b87e2bfd53b5843d592b6 | [
"Unlicense"
] | null | null | null | Module03/assignment3-1.py | kholt90/DataStruct | acc42358f27ec4bac15b87e2bfd53b5843d592b6 | [
"Unlicense"
] | null | null | null |
# You want to build a word cloud, an infographic where the size of a word corresponds to how often it appears in the body of text.
# To do this, you'll need data.
# Write code that takes a long string and builds its word cloud data in a dictionary, where the keys are words and the values are the number of times the wo... | 45.625 | 169 | 0.693151 |
bd01ca3d3196075d44c2f616b3497fe4eace31f9 | 27,678 | py | Python | magenta/music/melodies_lib_test.py | vaipatel/magenta | 8a828116c2a73c26724204987d2b5bddaab31a7e | [
"Apache-2.0"
] | 16 | 2016-09-02T04:59:30.000Z | 2022-01-11T10:38:29.000Z | magenta/music/melodies_lib_test.py | Kiku-git/magenta | b36c65466745ff1e056dca40179ae71306a0ca5b | [
"Apache-2.0"
] | 2 | 2016-09-25T16:39:59.000Z | 2016-11-18T17:43:41.000Z | magenta/music/melodies_lib_test.py | Kiku-git/magenta | b36c65466745ff1e056dca40179ae71306a0ca5b | [
"Apache-2.0"
] | 10 | 2016-09-02T04:59:32.000Z | 2021-09-29T06:57:24.000Z | # Copyright 2019 The Magenta Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 41.248882 | 80 | 0.634511 |
960f3168928b50ed433178470fce854faacc15dc | 118 | py | Python | {{cookiecutter.project_package}}/{{cookiecutter.project_package}}/settings/dev.py | madelyneriksen/react-django-goodstuff-cookiecutter | daa8960a762c59ebbdc940ebb08f3784853e4ccf | [
"MIT"
] | 17 | 2019-11-05T20:29:11.000Z | 2022-03-09T09:25:10.000Z | {{cookiecutter.project_package}}/{{cookiecutter.project_package}}/settings/dev.py | madelyneriksen/react-django-goodstuff-cookiecutter | daa8960a762c59ebbdc940ebb08f3784853e4ccf | [
"MIT"
] | 49 | 2019-12-02T13:27:23.000Z | 2021-08-03T13:32:25.000Z | {{cookiecutter.project_package}}/{{cookiecutter.project_package}}/settings/dev.py | madelyneriksen/react-django-goodstuff-cookiecutter | daa8960a762c59ebbdc940ebb08f3784853e4ccf | [
"MIT"
] | 2 | 2020-10-11T18:38:39.000Z | 2021-03-16T13:16:00.000Z | """Settings for development."""
from .base import *
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
| 14.75 | 61 | 0.737288 |
c41954ff06589f7a5e1e2e71a74ec8beeb02eae3 | 1,759 | py | Python | App/migrations/0002_auto_20200116_0401.py | Bchizi/Web_Awaards | 2889147501cc83a1ce672664f33688c26678ac44 | [
"MIT"
] | null | null | null | App/migrations/0002_auto_20200116_0401.py | Bchizi/Web_Awaards | 2889147501cc83a1ce672664f33688c26678ac44 | [
"MIT"
] | 7 | 2020-06-06T01:15:08.000Z | 2021-09-08T01:34:59.000Z | App/migrations/0002_auto_20200116_0401.py | leon-bi/Web_Awaards | 2889147501cc83a1ce672664f33688c26678ac44 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.8 on 2020-01-16 04:01
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... | 43.975 | 161 | 0.652075 |
3caf0b22fbc4ea0ec376ef9dc7b88945212a149c | 7,005 | py | Python | lib/sqlalchemy/orm/identity.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | lib/sqlalchemy/orm/identity.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | lib/sqlalchemy/orm/identity.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | # orm/identity.py
# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
from __future__ import annotations
import weakref
from . import util as orm_util
... | 28.591837 | 77 | 0.559029 |
a9b12868b995ad9715ddda5f93908099ac622fdf | 18,910 | py | Python | ahyper/observables.py | PhilChodrow/annotated_hypergraphs | e5fcaaa4196631460d188ab8d4dfc2ba4c3a2e4e | [
"MIT"
] | 3 | 2019-11-09T21:39:23.000Z | 2021-01-25T13:35:07.000Z | ahyper/observables.py | PhilChodrow/annotated_hypergraphs | e5fcaaa4196631460d188ab8d4dfc2ba4c3a2e4e | [
"MIT"
] | null | null | null | ahyper/observables.py | PhilChodrow/annotated_hypergraphs | e5fcaaa4196631460d188ab8d4dfc2ba4c3a2e4e | [
"MIT"
] | 1 | 2021-05-18T19:19:05.000Z | 2021-05-18T19:19:05.000Z | from itertools import groupby, chain
from collections import Counter
import networkx as nx
from .utils import normalise_counters
import numpy as np
from itertools import combinations, permutations
from collections import defaultdict
import pandas as pd
from scipy.linalg import eigh
def local_role_den... | 31 | 138 | 0.600423 |
ce7d72ec0b2574daec90dd9d48d1fb0aa7c423bf | 335 | py | Python | plugins/flytekit-sqlalchemy/flytekitplugins/sqlalchemy/__init__.py | bstadlbauer/flytekit | 12ef34d7b6d777088ab87f9cf0d5c32355895852 | [
"Apache-2.0"
] | null | null | null | plugins/flytekit-sqlalchemy/flytekitplugins/sqlalchemy/__init__.py | bstadlbauer/flytekit | 12ef34d7b6d777088ab87f9cf0d5c32355895852 | [
"Apache-2.0"
] | null | null | null | plugins/flytekit-sqlalchemy/flytekitplugins/sqlalchemy/__init__.py | bstadlbauer/flytekit | 12ef34d7b6d777088ab87f9cf0d5c32355895852 | [
"Apache-2.0"
] | null | null | null | """
.. currentmodule:: flytekitplugins.sqlalchemy
This package contains things that are useful when extending Flytekit.
.. autosummary::
:template: custom.rst
:toctree: generated/
SQLAlchemyConfig
SQLAlchemyDefaultImages
SQLAlchemyTask
"""
from .task import SQLAlchemyConfig, SQLAlchemyDefaultImages, ... | 20.9375 | 75 | 0.779104 |
7f9886a5409845b625ad7ada9b8e346eaac4e811 | 8,941 | py | Python | vut/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/utils/compat.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 18,636 | 2017-12-06T14:53:18.000Z | 2022-03-31T13:12:34.000Z | vut/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/utils/compat.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 3,640 | 2017-12-06T16:58:35.000Z | 2022-03-31T22:20:57.000Z | vut/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/utils/compat.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 1,987 | 2017-12-06T15:04:51.000Z | 2022-03-26T10:05:15.000Z | """Stuff that differs in different Python versions and platform
distributions."""
# The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
from __future__ import absolute_import, division
import codecs
import locale
import logging
import os
import shutil
import sys
... | 33.114815 | 79 | 0.645006 |
5179cf093c14959323244e2fa28b2eeba2b14089 | 512 | py | Python | quesans/migrations/0004_auto_20210223_1700.py | msking18/minor | 17cffab95b5dc1705a131a1ef66ff7f47837de64 | [
"MIT"
] | 3 | 2021-03-22T10:39:18.000Z | 2021-04-30T10:29:37.000Z | quesans/migrations/0004_auto_20210223_1700.py | msking18/minor | 17cffab95b5dc1705a131a1ef66ff7f47837de64 | [
"MIT"
] | 1 | 2021-04-16T06:54:10.000Z | 2021-04-16T06:54:10.000Z | quesans/migrations/0004_auto_20210223_1700.py | msking18/minor | 17cffab95b5dc1705a131a1ef66ff7f47837de64 | [
"MIT"
] | 3 | 2021-03-11T10:02:37.000Z | 2021-04-23T07:34:10.000Z | # Generated by Django 3.1.6 on 2021-02-23 11:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('quesans', '0003_question_slug'),
]
operations = [
migrations.RemoveField(
model_name='question',
name=... | 22.26087 | 55 | 0.544922 |
f5e544c95308e86c4e9a4f95c0fd2fba8f39b51c | 7,220 | py | Python | transitfeed/trip_capacity.py | brendannee/transitfeed-ride | 78cfd664eeedc8e41324750ff8c23d5095837039 | [
"Apache-2.0"
] | null | null | null | transitfeed/trip_capacity.py | brendannee/transitfeed-ride | 78cfd664eeedc8e41324750ff8c23d5095837039 | [
"Apache-2.0"
] | null | null | null | transitfeed/trip_capacity.py | brendannee/transitfeed-ride | 78cfd664eeedc8e41324750ff8c23d5095837039 | [
"Apache-2.0"
] | 2 | 2017-08-09T18:17:51.000Z | 2017-08-09T19:31:41.000Z | # Copyright (C) 2017 Oregon Department of Transportation (ODOT)
#
# 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 appl... | 38 | 142 | 0.677285 |
4719fbc4f6022da0d87f39757fec1e67b5117d70 | 12,991 | py | Python | src/lib/opts.py | pranshumittal08/FairMOT | 5881dfa02973b442a11c4e84186ff3ec860d1681 | [
"MIT"
] | null | null | null | src/lib/opts.py | pranshumittal08/FairMOT | 5881dfa02973b442a11c4e84186ff3ec860d1681 | [
"MIT"
] | null | null | null | src/lib/opts.py | pranshumittal08/FairMOT | 5881dfa02973b442a11c4e84186ff3ec860d1681 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
import sys
class opts(object):
def __init__(self):
self.parser = argparse.ArgumentParser()
# basic experiment setting
self.parser.add_argument('task', default='mot', hel... | 51.347826 | 110 | 0.59318 |
ab09e4f69cec53addaef78b3a323e53b95a9e1b6 | 195 | py | Python | ch09_movement_detector.py | jeffreycoen/prog_mb | 739e9869b51dc861a57da697d49406b1394ade6d | [
"MIT"
] | 13 | 2017-12-05T16:28:14.000Z | 2022-02-21T22:05:00.000Z | ch09_movement_detector.py | jeffreycoen/prog_mb | 739e9869b51dc861a57da697d49406b1394ade6d | [
"MIT"
] | null | null | null | ch09_movement_detector.py | jeffreycoen/prog_mb | 739e9869b51dc861a57da697d49406b1394ade6d | [
"MIT"
] | 5 | 2018-03-23T20:14:18.000Z | 2021-03-15T06:37:58.000Z | from microbit import *
THRESHOLD = 100
old_x = accelerometer.get_x()
while True:
x = accelerometer.get_x()
if abs(x - old_x) > THRESHOLD:
display.scroll("ALARM!")
old_x = x | 17.727273 | 34 | 0.641026 |
87b36acaeccd9fecffba48a7b0c6c61a3ff782b2 | 3,249 | py | Python | deepspeech/training/gradclip.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | deepspeech/training/gradclip.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | deepspeech/training/gradclip.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 37.77907 | 89 | 0.640813 |
99a5b030816cf3054135d570219e4f15f9460451 | 3,350 | py | Python | conopy/dbpool.py | sshmakov/conopy | 6187297b3cd26faa7e6279dd184a7657b32914e7 | [
"MIT"
] | 5 | 2017-08-28T10:59:53.000Z | 2021-12-16T07:06:45.000Z | conopy/dbpool.py | sshmakov/conopy | 6187297b3cd26faa7e6279dd184a7657b32914e7 | [
"MIT"
] | null | null | null | conopy/dbpool.py | sshmakov/conopy | 6187297b3cd26faa7e6279dd184a7657b32914e7 | [
"MIT"
] | 12 | 2017-08-28T06:57:30.000Z | 2021-04-28T12:09:19.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys, os
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtSql import *
class DBLoginDlg(QDialog):
def __init__(self, parent=None):
super().__init__(parent)
self.lay = QFormLayout()
self.setWindowTitle("Login to DB")
... | 32.843137 | 99 | 0.58 |
2d2c7270fc7a5126fc9829a6f787a2b89c2d18a5 | 1,243 | py | Python | src/app/externalOutages/checkIfOutageIsPresent.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | src/app/externalOutages/checkIfOutageIsPresent.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | 21 | 2021-01-08T18:03:32.000Z | 2021-02-02T16:17:34.000Z | src/app/externalOutages/checkIfOutageIsPresent.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | import cx_Oracle
def checkIfOutageIsPresent(pwcDbConnStr: str, rtoId: int) -> bool:
"""check if outage is present in pwc db
Args:
pwcDbConnStr (str): [description]
rtoId (int): [description]
Returns:
bool: True if outage is present in pwc db
"""
outageCount = 0
countF... | 24.372549 | 80 | 0.595334 |
51ffc5d79c9b9bd0007a24471247f29e24360141 | 4,927 | py | Python | project_redss/auto_code_surveys.py | AfricasVoices/Project-REDSS | 64999c5240fe8f1c839ccafccfa1e75b155c4787 | [
"MIT"
] | null | null | null | project_redss/auto_code_surveys.py | AfricasVoices/Project-REDSS | 64999c5240fe8f1c839ccafccfa1e75b155c4787 | [
"MIT"
] | 20 | 2018-11-21T15:58:36.000Z | 2019-03-12T11:19:59.000Z | project_redss/auto_code_surveys.py | AfricasVoices/Project-REDSS | 64999c5240fe8f1c839ccafccfa1e75b155c4787 | [
"MIT"
] | null | null | null | import time
from os import path
from core_data_modules.cleaners import Codes, PhoneCleaner
from core_data_modules.cleaners.cleaning_utils import CleaningUtils
from core_data_modules.traced_data import Metadata
from core_data_modules.traced_data.io import TracedDataCodaV2IO
from core_data_modules.util import IOUtils
f... | 52.414894 | 122 | 0.653745 |
8f92fa891ab471b245398d6ee766bcbbc9f60d43 | 4,245 | py | Python | examples/AsyncProgressBar/progress_bar.py | rperesy/aioflask | 446c34671fe2d7084815e2639cf416534ac1a5e8 | [
"MIT"
] | 189 | 2020-07-16T18:03:05.000Z | 2022-03-31T02:07:12.000Z | examples/AsyncProgressBar/progress_bar.py | rperesy/aioflask | 446c34671fe2d7084815e2639cf416534ac1a5e8 | [
"MIT"
] | 9 | 2020-07-17T01:23:57.000Z | 2022-03-11T12:48:30.000Z | examples/AsyncProgressBar/progress_bar.py | rperesy/aioflask | 446c34671fe2d7084815e2639cf416534ac1a5e8 | [
"MIT"
] | 8 | 2020-10-01T20:36:28.000Z | 2021-08-12T05:25:59.000Z | import asyncio
import random
import aioredis
import redis
from aioflask import Flask, request, url_for, jsonify
app = Flask(__name__)
sr = redis.StrictRedis(host='localhost', port=6379)
sr.execute_command('FLUSHDB')
async def some_work():
global aredis
await aredis.set('state', 'running')
work_to_do = r... | 30.106383 | 107 | 0.589164 |
679ac71c782b54a88da4272cb69e2af6bfeb279b | 3,122 | py | Python | contrib/testgen/base58.py | thothd/unit-e | 44cd02af44592ebfa99f276e20775ed7d2182d02 | [
"MIT"
] | 36 | 2019-04-17T18:58:51.000Z | 2022-01-18T12:16:27.000Z | contrib/testgen/base58.py | Danpetersen448/unit-e | 4ca86fc55a41e0daeb4409de2719a5523b6007c6 | [
"MIT"
] | 109 | 2019-04-17T17:19:45.000Z | 2019-06-19T15:16:37.000Z | contrib/testgen/base58.py | Danpetersen448/unit-e | 4ca86fc55a41e0daeb4409de2719a5523b6007c6 | [
"MIT"
] | 16 | 2019-04-17T17:35:42.000Z | 2020-01-09T17:51:05.000Z | # Copyright (c) 2012-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Unit-e base58 encoding and decoding.
Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain)
'''
import hash... | 26.913793 | 97 | 0.620756 |
fd979c354eccf34c83fdeb82f8333428c1a6d40f | 2,412 | py | Python | packages/blueking/component/apis/bk_login.py | gangh/bk-sops | 29f4b4915be42650c2eeee637e0cf798e4066f09 | [
"Apache-2.0"
] | 1 | 2019-12-23T07:23:35.000Z | 2019-12-23T07:23:35.000Z | packages/blueking/component/apis/bk_login.py | bk-sops/bk-sops | 9f5950b13473bf7b5032528b20016b7a571bb3cd | [
"Apache-2.0"
] | 9 | 2020-02-12T03:15:49.000Z | 2021-06-10T22:04:51.000Z | packages/blueking/component/apis/bk_login.py | tanghaiyong1989/bk-sops-ce | 7388914acc4004469982d6b5bf9cd7641bdf82f7 | [
"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... | 41.586207 | 115 | 0.663765 |
5fb28d78525455b2ac2c9b2ee7fa6413ddb52d4c | 1,591 | py | Python | src/cogs/helpers/config.py | nsde-archive/novalix-1 | 7a521fd7d7662b3db49ef34e01b2508d9c4b9b2a | [
"MIT"
] | null | null | null | src/cogs/helpers/config.py | nsde-archive/novalix-1 | 7a521fd7d7662b3db49ef34e01b2508d9c4b9b2a | [
"MIT"
] | null | null | null | src/cogs/helpers/config.py | nsde-archive/novalix-1 | 7a521fd7d7662b3db49ef34e01b2508d9c4b9b2a | [
"MIT"
] | null | null | null | import yaml
from typing import Union
CONFIG_NAME = 'config'
def load(filename: str=CONFIG_NAME):
"""Parses the config.
Args:
filename (str): A .yml-file name.
Returns:
dict: The parsed YAML Data from src/config.yml
"""
parsed_config_data = yaml.safe_load(open(f'src/{filename}.y... | 24.859375 | 100 | 0.607794 |
2a3dd8ce1ecdc4ab27ef69a0d5cab82afc1135de | 618 | py | Python | blog/migrations/0008_auto_20160217_0315.py | StratoBallooning/website | dad8db401279674d03355fdf5557c73074ff851f | [
"MIT"
] | null | null | null | blog/migrations/0008_auto_20160217_0315.py | StratoBallooning/website | dad8db401279674d03355fdf5557c73074ff851f | [
"MIT"
] | 19 | 2016-02-17T03:41:17.000Z | 2016-02-24T03:01:18.000Z | blog/migrations/0008_auto_20160217_0315.py | StratoBallooning/website | dad8db401279674d03355fdf5557c73074ff851f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-17 03:15
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0007_auto_20160217_0247'),
]
operations = [
migrations.AlterModelOpt... | 24.72 | 77 | 0.606796 |
b17458c523ab9c97caaf983994c36b4854c7b249 | 20,743 | py | Python | electrum/exchange_rate.py | tzarebczan/electrum | 11b95709aa3c17736ab7c957c87ad33cddaa12f3 | [
"MIT"
] | 2 | 2019-10-04T23:57:13.000Z | 2020-05-19T23:24:29.000Z | electrum/exchange_rate.py | tzarebczan/electrum | 11b95709aa3c17736ab7c957c87ad33cddaa12f3 | [
"MIT"
] | 1 | 2018-12-12T18:06:31.000Z | 2018-12-12T18:06:31.000Z | electrum/exchange_rate.py | tzarebczan/electrum | 11b95709aa3c17736ab7c957c87ad33cddaa12f3 | [
"MIT"
] | 3 | 2018-11-29T20:46:49.000Z | 2020-02-14T14:00:43.000Z | import asyncio
from datetime import datetime
import inspect
import sys
import os
import json
import time
import csv
import decimal
from decimal import Decimal
import concurrent.futures
import traceback
from typing import Sequence
from .bitcoin import COIN
from .i18n import _
from .util import PrintError, ThreadJob, ma... | 33.893791 | 107 | 0.602372 |
b0aaa69e60cfabe4e163edaf9800b0b87f498b75 | 3,101 | py | Python | Window.py | BrunoMartins11/UPT_Protocol | 4daf74df61ce3694d414e0d1518d33cbe738ecff | [
"MIT"
] | null | null | null | Window.py | BrunoMartins11/UPT_Protocol | 4daf74df61ce3694d414e0d1518d33cbe738ecff | [
"MIT"
] | null | null | null | Window.py | BrunoMartins11/UPT_Protocol | 4daf74df61ce3694d414e0d1518d33cbe738ecff | [
"MIT"
] | null | null | null | import utils as CC
from random import randint
class Window:
def __init__(self, ws):
self.msg_window = []
self.initial_sn = randint(0, 65535)
self.current_sn = self.initial_sn
self.ws = ws
self.cwnd = 1
self.dup_ack = 0
self.ssthresh = 64
self.state ... | 28.449541 | 81 | 0.521445 |
8cd2b5266219c5f678f2d38388ff430efc79e6ef | 4,748 | py | Python | vtrace.py | seungwoos/minimalRL | 7597b9af94ee64536dfd261446d795854f34171b | [
"MIT"
] | 2,259 | 2019-05-03T23:33:01.000Z | 2022-03-30T09:50:00.000Z | vtrace.py | Olegnv47/minimalRL | 7597b9af94ee64536dfd261446d795854f34171b | [
"MIT"
] | 47 | 2019-05-26T20:52:51.000Z | 2021-11-16T05:55:32.000Z | vtrace.py | Olegnv47/minimalRL | 7597b9af94ee64536dfd261446d795854f34171b | [
"MIT"
] | 375 | 2019-05-17T12:22:36.000Z | 2022-03-22T18:48:39.000Z | import gym
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.distributions import Categorical
import numpy as np
#Hyperparameters
learning_rate = 0.0005
gamma = 0.98
T_horizon = 20
clip_rho_threshold = 1.0
clip_c_threshold ... | 34.656934 | 109 | 0.524853 |
26d1033928e5dc7e6131b5b0ba4aced5f95ad7d9 | 7,893 | py | Python | COMP9418_Assignment_2/example_test.py | usama-sadiq/COMP9418_20T3 | af5561c146f463da838a621d1adf0fad8b7777fa | [
"MIT"
] | null | null | null | COMP9418_Assignment_2/example_test.py | usama-sadiq/COMP9418_20T3 | af5561c146f463da838a621d1adf0fad8b7777fa | [
"MIT"
] | null | null | null | COMP9418_Assignment_2/example_test.py | usama-sadiq/COMP9418_20T3 | af5561c146f463da838a621d1adf0fad8b7777fa | [
"MIT"
] | null | null | null | '''
COMP9418 Assignment 2
This file is similar to the file that will be used to test your assignment
It should be used to make sure you code will work during testing
'''
# Make division default to floating-point, saving confusion
from __future__ import division
# Allowed libraries
import numpy as np
import pandas as ... | 34.021552 | 337 | 0.548461 |
33e48151fdf8a382fd286e9f5474577e395ee953 | 3,338 | py | Python | tests/table_popup_test.py | surfaceanalytics/inelasticscattering | da549dde788a55084c565bbc5f89ebf9cbae4263 | [
"MIT"
] | null | null | null | tests/table_popup_test.py | surfaceanalytics/inelasticscattering | da549dde788a55084c565bbc5f89ebf9cbae4263 | [
"MIT"
] | 3 | 2021-09-08T03:02:25.000Z | 2022-03-12T01:00:06.000Z | tests/table_popup_test.py | surfaceanalytics/inelasticscattering | da549dde788a55084c565bbc5f89ebf9cbae4263 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 30 22:31:45 2020
@author: Mark
"""
import tkinter as tk
import tkinter.ttk as ttk
import functools
class Controller():
def __init__(self):
self.root = tk.Tk()
self.table_values = [(0,'A','1'),(1,'A','2'),(2,'B','3')]
self.table1_values = [(0,'... | 43.350649 | 151 | 0.611144 |
b423c0b7dd7b9d5226488760c727835a61dd1092 | 614 | py | Python | bl4zzer/bl4zzer.py | s0wr0b1ndef/security-tools | 865682ba958c4138261863af27243d1da35e13e5 | [
"MIT"
] | 3 | 2020-04-24T13:54:31.000Z | 2021-05-30T08:12:58.000Z | bl4zzer/bl4zzer.py | FingerLeakers/security-tools | 7537294b17abc5ff219d745c0829aa10d945c5ca | [
"MIT"
] | null | null | null | bl4zzer/bl4zzer.py | FingerLeakers/security-tools | 7537294b17abc5ff219d745c0829aa10d945c5ca | [
"MIT"
] | 4 | 2019-08-30T16:42:07.000Z | 2021-10-30T16:17:15.000Z | #!/usr/bin/env python
"""Web Application Fuzzer
"""
import requests
import os
url = "http://us.rd.yahoo.com/200/*http://google.ie*FUZZ"
fuzzString = "FUZZ"
counter = 0
separator = "#" * 80
os.system('clear')
print '[+] working, please be patient...'
for p in open('xss_vectors.txt', 'r').readlines():
currentUrl... | 22.740741 | 95 | 0.636808 |
4f1a02b8b9c67c872f2b02993faf8775e8c4993c | 5,434 | py | Python | src/backoff_simulator.py | randomvariable/aws-arch-backoff-simulator | caf4f123bd96aee900aa1f5b50becb2d8bb22b0f | [
"Apache-2.0"
] | null | null | null | src/backoff_simulator.py | randomvariable/aws-arch-backoff-simulator | caf4f123bd96aee900aa1f5b50becb2d8bb22b0f | [
"Apache-2.0"
] | null | null | null | src/backoff_simulator.py | randomvariable/aws-arch-backoff-simulator | caf4f123bd96aee900aa1f5b50becb2d8bb22b0f | [
"Apache-2.0"
] | null | null | null | # Simulator for the effects of backoff and jitter on a remote OCC system.
# This code was used for the post on backoff on the AWS architecture blog
# at http://www.awsarchitectureblog.com/
import heapq
import random
# Net models the natural delay and variance of the network
class Net:
def __init__(self, mean, sd):... | 32.73494 | 121 | 0.595142 |
461f98c028adac03ecfe063149804347e4090f6f | 1,314 | py | Python | tests/view_tests/models.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AppServer/lib/django-1.5/tests/regressiontests/views/models.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AppServer/lib/django-1.5/tests/regressiontests/views/models.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | """
Regression tests for Django built-in views.
"""
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Author(models.Model):
name = models.CharField(max_length=100)
def __str__(self):
return self.name
def get_absolute_url... | 24.792453 | 78 | 0.703196 |
d5f825fd49aa7bae2f23e2ab9ddc676d7f159915 | 2,361 | py | Python | src/etl/tasks/song_transform.py | vatdaell/spotify-analysis | 030239ba16cfc4a80d4f870686450c1ababc62c2 | [
"MIT"
] | 1 | 2020-10-14T10:01:37.000Z | 2020-10-14T10:01:37.000Z | src/etl/tasks/song_transform.py | vatdaell/spotify-analysis | 030239ba16cfc4a80d4f870686450c1ababc62c2 | [
"MIT"
] | null | null | null | src/etl/tasks/song_transform.py | vatdaell/spotify-analysis | 030239ba16cfc4a80d4f870686450c1ababc62c2 | [
"MIT"
] | null | null | null | from common.store import Store
from common.timehelpers import extractDate
from common.apiauth import spotify_authenticate
from dotenv import load_dotenv, find_dotenv
from os import getenv
from io import StringIO
from datetime import datetime
import pandas as pd
FEATURE_PREFIX = "audio_features"
LYRICS_PREFIX = "lyrics... | 25.663043 | 79 | 0.63956 |
46d392b3a241f2da7b31bf75f6e1694c4caed155 | 4,864 | py | Python | tests/integration_tests/test_mlflow.py | iamshnoo/optuna | d809aacd0384a17d06dcab03cf99d5c4c86abc92 | [
"MIT"
] | 1 | 2019-05-28T07:29:49.000Z | 2019-05-28T07:29:49.000Z | tests/integration_tests/test_mlflow.py | nabenabe0928/optuna | aa505125de8515518fe19ba227edf7a1d3f8ebda | [
"MIT"
] | null | null | null | tests/integration_tests/test_mlflow.py | nabenabe0928/optuna | aa505125de8515518fe19ba227edf7a1d3f8ebda | [
"MIT"
] | 2 | 2020-03-03T00:40:28.000Z | 2021-01-28T11:54:32.000Z | from mlflow.tracking import MlflowClient
import py
import optuna
from optuna.integration.mlflow import MLflowCallback
def _objective_func(trial: optuna.trial.Trial) -> float:
x = trial.suggest_uniform("x", -1.0, 1.0)
y = trial.suggest_loguniform("y", 20, 30)
z = trial.suggest_categorical("z", (-1.0, 1.0... | 36.02963 | 88 | 0.71176 |
00013651dedd34f35d71f09c33c91c0c937425cc | 732 | py | Python | setup.py | cutec-chris/gitlab-timetracking | 8f96fadb5baee8a80bb309ca61a7d06ba4f5a2be | [
"MIT"
] | null | null | null | setup.py | cutec-chris/gitlab-timetracking | 8f96fadb5baee8a80bb309ca61a7d06ba4f5a2be | [
"MIT"
] | null | null | null | setup.py | cutec-chris/gitlab-timetracking | 8f96fadb5baee8a80bb309ca61a7d06ba4f5a2be | [
"MIT"
] | null | null | null | from setuptools import setup
with open("README.md", 'r') as f:
long_description = f.read()
setup(name='gitlab-timetracking',
version='0.0.1',
description='simple timetracking commandline application that uses the Gitlab api to get / store times in gitlab directly in the project/repository',
long_... | 38.526316 | 155 | 0.685792 |
400846cc4ca1de7433eaf982551bc22797428464 | 11,831 | py | Python | crabageprediction/venv/Lib/site-packages/pandas/tests/arrays/interval/test_interval.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 3 | 2021-11-23T05:35:28.000Z | 2022-02-10T08:05:53.000Z | crabageprediction/venv/Lib/site-packages/pandas/tests/arrays/interval/test_interval.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 5 | 2022-02-13T14:38:04.000Z | 2022-02-15T00:13:07.000Z | crabageprediction/venv/Lib/site-packages/pandas/tests/arrays/interval/test_interval.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 5 | 2018-04-24T13:31:56.000Z | 2021-10-21T05:06:23.000Z | import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import (
Index,
Interval,
IntervalIndex,
Timedelta,
Timestamp,
date_range,
timedelta_range,
)
import pandas._testing as tm
from pandas.core.arrays import IntervalArray
@pytest.fixtu... | 31.975676 | 85 | 0.614487 |
b36b251b6ac0bd83ba2e3de45203605c70e81927 | 119,573 | py | Python | electrumx/lib/coins.py | magnumwallet/electrumx | b732283de717a5cfa4215582d03dc43f1542dac6 | [
"MIT"
] | null | null | null | electrumx/lib/coins.py | magnumwallet/electrumx | b732283de717a5cfa4215582d03dc43f1542dac6 | [
"MIT"
] | null | null | null | electrumx/lib/coins.py | magnumwallet/electrumx | b732283de717a5cfa4215582d03dc43f1542dac6 | [
"MIT"
] | null | null | null | # Copyright (c) 2016-2017, Neil Booth
# Copyright (c) 2017, the ElectrumX authors
#
# All rights reserved.
#
# The MIT License (MIT)
#
# 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 ... | 30.778121 | 95 | 0.649879 |
5cf644f33d2775abb892eb1d62e6ba0bcebf2306 | 5,917 | py | Python | examples/dependency_parsing/ddparser/model/encoder.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/dependency_parsing/ddparser/model/encoder.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/dependency_parsing/ddparser/model/encoder.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 35.431138 | 80 | 0.591178 |
6b7656e03eb6c32f43adc7e2653b0ba1f5e86dd0 | 1,233 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/bx_python-0.7.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/table_add_column.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/bx_python-0.7.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/table_add_column.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/bx_python-0.7.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/table_add_column.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/python2.7
"""
Tool for adding a column to a table. Expressions for the column are similar
to those supported by table_filter.py
usage: %prog expression colname < table
-H, --header: keep header in output
-C, --comments: keep comments in output
"""
import psyco_full
import sys
import sys
imp... | 26.234043 | 75 | 0.614761 |
aa3ecdc215b7b10cef1e0f56c2f8be4d75966fb6 | 647 | py | Python | src/733-flood-fill.py | sahilrider/LeetCode-Solutions | 9cac844c27b5dbf37a70c2981a09cd92457f7ff1 | [
"MIT"
] | 2 | 2020-03-06T11:44:25.000Z | 2020-03-13T20:07:48.000Z | src/733-flood-fill.py | sahilrider/LeetCode-Solutions | 9cac844c27b5dbf37a70c2981a09cd92457f7ff1 | [
"MIT"
] | null | null | null | src/733-flood-fill.py | sahilrider/LeetCode-Solutions | 9cac844c27b5dbf37a70c2981a09cd92457f7ff1 | [
"MIT"
] | null | null | null | '''https://leetcode.com/problems/flood-fill/'''
class Solution:
def floodFill(self, image: List[List[int]], sr: int, sc: int, newColor: int) -> List[List[int]]:
visited = []
target = image[sr][sc]
def dfs(i, j):
if i<0 or j<0 or i>=len(image) or j>=len(image[0]) or (i,j) in visi... | 32.35 | 100 | 0.446677 |
ed1515a410b8b1cfdb343df0320d29690ef7ff1b | 9,194 | py | Python | moneytronAlternativeData2.py | JorisMeertBambrugge/scraping | dd22f30ba8a19a5bb73b90aa388c5385bfccfc46 | [
"MIT"
] | null | null | null | moneytronAlternativeData2.py | JorisMeertBambrugge/scraping | dd22f30ba8a19a5bb73b90aa388c5385bfccfc46 | [
"MIT"
] | null | null | null | moneytronAlternativeData2.py | JorisMeertBambrugge/scraping | dd22f30ba8a19a5bb73b90aa388c5385bfccfc46 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import datetime
from math import pi
from bokeh.plotting import figure,show
from bokeh.models import Column,ColumnDataSource,Row
from bokeh.palettes import Category20
from bokeh.transform import cumsum
def nearest(date,timeSeries,findSeries):
"""
This function will return... | 55.385542 | 228 | 0.739722 |
47e243600a4a4f5821cb4f357ef0081ef0100df5 | 7,452 | py | Python | rcnn_dff/core/metric.py | tonysy/mx-rcnn-flow | b78c3c964c802bb874d673170d7452e7a573a998 | [
"Apache-2.0"
] | 2 | 2018-01-31T02:47:42.000Z | 2019-07-05T03:48:54.000Z | rcnn_dff/core/metric.py | tonysy/mx-rcnn-flow | b78c3c964c802bb874d673170d7452e7a573a998 | [
"Apache-2.0"
] | null | null | null | rcnn_dff/core/metric.py | tonysy/mx-rcnn-flow | b78c3c964c802bb874d673170d7452e7a573a998 | [
"Apache-2.0"
] | null | null | null | import mxnet as mx
import numpy as np
from ..config import config
def get_rpn_names():
if config.TRAIN.RPN_OHEM:
pred = ['rpn_cls_prob', 'rpn_bbox_loss', 'rpn_cls_mask', 'rpn_bbox_mask']
else:
pred = ['rpn_cls_prob', 'rpn_bbox_loss']
label = ['rpn_label', 'rpn_bbox_target', 'rpn_bbox_weig... | 36 | 101 | 0.607622 |
c1a7bec307e79b321946279e7a181db02c526d20 | 23,926 | py | Python | tensorflow_probability/python/experimental/mcmc/particle_filter_test.py | awav/probability | c833ee5cd9f60f3257366b25447b9e50210b0590 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/experimental/mcmc/particle_filter_test.py | awav/probability | c833ee5cd9f60f3257366b25447b9e50210b0590 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/experimental/mcmc/particle_filter_test.py | awav/probability | c833ee5cd9f60f3257366b25447b9e50210b0590 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the _License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 42.497336 | 91 | 0.644822 |
d23e82bb18520cfe923e6480091a9110fd42b7e5 | 1,979 | py | Python | pywal/image.py | deviantfero/pywal | 2d7662dfe0a9d49d0634d68ee244bb31462332cb | [
"MIT"
] | null | null | null | pywal/image.py | deviantfero/pywal | 2d7662dfe0a9d49d0634d68ee244bb31462332cb | [
"MIT"
] | null | null | null | pywal/image.py | deviantfero/pywal | 2d7662dfe0a9d49d0634d68ee244bb31462332cb | [
"MIT"
] | null | null | null | """
Get the image file.
"""
import logging
import os
import random
import re
import sys
from .settings import CACHE_DIR
from . import util
from . import wallpaper
def get_image_dir(img_dir):
"""Get all images in a directory."""
current_wall = wallpaper.get()
current_wall = os.path.basename(current_wall)
... | 23.282353 | 69 | 0.630622 |
2b7d0fa851d72d306e36b3418025101045e24373 | 1,834 | py | Python | 0010_RegularExpressionMatching.py | yingzhuo1994/LeetCode | 636eef90867d21e3439d258ec99fbb8e5ad5a742 | [
"MIT"
] | null | null | null | 0010_RegularExpressionMatching.py | yingzhuo1994/LeetCode | 636eef90867d21e3439d258ec99fbb8e5ad5a742 | [
"MIT"
] | null | null | null | 0010_RegularExpressionMatching.py | yingzhuo1994/LeetCode | 636eef90867d21e3439d258ec99fbb8e5ad5a742 | [
"MIT"
] | null | null | null | class Solution:
# 1st solution
def isMatch(self, s: str, p: str) -> bool:
if not p:
return not s
if s and p[0] in {s[0], '.'}:
first_match = True
else:
first_match = False
if len(p) >= 2 and p[1] == '*':
return (self.isMatch(s, p[2:... | 37.428571 | 75 | 0.416576 |
a9530e28966c8a69f396db5d22f40a4a08fec381 | 266 | py | Python | quality/config/desktop.py | creador30/Quality | dde1a9dc327982077fe0a7bd069c7a85686d763a | [
"MIT"
] | 1 | 2021-05-21T14:44:27.000Z | 2021-05-21T14:44:27.000Z | quality/config/desktop.py | creador30/Quality | dde1a9dc327982077fe0a7bd069c7a85686d763a | [
"MIT"
] | null | null | null | quality/config/desktop.py | creador30/Quality | dde1a9dc327982077fe0a7bd069c7a85686d763a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"module_name": "Quality",
"color": "#c0382b",
"icon": "octicon octicon-zap",
"type": "module",
"label": _("Quality Management")
}
]
| 17.733333 | 39 | 0.612782 |
f25123ca087f12fc284a866222267cba60a640fe | 6,530 | py | Python | recipe_modules/os_utils/api.py | cbracken/flutter_recipes | 377482c7e1058d1ef2d9c946f4144c01c2a588ce | [
"BSD-3-Clause"
] | 2 | 2021-04-09T06:07:28.000Z | 2021-04-10T01:42:23.000Z | recipe_modules/os_utils/api.py | cbracken/flutter_recipes | 377482c7e1058d1ef2d9c946f4144c01c2a588ce | [
"BSD-3-Clause"
] | null | null | null | recipe_modules/os_utils/api.py | cbracken/flutter_recipes | 377482c7e1058d1ef2d9c946f4144c01c2a588ce | [
"BSD-3-Clause"
] | 1 | 2021-09-28T16:26:46.000Z | 2021-09-28T16:26:46.000Z | # Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from contextlib import contextmanager
from recipe_engine import recipe_api
from PB.go.chromium.org.luci.buildbucket.proto import common as common_pb2
clas... | 32.81407 | 89 | 0.575957 |
3729c927f0aa93ae3a350b7324cc5180d7441906 | 493 | py | Python | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 ... | 35.214286 | 76 | 0.51927 |
f78347778b858f957b167a0e68d65c8cf7d9429b | 715 | py | Python | verilog/dv/common/python/fwnoc_tests/fwnoc/single_inflight_00_01_sz_zero.py | Featherweight-IP/fwnoc | c1d8558e97fff1c125a1ef8f3519bd48735fe1a5 | [
"Apache-2.0"
] | null | null | null | verilog/dv/common/python/fwnoc_tests/fwnoc/single_inflight_00_01_sz_zero.py | Featherweight-IP/fwnoc | c1d8558e97fff1c125a1ef8f3519bd48735fe1a5 | [
"Apache-2.0"
] | null | null | null | verilog/dv/common/python/fwnoc_tests/fwnoc/single_inflight_00_01_sz_zero.py | Featherweight-IP/fwnoc | c1d8558e97fff1c125a1ef8f3519bd48735fe1a5 | [
"Apache-2.0"
] | null | null | null | '''
Created on May 7, 2021
@author: mballance
'''
import cocotb
from fwnoc_tests.fwnoc.fwnoc_test_base import FwnocTestBase
from fwnoc_bfms.fwnoc_channel_bfm import FwNocPacket
class SingleInflightP2P(FwnocTestBase):
async def run(self):
pkt = FwNocPacket()
pkt.src_tile_x = 0
pkt.src_... | 21.029412 | 59 | 0.61958 |
db9c49b9f0c1570e23aa57599fbff7ea1f95904e | 1,310 | py | Python | research/setup.py | nilskk/models | dfb8bd66b54aa7f3c574089ed24b30b2e5ffa41c | [
"Apache-2.0"
] | null | null | null | research/setup.py | nilskk/models | dfb8bd66b54aa7f3c574089ed24b30b2e5ffa41c | [
"Apache-2.0"
] | null | null | null | research/setup.py | nilskk/models | dfb8bd66b54aa7f3c574089ed24b30b2e5ffa41c | [
"Apache-2.0"
] | null | null | null | """Setup script for object_detection with TF2.0."""
import os
from setuptools import find_packages
from setuptools import setup
# Note: adding apache-beam to required packages causes conflict with
# tf-models-offical requirements. These packages request for incompatible
# oauth2client package.
REQUIRED_PACKAGES = [
... | 29.111111 | 85 | 0.651908 |
b4861fa2151ce7256aff10ea0cdf9da929f2a0fe | 811 | py | Python | ecommerce_api/urls.py | HemanthKumar-Thope/ecommerce-api | a93603b6b9db2e16ae4511f2643662200d11b85e | [
"MIT"
] | null | null | null | ecommerce_api/urls.py | HemanthKumar-Thope/ecommerce-api | a93603b6b9db2e16ae4511f2643662200d11b85e | [
"MIT"
] | null | null | null | ecommerce_api/urls.py | HemanthKumar-Thope/ecommerce-api | a93603b6b9db2e16ae4511f2643662200d11b85e | [
"MIT"
] | null | null | null | """ecommerce_api URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class... | 35.26087 | 77 | 0.707768 |
a5121fd01ba8147fde523f6ea8d89481e28f3b7c | 478 | py | Python | pyredfish/console/console_disband.py | vaideesg/pyopenapi | f233bb27a31e811510a76759c5c15e76ba08684e | [
"Apache-2.0"
] | null | null | null | pyredfish/console/console_disband.py | vaideesg/pyopenapi | f233bb27a31e811510a76759c5c15e76ba08684e | [
"Apache-2.0"
] | null | null | null | pyredfish/console/console_disband.py | vaideesg/pyopenapi | f233bb27a31e811510a76759c5c15e76ba08684e | [
"Apache-2.0"
] | null | null | null | import os, sys
sys.path.append(os.getcwd())
from console.console_api import *
def printx(response):
print(json.dumps(response, indent=4, separators=(',', ': ')))
scom = ConsoleRemote()
print("==== Disbanding Console")
my_data = {
'type' : 'SCOM',
'name' : 'Anusha SCOM Server',
'hop_server' : '100.... | 25.157895 | 69 | 0.604603 |
275106b0f337022521e0830be081f85db72b57b8 | 34,002 | py | Python | nikola/plugin_categories.py | jonasstein/nikola | 9b94d4581f66d72f8ceb3772e458ca66cb7eb869 | [
"MIT"
] | null | null | null | nikola/plugin_categories.py | jonasstein/nikola | 9b94d4581f66d72f8ceb3772e458ca66cb7eb869 | [
"MIT"
] | null | null | null | nikola/plugin_categories.py | jonasstein/nikola | 9b94d4581f66d72f8ceb3772e458ca66cb7eb869 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2012-2018 Roberto Alsina and others.
# 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 t... | 37.738069 | 220 | 0.673255 |
424201ecefd17117a7682f762921fdc52613d1f6 | 3,272 | py | Python | tests/command_line/test_export_best.py | dials-src/dials | 25055c1f6164dc33e672e7c5c6a9c5a35e870660 | [
"BSD-3-Clause"
] | null | null | null | tests/command_line/test_export_best.py | dials-src/dials | 25055c1f6164dc33e672e7c5c6a9c5a35e870660 | [
"BSD-3-Clause"
] | null | null | null | tests/command_line/test_export_best.py | dials-src/dials | 25055c1f6164dc33e672e7c5c6a9c5a35e870660 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
import procrunner
def test_export_best(dials_data, tmp_path):
result = procrunner.run(
[
"dials.import",
"template="
+ str(dials_data("centroid_test_data", pathlib=True) / "centroid_####.cbf"),
],
working_directory=tmp... | 28.955752 | 88 | 0.523839 |
cb2b9b002fa0c55119d48c325a2fdf82d6743cfa | 5,471 | py | Python | modules/dbnd/src/dbnd/_core/utils/http/reliable_http_client.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | modules/dbnd/src/dbnd/_core/utils/http/reliable_http_client.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 16 | 2020-03-11T09:37:58.000Z | 2022-01-26T10:22:08.000Z | modules/dbnd/src/dbnd/_core/utils/http/reliable_http_client.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | import json
import logging
from time import sleep
import requests
from dbnd._core.errors import DatabandError, DatabandConfigError
from dbnd._core.utils.http import constants
# copypasted from sparkmagic package
# Copyright (c) 2015 aggftw@gmail.com
# Distributed under the terms of the Modified BSD License.
#
lo... | 35.296774 | 97 | 0.545056 |
c7d7024b06f8b152a0a8735258c16854aadba82c | 2,400 | py | Python | hash_hardlink.py | voussoir/cmd | 9ecfc43751c42d4cdd288b8a1b28ba3a7fa6c650 | [
"BSD-3-Clause"
] | 6 | 2020-01-30T13:36:53.000Z | 2022-02-05T08:14:56.000Z | hash_hardlink.py | voussoir/cmd | 9ecfc43751c42d4cdd288b8a1b28ba3a7fa6c650 | [
"BSD-3-Clause"
] | null | null | null | hash_hardlink.py | voussoir/cmd | 9ecfc43751c42d4cdd288b8a1b28ba3a7fa6c650 | [
"BSD-3-Clause"
] | 1 | 2020-01-30T13:36:33.000Z | 2020-01-30T13:36:33.000Z | import argparse
import hashlib
import os
import send2trash
import sys
from voussoirkit import bytestring
from voussoirkit import lazychain
from voussoirkit import pathclass
from voussoirkit import pipeable
from voussoirkit import spinal
from voussoirkit import vlogging
log = vlogging.getLogger(__name__, 'hash_hardlin... | 28.915663 | 101 | 0.658333 |
11c26c726fa5661230a5fea4aa92883480b1e275 | 29,029 | py | Python | rlkit/launchers/launcher_util.py | richardrl/rlkit | 088dae169a8d5ba1430094eee66f27b2cb7c4998 | [
"MIT"
] | null | null | null | rlkit/launchers/launcher_util.py | richardrl/rlkit | 088dae169a8d5ba1430094eee66f27b2cb7c4998 | [
"MIT"
] | null | null | null | rlkit/launchers/launcher_util.py | richardrl/rlkit | 088dae169a8d5ba1430094eee66f27b2cb7c4998 | [
"MIT"
] | null | null | null | import datetime
import json
import os
import os.path as osp
import pickle
import random
import sys
import time
from collections import namedtuple
import __main__ as main
import dateutil.tz
import numpy as np
from rlkit.core import logger
from rlkit.launchers import config
from rlkit.torch.pytorch_util import set_gpu_... | 32.182927 | 131 | 0.606738 |
db0260ebb25ba911e0bbcfb919a461413c381038 | 12,186 | py | Python | Episode09-Lives/Pygame/Shmup Tutorial-11.py | Inksaver/Shmup_With_Pygame_Love2D_Monogame | 84838516d9dd9d6639b1b699dca546bfdfec73dc | [
"CC0-1.0"
] | 1 | 2022-02-01T04:05:04.000Z | 2022-02-01T04:05:04.000Z | Episode09-Lives/Pygame/Shmup Tutorial-11.py | Inksaver/Shmup_With_Pygame_Love2D_Monogame | 84838516d9dd9d6639b1b699dca546bfdfec73dc | [
"CC0-1.0"
] | null | null | null | Episode09-Lives/Pygame/Shmup Tutorial-11.py | Inksaver/Shmup_With_Pygame_Love2D_Monogame | 84838516d9dd9d6639b1b699dca546bfdfec73dc | [
"CC0-1.0"
] | null | null | null | '''
Episode 11
https://www.youtube.com/watch?v=G5-4nV6LxgU
Lives
# Background music: Frozen Jam by tgfcoder <https://twitter.com/tgfcoder> licensed under CC-BY-3
'''
# import libraries
import pygame, os, math, random
import shared, player, mob, bullet, shield, explosion
class data():
new_bullet_timer:f... | 38.08125 | 149 | 0.671919 |
24be67b734e19fa6d0f8fecf16d019b3ff634c00 | 3,237 | py | Python | Talk/config/models.py | huqingsong/typeidea | 9ac7c5547520f17f7747d36fc34468cd704f2f92 | [
"MIT"
] | null | null | null | Talk/config/models.py | huqingsong/typeidea | 9ac7c5547520f17f7747d36fc34468cd704f2f92 | [
"MIT"
] | null | null | null | Talk/config/models.py | huqingsong/typeidea | 9ac7c5547520f17f7747d36fc34468cd704f2f92 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.template.loader import render_to_string
# Create your models here.
class Link(models.Model):
STATUS_NORMAL = 1
STATUS_DELETE = 0
STATUS_ITEMS = (
(STATUS_NORMAL, '正常'),
(STATUS_DELETE, '删除'),
)
titl... | 34.806452 | 104 | 0.614458 |
be5407ccc64b3c3eb8f4a30be8b1af67d9e09376 | 58,661 | py | Python | tests/language/test_visitor.py | dfee/graphql-core-next | 1ada7146bd0510171ae931b68f6c77dbdf5d5c63 | [
"MIT"
] | null | null | null | tests/language/test_visitor.py | dfee/graphql-core-next | 1ada7146bd0510171ae931b68f6c77dbdf5d5c63 | [
"MIT"
] | null | null | null | tests/language/test_visitor.py | dfee/graphql-core-next | 1ada7146bd0510171ae931b68f6c77dbdf5d5c63 | [
"MIT"
] | null | null | null | from copy import copy
from pytest import fail
from graphql.language import (
Node, FieldNode, NameNode, SelectionSetNode, parse, print_ast,
visit, BREAK, REMOVE, SKIP, ParallelVisitor, TypeInfoVisitor, Visitor)
from graphql.type import get_named_type, is_composite_type
from graphql.utilities import TypeInfo
... | 43.484804 | 79 | 0.477779 |
d674a3c1d3258ca70ba8eabfaee17bfa449a39a8 | 11,269 | py | Python | doc/conf.py | cboos/trac | c0d42829d719dd82fde489611344ced97597aebd | [
"BSD-3-Clause"
] | null | null | null | doc/conf.py | cboos/trac | c0d42829d719dd82fde489611344ced97597aebd | [
"BSD-3-Clause"
] | null | null | null | doc/conf.py | cboos/trac | c0d42829d719dd82fde489611344ced97597aebd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2018 Edgewall Software
# Copyright (C) 2008 Noah Kantrowitz <noah@coderanger.net>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://... | 29.655263 | 81 | 0.71923 |
b39a406b138e35465c9c128c7f2914e7b5f6c955 | 665 | py | Python | ACME/layer/TLayer.py | mauriziokovacic/ACME | 2615b66dd4addfd5c03d9d91a24c7da414294308 | [
"MIT"
] | 3 | 2019-10-23T23:10:55.000Z | 2021-09-01T07:30:14.000Z | ACME/layer/TLayer.py | mauriziokovacic/ACME-Python | 2615b66dd4addfd5c03d9d91a24c7da414294308 | [
"MIT"
] | null | null | null | ACME/layer/TLayer.py | mauriziokovacic/ACME-Python | 2615b66dd4addfd5c03d9d91a24c7da414294308 | [
"MIT"
] | 1 | 2020-07-11T11:35:43.000Z | 2020-07-11T11:35:43.000Z | import torch
class TLayer(torch.nn.Module):
def __init__(self, K=3, bias=False):
super(TLayer, self).__init__()
self.weight = torch.nn.Parameter(data=torch.eye(K, dtype=torch.float, requires_grad=True), requires_grad=True)
if bias:
self.bias = torch.nn.Parameter(data=torch.eye(... | 33.25 | 120 | 0.645113 |
3ccb0b0311dcc6aeecbcca9718e56ac1cc0494ee | 15,347 | py | Python | pw_console/py/window_manager_test.py | octml/pigweed | e273d46024ef7b5a7c7ec584e4aaada41c541fc4 | [
"Apache-2.0"
] | 86 | 2021-03-09T23:49:40.000Z | 2022-03-30T08:14:51.000Z | pw_console/py/window_manager_test.py | octml/pigweed | e273d46024ef7b5a7c7ec584e4aaada41c541fc4 | [
"Apache-2.0"
] | 4 | 2021-07-27T20:32:03.000Z | 2022-03-08T10:39:07.000Z | pw_console/py/window_manager_test.py | octml/pigweed | e273d46024ef7b5a7c7ec584e4aaada41c541fc4 | [
"Apache-2.0"
] | 22 | 2021-03-11T15:15:47.000Z | 2022-02-09T06:16:36.000Z | # Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.715311 | 79 | 0.563302 |
1724926fe0a2d72c27c5f7d81fae5736b1e13c2a | 16,919 | py | Python | sds/sdsfile.py | ltrani/DMPilot-RuleManager | 2c9a5fa7016203440bd7a2318eef71d5a4ee2381 | [
"MIT"
] | 4 | 2019-05-16T11:13:56.000Z | 2022-01-11T10:43:39.000Z | sds/sdsfile.py | ltrani/DMPilot-RuleManager | 2c9a5fa7016203440bd7a2318eef71d5a4ee2381 | [
"MIT"
] | null | null | null | sds/sdsfile.py | ltrani/DMPilot-RuleManager | 2c9a5fa7016203440bd7a2318eef71d5a4ee2381 | [
"MIT"
] | 1 | 2020-05-26T11:02:17.000Z | 2020-05-26T11:02:17.000Z | """
orfeus/sdsfile class for handling SDS type files.
Author: Mathijs Koymans, 2017
Copyright: ORFEUS Data Center, 2017
Modified: 2019
"""
import os
import requests
import subprocess
import base64
import logging
import ctypes
from datetime import datetime, timedelta
from zlib import adler32
from obspy imp... | 29.998227 | 143 | 0.580353 |
7fc5d93432c942d0c195790acb1a9d28eec3960c | 7,090 | py | Python | pontoon/insights/utils.py | dothq/pontoon | fa85710f56e50d500e6bf8e6c82626ce64440a62 | [
"BSD-3-Clause"
] | 1 | 2021-10-03T20:48:42.000Z | 2021-10-03T20:48:42.000Z | pontoon/insights/utils.py | dothq/pontoon | fa85710f56e50d500e6bf8e6c82626ce64440a62 | [
"BSD-3-Clause"
] | 14 | 2021-06-05T00:09:20.000Z | 2021-09-03T01:48:36.000Z | pontoon/insights/utils.py | dothq/pontoon | fa85710f56e50d500e6bf8e6c82626ce64440a62 | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime
from django.db.models.functions import TruncMonth
from django.db.models import Avg, Sum
from pontoon.base.utils import convert_to_unix_time
from pontoon.insights.models import (
LocaleInsightsSnapshot,
ProjectInsightsSnapshot,
active_users_default,
)
def get_insight_start_da... | 38.532609 | 86 | 0.621016 |
fab2672c5bf76ec5cdfcfaed4ee197321aa00173 | 205 | py | Python | MapAPP/views.py | MHuiG/Karat-Django-Backend | 8887417bb3eee302a1639e247957539479d2ef67 | [
"MIT"
] | null | null | null | MapAPP/views.py | MHuiG/Karat-Django-Backend | 8887417bb3eee302a1639e247957539479d2ef67 | [
"MIT"
] | null | null | null | MapAPP/views.py | MHuiG/Karat-Django-Backend | 8887417bb3eee302a1639e247957539479d2ef67 | [
"MIT"
] | null | null | null | from django.shortcuts import render
# Create your views here.
from Karat.settings import RequestHost
def SchoolHistoryMuseum(request):
return render(request, 'test.html',{"RequestHost":RequestHost}) | 25.625 | 67 | 0.790244 |
16b76118bf010ef05151e277efd7bb1b165fc18b | 3,673 | py | Python | brick_data/queryprocessor/querysynthesizer.py | jbkoh/brick_data | bab392b8b0b83c7a0c5427c08f3d9f2b22a8ab06 | [
"Apache-2.0"
] | 3 | 2020-09-24T18:53:55.000Z | 2021-02-22T07:30:04.000Z | brick_data/queryprocessor/querysynthesizer.py | jbkoh/brick-federation | bab392b8b0b83c7a0c5427c08f3d9f2b22a8ab06 | [
"Apache-2.0"
] | 2 | 2019-03-31T01:22:13.000Z | 2019-05-28T00:49:36.000Z | brick_data/queryprocessor/querysynthesizer.py | jbkoh/brick-federation | bab392b8b0b83c7a0c5427c08f3d9f2b22a8ab06 | [
"Apache-2.0"
] | 1 | 2019-05-28T18:58:51.000Z | 2019-05-28T18:58:51.000Z | import pdb
from functools import reduce
from copy import deepcopy
from moz_sql_parser import parse
adder = lambda x,y: x+y
class QuerySynthesizer(object):
def __init__(self):
pass
class BrickSynthesizer(QuerySynthesizer):
def __init__(self):
super(BrickSynthesizer, self).__init__()
def ... | 32.794643 | 85 | 0.569017 |
5c90cdcf9395e41cd0165185d0fb47fbc1d0b687 | 16,901 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_network_management_client.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_network_management_client.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_network_management_client.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # 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 may ... | 67.06746 | 180 | 0.803444 |
06ac7364868000519585e8db0c299aba9c7d7257 | 4,371 | py | Python | .waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Tools/c_tests.py | nimbostratus214/FlappyBird | 20c2ff59d443bf05003f680d3d5dc9d84aef7744 | [
"MIT"
] | 1 | 2022-03-22T08:08:35.000Z | 2022-03-22T08:08:35.000Z | ns-3-dev/.waf3-2.0.21-c6c9a875365426e5928462b9b74d40b5/waflib/Tools/c_tests.py | Marquez607/Wireless-Perf-Sim | 1086759b6dbe7da192225780d5fe6a3da0c5eb07 | [
"MIT"
] | null | null | null | ns-3-dev/.waf3-2.0.21-c6c9a875365426e5928462b9b74d40b5/waflib/Tools/c_tests.py | Marquez607/Wireless-Perf-Sim | 1086759b6dbe7da192225780d5fe6a3da0c5eb07 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
from waflib import Task
from waflib.Configure import conf
from waflib.TaskGen import feature,before_method,after_method
LIB_CODE='''
#ifdef _MSC_VER
#define testEXPORT __declspec(dllexport)
#else
#de... | 27.490566 | 166 | 0.716541 |
e06a24a8960c628ec08a500f279e151fe7253d54 | 45,669 | py | Python | trident/layers/pytorch_rnn.py | cronin4392/trident | 1c1eb01bcde861496ce83e265ff071fc9bcb9db2 | [
"MIT"
] | 68 | 2020-11-13T06:40:52.000Z | 2022-03-28T12:40:59.000Z | trident/layers/pytorch_rnn.py | cronin4392/trident | 1c1eb01bcde861496ce83e265ff071fc9bcb9db2 | [
"MIT"
] | 1 | 2021-08-15T17:06:35.000Z | 2021-11-10T04:42:52.000Z | trident/layers/pytorch_rnn.py | cronin4392/trident | 1c1eb01bcde861496ce83e265ff071fc9bcb9db2 | [
"MIT"
] | 11 | 2020-11-24T13:14:16.000Z | 2021-12-26T07:41:29.000Z | """Pytorch recursive layers definition in trident"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import numbers
import random
import warnings
from typing import Optional, Tuple, overload,Union
import torch
import torch.nn as nn
from torch im... | 47.325389 | 225 | 0.624165 |
3b9872471ba89cd099261e8b67c6db9c64ac79ee | 1,976 | py | Python | setup.py | sergiusnick/django-admin-env-notice | 9fd162567d24a3c2991ea546aff06d6b03a7026a | [
"MIT"
] | null | null | null | setup.py | sergiusnick/django-admin-env-notice | 9fd162567d24a3c2991ea546aff06d6b03a7026a | [
"MIT"
] | null | null | null | setup.py | sergiusnick/django-admin-env-notice | 9fd162567d24a3c2991ea546aff06d6b03a7026a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOErr... | 29.058824 | 80 | 0.616397 |
3b3c89ee73e238e0232fb31fdf17209acfad6b52 | 6,079 | py | Python | tests/disk_metadata_test.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 3 | 2018-04-28T13:06:14.000Z | 2020-06-09T02:39:44.000Z | tests/disk_metadata_test.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 1 | 2021-02-23T12:07:44.000Z | 2021-02-23T12:07:44.000Z | tests/disk_metadata_test.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 6 | 2019-06-11T18:59:57.000Z | 2021-03-02T19:14:42.000Z | # Copyright 2018 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.344633 | 77 | 0.646817 |
b53fa5fea2b5eb911732df16bfac456c04a7720c | 1,650 | py | Python | ssd/structures/container.py | kristine-li/SSD-Server | 35d680a02284feb8e4800c9ef7a2655fbc16261d | [
"MIT"
] | 1 | 2021-04-16T15:50:26.000Z | 2021-04-16T15:50:26.000Z | ssd/structures/container.py | kristine-li/SSD-Server | 35d680a02284feb8e4800c9ef7a2655fbc16261d | [
"MIT"
] | 6 | 2020-03-30T11:25:15.000Z | 2022-01-13T02:27:12.000Z | ssd/structures/container.py | kristine-li/SSD-Server | 35d680a02284feb8e4800c9ef7a2655fbc16261d | [
"MIT"
] | null | null | null | class Container:
"""
Help class for manage boxes, labels, etc...
Not inherit dict due to `default_collate` will change dict's subclass to dict.
"""
def __init__(self, *args, **kwargs):
self._data_dict = dict(*args, **kwargs)
def __setattr__(self, key, value):
object.__setattr__... | 28.448276 | 82 | 0.575758 |
805ca98a4030e01d6f4bcb51af8a3452f15c5819 | 14,395 | py | Python | diofant/tests/vector/test_coordsysrect.py | project-kotinos/diofant___diofant | 882549ac3a4dac238695aa620c02fce6ca33f9d3 | [
"BSD-3-Clause"
] | 1 | 2021-08-22T09:34:15.000Z | 2021-08-22T09:34:15.000Z | diofant/tests/vector/test_coordsysrect.py | project-kotinos/diofant___diofant | 882549ac3a4dac238695aa620c02fce6ca33f9d3 | [
"BSD-3-Clause"
] | null | null | null | diofant/tests/vector/test_coordsysrect.py | project-kotinos/diofant___diofant | 882549ac3a4dac238695aa620c02fce6ca33f9d3 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from diofant import ImmutableMatrix as Matrix
from diofant import Symbol, cos, pi, simplify, sin, symbols, zeros
from diofant.vector.coordsysrect import CoordSysCartesian
from diofant.vector.functions import express
from diofant.vector.orienters import (AxisOrienter, BodyOrienter,
... | 42.588757 | 112 | 0.508093 |
c0f3760f0421bbb257d7bfa19911419228d23909 | 1,032 | py | Python | sdk/python/pulumi_azure_native/datashare/v20201001preview/_inputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_native/datashare/v20201001preview/_inputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_native/datashare/v20201001preview/_inputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"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
from... | 25.8 | 80 | 0.618217 |
88fe6525acf254d98854ace41cd5411fef9580e1 | 3,272 | py | Python | torch/ao/quantization/fx/backend_config_dict/utils.py | ZIZUN/pytorch | f565167fbdf607f3b0b95f077b11f2f78716c217 | [
"Intel"
] | 183 | 2018-04-06T21:10:36.000Z | 2022-03-30T15:05:24.000Z | torch/ao/quantization/fx/backend_config_dict/utils.py | ZIZUN/pytorch | f565167fbdf607f3b0b95f077b11f2f78716c217 | [
"Intel"
] | 631 | 2018-06-05T16:59:11.000Z | 2022-03-31T16:26:57.000Z | torch/ao/quantization/fx/backend_config_dict/utils.py | ZIZUN/pytorch | f565167fbdf607f3b0b95f077b11f2f78716c217 | [
"Intel"
] | 58 | 2018-06-05T16:40:18.000Z | 2022-03-16T15:37:29.000Z | import torch
import torch.nn as nn
from .quantize_handler import get_quantize_handler_cls
from .fuse_handler import get_fuse_handler_cls
from typing import Dict, Any, List, Callable, Union
from ..quantization_types import Pattern, QuantizerCls
def get_pattern_to_quantize_handlers(
backend_config_dict: Dict[str... | 44.821918 | 94 | 0.72555 |
f68dd0e281ee5df6ff744821331f48c353b73a22 | 4,050 | py | Python | ScienceCruiseDataManagement/metadata/management/commands/updatedirectoryusage.py | Swiss-Polar-Institute/science-cruise-data-management | 67721a0f4a1255b8ac43e530ed95a8c324239c7c | [
"MIT"
] | 6 | 2017-10-06T09:18:04.000Z | 2022-02-10T08:54:56.000Z | ScienceCruiseDataManagement/metadata/management/commands/updatedirectoryusage.py | Swiss-Polar-Institute/science-cruise-data-management | 67721a0f4a1255b8ac43e530ed95a8c324239c7c | [
"MIT"
] | 12 | 2020-02-27T09:24:50.000Z | 2021-09-22T17:39:55.000Z | ScienceCruiseDataManagement/metadata/management/commands/updatedirectoryusage.py | Swiss-Polar-Institute/science-cruise-data-management | 67721a0f4a1255b8ac43e530ed95a8c324239c7c | [
"MIT"
] | 1 | 2017-10-16T13:49:33.000Z | 2017-10-16T13:49:33.000Z | from django.core.management.base import BaseCommand, CommandError
from metadata.models import MetadataEntry, Distribution
from django.conf import settings
import os
# This file is part of https://github.com/cpina/science-cruise-data-management
#
# This project was programmed in a hurry without any prior Django experi... | 39.320388 | 133 | 0.644938 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.