hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9bead1489b364e2ba2e8a17860848ae50a622b1b | 6,524 | py | Python | at_tmp/model/util/TMP_PAGINATOR.py | zuoleilei3253/zuoleilei | e188b15a0aa4a9fde00dba15e8300e4b87973e2d | [
"Apache-2.0"
] | null | null | null | at_tmp/model/util/TMP_PAGINATOR.py | zuoleilei3253/zuoleilei | e188b15a0aa4a9fde00dba15e8300e4b87973e2d | [
"Apache-2.0"
] | null | null | null | at_tmp/model/util/TMP_PAGINATOR.py | zuoleilei3253/zuoleilei | e188b15a0aa4a9fde00dba15e8300e4b87973e2d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/7/16 11:50
# @Author : bxf
# @File : TMP_PAGINATOR.py
# @Software: PyCharm
from concurrent.futures import ThreadPoolExecutor
from model.FUNC.GROUP_OPT import *
from model.util.TMP_DB_OPT import *
from model.util.PUB_LOG import *
class Pag... | 30.919431 | 105 | 0.547977 |
ba73bf61b21f7073055589d811eec19cbd9b284e | 2,031 | py | Python | conans/test/functional/conan_api/two_conan_creates_test.py | laundry-96/conan | fd938f7220ca042d94c42ec5eb607ee69c6785a3 | [
"MIT"
] | 1 | 2021-06-14T01:39:27.000Z | 2021-06-14T01:39:27.000Z | conans/test/functional/conan_api/two_conan_creates_test.py | laundry-96/conan | fd938f7220ca042d94c42ec5eb607ee69c6785a3 | [
"MIT"
] | null | null | null | conans/test/functional/conan_api/two_conan_creates_test.py | laundry-96/conan | fd938f7220ca042d94c42ec5eb607ee69c6785a3 | [
"MIT"
] | 1 | 2021-06-03T23:08:43.000Z | 2021-06-03T23:08:43.000Z | import os
import unittest
import platform
from conans.client.conan_api import ConanAPIV1
from conans.client.tools.env import environment_append
from conans.client.tools.files import chdir
from conans.model.ref import PackageReference
from conans.test.utils.test_files import temp_folder
from conans.util.files import lo... | 49.536585 | 98 | 0.643525 |
ce88b13f7f3ee9540d191ba40e505489fc35633a | 39,741 | py | Python | myems-api/reports/spaceenergycategory.py | hyh123a/myems | 669ab8554995a622da595384698d670f9cee61f8 | [
"MIT"
] | 1 | 2021-08-04T13:41:45.000Z | 2021-08-04T13:41:45.000Z | myems-api/reports/spaceenergycategory.py | hyh123a/myems | 669ab8554995a622da595384698d670f9cee61f8 | [
"MIT"
] | null | null | null | myems-api/reports/spaceenergycategory.py | hyh123a/myems | 669ab8554995a622da595384698d670f9cee61f8 | [
"MIT"
] | null | null | null | import falcon
import simplejson as json
import mysql.connector
import config
from datetime import datetime, timedelta, timezone
from core import utilities
from decimal import Decimal
import excelexporters.spaceenergycategory
class Reporting:
@staticmethod
def __init__():
pass
@staticmethod
de... | 61.709627 | 120 | 0.514204 |
069eefd7f6fad28379bd496e5f9045c009d9024d | 25,724 | py | Python | plotting_for_publication_plos_bio/plot_supplemental_polyploid_changes.py | zhiru-liu/microbiome_evolution | 5a08fbf41357d845236e3ff46c31315929d2b649 | [
"BSD-2-Clause"
] | null | null | null | plotting_for_publication_plos_bio/plot_supplemental_polyploid_changes.py | zhiru-liu/microbiome_evolution | 5a08fbf41357d845236e3ff46c31315929d2b649 | [
"BSD-2-Clause"
] | null | null | null | plotting_for_publication_plos_bio/plot_supplemental_polyploid_changes.py | zhiru-liu/microbiome_evolution | 5a08fbf41357d845236e3ff46c31315929d2b649 | [
"BSD-2-Clause"
] | null | null | null | # Within-snp gene changes
import matplotlib
matplotlib.use('Agg')
import config
###
#
# For today while the new data processes
#
import os
#parse_midas_data.data_directory = os.path.expanduser("~/ben_nandita_hmp_data_062517/")
#########################################
import pylab
import sys
import numpy
from ut... | 38.916793 | 424 | 0.761857 |
5aadcf390184db3b60c72e78cd2c28149735935c | 2,220 | bzl | Python | third_party/bazel_doctest/doctest.bzl | uavaustin/image-rec | befb2a171397775e3282284aa636993488ff6ebc | [
"MIT"
] | null | null | null | third_party/bazel_doctest/doctest.bzl | uavaustin/image-rec | befb2a171397775e3282284aa636993488ff6ebc | [
"MIT"
] | 11 | 2020-06-07T16:07:52.000Z | 2022-01-13T03:33:16.000Z | third_party/bazel_doctest/doctest.bzl | uavaustin/hawk-eye | befb2a171397775e3282284aa636993488ff6ebc | [
"MIT"
] | null | null | null | """ Implements Python doctest support for Bazel. """
load("@rules_python//python:defs.bzl", "PyInfo", "py_test")
def _target_to_module(target):
""" Converts the label name to the Python module name. """
label = target.label
return ".".join([label.package.replace("/", "."), label.name])
def _py_doctest_ru... | 29.6 | 93 | 0.625676 |
b615d24f4f283873c52c0af62eb04459af6117e0 | 2,667 | py | Python | lib/train/train_script.py | SkyeSong38/CSWinTT | 27b78f9b0b1eebecfd5b3d3dbdc591c6562e69d7 | [
"MIT"
] | null | null | null | lib/train/train_script.py | SkyeSong38/CSWinTT | 27b78f9b0b1eebecfd5b3d3dbdc591c6562e69d7 | [
"MIT"
] | null | null | null | lib/train/train_script.py | SkyeSong38/CSWinTT | 27b78f9b0b1eebecfd5b3d3dbdc591c6562e69d7 | [
"MIT"
] | null | null | null | import os
from lib.utils.box_ops import giou_loss
from torch.nn.functional import l1_loss
from torch.nn import BCEWithLogitsLoss
from lib.train.trainers import LTRTrainer
from torch.nn.parallel import DistributedDataParallel as DDP
from lib.train.base_functions import *
from lib.models import build_cswintt
from lib.tra... | 37.041667 | 102 | 0.761155 |
a5f085a118d4b553e1e4bb1314ff4fd5ddc5c27f | 13,029 | py | Python | unet/util/spectral_norm.py | botal9/naturalistic-image-embedder | aae459528efd2442eebfb6b00637d7e9fc197093 | [
"MIT"
] | 102 | 2021-01-22T05:56:05.000Z | 2022-03-30T03:14:49.000Z | unet/util/spectral_norm.py | botal9/naturalistic-image-embedder | aae459528efd2442eebfb6b00637d7e9fc197093 | [
"MIT"
] | 18 | 2021-07-22T02:37:57.000Z | 2021-12-01T01:31:31.000Z | unet/util/spectral_norm.py | botal9/naturalistic-image-embedder | aae459528efd2442eebfb6b00637d7e9fc197093 | [
"MIT"
] | 16 | 2021-06-12T06:53:33.000Z | 2021-11-29T20:16:41.000Z | """
Spectral Normalization from https://arxiv.org/abs/1802.05957
"""
import torch
from torch.nn.functional import normalize
class SpectralNorm(object):
# Invariant before and after each forward call:
# u = normalize(W @ v)
# NB: At initialization, this invariant is not enforced
_version = 1
# A... | 47.036101 | 118 | 0.618236 |
48b573a2c8587f22d6197f2c0b3b7776833a5eb1 | 618 | py | Python | sols1.py | Samakwa/PyDS | 818ab4b19936ef1ca557c83ed5985857f33da9d5 | [
"Apache-2.0"
] | 2 | 2019-09-08T00:27:40.000Z | 2019-10-08T16:49:01.000Z | sols1.py | ptarau/PyDS | eeaea1a5842d4e5f2ed2ec094272c3e0a56e4d92 | [
"Apache-2.0"
] | null | null | null | sols1.py | ptarau/PyDS | eeaea1a5842d4e5f2ed2ec094272c3e0a56e4d92 | [
"Apache-2.0"
] | null | null | null | # Q1
def bin(n) :
if n==0 :
yield ()
else :
for k in range(0,n) :
for l in bin(k) :
for r in bin(n-1-k) :
yield (l,r)
def depth(t) :
if not t : return 0
(l,r) = t
return 1+max(depth(l),depth(r))
def t1() :
for t in bin(3) :
print(t,depth(t))
de... | 11.884615 | 37 | 0.446602 |
d5cb5d2b5c1b23fc7381e8abc0ab62a8d5c4cccb | 50,824 | py | Python | sionna/fec/ldpc/decoding.py | NVlabs/sionna | 488e6c3ff6ff2b3313d0ca0f94e4247b8dd6ff35 | [
"Apache-2.0"
] | 163 | 2022-03-22T19:47:47.000Z | 2022-03-31T23:56:45.000Z | sionna/fec/ldpc/decoding.py | Maryammhsnv/sionna | 527d0f7866b379afffad34a6bef7ed3bf6f33ad2 | [
"Apache-2.0"
] | 2 | 2022-03-24T12:43:07.000Z | 2022-03-29T07:17:16.000Z | sionna/fec/ldpc/decoding.py | Maryammhsnv/sionna | 527d0f7866b379afffad34a6bef7ed3bf6f33ad2 | [
"Apache-2.0"
] | 19 | 2022-03-23T02:31:22.000Z | 2022-03-30T06:35:12.000Z | #
# SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Layers for channel decoding and utility functions."""
import tensorflow as tf
import numpy as np
import scipy as sp # for sparse H matrix computations
from tensorflow.ker... | 38.915773 | 207 | 0.595506 |
eaacd9c21c6087066a094d941209aa9d11f98d74 | 413 | py | Python | 2. Programming Fundamentals With Python (May 2021)/07. Lists Basics/05_numbers_filter.py | kzborisov/SoftUni | ccb2b8850adc79bfb2652a45124c3ff11183412e | [
"MIT"
] | 1 | 2021-02-07T07:51:12.000Z | 2021-02-07T07:51:12.000Z | 2. Programming Fundamentals With Python (May 2021)/07. Lists Basics/05_numbers_filter.py | kzborisov/softuni | 9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751 | [
"MIT"
] | null | null | null | 2. Programming Fundamentals With Python (May 2021)/07. Lists Basics/05_numbers_filter.py | kzborisov/softuni | 9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751 | [
"MIT"
] | null | null | null | n = int(input())
integers = []
for _ in range(n):
curr_int = int(input())
integers.append(curr_int)
cmd = input()
if cmd == 'positive':
result = [x for x in integers if x >= 0]
elif cmd == 'negative':
result = [x for x in integers if x < 0]
elif cmd == 'even':
result = [x for x in integers if x ... | 19.666667 | 48 | 0.57385 |
0d6fa432698bf9df02f0c9305a82df071049bc76 | 1,849 | py | Python | old_code/keycreate.py | DiabloHorn/pageant_xkeys | deca836e1781b5b66d61caa8eac7c9432c80be7a | [
"BSD-2-Clause"
] | 17 | 2015-10-04T01:24:50.000Z | 2021-04-09T20:03:46.000Z | old_code/keycreate.py | DiabloHorn/pageant_xkeys | deca836e1781b5b66d61caa8eac7c9432c80be7a | [
"BSD-2-Clause"
] | null | null | null | old_code/keycreate.py | DiabloHorn/pageant_xkeys | deca836e1781b5b66d61caa8eac7c9432c80be7a | [
"BSD-2-Clause"
] | 2 | 2016-12-04T04:56:05.000Z | 2018-01-18T11:42:39.000Z | #!/usr/bin/env python
"""
DiabloHorn https://diablohorn.wordpress.com
Converts rsa primitives extracted with windbg from memory
to a workable rsa private key format
"""
import sys
import base64
from Crypto.PublicKey import RSA
def string_to_long(data):
data = data.split(' ')
data.reverse()
return long(("".join(dat... | 63.758621 | 607 | 0.836128 |
c08d79b987564bfd2bb3e47a6138a2901c70ffdc | 46,735 | py | Python | python/taichi/lang/__init__.py | izackwu/taichi | 48770b8078f814af3f2e3d3a6c4352e79f518784 | [
"MIT"
] | null | null | null | python/taichi/lang/__init__.py | izackwu/taichi | 48770b8078f814af3f2e3d3a6c4352e79f518784 | [
"MIT"
] | null | null | null | python/taichi/lang/__init__.py | izackwu/taichi | 48770b8078f814af3f2e3d3a6c4352e79f518784 | [
"MIT"
] | null | null | null | import atexit
import datetime
import functools
import json
import os
import platform
import shutil
import tempfile
import time
from contextlib import contextmanager
from copy import deepcopy as _deepcopy
from urllib import request
from urllib.error import HTTPError
import taichi.lang.linalg_impl
import taichi.lang.met... | 34.773065 | 233 | 0.624093 |
6353a485a6e49f5e7f23db0d4373469540166ca7 | 1,295 | py | Python | nagare/server/cli_application.py | nagareproject/server-cli | fdcaa67c5883c6c8dbfa15eba4c500ab1f27761c | [
"BSD-3-Clause"
] | null | null | null | nagare/server/cli_application.py | nagareproject/server-cli | fdcaa67c5883c6c8dbfa15eba4c500ab1f27761c | [
"BSD-3-Clause"
] | null | null | null | nagare/server/cli_application.py | nagareproject/server-cli | fdcaa67c5883c6c8dbfa15eba4c500ab1f27761c | [
"BSD-3-Clause"
] | null | null | null | # --
# Copyright (c) 2008-2021 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
# --
import sys
from nagare.admin import app_serve
from nagare.services import plugin
from nagare.co... | 25.9 | 80 | 0.66332 |
69becfa5247dd95a97c4aa5d06a669ece778be1f | 2,697 | py | Python | megnet/data/crystal.py | muratsahin429/megnet | 47973610c88a21d316d280dc80c4bf574f6cf4d7 | [
"BSD-3-Clause"
] | 1 | 2019-10-04T09:39:16.000Z | 2019-10-04T09:39:16.000Z | megnet/data/crystal.py | muratsahin429/megnet | 47973610c88a21d316d280dc80c4bf574f6cf4d7 | [
"BSD-3-Clause"
] | null | null | null | megnet/data/crystal.py | muratsahin429/megnet | 47973610c88a21d316d280dc80c4bf574f6cf4d7 | [
"BSD-3-Clause"
] | null | null | null | from megnet.data.graph import StructureGraph
import numpy as np
from megnet.data.graph import GaussianDistance
from monty.serialization import loadfn
from pathlib import Path
from copy import deepcopy
from pymatgen import Element
MODULE_DIR = Path(__file__).parent.absolute()
class CrystalGraph(StructureGraph):
"... | 36.445946 | 88 | 0.678532 |
9f2208039c27b233b039f7ca4cb89f416438cf9d | 11,090 | py | Python | cogs/colors.py | Prie-st/Aoi | 1fec6fe487d4d1dab0bb125ebaa91051e3e8f866 | [
"MIT"
] | null | null | null | cogs/colors.py | Prie-st/Aoi | 1fec6fe487d4d1dab0bb125ebaa91051e3e8f866 | [
"MIT"
] | null | null | null | cogs/colors.py | Prie-st/Aoi | 1fec6fe487d4d1dab0bb125ebaa91051e3e8f866 | [
"MIT"
] | null | null | null | import colorsys
import io
import random
from typing import List, Optional, Union
import discord
from PIL import Image, ImageDraw
from PIL.ImageOps import grayscale, colorize
from discord.ext import commands
from discord.ext.commands import Greedy
import aoi
from libs.colors import rgb_gradient, hls_gradient
from libs... | 41.691729 | 128 | 0.5633 |
517ad42bae89f3eb7cc2ca74148911af25585790 | 175 | py | Python | msgboard/forms.py | jeniaSakirko/beyond-tutorial | cd847d5af53bd385d0741941216b965d29019999 | [
"MIT"
] | null | null | null | msgboard/forms.py | jeniaSakirko/beyond-tutorial | cd847d5af53bd385d0741941216b965d29019999 | [
"MIT"
] | 1 | 2020-11-15T16:07:00.000Z | 2020-11-15T16:07:23.000Z | msgboard/forms.py | jeniaSakirko/beyond-tutorial | cd847d5af53bd385d0741941216b965d29019999 | [
"MIT"
] | 1 | 2022-03-27T09:55:26.000Z | 2022-03-27T09:55:26.000Z | from django import forms
from msgboard.models import Message
class MessageForm(forms.ModelForm):
class Meta:
model = Message
fields = ('author', 'text')
| 19.444444 | 35 | 0.68 |
14b42ec5ac3d6d88d7de543468a7ccee8b08e2f9 | 594 | py | Python | SPIWork/Server/NaiveScoreMS/apps/operation/models.py | happylrd/buptsse-workbooks | 0c98d5b475abdabd47bb9f406d32f60d49cddfa7 | [
"MIT"
] | null | null | null | SPIWork/Server/NaiveScoreMS/apps/operation/models.py | happylrd/buptsse-workbooks | 0c98d5b475abdabd47bb9f406d32f60d49cddfa7 | [
"MIT"
] | null | null | null | SPIWork/Server/NaiveScoreMS/apps/operation/models.py | happylrd/buptsse-workbooks | 0c98d5b475abdabd47bb9f406d32f60d49cddfa7 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
from datetime import datetime
from django.db import models
from users.models import Student
from activities.models import Activity
class StudentActivity(models.Model):
student = models.ForeignKey(Student, verbose_name='学生')
activity = models.ForeignKey(... | 29.7 | 78 | 0.765993 |
836066f176abc3db2a1a79876cb348b9534ae979 | 4,136 | py | Python | scripts/truck_node.py | PaulBouchier/truck | 041f050ca039caa04bc78a2a6a87187fd96c5f77 | [
"MIT"
] | 3 | 2017-10-31T02:48:39.000Z | 2020-10-23T04:18:51.000Z | scripts/truck_node.py | PaulBouchier/truck | 041f050ca039caa04bc78a2a6a87187fd96c5f77 | [
"MIT"
] | 1 | 2020-11-05T06:25:39.000Z | 2020-11-05T06:25:39.000Z | scripts/truck_node.py | PaulBouchier/truck | 041f050ca039caa04bc78a2a6a87187fd96c5f77 | [
"MIT"
] | 4 | 2018-12-04T17:43:15.000Z | 2021-09-20T07:42:00.000Z | #!/usr/bin/env python
# Node for the big truck gazebo model
########################################################################
# Copyright (c) 2010 University at Albany. All right reserved.
# Derived work Copyright (c) 2014 Paul Bouchier. All rights reserved.
#
# Redistribution and use in source and binary forms... | 40.15534 | 97 | 0.651112 |
510d9f9dc8e4fb4d61d39d932dc387b0514a3c42 | 1,332 | py | Python | min_analysis_tools/min_de_patterns_velocity.py | M-Sabrina/2022_minDE_analysis | fc405a21cb048f2eba7b2f3e69c09a469bb68aaa | [
"MIT"
] | null | null | null | min_analysis_tools/min_de_patterns_velocity.py | M-Sabrina/2022_minDE_analysis | fc405a21cb048f2eba7b2f3e69c09a469bb68aaa | [
"MIT"
] | null | null | null | min_analysis_tools/min_de_patterns_velocity.py | M-Sabrina/2022_minDE_analysis | fc405a21cb048f2eba7b2f3e69c09a469bb68aaa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Function specific for MinDE pattern analysis.
Created on Wed Oct 27 11:42:23 2021
@author: jkerssemakers
"""
import matplotlib.pyplot as plt
import numpy as np
def work_wheel(
velocities,
forward_wavevector_x,
forward_wavevector_y,
edge=100,
bins=50,
demo=1,
):
... | 25.615385 | 70 | 0.603604 |
808458443eb0e8eb63bf6f5f29235675bc53ae78 | 31,695 | py | Python | compose/config/config.py | yongjhih/docker-compose | b1c153df89dede34179284adcf24e4eab523b3db | [
"Apache-2.0"
] | null | null | null | compose/config/config.py | yongjhih/docker-compose | b1c153df89dede34179284adcf24e4eab523b3db | [
"Apache-2.0"
] | null | null | null | compose/config/config.py | yongjhih/docker-compose | b1c153df89dede34179284adcf24e4eab523b3db | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
import codecs
import functools
import logging
import operator
import os
import string
import sys
from collections import namedtuple
import six
import yaml
import urllib
from cached_property import cached_property
from ..const import COMPO... | 31.822289 | 95 | 0.659189 |
3b6747c68309322958f9062998b327f8575e7e02 | 1,583 | py | Python | pybamm/parameters/parameter_sets.py | danieljtait/PyBaMM | f9d6143770e4a01099f06e3574142424730f731a | [
"BSD-3-Clause"
] | null | null | null | pybamm/parameters/parameter_sets.py | danieljtait/PyBaMM | f9d6143770e4a01099f06e3574142424730f731a | [
"BSD-3-Clause"
] | null | null | null | pybamm/parameters/parameter_sets.py | danieljtait/PyBaMM | f9d6143770e4a01099f06e3574142424730f731a | [
"BSD-3-Clause"
] | null | null | null | #
# Parameter sets from papers
#
"""
Parameter sets from papers. The 'citation' entry provides a reference to the appropriate
paper in the file "pybamm/CITATIONS.txt". To see which parameter sets have been used in
your simulation, add the line "pybamm.print_citations()" to your script.
"""
#
# Lithium-ion
#
Marquis201... | 27.293103 | 88 | 0.681617 |
a1b67a42d4816d7b6cc9c5f1242ca7bbfd33ef29 | 3,499 | py | Python | 12_PassagePathing/navigate.py | dandrianneDEL/PyAdventOfCode2021 | ea91186383c0855c81c7243d527de0c4dd4c0afb | [
"MIT"
] | null | null | null | 12_PassagePathing/navigate.py | dandrianneDEL/PyAdventOfCode2021 | ea91186383c0855c81c7243d527de0c4dd4c0afb | [
"MIT"
] | null | null | null | 12_PassagePathing/navigate.py | dandrianneDEL/PyAdventOfCode2021 | ea91186383c0855c81c7243d527de0c4dd4c0afb | [
"MIT"
] | null | null | null | from mmap import ALLOCATIONGRANULARITY
import filehelper
paths = filehelper.readfile()
class Path:
start: 'Node' # https://stackoverflow.com/questions/33837918/type-hints-solve-circular-dependency
target: 'Node'
def __init__(self, start:'Node', target:'Node') -> None:
self.start = start
se... | 35.343434 | 110 | 0.600743 |
0ed63ae40ddf4fe4bfbb46eaf42231bc1bece811 | 1,390 | py | Python | tests/conftest.py | Windact/classification_model | e42e8099069467eeb21f94f6777eb34e68906500 | [
"MIT"
] | null | null | null | tests/conftest.py | Windact/classification_model | e42e8099069467eeb21f94f6777eb34e68906500 | [
"MIT"
] | null | null | null | tests/conftest.py | Windact/classification_model | e42e8099069467eeb21f94f6777eb34e68906500 | [
"MIT"
] | null | null | null | import pytest
import numpy as np
from sklearn.model_selection import train_test_split
from classification_model.config import core
from classification_model.processing import utils
@pytest.fixture(scope="session")
def pipeline_inputs():
# read the data
data = utils.load_dataset(core.config.app_config.TRAINI... | 27.254902 | 84 | 0.71295 |
efcd8903eb5b46df27f9155e1b7d2eb907772bad | 9,191 | py | Python | tests/unit_tests/logic/astrometry/test_astrometry.py | mworion/MountWizzard4 | 4e06b29ec2ef70be40e114b911b7bdf2f858a4b1 | [
"Apache-2.0"
] | 16 | 2020-01-11T22:32:26.000Z | 2022-03-31T15:18:14.000Z | tests/unit_tests/logic/astrometry/test_astrometry.py | mworion/MountWizzard4 | 4e06b29ec2ef70be40e114b911b7bdf2f858a4b1 | [
"Apache-2.0"
] | 196 | 2020-01-16T13:56:01.000Z | 2022-03-29T02:06:51.000Z | tests/unit_tests/logic/astrometry/test_astrometry.py | mworion/MountWizzard4 | 4e06b29ec2ef70be40e114b911b7bdf2f858a4b1 | [
"Apache-2.0"
] | 6 | 2019-12-01T19:39:33.000Z | 2021-05-27T13:14:20.000Z | ############################################################
# -*- coding: utf-8 -*-
#
# # # # # # #
# ## ## # ## # #
# # # # # # # # # # #
# # ## # ## ## ######
# # # # # # #
#
# Python-based Tool for interaction with the 10micron mounts
# GUI with PyQT5 fo... | 27.354167 | 85 | 0.589272 |
7d166f9a8e763e81b82918a62cc9d21228a607ab | 2,457 | py | Python | tests/handlers/test_handlers_blind.py | indeedsecurity/ava-ce | 4483b301034a096b716646a470a6642b3df8ce61 | [
"Apache-2.0"
] | 2 | 2019-03-26T15:37:48.000Z | 2020-01-03T03:47:30.000Z | tests/handlers/test_handlers_blind.py | indeedsecurity/ava-ce | 4483b301034a096b716646a470a6642b3df8ce61 | [
"Apache-2.0"
] | 2 | 2021-03-25T21:27:09.000Z | 2021-06-01T21:20:04.000Z | tests/handlers/test_handlers_blind.py | indeedsecurity/ava-ce | 4483b301034a096b716646a470a6642b3df8ce61 | [
"Apache-2.0"
] | null | null | null | import pytest
from ava.blinds.xss import CrossSiteScriptingBlindDirectCheck
from ava.common.check import _BlindCheck
from ava.handlers.blind import _BlindHandler
@pytest.fixture
def vector():
vector = {
'url': "http://www.avascan.com/",
'method': "get",
'params': {"param": "avascan"},
... | 34.125 | 117 | 0.660969 |
5286092a916a5e58bd1d82687109b3782b4e4a8b | 964 | py | Python | test/test_key.py | tinylinux/m1platformer | b7202399810e24aedb0398f37622a83a9c0c8b7b | [
"CC0-1.0"
] | 9 | 2020-12-04T17:50:18.000Z | 2021-01-22T14:08:46.000Z | test/test_key.py | tinylinux/m1platformer | b7202399810e24aedb0398f37622a83a9c0c8b7b | [
"CC0-1.0"
] | 28 | 2020-10-09T15:18:11.000Z | 2021-01-10T23:03:41.000Z | test/test_key.py | tinylinux/m1platformer | b7202399810e24aedb0398f37622a83a9c0c8b7b | [
"CC0-1.0"
] | null | null | null | # Roll 'n' Jump
# Written in 2020, 2021 by Samuel Arsac, Hugo Buscemi,
# Matteo Chencerel, Rida Lali
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
#... | 31.096774 | 77 | 0.726141 |
a9a8dd9798b4850f4936533a29ff64974411e8b9 | 11,840 | py | Python | modeling/backbone/xception.py | ansarker/deeplab-v3-plus-gis | 1a8966b6a52ef0366d1524a182e3a4ae65ee3377 | [
"MIT"
] | null | null | null | modeling/backbone/xception.py | ansarker/deeplab-v3-plus-gis | 1a8966b6a52ef0366d1524a182e3a4ae65ee3377 | [
"MIT"
] | null | null | null | modeling/backbone/xception.py | ansarker/deeplab-v3-plus-gis | 1a8966b6a52ef0366d1524a182e3a4ae65ee3377 | [
"MIT"
] | null | null | null | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
from modeling.sync_batchnorm.batchnorm import SynchronizedBatchNorm2d
def fixed_padding(inputs, kernel_size, dilation):
kernel_size_effective = kernel_size + (kernel_size - 1) * (dilatio... | 41.111111 | 117 | 0.569088 |
f5f84bb51b649e1cdb9ccc1f6f5a3bea727eaee8 | 172 | py | Python | sympy/functions/special/benchmarks/bench_special.py | Michal-Gagala/sympy | 3cc756c2af73b5506102abaeefd1b654e286e2c8 | [
"MIT"
] | null | null | null | sympy/functions/special/benchmarks/bench_special.py | Michal-Gagala/sympy | 3cc756c2af73b5506102abaeefd1b654e286e2c8 | [
"MIT"
] | null | null | null | sympy/functions/special/benchmarks/bench_special.py | Michal-Gagala/sympy | 3cc756c2af73b5506102abaeefd1b654e286e2c8 | [
"MIT"
] | null | null | null | from sympy.core.symbol import symbols
from sympy.functions.special.spherical_harmonics import Ynm
x, y = symbols('x,y')
def timeit_Ynm_xy():
Ynm(1, 1, x, y)
| 19.111111 | 60 | 0.69186 |
8dfd1410a1cc59df4e7d2ddd72e1838be56d82ce | 15,319 | py | Python | frappe/website/doctype/web_form/web_form.py | hfaridgit/frappe | b939458ed61d521bdc8ebceec7adf4e072df9149 | [
"MIT"
] | null | null | null | frappe/website/doctype/web_form/web_form.py | hfaridgit/frappe | b939458ed61d521bdc8ebceec7adf4e072df9149 | [
"MIT"
] | null | null | null | frappe/website/doctype/web_form/web_form.py | hfaridgit/frappe | b939458ed61d521bdc8ebceec7adf4e072df9149 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, json, os
from frappe.website.website_generator import WebsiteGenerator
from frappe import _, scrub
from frappe.utils import cstr
from frappe.util... | 29.403071 | 148 | 0.723089 |
c29a814b27706bf0dbd7db5fecfc88a0bbf7b64b | 5,956 | py | Python | git_tools/tag_all_repos.py | dllehr81/open-ce-builder | 7f279c130a288240d0fea706122b70f061850e65 | [
"Apache-2.0"
] | null | null | null | git_tools/tag_all_repos.py | dllehr81/open-ce-builder | 7f279c130a288240d0fea706122b70f061850e65 | [
"Apache-2.0"
] | null | null | null | git_tools/tag_all_repos.py | dllehr81/open-ce-builder | 7f279c130a288240d0fea706122b70f061850e65 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# *****************************************************************
# (C) Copyright IBM Corp. 2020, 2021. 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 Licen... | 42.241135 | 158 | 0.567495 |
3514bde2dba08fddeed7107f0ec81e1342461815 | 7,171 | py | Python | pyoracle_forms/misc.py | LatvianPython/pyoracle_forms | 6ac789ee14b1b910d436a53da18bbf89b01e1998 | [
"MIT"
] | 2 | 2019-11-08T21:39:23.000Z | 2020-02-03T19:52:28.000Z | pyoracle_forms/misc.py | LatvianPython/pyoracle_forms | 6ac789ee14b1b910d436a53da18bbf89b01e1998 | [
"MIT"
] | null | null | null | pyoracle_forms/misc.py | LatvianPython/pyoracle_forms | 6ac789ee14b1b910d436a53da18bbf89b01e1998 | [
"MIT"
] | 2 | 2020-02-16T12:05:10.000Z | 2020-11-03T22:44:11.000Z | from __future__ import annotations
import enum
from typing import (
Dict,
Type,
Tuple,
Union,
NoReturn,
Iterable,
List,
TypeVar,
Generic,
Any,
TYPE_CHECKING,
Optional,
)
from .context import context, property_type
from .context import get_boolean
from .context import ge... | 31.178261 | 111 | 0.69279 |
2e005006e75baddc1d9cbfc955a6598d7f47d755 | 4,077 | py | Python | service/models/oaipmh.py | tuub/jper-oaipmh | c3e11489368b88b18919fcfdf759b777a77c99b4 | [
"Apache-2.0"
] | null | null | null | service/models/oaipmh.py | tuub/jper-oaipmh | c3e11489368b88b18919fcfdf759b777a77c99b4 | [
"Apache-2.0"
] | null | null | null | service/models/oaipmh.py | tuub/jper-oaipmh | c3e11489368b88b18919fcfdf759b777a77c99b4 | [
"Apache-2.0"
] | 2 | 2020-02-03T12:35:53.000Z | 2020-02-11T13:47:57.000Z | """
Model objects which bind the OAI-PMH records to the JPER API
"""
from octopus.core import app
from octopus.lib import dates
from octopus.modules.jper import client
import math
class OAIPMHRecord(object):
"""
Base class for communicating with the JPER API for the key operations required by
the OAI inter... | 36.72973 | 188 | 0.663233 |
6a341da03dc28270081d949122fecac93f5e823c | 414 | py | Python | gallery/urls.py | melissa-koi/PersonalGallery | 0fed4a60a754d04f169a976403fb2bde6425ae59 | [
"MIT"
] | null | null | null | gallery/urls.py | melissa-koi/PersonalGallery | 0fed4a60a754d04f169a976403fb2bde6425ae59 | [
"MIT"
] | null | null | null | gallery/urls.py | melissa-koi/PersonalGallery | 0fed4a60a754d04f169a976403fb2bde6425ae59 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('', views.home, name = 'home'),
path('photo/<str:pk>/', views.viewPhoto, name = 'photo'),
path('search/', views.search_results, name='search_results'),
]
if sett... | 29.571429 | 80 | 0.722222 |
201aa347e58d97741612a043b0de11c197dadf12 | 7,172 | py | Python | pyzoo/test/zoo/orca/automl/model/test_base_pytorch_model.py | limn2o4/analytics-zoo | 78d6ce10976a7e1320ff5ebdf431db93a439ec56 | [
"Apache-2.0"
] | 2,970 | 2017-06-08T00:24:43.000Z | 2022-03-30T12:14:55.000Z | pyzoo/test/zoo/orca/automl/model/test_base_pytorch_model.py | limn2o4/analytics-zoo | 78d6ce10976a7e1320ff5ebdf431db93a439ec56 | [
"Apache-2.0"
] | 3,530 | 2017-05-09T08:29:10.000Z | 2022-03-21T02:11:45.000Z | pyzoo/test/zoo/orca/automl/model/test_base_pytorch_model.py | limn2o4/analytics-zoo | 78d6ce10976a7e1320ff5ebdf431db93a439ec56 | [
"Apache-2.0"
] | 972 | 2017-05-09T07:03:50.000Z | 2022-03-23T07:48:48.000Z | #
# Copyright 2018 Analytics Zoo 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... | 37.549738 | 97 | 0.579057 |
726a935e31eccbaa63b716a4a40919038535e611 | 1,153 | py | Python | setup.py | phelipetls/mapsbr | 36e2637c612d333a327199fd0687dbba09e964ba | [
"MIT"
] | null | null | null | setup.py | phelipetls/mapsbr | 36e2637c612d333a327199fd0687dbba09e964ba | [
"MIT"
] | null | null | null | setup.py | phelipetls/mapsbr | 36e2637c612d333a327199fd0687dbba09e964ba | [
"MIT"
] | null | null | null | import setuptools
import distutils
long_description = """
MapsBR - Get brazilian geospatial data with Python
This package helps you get brazilian geospatial data from IBGE sources directly into a GeoPandas structure. It also has functionalities to retrieve data from an ArcGIS server.
Learn more about it in our [repo... | 37.193548 | 175 | 0.719861 |
4a4f840edad331e0b7edceb3e6efc0707efbb616 | 397 | py | Python | wpt/websockets/websock_handlers/handshake_raw_no_trailing_data_wsh.py | gsnedders/presto-testo | a0acfbef13a3f8cae67cc7145216d31b67aa8eb4 | [
"BSD-3-Clause"
] | null | null | null | wpt/websockets/websock_handlers/handshake_raw_no_trailing_data_wsh.py | gsnedders/presto-testo | a0acfbef13a3f8cae67cc7145216d31b67aa8eb4 | [
"BSD-3-Clause"
] | null | null | null | wpt/websockets/websock_handlers/handshake_raw_no_trailing_data_wsh.py | gsnedders/presto-testo | a0acfbef13a3f8cae67cc7145216d31b67aa8eb4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
from mod_pywebsocket import msgutil
import urllib
def web_socket_do_extra_handshake(request):
request.connection.write(urllib.unquote(request.ws_resource.split('?', 1)[1]).decode("string-escape")+'\x0D\x0ASec-WebSocket-Accept: '+request.ws_accept+'\x0D\x0A\x0D\x0A')
raise Exception('Boo!') # don'... | 30.538462 | 173 | 0.778338 |
d7e64162428428d05345ca7e9d3cd8d38e24c724 | 2,881 | py | Python | test_decode.py | deniska/rpyv | f58749c9ad80f62325c9fa990a705f55522ee22a | [
"MIT"
] | null | null | null | test_decode.py | deniska/rpyv | f58749c9ad80f62325c9fa990a705f55522ee22a | [
"MIT"
] | null | null | null | test_decode.py | deniska/rpyv | f58749c9ad80f62325c9fa990a705f55522ee22a | [
"MIT"
] | null | null | null | import cpu
#32 bit 0b00000000000000000000000000000000
def test_dec_opcode():
assert cpu.dec_opcode(
0b00000000000000000000000001000001
) == 0b1000001
def test_dec_rd():
assert cpu.dec_rd(
0b00000000000000000000100010000000
) == 0b10001
def test_funct3():
a... | 26.431193 | 51 | 0.669559 |
6568ffeec04a01a8e0174a12322664a7b48da6e1 | 1,714 | py | Python | rds/CDK/unencrypted_to_encrypted_rds/test_rds_stack.py | aorcl/aws-system-manager-automation-unencrypted-to-encrypted-resources | 40712aa88425ef08e559bc1ebbda0777537ec8db | [
"MIT-0"
] | 4 | 2021-07-09T17:51:56.000Z | 2022-02-15T04:44:51.000Z | rds/CDK/unencrypted_to_encrypted_rds/test_rds_stack.py | aorcl/aws-system-manager-automation-unencrypted-to-encrypted-resources | 40712aa88425ef08e559bc1ebbda0777537ec8db | [
"MIT-0"
] | 2 | 2021-09-07T15:39:31.000Z | 2021-09-08T21:19:24.000Z | rds/CDK/unencrypted_to_encrypted_rds/test_rds_stack.py | aorcl/aws-system-manager-automation-unencrypted-to-encrypted-resources | 40712aa88425ef08e559bc1ebbda0777537ec8db | [
"MIT-0"
] | 4 | 2021-07-08T19:56:40.000Z | 2021-11-18T09:32:14.000Z | from aws_cdk import (
aws_ec2 as ec2,
aws_rds as rds,
core,
)
class RDSStack(core.Stack):
def __init__(self, app: core.App, id: str, **kwargs) -> None:
super().__init__(app, id, **kwargs)
vpc = ec2.Vpc(self, "VPC", max_azs=99)
rds.DatabaseInstance(
self,
... | 31.740741 | 84 | 0.553676 |
8abdf9034527bccca7a515c846a0fe5b6c99317e | 34,201 | py | Python | pandas/tests/resample/test_period_index.py | the-nose-knows/pandas | dcf7137ccc81986091b6c76624855bb5c32185f7 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 80 | 2015-01-01T17:32:11.000Z | 2022-01-24T07:17:47.000Z | pandas/tests/resample/test_period_index.py | stevenbw/pandas | 9c0f6a8d703b6bee48918f2c5d16418a7ff736e3 | [
"BSD-3-Clause"
] | 1 | 2018-04-04T16:46:41.000Z | 2018-04-04T16:46:41.000Z | pandas/tests/resample/test_period_index.py | stevenbw/pandas | 9c0f6a8d703b6bee48918f2c5d16418a7ff736e3 | [
"BSD-3-Clause"
] | 28 | 2015-01-30T16:07:48.000Z | 2022-02-11T18:41:13.000Z | from datetime import datetime, timedelta
import dateutil
import numpy as np
import pytest
import pytz
from pandas._libs.tslibs.ccalendar import DAYS, MONTHS
from pandas._libs.tslibs.period import IncompatibleFrequency
from pandas.compat import lrange, range, zip
import pandas as pd
from pandas import DataFrame, Seri... | 44.244502 | 79 | 0.575509 |
d1b267e0a6273a065987926a9dd1d9daf7606faf | 3,078 | py | Python | corehq/apps/fixtures/upload/failure_messages.py | dannyroberts/commcare-hq | 4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/fixtures/upload/failure_messages.py | dannyroberts/commcare-hq | 4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/fixtures/upload/failure_messages.py | dannyroberts/commcare-hq | 4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
from django.utils.translation import ugettext_noop
FAILURE_MESSAGES = {
"not_excel_file": ugettext_noop(
"Invalid file-format. Please upload a valid xlsx file."
),
"has_no_column": ugettext_noop(
"Workbook 'type... | 42.164384 | 115 | 0.653346 |
f23f03ba0848fea6a62477ebd19dc1b7d52766f0 | 445 | py | Python | SW-Academy/luann9711/stack/stack_1-2.py | Luann9711/NDD_study | 3ba3a8bf31e1da07531b526e873ec5865d91fda0 | [
"Unlicense"
] | null | null | null | SW-Academy/luann9711/stack/stack_1-2.py | Luann9711/NDD_study | 3ba3a8bf31e1da07531b526e873ec5865d91fda0 | [
"Unlicense"
] | 6 | 2022-01-17T01:58:51.000Z | 2022-02-17T06:20:35.000Z | SW-Academy/luann9711/stack/stack_1-2.py | Luann9711/NDD_study | 3ba3a8bf31e1da07531b526e873ec5865d91fda0 | [
"Unlicense"
] | 5 | 2022-01-16T04:15:14.000Z | 2022-01-16T05:22:29.000Z | # 테스트 케이스 입력
t = int(input('테스트 케이스 입력 : '))
c = t + 1
while t > 0:
code = input('검사할 코드를 입력 : ')
open_p = ['(', '[', '{']
close_p = [')', ']', '}']
stack = []
for i in code:
if i in open_p:
stack.append(i)
if i in close_p:
stack.pop()
... | 17.8 | 33 | 0.375281 |
e94c56e9534215bc0e277feebbbbd4739d5cbc6b | 83 | py | Python | inputsTest.py | MST-MRDT/Python-RED | 581a49036a2ceecef50980ae29991a5cb48c04be | [
"MIT"
] | null | null | null | inputsTest.py | MST-MRDT/Python-RED | 581a49036a2ceecef50980ae29991a5cb48c04be | [
"MIT"
] | null | null | null | inputsTest.py | MST-MRDT/Python-RED | 581a49036a2ceecef50980ae29991a5cb48c04be | [
"MIT"
] | null | null | null | from inputs import devices
gamepads = devices.gamepads
for gamepad in gamepads:
| 11.857143 | 27 | 0.795181 |
c116978f5954345fa5320d5c730a077112a9005c | 13,988 | py | Python | mava/utils/debugging/rendering.py | sash-a/Mava | 976d0863e058fd92f066d8a8fabe2f5e2f3f60ce | [
"Apache-2.0"
] | 337 | 2021-07-06T09:09:56.000Z | 2022-03-30T21:42:37.000Z | mava/utils/debugging/rendering.py | sash-a/Mava | 976d0863e058fd92f066d8a8fabe2f5e2f3f60ce | [
"Apache-2.0"
] | 125 | 2021-07-12T11:38:37.000Z | 2022-03-30T19:22:53.000Z | mava/utils/debugging/rendering.py | sash-a/Mava | 976d0863e058fd92f066d8a8fabe2f5e2f3f60ce | [
"Apache-2.0"
] | 43 | 2021-07-06T19:44:37.000Z | 2022-03-07T09:29:07.000Z | # Adapted from https://github.com/openai/multiagent-particle-envs.
# TODO (dries): Try using this class directly from PettingZoo and delete this file.
"""
2D rendering framework
"""
from __future__ import division
import os
import sys
import typing
from typing import Any, Dict, List, Tuple
import six
if "Apple" in ... | 28.430894 | 87 | 0.575708 |
4a63ff570e1783fc94da0906067f941e55d3e084 | 7,483 | py | Python | tests/test_middleware.py | ckkz-it/aiohttp-jwt | 0c7deb6665e45a0c2e577c079ae13711ff1d1a5d | [
"MIT"
] | null | null | null | tests/test_middleware.py | ckkz-it/aiohttp-jwt | 0c7deb6665e45a0c2e577c079ae13711ff1d1a5d | [
"MIT"
] | null | null | null | tests/test_middleware.py | ckkz-it/aiohttp-jwt | 0c7deb6665e45a0c2e577c079ae13711ff1d1a5d | [
"MIT"
] | null | null | null | import jwt
import pytest
from aiohttp import web
from aiohttp_jwt import JWTMiddleware
def test_throw_on_invalid_secret():
with pytest.raises(RuntimeError):
JWTMiddleware(secret_or_pub_key='')
async def test_get_payload(create_app, aiohttp_client, fake_payload, token):
async def handler(request):
... | 30.295547 | 78 | 0.653882 |
0f4ec56886dc0877ab8a7b19d90b525696d1a8ee | 377 | py | Python | src/decker/format/backends/base.py | douglasfarinelli/pydev | 9d43d485b102e5b44ee28894278ae496c3cec024 | [
"MIT"
] | 21 | 2020-12-11T17:59:50.000Z | 2022-03-12T02:22:09.000Z | src/decker/format/backends/base.py | douglasfarinelli/decker | 9d43d485b102e5b44ee28894278ae496c3cec024 | [
"MIT"
] | null | null | null | src/decker/format/backends/base.py | douglasfarinelli/decker | 9d43d485b102e5b44ee28894278ae496c3cec024 | [
"MIT"
] | 2 | 2021-07-31T00:05:25.000Z | 2021-11-04T12:09:26.000Z | import abc
from typing import Optional
from decker.conf import Config
class Formatter(abc.ABC):
id: str = NotImplemented
version: Optional[str] = None
@property
def display(self):
if self.version:
return f'{self.id}=={self.version}'
return self.id
@abc.abstractmetho... | 17.952381 | 47 | 0.62069 |
9d67753e95bb771e8e36d0d348921a539b81368e | 222 | py | Python | main.py | Itay2805/Vork | a92da273b5b09cbc0a4f4fc4dcf0fd157338340a | [
"MIT"
] | 28 | 2019-10-07T14:27:44.000Z | 2022-01-25T08:56:47.000Z | main.py | Itay2805/Vork | a92da273b5b09cbc0a4f4fc4dcf0fd157338340a | [
"MIT"
] | null | null | null | main.py | Itay2805/Vork | a92da273b5b09cbc0a4f4fc4dcf0fd157338340a | [
"MIT"
] | 5 | 2019-11-06T20:24:11.000Z | 2022-01-25T08:56:52.000Z | from vork.tokenizer import *
from vork.parser import *
def main():
workspace = Workspace([])
workspace.load_main('./')
print(workspace.load_module('main'))
if __name__ == '__main__':
main()
| 17.076923 | 41 | 0.617117 |
31e7a3d48bd8036f2c2b8eed60f297147b22d488 | 4,291 | py | Python | build/PureCloudPlatformClientV2/models/presence_event_organization_presence.py | cjohnson-ctl/platform-client-sdk-python | 38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100 | [
"MIT"
] | 10 | 2019-02-22T00:27:08.000Z | 2021-09-12T23:23:44.000Z | libs/PureCloudPlatformClientV2/models/presence_event_organization_presence.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 5 | 2018-06-07T08:32:00.000Z | 2021-07-28T17:37:26.000Z | libs/PureCloudPlatformClientV2/models/presence_event_organization_presence.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 6 | 2020-04-09T17:43:07.000Z | 2022-02-17T08:48:05.000Z | # coding: utf-8
"""
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | 27.33121 | 94 | 0.582615 |
1c8f9c39d720ef80f19ceed392922bb1581eab4a | 4,744 | py | Python | Tests/scripts/update_conf_json.py | mchasepan/content | 177c7fe86c4872141107f48075c6578daffc4bd4 | [
"MIT"
] | null | null | null | Tests/scripts/update_conf_json.py | mchasepan/content | 177c7fe86c4872141107f48075c6578daffc4bd4 | [
"MIT"
] | 1 | 2020-07-29T21:48:58.000Z | 2020-07-29T21:48:58.000Z | Tests/scripts/update_conf_json.py | mchasepan/content | 177c7fe86c4872141107f48075c6578daffc4bd4 | [
"MIT"
] | 2 | 2020-07-15T06:41:52.000Z | 2020-07-19T18:45:23.000Z | #!/usr/bin/env python3
import os
import yaml
import json
from datetime import datetime
from distutils.version import LooseVersion
from demisto_sdk.commands.common.tools import find_type
from demisto_sdk.commands.common.constants import TEST_PLAYBOOKS_DIR, INTEGRATIONS_DIR, CONF_PATH, PACKS_DIR, FileType
INITIAL_FROM... | 36.492308 | 118 | 0.687395 |
3dcfab688eceaeff0f40256527c0cc6930120bf5 | 6,681 | py | Python | sdk/python/pulumi_kubernetes/networking/v1/IngressClass.py | hazsetata/pulumi-kubernetes | e3aa3027fa3bb268c496af174b59a9913ae8094e | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/networking/v1/IngressClass.py | hazsetata/pulumi-kubernetes | e3aa3027fa3bb268c496af174b59a9913ae8094e | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/networking/v1/IngressClass.py | hazsetata/pulumi-kubernetes | e3aa3027fa3bb268c496af174b59a9913ae8094e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by pulumigen. ***
# *** 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, Dict, List, Mapping, Optional, Tuple, Union
from ... import _utilities, _tables
from . imp... | 53.879032 | 379 | 0.691962 |
a21139256f7562fe1d81a84e0093a668ccaa1849 | 1,480 | py | Python | examples/cnn/resnet50.py | vishalbelsare/neupy | 684313cdaddcad326f2169384fb15ec3aa29d991 | [
"MIT"
] | null | null | null | examples/cnn/resnet50.py | vishalbelsare/neupy | 684313cdaddcad326f2169384fb15ec3aa29d991 | [
"MIT"
] | null | null | null | examples/cnn/resnet50.py | vishalbelsare/neupy | 684313cdaddcad326f2169384fb15ec3aa29d991 | [
"MIT"
] | null | null | null | import os
import theano
from six.moves import cPickle as pickle
from neupy.utils import asfloat
from neupy import layers, storage, architectures, environment
from imagenet_tools import (CURRENT_DIR, FILES_DIR, load_image,
print_top_n, download_file, read_image)
RESNET50_WEIGHTS_FILE = os... | 32.888889 | 78 | 0.712162 |
1688705c0f35ee9c99e5fe67f2d6272e91af6264 | 873 | py | Python | xlsxwriter/test/comparison/test_image45.py | eddiechapman/XlsxWriter | c636117ab30e64e4b7b824c9105595c42887c2c9 | [
"BSD-2-Clause-FreeBSD"
] | 2,766 | 2015-01-02T17:36:42.000Z | 2022-03-31T09:23:30.000Z | xlsxwriter/test/comparison/test_image45.py | xiaolanmeng86/XlsxWriter | 6c3ea23a410e8216eab8f5751e5544ffb444b3da | [
"BSD-2-Clause-FreeBSD"
] | 683 | 2015-01-03T09:55:02.000Z | 2022-03-31T07:18:15.000Z | xlsxwriter/test/comparison/test_image45.py | xiaolanmeng86/XlsxWriter | 6c3ea23a410e8216eab8f5751e5544ffb444b3da | [
"BSD-2-Clause-FreeBSD"
] | 636 | 2015-01-05T01:57:08.000Z | 2022-03-25T18:42:41.000Z | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 24.25 | 88 | 0.610538 |
f99d333aa70059cc0b8485cc6bb1ba0bb27126bf | 2,552 | bzl | Python | tensorflow/workspace3.bzl | sighingnow/tensorflow | 12579f9a795da54db405b5918f709665e2a7c07f | [
"Apache-2.0"
] | 1 | 2022-01-30T11:46:58.000Z | 2022-01-30T11:46:58.000Z | tensorflow/workspace3.bzl | sighingnow/tensorflow | 12579f9a795da54db405b5918f709665e2a7c07f | [
"Apache-2.0"
] | null | null | null | tensorflow/workspace3.bzl | sighingnow/tensorflow | 12579f9a795da54db405b5918f709665e2a7c07f | [
"Apache-2.0"
] | null | null | null | """TensorFlow workspace initialization. Consult the WORKSPACE on how to use it."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//third_party:tf_runtime/workspace.bzl", tf_runtime = "repo")
load("//third_party/llvm:workspace.bzl", llvm = "repo")
def workspace():
http_archive(
... | 44.77193 | 159 | 0.6971 |
4453a4e485d9900a896b74ef9cdfa90adb634973 | 4,780 | py | Python | examples/transaction_challenge.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | 341 | 2015-10-06T20:56:19.000Z | 2022-03-23T15:58:54.000Z | examples/transaction_challenge.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | 479 | 2015-11-09T18:39:40.000Z | 2022-03-16T06:46:58.000Z | examples/transaction_challenge.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | 181 | 2015-10-01T23:00:59.000Z | 2022-03-05T13:42:19.000Z | """
This example demonstrates how the client interacts with the server as described in SEP-10.
See: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md
"""
from stellar_sdk import Keypair, Network, Server, TransactionBuilder
from stellar_sdk.exceptions import NotFoundError
from stellar_sdk.se... | 34.388489 | 90 | 0.707322 |
0fd7ab60b68bfe77149435e0d2b52bc643e64144 | 6,344 | py | Python | django/contrib/messages/storage/cookie.py | jpmallarino/django | 659d2421c7adbbcd205604002d521d82d6b0b465 | [
"BSD-3-Clause",
"0BSD"
] | 16 | 2019-08-10T12:24:06.000Z | 2020-05-21T09:11:14.000Z | django/contrib/messages/storage/cookie.py | jpmallarino/django | 659d2421c7adbbcd205604002d521d82d6b0b465 | [
"BSD-3-Clause",
"0BSD"
] | 12 | 2019-08-10T11:55:29.000Z | 2020-05-21T04:46:30.000Z | django/contrib/messages/storage/cookie.py | jpmallarino/django | 659d2421c7adbbcd205604002d521d82d6b0b465 | [
"BSD-3-Clause",
"0BSD"
] | 3 | 2019-08-20T13:29:34.000Z | 2020-01-30T22:05:10.000Z | import binascii
import json
from django.conf import settings
from django.contrib.messages.storage.base import BaseStorage, Message
from django.core import signing
from django.http import SimpleCookie
from django.utils.safestring import SafeData, mark_safe
class MessageEncoder(json.JSONEncoder):
"""
Compactly... | 36.251429 | 86 | 0.622793 |
dd5bef1af594a4e1607be7ea07296bc7f2ad909d | 772 | py | Python | pgeng/vfx/__init__.py | Bouncehball/pgeng | 6f88991e16cfd744c8565b68b6348f313b4d75c0 | [
"MIT"
] | null | null | null | pgeng/vfx/__init__.py | Bouncehball/pgeng | 6f88991e16cfd744c8565b68b6348f313b4d75c0 | [
"MIT"
] | null | null | null | pgeng/vfx/__init__.py | Bouncehball/pgeng | 6f88991e16cfd744c8565b68b6348f313b4d75c0 | [
"MIT"
] | null | null | null | 'Visual effects classes and functions for pgeng'
#IMPORTS
from .. import failed_imports as _failed_imports #UNDERSCORE SO IT IS NOT VISIBLE AS A VARIABLE
#IMPORTS
#CORE
try:
from .core import circle_lighting
except ImportError as e:
_failed_imports.append(e.name)
#CORE
#FLAME
try:
from .flam... | 19.794872 | 96 | 0.715026 |
0b175bf451327158073fe0d6d1dd0e28e36d8fc6 | 6,106 | py | Python | brainiak/matnormal/mnrsa.py | osaaso3/brainiak | 153552c9b65e8354fa45985454f96978e0a92579 | [
"Apache-2.0"
] | 235 | 2017-10-31T22:58:14.000Z | 2022-03-23T06:16:57.000Z | brainiak/matnormal/mnrsa.py | osaaso3/brainiak | 153552c9b65e8354fa45985454f96978e0a92579 | [
"Apache-2.0"
] | 205 | 2017-10-24T16:55:16.000Z | 2022-03-31T22:56:14.000Z | brainiak/matnormal/mnrsa.py | osaaso3/brainiak | 153552c9b65e8354fa45985454f96978e0a92579 | [
"Apache-2.0"
] | 104 | 2017-11-01T20:04:07.000Z | 2022-03-25T18:55:34.000Z | import tensorflow as tf
from sklearn.base import BaseEstimator
from sklearn.linear_model import LinearRegression
from .covs import CovIdentity
from brainiak.utils.utils import cov2corr
import numpy as np
from brainiak.matnormal.matnormal_likelihoods import matnorm_logp_marginal_row
from brainiak.matnormal.utils import ... | 34.693182 | 79 | 0.636096 |
dfd5f59f23f80ca55c338c2cc6fe373d8af392e5 | 3,486 | py | Python | aiida/backends/tests/cmdline/commands/test_user.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | 1 | 2019-07-31T04:08:13.000Z | 2019-07-31T04:08:13.000Z | aiida/backends/tests/cmdline/commands/test_user.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/tests/cmdline/commands/test_user.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 37.483871 | 101 | 0.58405 |
416ef98bae226fa10b9f12d0a795129999737bf2 | 575 | py | Python | doc/customizing_guide/scripts/bball_viewer_1.py | HPLegion/glue | 1843787ccb4de852dfe103ff58473da13faccf5f | [
"BSD-3-Clause"
] | 550 | 2015-01-08T13:51:06.000Z | 2022-03-31T11:54:47.000Z | doc/customizing_guide/scripts/bball_viewer_1.py | HPLegion/glue | 1843787ccb4de852dfe103ff58473da13faccf5f | [
"BSD-3-Clause"
] | 1,362 | 2015-01-03T19:15:52.000Z | 2022-03-30T13:23:11.000Z | doc/customizing_guide/scripts/bball_viewer_1.py | HPLegion/glue | 1843787ccb4de852dfe103ff58473da13faccf5f | [
"BSD-3-Clause"
] | 142 | 2015-01-08T13:08:00.000Z | 2022-03-18T13:25:57.000Z | from glue import custom_viewer
from matplotlib.colors import LogNorm
bball = custom_viewer('Shot Plot',
x='att(x)',
y='att(y)')
@bball.plot_data
def show_hexbin(axes, x, y):
axes.hexbin(x, y,
cmap='Purples',
gridsize=40,
... | 22.115385 | 37 | 0.506087 |
70ecd6eb150e36d73499b19e89ddcea25d693662 | 39,893 | py | Python | numpy/lib/histograms.py | MLK97/numpy | 15d6ed2b07ed42ecafb4c13dfabb2d20e61481d5 | [
"BSD-3-Clause"
] | null | null | null | numpy/lib/histograms.py | MLK97/numpy | 15d6ed2b07ed42ecafb4c13dfabb2d20e61481d5 | [
"BSD-3-Clause"
] | null | null | null | numpy/lib/histograms.py | MLK97/numpy | 15d6ed2b07ed42ecafb4c13dfabb2d20e61481d5 | [
"BSD-3-Clause"
] | null | null | null | """
Histogram-related functions
"""
import contextlib
import functools
import operator
import warnings
import numpy as np
from numpy.compat.py3k import basestring
from numpy.core import overrides
__all__ = ['histogram', 'histogramdd', 'histogram_bin_edges']
array_function_dispatch = functools.partial(
overrides.... | 35.555258 | 104 | 0.612714 |
23c10a56a4bd2b7859b8dba1d80c4353ac89de40 | 18,174 | py | Python | t5x/checkpoint_importer.py | lilakk/t5x | cb0b7cfd8f25a631236766600298bbc49e884dc4 | [
"Apache-2.0"
] | 1 | 2022-03-06T00:45:33.000Z | 2022-03-06T00:45:33.000Z | t5x/checkpoint_importer.py | justinphan3110/t5x | 83151b8a7cfc78ebfc1d87ccc5109b6a0444a5e5 | [
"Apache-2.0"
] | null | null | null | t5x/checkpoint_importer.py | justinphan3110/t5x | 83151b8a7cfc78ebfc1d87ccc5109b6a0444a5e5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The T5X 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 writ... | 35.988119 | 105 | 0.692968 |
d5bfa0f33f7bf8d41e3e40f0ef7d378c0f65ab9c | 394 | py | Python | networkx/algorithms/tests/test_non_randomness.py | jmmcd/networkx | 207ff7d1e9bfaff013ac77c8d6bb79619892c994 | [
"BSD-3-Clause"
] | 3 | 2020-08-04T20:29:41.000Z | 2020-11-09T09:28:19.000Z | networkx/algorithms/tests/test_non_randomness.py | jmmcd/networkx | 207ff7d1e9bfaff013ac77c8d6bb79619892c994 | [
"BSD-3-Clause"
] | 30 | 2020-04-15T19:37:40.000Z | 2020-04-22T21:19:35.000Z | networkx/algorithms/tests/test_non_randomness.py | jmmcd/networkx | 207ff7d1e9bfaff013ac77c8d6bb79619892c994 | [
"BSD-3-Clause"
] | 2 | 2020-03-12T23:20:22.000Z | 2021-02-15T21:54:02.000Z | #!/usr/bin/env python
import networkx as nx
import pytest
numpy = pytest.importorskip('numpy')
npt = pytest.importorskip('numpy.testing')
def test_non_randomness():
G = nx.karate_club_graph()
npt.assert_almost_equal(nx.non_randomness(G, 2)[0], 11.7, decimal=2)
npt.assert_almost_equal(nx.non_randomness(G)... | 28.142857 | 72 | 0.682741 |
71e2c5807f8c2c5c78a198bc704d2b2a9280c72f | 3,603 | py | Python | virtualenv-environment/lib/python2.7/site-packages/rest_framework_jwt/authentication.py | AyushLalShrestha/BLOGAPI-djangorestframework | 7d401eb3dab91b91d0978b12d5fc21442ff82c11 | [
"MIT"
] | 1 | 2018-02-04T22:52:32.000Z | 2018-02-04T22:52:32.000Z | virtualenv-environment/lib/python2.7/site-packages/rest_framework_jwt/authentication.py | AyushLalShrestha/BLOGAPI-djangorestframework | 7d401eb3dab91b91d0978b12d5fc21442ff82c11 | [
"MIT"
] | 6 | 2020-06-05T21:52:56.000Z | 2022-03-11T23:53:52.000Z | venv/lib/python3.6/site-packages/rest_framework_jwt/authentication.py | NYARAS/calvine-comments-application | 981b2d42e727509edb1878c5b98cf71b87a4dc27 | [
"MIT"
] | null | null | null | import jwt
from django.contrib.auth import get_user_model
from django.utils.encoding import smart_text
from django.utils.translation import ugettext as _
from rest_framework import exceptions
from rest_framework.authentication import (
BaseAuthentication, get_authorization_header
)
from rest_framework_jwt.setting... | 34.314286 | 105 | 0.677491 |
2e64c75fb49645d71a3225c7a67df384d8ab0995 | 5,742 | py | Python | examples/anbncn/anbncn.py | ML-KULeuven/deepstochlog | 4b71d1e306d9cdbbb6237947533f0facfcc62c3a | [
"Apache-2.0"
] | 10 | 2021-12-06T02:07:19.000Z | 2022-03-24T11:40:10.000Z | examples/anbncn/anbncn.py | ML-KULeuven/deepstochlog | 4b71d1e306d9cdbbb6237947533f0facfcc62c3a | [
"Apache-2.0"
] | null | null | null | examples/anbncn/anbncn.py | ML-KULeuven/deepstochlog | 4b71d1e306d9cdbbb6237947533f0facfcc62c3a | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from typing import Optional
import torch
from torch.optim import Adam
from time import time
from examples.anbncn.anbncn_data import ABCDataset
from deepstochlog.network import Network, NetworkStore
from examples.models import MNISTNet
from deepstochlog.utils import (
set_fixed_seed,
c... | 28.425743 | 109 | 0.65883 |
0430ebe2c5a2bd3c569c6ac02536396d8417b0e3 | 1,385 | py | Python | lib/cuckoo/core/rooter.py | Yuanmessi/Bold-Falcon | 00fcaba0b3d9c462b9d20ecb256ff85db5d119e2 | [
"BSD-3-Clause"
] | 1 | 2021-06-22T05:33:08.000Z | 2021-06-22T05:33:08.000Z | lib/cuckoo/core/rooter.py | Yuanmessi/Bold-Falcon | 00fcaba0b3d9c462b9d20ecb256ff85db5d119e2 | [
"BSD-3-Clause"
] | null | null | null | lib/cuckoo/core/rooter.py | Yuanmessi/Bold-Falcon | 00fcaba0b3d9c462b9d20ecb256ff85db5d119e2 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2010-2013 Claudio Guarnieri.
# Copyright (C) 2014-2016 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import json
import logging
import os.path
import socket
import tempfile
import threading
from lib.cuckoo.... | 23.87931 | 77 | 0.644765 |
d06724a72af415b85794f9bb1c2c9ff03f075027 | 528 | py | Python | tool/migrations/0024_alter_candidate_recruiter.py | borislavstoychev/RecrutmentTool | 80cc8db9b653c05dcafe3b79b6da8847111e92f9 | [
"MIT"
] | null | null | null | tool/migrations/0024_alter_candidate_recruiter.py | borislavstoychev/RecrutmentTool | 80cc8db9b653c05dcafe3b79b6da8847111e92f9 | [
"MIT"
] | null | null | null | tool/migrations/0024_alter_candidate_recruiter.py | borislavstoychev/RecrutmentTool | 80cc8db9b653c05dcafe3b79b6da8847111e92f9 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-10-29 12:25
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('tool', '0023_alter_candidate_recruiter'),
]
operations = [
migrations.AlterField(
model_name='c... | 25.142857 | 113 | 0.643939 |
06e0fdba9010748eefc2c45ccd1123c48cc2639d | 22,554 | py | Python | kubernetes/client/models/v1_container.py | SEJeff/client-python | baba523c28a684b3f537502977d600dedd1f17c5 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_container.py | SEJeff/client-python | baba523c28a684b3f537502977d600dedd1f17c5 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_container.py | SEJeff/client-python | baba523c28a684b3f537502977d600dedd1f17c5 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.5.0-beta.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "Lice... | 39.499124 | 578 | 0.654873 |
24546acf57da4bad315c2a29c61a68be7feec809 | 991 | py | Python | octodns/provider/delete.py | MindGeekOSS/octodns | 7304e1f531cb7e338df3f4858391989c1f9a62ca | [
"MIT"
] | 4 | 2019-02-13T09:36:50.000Z | 2019-12-16T02:36:45.000Z | octodns/provider/delete.py | MindGeekOSS/octodns | 7304e1f531cb7e338df3f4858391989c1f9a62ca | [
"MIT"
] | null | null | null | octodns/provider/delete.py | MindGeekOSS/octodns | 7304e1f531cb7e338df3f4858391989c1f9a62ca | [
"MIT"
] | 2 | 2018-08-16T23:48:35.000Z | 2019-02-13T09:37:15.000Z | #
#
#
from __future__ import absolute_import, division, print_function, \
unicode_literals
import logging
from .base import BaseProvider
class DeleteProvider(BaseProvider):
'''
Core provider for records configured in yaml files on disk.
config:
class: octodns.provider.delete.DeleteProvider... | 24.775 | 78 | 0.607467 |
a9f4b49a302ec0c30edcb672ea9b79df9cf65492 | 1,363 | py | Python | src/observers/xmppmessager.py | f0ster/bitcoin-arbitrage | 2c389fca988e6d24f3394adbc67d4a01259aa345 | [
"Unlicense"
] | 1 | 2021-03-07T23:08:01.000Z | 2021-03-07T23:08:01.000Z | src/observers/xmppmessager.py | f0ster/bitcoin-arbitrage | 2c389fca988e6d24f3394adbc67d4a01259aa345 | [
"Unlicense"
] | null | null | null | src/observers/xmppmessager.py | f0ster/bitcoin-arbitrage | 2c389fca988e6d24f3394adbc67d4a01259aa345 | [
"Unlicense"
] | null | null | null | import logging
import config
import time
from sleekxmpp import ClientXMPP
from sleekxmpp.exceptions import IqError, IqTimeout
from .observer import Observer
class MyXMPPClient(ClientXMPP):
def __init__(self):
logger = logging.getLogger("sleekxmpp")
logger.setLevel(logging.ERROR)
ClientXMPP... | 34.948718 | 120 | 0.677916 |
54da07ea8e760fdce24709f34a3148e976915661 | 9,047 | py | Python | docs/conf.py | personalcomputer/tcconfig | 87b801beaa4ad16410fa4aac0c98606d9caec7b6 | [
"MIT"
] | 644 | 2016-01-25T09:41:20.000Z | 2022-03-28T16:20:13.000Z | docs/conf.py | personalcomputer/tcconfig | 87b801beaa4ad16410fa4aac0c98606d9caec7b6 | [
"MIT"
] | 109 | 2016-04-14T13:37:32.000Z | 2022-02-20T16:39:44.000Z | docs/conf.py | personalcomputer/tcconfig | 87b801beaa4ad16410fa4aac0c98606d9caec7b6 | [
"MIT"
] | 81 | 2016-03-01T16:21:24.000Z | 2022-03-09T15:05:59.000Z | import os
import sys
import sphinx_rtd_theme
from tcconfig import __author__, __copyright__, __version__
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it ... | 32.08156 | 79 | 0.717918 |
ecd4038d8d01e75a25eff16fb340eb63fa1cfeb4 | 428 | py | Python | Chapter_15_Generating_Data/mpl_squares.py | charliealpha094/Project_Data_Visualization | ccd55db58927dbbcfd57ab750fe7b21754c2b2dc | [
"MIT"
] | null | null | null | Chapter_15_Generating_Data/mpl_squares.py | charliealpha094/Project_Data_Visualization | ccd55db58927dbbcfd57ab750fe7b21754c2b2dc | [
"MIT"
] | null | null | null | Chapter_15_Generating_Data/mpl_squares.py | charliealpha094/Project_Data_Visualization | ccd55db58927dbbcfd57ab750fe7b21754c2b2dc | [
"MIT"
] | null | null | null | #Done by Carlos Amaral (18/07/2020)
import matplotlib.pyplot as plt #1st, import pyplot module, using alias plt, so we don't need to type pyplot repeateadly.
squares = [1, 4, 9, 16, 25]
fig, ax = plt.subplots() #Subplots() generates one or more plots in the same figure. Fig, represents the entire figure or collec... | 42.8 | 154 | 0.738318 |
2e0bac70ecda4e6737b7d3902fef5587699d2db0 | 11,096 | py | Python | assignment2/q2_parser_model.py | tavaresdong/stanford_cs224n | 09936ce5d994bb25bb45d19fd363c37198b6eda2 | [
"MIT"
] | null | null | null | assignment2/q2_parser_model.py | tavaresdong/stanford_cs224n | 09936ce5d994bb25bb45d19fd363c37198b6eda2 | [
"MIT"
] | null | null | null | assignment2/q2_parser_model.py | tavaresdong/stanford_cs224n | 09936ce5d994bb25bb45d19fd363c37198b6eda2 | [
"MIT"
] | null | null | null | import pickle
import os
import time
import tensorflow as tf
from model import Model
from q2_initialization import xavier_weight_init
from utils.parser_utils import minibatches, load_and_preprocess_data
from utils.general_utils import Progbar
class Config(object):
"""Holds model hyperparams and data information.
... | 38.527778 | 103 | 0.638338 |
7d04a74ed8df29cdfabbbd740d1ebe352588ddee | 5,871 | py | Python | clients/client/python/ory_client/models/__init__.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/models/__init__.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/models/__init__.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# import all models into this package
# if you have many models here with many references from one model to another this may
# raise a RecursionError
# to avoid this, import only the models that you directly need like:
# from from ory_client.model.pet import Pet
# or import this package, but before doin... | 65.233333 | 139 | 0.905468 |
a7ef7b7d0b70fcce2726f0ae6415d0b741676d39 | 7,600 | py | Python | unittests/resources/checks/frontend_checks.py | CLIP-HPC/reframe | eddf0b2508c2ba644e4c3aba5652e57fddfde106 | [
"BSD-3-Clause"
] | 167 | 2017-11-14T20:37:28.000Z | 2022-03-31T11:19:18.000Z | unittests/resources/checks/frontend_checks.py | CLIP-HPC/reframe | eddf0b2508c2ba644e4c3aba5652e57fddfde106 | [
"BSD-3-Clause"
] | 2,190 | 2017-06-14T12:48:13.000Z | 2022-03-31T16:09:51.000Z | unittests/resources/checks/frontend_checks.py | victorusu/reframe | e98078a990e31a47604b06d674e4ee730c22cd44 | [
"BSD-3-Clause"
] | 83 | 2017-05-29T19:12:16.000Z | 2022-03-18T09:49:21.000Z | # Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Special checks for testing the front-end
#
import os
import signal
import sys
import time
import reframe as rfm
import r... | 28.148148 | 79 | 0.629211 |
c8145efbc305a5b41d38c2af088a472fda681f66 | 54,510 | py | Python | wagtail/admin/tests/test_compare.py | fairhopeweb/wagtail | fe658f021f2cd43bde4a16d1c4d9fa292ec547f3 | [
"BSD-3-Clause"
] | 1 | 2022-02-09T05:25:30.000Z | 2022-02-09T05:25:30.000Z | wagtail/admin/tests/test_compare.py | fairhopeweb/wagtail | fe658f021f2cd43bde4a16d1c4d9fa292ec547f3 | [
"BSD-3-Clause"
] | null | null | null | wagtail/admin/tests/test_compare.py | fairhopeweb/wagtail | fe658f021f2cd43bde4a16d1c4d9fa292ec547f3 | [
"BSD-3-Clause"
] | null | null | null | from functools import partial
from django.test import TestCase
from django.utils.safestring import SafeString
from wagtail.admin import compare
from wagtail.blocks import StreamValue
from wagtail.images import get_image_model
from wagtail.images.tests.utils import get_test_image_file
from wagtail.test.testapp.models ... | 35.627451 | 279 | 0.541735 |
64ddd497613a901f7b6f67d431f74ed6f0d71c46 | 1,027 | py | Python | klimaat_helpdesk/search/views.py | Arfor/website | d67b19e9be5a33f58f607962e665389b7695cccc | [
"MIT"
] | 5 | 2020-10-22T07:02:11.000Z | 2020-11-02T10:24:43.000Z | klimaat_helpdesk/search/views.py | Arfor/website | d67b19e9be5a33f58f607962e665389b7695cccc | [
"MIT"
] | 71 | 2020-10-21T18:11:10.000Z | 2022-02-09T14:11:18.000Z | klimaat_helpdesk/search/views.py | Arfor/website | d67b19e9be5a33f58f607962e665389b7695cccc | [
"MIT"
] | 5 | 2020-10-21T17:51:47.000Z | 2021-03-21T16:33:17.000Z | from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.search.models import Query
from klimaat_helpdesk.cms.models import Answer
def search(request):
search_query = request.GET.get('query', None)
page = r... | 27.026316 | 72 | 0.684518 |
7c81a7d9836448b25530530d68a32b008052bf64 | 9,023 | py | Python | src/casascripts/export_uv.py | iancze/casascripts | fa1d036c6333d6323a55cb8ee027e043b6f57294 | [
"MIT"
] | null | null | null | src/casascripts/export_uv.py | iancze/casascripts | fa1d036c6333d6323a55cb8ee027e043b6f57294 | [
"MIT"
] | null | null | null | src/casascripts/export_uv.py | iancze/casascripts | fa1d036c6333d6323a55cb8ee027e043b6f57294 | [
"MIT"
] | null | null | null | # copied from uvplot and edited
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import, unicode_literals
import numpy as np
clight = 2.99792458e8 # [m/s] Speed of light
def export_uvtable(
uvtable_filename,
tb,
vis="",
split_args=None,
s... | 34.703846 | 131 | 0.607448 |
ab730563ab0ecd4a3bcb6e24bc9f035354e49031 | 1,613 | py | Python | source/applications/basic/file_formats/read_iterate_zdf.py | zivid/zivid-python-samples | 83cdfa39f93221ef1c523640495a9ccb356d3aed | [
"BSD-3-Clause"
] | 10 | 2020-12-03T22:59:39.000Z | 2022-03-27T07:31:42.000Z | source/applications/basic/file_formats/read_iterate_zdf.py | zivid/zivid-python-samples | 83cdfa39f93221ef1c523640495a9ccb356d3aed | [
"BSD-3-Clause"
] | 20 | 2021-01-04T08:30:56.000Z | 2022-03-08T11:25:55.000Z | source/applications/basic/file_formats/read_iterate_zdf.py | zivid/zivid-python-samples | 83cdfa39f93221ef1c523640495a9ccb356d3aed | [
"BSD-3-Clause"
] | 3 | 2021-04-21T01:42:58.000Z | 2021-06-17T08:13:25.000Z | """
This example shows how to read point cloud data from a ZDF file, iterate through it, and extract individual points.
The ZDF file for this sample can be found under the main instructions for Zivid samples.
"""
from pathlib import Path
import zivid
from sample_utils.paths import get_sample_data_path
def _main():... | 32.26 | 115 | 0.631742 |
5557e96ec393e51a2a014ed131df3b6b245ba904 | 1,510 | py | Python | tfkstbd/hparam.py | shkarupa-alex/tfstbd | 93353478dcea57dec171a41686852de5a1fbf4cf | [
"MIT"
] | null | null | null | tfkstbd/hparam.py | shkarupa-alex/tfstbd | 93353478dcea57dec171a41686852de5a1fbf4cf | [
"MIT"
] | null | null | null | tfkstbd/hparam.py | shkarupa-alex/tfstbd | 93353478dcea57dec171a41686852de5a1fbf4cf | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
class HParams(collections.namedtuple('HParams', [
'bucket_bounds', 'batch_rates', 'batch_mult', 'batch_sizes', 'word_mean', 'word_std', 'ngram_minn', 'ngram_maxn',
'ngram_itself', '... | 27.962963 | 117 | 0.647682 |
3463625f0cea361e1b7b8551c367dfedb2a16054 | 1,766 | py | Python | tests/test_dataset/test_ndcoordrange.py | spectrochempy/spectrochempy | 829b290f465e630078785e303dbab197cd78b815 | [
"Apache-2.0",
"CECILL-B",
"BSD-3-Clause"
] | 44 | 2020-05-14T01:56:40.000Z | 2022-03-23T11:16:30.000Z | tests/test_dataset/test_ndcoordrange.py | spectrochempy/spectrochempy | 829b290f465e630078785e303dbab197cd78b815 | [
"Apache-2.0",
"CECILL-B",
"BSD-3-Clause"
] | 210 | 2020-05-22T17:33:22.000Z | 2022-03-20T16:50:30.000Z | tests/test_dataset/test_ndcoordrange.py | spectrochempy/spectrochempy | 829b290f465e630078785e303dbab197cd78b815 | [
"Apache-2.0",
"CECILL-B",
"BSD-3-Clause"
] | 9 | 2020-05-16T15:36:02.000Z | 2022-03-23T11:16:56.000Z | # -*- coding: utf-8 -*-
# ======================================================================================================================
# Copyright (©) 2015-2022 LCS - Laboratoire Catalyse et Spectrochimie, Caen, France. =
# CeCILL-B FREE SOFTWARE LICENSE AGREEMENT - See ful... | 36.040816 | 120 | 0.342016 |
d3aad7914ff38df51594d2a2859994f30a2abace | 15,233 | py | Python | attendance_gui.py | romiembaye/wireless-student-attendance-system | 6609ee61e8b5d3be9938c94dbd2159e87d4a3198 | [
"MIT"
] | null | null | null | attendance_gui.py | romiembaye/wireless-student-attendance-system | 6609ee61e8b5d3be9938c94dbd2159e87d4a3198 | [
"MIT"
] | null | null | null | attendance_gui.py | romiembaye/wireless-student-attendance-system | 6609ee61e8b5d3be9938c94dbd2159e87d4a3198 | [
"MIT"
] | null | null | null | import os
import csv
import smtplib
import datetime
import openpyxl
import threading
from tkinter import *
from email import encoders
from tkinter import messagebox
import paho.mqtt.client as mqtt
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
... | 45.471642 | 114 | 0.590297 |
56572f12e6cd42aa28cbc74e35aa9c5a9214aeac | 4,739 | py | Python | kaizen_modules/img_search_my.py | LexaNoN/kaizen85-discord | a1fb95c04807a6ed0f2381c5ed70dadfa22d9440 | [
"MIT"
] | null | null | null | kaizen_modules/img_search_my.py | LexaNoN/kaizen85-discord | a1fb95c04807a6ed0f2381c5ed70dadfa22d9440 | [
"MIT"
] | null | null | null | kaizen_modules/img_search_my.py | LexaNoN/kaizen85-discord | a1fb95c04807a6ed0f2381c5ed70dadfa22d9440 | [
"MIT"
] | null | null | null | import os
import discord
import requests
import voxelmodules
request_url = "https://www.googleapis.com/customsearch/v1?q=%s&num=1&start=1" \
"&searchType=image&key=%s&cx=%s"
class Module(voxelmodules.ModuleHandler.Module):
name = "ImageSearch"
desc = "Поиск картинок в Google с автоматическим ... | 42.3125 | 140 | 0.470352 |
266248d9bb028f483f10519a6f809e0452b88b30 | 4,790 | py | Python | with_protocol.py | ArjanCodes/2021-pythonic-factory | da411eb42706a78b3118599a77c4fb8cd0616f54 | [
"MIT"
] | 3 | 2021-09-10T19:14:00.000Z | 2022-02-23T13:44:20.000Z | with_protocol.py | ArjanCodes/2021-pythonic-factory | da411eb42706a78b3118599a77c4fb8cd0616f54 | [
"MIT"
] | null | null | null | with_protocol.py | ArjanCodes/2021-pythonic-factory | da411eb42706a78b3118599a77c4fb8cd0616f54 | [
"MIT"
] | 1 | 2021-12-26T22:48:55.000Z | 2021-12-26T22:48:55.000Z | """
Basic video exporting example
"""
from abc import abstractmethod
from pathlib import Path
from typing import Protocol
class VideoExporter(Protocol):
"""Basic representation of video exporting codec."""
@abstractmethod
def prepare_export(self, video_data: str) -> None:
"""Prepares video data ... | 27.528736 | 90 | 0.684342 |
257ff23df815548870046e581da6801b4badb72b | 24,760 | py | Python | ambari-common/src/main/python/ambari_commons/shell.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | ambari-common/src/main/python/ambari_commons/shell.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | ambari-common/src/main/python/ambari_commons/shell.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | # !/usr/bin/python2
"""
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"); ... | 29.47619 | 164 | 0.703312 |
44cfecf0eeed9e537d648a9ca4ac3b7c83a15c8c | 4,280 | py | Python | Notebooks/SentinelUtilities/SentinelRegi/regi_controller.py | ms-bnick/Azure-Sentinel | 8a25e5cbac6001af10617ba709a580a5a65b9ae0 | [
"MIT"
] | 1 | 2019-11-22T12:25:53.000Z | 2019-11-22T12:25:53.000Z | Notebooks/SentinelUtilities/SentinelRegi/regi_controller.py | ms-bnick/Azure-Sentinel | 8a25e5cbac6001af10617ba709a580a5a65b9ae0 | [
"MIT"
] | 1 | 2019-09-20T19:56:54.000Z | 2019-09-20T19:56:54.000Z | Notebooks/SentinelUtilities/SentinelRegi/regi_controller.py | ms-bnick/Azure-Sentinel | 8a25e5cbac6001af10617ba709a580a5a65b9ae0 | [
"MIT"
] | 1 | 2019-09-20T18:13:21.000Z | 2019-09-20T18:13:21.000Z | """
Regi Controller:
This controller module takes user actions and renders corresponding widgets.
"""
import pandas as pd
from IPython.display import display, HTML
import ipywidgets as widgets
from ipywidgets import Button, GridBox, Layout, ButtonStyle, IntProgress
from .regi_view_helper import *
class RegiController... | 40.761905 | 137 | 0.657243 |
cd1ab23d9766dde20467dd29e323b43d8689e6e5 | 2,977 | py | Python | Chapter14/lstm.py | tongni1975/Hands-On-Machine-Learning-on-Google-Cloud-Platform | 156950530e64462bcbeebbb5d58eaf5561ed62db | [
"MIT"
] | 11 | 2018-05-25T00:26:18.000Z | 2022-03-06T02:03:26.000Z | Chapter14/lstm.py | tongni1975/Hands-On-Machine-Learning-on-Google-Cloud-Platform | 156950530e64462bcbeebbb5d58eaf5561ed62db | [
"MIT"
] | null | null | null | Chapter14/lstm.py | tongni1975/Hands-On-Machine-Learning-on-Google-Cloud-Platform | 156950530e64462bcbeebbb5d58eaf5561ed62db | [
"MIT"
] | 10 | 2018-05-10T15:08:31.000Z | 2022-03-06T02:03:28.000Z | import pandas as pd
import matplotlib.pyplot as plt
import numpy
import math
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import mean_squared_error
# convert an array of values into a d... | 34.218391 | 96 | 0.72825 |
cc29c6c97f66227d498274bea64cd2eb6f1fced2 | 11,229 | py | Python | populationsim/steps/sub_balancing.py | bstabler/populationsim | 872f7d26992e566c6fe75aed1cc14c8ad5f71d3a | [
"BSD-3-Clause"
] | null | null | null | populationsim/steps/sub_balancing.py | bstabler/populationsim | 872f7d26992e566c6fe75aed1cc14c8ad5f71d3a | [
"BSD-3-Clause"
] | null | null | null | populationsim/steps/sub_balancing.py | bstabler/populationsim | 872f7d26992e566c6fe75aed1cc14c8ad5f71d3a | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
# PopulationSim
# See full license in LICENSE.txt.
import logging
import os
import pandas as pd
from ..simul_balancer import SimultaneousListBalancer
from activitysim.core import inject
from activitysim.core import pipeline
from activitysim.core.config import setting
from .h... | 36.339806 | 99 | 0.705406 |
6eb9b9a7891398c78942c0f0a5279aff00edafd6 | 322 | py | Python | app/exercise/models.py | MauricioAntonioMartinez/recipie-api-django | 69fd3d097033331cb9531e5ae6220d0931ec40e5 | [
"MIT"
] | null | null | null | app/exercise/models.py | MauricioAntonioMartinez/recipie-api-django | 69fd3d097033331cb9531e5ae6220d0931ec40e5 | [
"MIT"
] | null | null | null | app/exercise/models.py | MauricioAntonioMartinez/recipie-api-django | 69fd3d097033331cb9531e5ae6220d0931ec40e5 | [
"MIT"
] | null | null | null | from django.db import models
# class ExerciseGroup(models.Model):
# body_part_name = models.CharField(max_length=200)
# group_name = models.CharField(max_length=100)
# class Exercise(models.Model):
# group = models.ManyToManyField(
# ExerciseGroup, on_delete=models.SET_NULL, related_name='groups'... | 29.272727 | 74 | 0.736025 |
5c19e280d3766bfef9e62f4d275dc2df9877f40c | 437 | py | Python | tests/test_early_stopping.py | Catminusminus/early-stopping-pytorch | ecad5771457028c038a7e23a293949b8a11dcf0d | [
"MIT"
] | null | null | null | tests/test_early_stopping.py | Catminusminus/early-stopping-pytorch | ecad5771457028c038a7e23a293949b8a11dcf0d | [
"MIT"
] | null | null | null | tests/test_early_stopping.py | Catminusminus/early-stopping-pytorch | ecad5771457028c038a7e23a293949b8a11dcf0d | [
"MIT"
] | null | null | null | from early_stopping_pytorch import EarlyStopping
def test_earlystopping(mocker):
mocker.patch.object(EarlyStopping, "save_checkpoint")
model = mocker.Mock()
early_stopping = EarlyStopping()
early_stopping(0.1, model)
assert early_stopping.best_score == -0.1
early_stopping(0.2, model)
ass... | 25.705882 | 57 | 0.732265 |
7b76fb0a48c560bc3742bdba5ee6792a2071d6da | 731 | py | Python | tests/settings.py | danihodovic/django-disable-cache-headers | e392007b931f3d79ca10f775fba7dd586ba058c9 | [
"MIT"
] | 4 | 2019-08-22T14:48:13.000Z | 2020-11-27T09:23:18.000Z | tests/settings.py | danihodovic/django-disable-cache-headers | e392007b931f3d79ca10f775fba7dd586ba058c9 | [
"MIT"
] | 5 | 2020-06-05T22:39:23.000Z | 2021-06-10T18:45:27.000Z | tests/settings.py | danihodovic/django-disable-cache-headers | e392007b931f3d79ca10f775fba7dd586ba058c9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8
from __future__ import absolute_import, unicode_literals
import sys
import django
DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "g$(*_d#bd!9g=3ze9j^xyr@j+oko$j@__&*e6ni(x((ypk!5$c"
DATABASES = {"default": {"ENGINE": "django.db.backend... | 23.580645 | 85 | 0.718194 |
dff4d6d44a0367d17bca8be1f11f8460b4b9f92c | 7,916 | py | Python | google/ads/google_ads/v4/proto/resources/campaign_shared_set_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v4/proto/resources/campaign_shared_set_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v4/proto/resources/campaign_shared_set_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v4/proto/resources/campaign_shared_set.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf... | 59.518797 | 1,352 | 0.793456 |
2195cfe620995da509f5cedb7d7dfde843e8a507 | 2,609 | py | Python | modules/services/service_factory.py | signeus/WebSockets | a3013ed684404a95c3608e6016b28ce08b16eeb8 | [
"MIT"
] | null | null | null | modules/services/service_factory.py | signeus/WebSockets | a3013ed684404a95c3608e6016b28ce08b16eeb8 | [
"MIT"
] | null | null | null | modules/services/service_factory.py | signeus/WebSockets | a3013ed684404a95c3608e6016b28ce08b16eeb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#Sockets Management"
from modules.services.service.socket_management.register_service import RegisterService
from modules.services.service.socket_management.unregister_service import UnregisterService
#Actions#
from modules.services.service.actions.connect_service import ConnectService
from mo... | 42.080645 | 91 | 0.661556 |
0fc6d546b2356515b8ec43853e251697ebff3ced | 633 | py | Python | data/groups.py | Alderon-first/pytest | a9cd2a49f108af7d21d8e39dfcff4a153b9d8f31 | [
"Apache-2.0"
] | null | null | null | data/groups.py | Alderon-first/pytest | a9cd2a49f108af7d21d8e39dfcff4a153b9d8f31 | [
"Apache-2.0"
] | null | null | null | data/groups.py | Alderon-first/pytest | a9cd2a49f108af7d21d8e39dfcff4a153b9d8f31 | [
"Apache-2.0"
] | null | null | null | # import random
# import string
from model.group import Group
testdata = [
Group(name="name", header="header", footer="footer"),
Group(name="name1", header="name2", footer="name3")
]
# Закомичена рандмная генерация
# def random_string(prefix, maxlen):
# symbols = string.ascii_letters+string.digits+string.p... | 30.142857 | 114 | 0.682464 |
2af3abf94b6e7a392f5e81fe7b1b95523ae81d35 | 7,457 | py | Python | meta-files/metadata.py | thethales/File-Examples | 42aa18892f1205efa64a03d41f675b98a5a8b55f | [
"MIT"
] | null | null | null | meta-files/metadata.py | thethales/File-Examples | 42aa18892f1205efa64a03d41f675b98a5a8b55f | [
"MIT"
] | null | null | null | meta-files/metadata.py | thethales/File-Examples | 42aa18892f1205efa64a03d41f675b98a5a8b55f | [
"MIT"
] | null | null | null | import os
import yaml
import json
import shutil
import math
import collections
import configparser
import common
#Script Local Parameters
params = common.getLocalParameters()
def getKeysFromInfFile(inf_file_path:str):
try:
config = configparser.ConfigParser()
config.read(inf_file_path)
r... | 47.801282 | 133 | 0.542577 |
63a3c2d49ab4a4fb53cc91022ee1af190ad1a491 | 192 | py | Python | leetcode/929.unique-email-addresses.py | zhongqi1112/Hulk | 9e7e65368b8091068755ebf70c1e28ee883a480d | [
"MIT"
] | null | null | null | leetcode/929.unique-email-addresses.py | zhongqi1112/Hulk | 9e7e65368b8091068755ebf70c1e28ee883a480d | [
"MIT"
] | null | null | null | leetcode/929.unique-email-addresses.py | zhongqi1112/Hulk | 9e7e65368b8091068755ebf70c1e28ee883a480d | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=929 lang=python3
#
# [929] Unique Email Addresses
#
# @lc code=start
class Solution:
def numUniqueEmails(self, emails: List[str]) -> int:
# @lc code=end
| 14.769231 | 56 | 0.640625 |
b15bbaf55a31c36920b95d13c47c15d7199b0b59 | 27,952 | py | Python | google/cloud/dlp_v2/services/dlp_service/transports/base.py | LaudateCorpus1/python-dlp | e0a51c9254677016f547647848dcbee85ee1bf29 | [
"Apache-2.0"
] | null | null | null | google/cloud/dlp_v2/services/dlp_service/transports/base.py | LaudateCorpus1/python-dlp | e0a51c9254677016f547647848dcbee85ee1bf29 | [
"Apache-2.0"
] | null | null | null | google/cloud/dlp_v2/services/dlp_service/transports/base.py | LaudateCorpus1/python-dlp | e0a51c9254677016f547647848dcbee85ee1bf29 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 35.115578 | 101 | 0.559209 |
ac0e3373284f718883fbe7cea35d230699fb74e5 | 9,849 | py | Python | zhinst/toolkit/control/drivers/uhfli.py | ovaar/zhinst-toolkit | 9d81e47c7cf31b431a2a1025e7a3d51033ed6346 | [
"MIT"
] | null | null | null | zhinst/toolkit/control/drivers/uhfli.py | ovaar/zhinst-toolkit | 9d81e47c7cf31b431a2a1025e7a3d51033ed6346 | [
"MIT"
] | null | null | null | zhinst/toolkit/control/drivers/uhfli.py | ovaar/zhinst-toolkit | 9d81e47c7cf31b431a2a1025e7a3d51033ed6346 | [
"MIT"
] | null | null | null | # Copyright (C) 2020 Zurich Instruments
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import numpy as np
from zhinst.toolkit.control.drivers.base import (
BaseInstrument,
DAQModule as DAQ,
SweeperModule as Sweeper,
ToolkitErro... | 40.036585 | 85 | 0.577317 |
f5a84a7bd0ceeaadb1265dfdcc7a836940fd61de | 17,691 | py | Python | calvin_env/robot/robot.py | snasiriany/calvin_env | fe484a98e738be39ca4489be4a0fcecfc1b0b43e | [
"MIT"
] | null | null | null | calvin_env/robot/robot.py | snasiriany/calvin_env | fe484a98e738be39ca4489be4a0fcecfc1b0b43e | [
"MIT"
] | null | null | null | calvin_env/robot/robot.py | snasiriany/calvin_env | fe484a98e738be39ca4489be4a0fcecfc1b0b43e | [
"MIT"
] | null | null | null | import logging
import math
import os
import cv2
import numpy as np
import pybullet as p
import quaternion
from calvin_env.robot.mixed_ik import MixedIK
from calvin_env.utils.utils import timeit
# A logger for this file
log = logging.getLogger(__name__)
class Robot:
def __init__(
self,
filename,... | 41.237762 | 132 | 0.588887 |
d8955376da29484324b13753e1a978aebe6f61e7 | 2,141 | py | Python | setup.py | l-gonz/tfg-giaa-dronecontrol | 5f7816018448b44afa20e0adb44907adac43a309 | [
"MIT"
] | 2 | 2022-01-17T20:56:19.000Z | 2022-03-23T18:54:20.000Z | setup.py | l-gonz/tfg-giaa-dronecontrol | 5f7816018448b44afa20e0adb44907adac43a309 | [
"MIT"
] | null | null | null | setup.py | l-gonz/tfg-giaa-dronecontrol | 5f7816018448b44afa20e0adb44907adac43a309 | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/guides/distributing-packages-using-setuptools/
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
import pathlib
here = pathlib.Path(__file__).parent.resolve()
# Get the... | 36.288136 | 79 | 0.650631 |
86fb4e32cef7c47115df3a1d7902e71e25a7c78b | 775 | py | Python | authenticate.py | dingwen07/account-manage-system | 8c65a5cf8c3c2b73e10fa4e36260c773fd9d9c6d | [
"MIT"
] | null | null | null | authenticate.py | dingwen07/account-manage-system | 8c65a5cf8c3c2b73e10fa4e36260c773fd9d9c6d | [
"MIT"
] | null | null | null | authenticate.py | dingwen07/account-manage-system | 8c65a5cf8c3c2b73e10fa4e36260c773fd9d9c6d | [
"MIT"
] | null | null | null | import os
import hashlib
import json
import warnings
from hash_encrypt import hash_encrypt
import password
import yubikey
ACCOUNT_DATA_FILE = 'account.json'
class Authenticator(object):
def authenticate(self, code):
pass
class PasswordAuthenticator(Authenticator):
def __init__(self, user_id):
... | 18.902439 | 56 | 0.723871 |
dc56cddb8685e84df9ad289c8be4201269dc4e16 | 19,766 | py | Python | lib/galaxy/webapps/galaxy/api/jobs.py | toshea-bu/galaxy | 760fcbd3d4ca8b036d8531751d972684eee130e2 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/galaxy/api/jobs.py | toshea-bu/galaxy | 760fcbd3d4ca8b036d8531751d972684eee130e2 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/galaxy/api/jobs.py | toshea-bu/galaxy | 760fcbd3d4ca8b036d8531751d972684eee130e2 | [
"CC-BY-3.0"
] | null | null | null | """
API operations on a jobs.
.. seealso:: :class:`galaxy.model.Jobs`
"""
import logging
import typing
from fastapi import Depends
from fastapi_utils.cbv import cbv
from fastapi_utils.inferring_router import InferringRouter as APIRouter
from sqlalchemy import (
or_,
)
from galaxy import (
exceptions,
mo... | 37.577947 | 148 | 0.630021 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.