hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a25f58d9111ba38b578740fd6a1a04f9c5f586d | 331 | py | Python | 238_Product of Array Except Self.py | carryking1988/carryleetcode | 9d6b353e8f235219d0b9e4feb131bfea6fe3ef21 | [
"MIT"
] | null | null | null | 238_Product of Array Except Self.py | carryking1988/carryleetcode | 9d6b353e8f235219d0b9e4feb131bfea6fe3ef21 | [
"MIT"
] | null | null | null | 238_Product of Array Except Self.py | carryking1988/carryleetcode | 9d6b353e8f235219d0b9e4feb131bfea6fe3ef21 | [
"MIT"
] | null | null | null | # Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].
#
# The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer.
#
# You must write an algorithm that runs in O(n) time and without using the division op... | 47.285714 | 141 | 0.755287 |
4a25f5ec915d33af3684612cdc50a825841213d3 | 18,716 | py | Python | ddsp/spectral_ops.py | NiklasWan/ddsp | dda0320a7f5b8bc080623333c8be63ffb35500c9 | [
"Apache-2.0"
] | null | null | null | ddsp/spectral_ops.py | NiklasWan/ddsp | dda0320a7f5b8bc080623333c8be63ffb35500c9 | [
"Apache-2.0"
] | null | null | null | ddsp/spectral_ops.py | NiklasWan/ddsp | dda0320a7f5b8bc080623333c8be63ffb35500c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The DDSP 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 wri... | 33.905797 | 91 | 0.666008 |
4a25f6088b0ac27e5cdbf3cfe37d691460b2f097 | 2,747 | py | Python | src/main.py | seaniedan/enviroplus-mqtt | f4e877b4301fc026c73f96cc85993f62d9143bba | [
"MIT"
] | null | null | null | src/main.py | seaniedan/enviroplus-mqtt | f4e877b4301fc026c73f96cc85993f62d9143bba | [
"MIT"
] | null | null | null | src/main.py | seaniedan/enviroplus-mqtt | f4e877b4301fc026c73f96cc85993f62d9143bba | [
"MIT"
] | null | null | null | import argparse, time, sys
from logger import EnvLogger
def parse_args():
ap = argparse.ArgumentParser(add_help=False)
ap.add_argument("-h", "--host", required=True, help="the MQTT host to connect to")
ap.add_argument("-p", "--port", type=int, default=1883, help="the port on the MQTT host to connect to")... | 41.621212 | 154 | 0.67055 |
4a25f6cc7059df1fa928495d77d2ab3be8355c51 | 11,999 | py | Python | tests/python/pants_test/backend/jvm/tasks/test_checkstyle_integration.py | viktortnk/pants | 54c98206de5ac9aadfe26d83175f472941be6c7d | [
"Apache-2.0"
] | 1 | 2020-06-13T22:01:39.000Z | 2020-06-13T22:01:39.000Z | tests/python/pants_test/backend/jvm/tasks/test_checkstyle_integration.py | viktortnk/pants | 54c98206de5ac9aadfe26d83175f472941be6c7d | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/tasks/test_checkstyle_integration.py | viktortnk/pants | 54c98206de5ac9aadfe26d83175f472941be6c7d | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import json
import os
import shutil
from contextlib import contextmanager
from textwrap import dedent
from pants.base.build_environment import get_buildroot
from pants.testutil.pants_run_... | 44.440741 | 102 | 0.506376 |
4a25f820b9e1ba7aeed022d658eada72c8e765e8 | 1,616 | py | Python | addons/account/models/digest.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/account/models/digest.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/account/models/digest.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, _
from odoo.exceptions import AccessError
class Digest(models.Model):
_inherit = 'digest.digest'
kpi_account_total_revenue = fields.Boolean('Revenue')
kpi_account_total_rev... | 46.171429 | 134 | 0.668936 |
4a25f993a94138e68ea0906b7283f5c3a07de516 | 4,023 | py | Python | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/ns/nssurgeq.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/ns/nssurgeq.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/ns/nssurgeq.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2016 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 29.8 | 135 | 0.717127 |
4a25fa3c9889a515690312af4bd98726d0c0308a | 21,915 | py | Python | homeassistant/components/zha/light.py | dlintott/core | a6c83cc46a34084fdc4c0e7221b6ba493f82cbac | [
"Apache-2.0"
] | 1 | 2021-01-27T08:47:19.000Z | 2021-01-27T08:47:19.000Z | homeassistant/components/zha/light.py | dlintott/core | a6c83cc46a34084fdc4c0e7221b6ba493f82cbac | [
"Apache-2.0"
] | 48 | 2020-10-11T08:00:05.000Z | 2022-03-31T06:02:23.000Z | homeassistant/components/zha/light.py | dlintott/core | a6c83cc46a34084fdc4c0e7221b6ba493f82cbac | [
"Apache-2.0"
] | 2 | 2017-10-13T21:54:28.000Z | 2018-02-24T23:48:21.000Z | """Lights on Zigbee Home Automation networks."""
from collections import Counter
from datetime import timedelta
import functools
import itertools
import logging
import random
from typing import Any, Dict, List, Optional, Tuple
from zigpy.zcl.clusters.general import Identify, LevelControl, OnOff
from zigpy.zcl.clusters... | 36.956155 | 123 | 0.641387 |
4a25fafcc599f1262061a69b88cd86294cb752df | 4,028 | py | Python | prody/apps/prody_apps/prody_contacts.py | grandevelia/ProDy | 7c725640a94c16543423c0756388998cb86a97ae | [
"MIT"
] | 210 | 2015-01-26T08:17:56.000Z | 2022-03-30T01:40:34.000Z | prody/apps/prody_apps/prody_contacts.py | grandevelia/ProDy | 7c725640a94c16543423c0756388998cb86a97ae | [
"MIT"
] | 555 | 2015-01-05T21:51:54.000Z | 2022-03-31T16:51:41.000Z | prody/apps/prody_apps/prody_contacts.py | grandevelia/ProDy | 7c725640a94c16543423c0756388998cb86a97ae | [
"MIT"
] | 99 | 2015-02-09T18:00:39.000Z | 2022-03-07T12:52:51.000Z | # -*- coding: utf-8 -*-
"""This module defines a routine for contact identification."""
from ..apptools import *
__all__ = ['prody_contacts']
def prody_contacts(**kwargs):
"""Identify contacts of a target structure with one or more ligands.
Contacting atoms (or extended subset of atoms, such as residues) are... | 35.646018 | 79 | 0.635303 |
4a25fbc2b2f4701edd14f859c6f644cc7fa7c24e | 1,875 | py | Python | game.py | bdupau/wordsnake | 7d8be2048412990ffa850d86bece3687dcfe24c8 | [
"Apache-2.0"
] | null | null | null | game.py | bdupau/wordsnake | 7d8be2048412990ffa850d86bece3687dcfe24c8 | [
"Apache-2.0"
] | null | null | null | game.py | bdupau/wordsnake | 7d8be2048412990ffa850d86bece3687dcfe24c8 | [
"Apache-2.0"
] | null | null | null | __author__ = 'Bastiaan'
class Game:
def __init__(self, fn_get_current_word, fn_add_word, fn_score):
self._scores_per_player = {}
self._get_current_word = fn_get_current_word
self._add_word = fn_add_word
self._score = fn_score
self._is_started = False
def game_finished... | 44.642857 | 173 | 0.639467 |
4a25fc17b7fc6ad585df47befc0bb9bfac54467f | 1,706 | py | Python | source/file_writter.py | noltron000-coursework/adventure | 744cc0b16e76dee7e1ba617c7153d90fca37718e | [
"MIT"
] | 1 | 2019-12-13T14:31:21.000Z | 2019-12-13T14:31:21.000Z | source/file_writter.py | noltron000-coursework/adventure | 744cc0b16e76dee7e1ba617c7153d90fca37718e | [
"MIT"
] | 1 | 2019-12-13T19:17:40.000Z | 2019-12-13T19:17:40.000Z | source/file_writter.py | noltron000/adventure | 744cc0b16e76dee7e1ba617c7153d90fca37718e | [
"MIT"
] | 1 | 2022-01-10T20:21:37.000Z | 2022-01-10T20:21:37.000Z | import os
class FileWritter:
def __init__(self, story):
self.story = story
self.dir = input('What folder-name do you want your output files to be in? ')
if self.dir == '':
self.dir = 'story'
if os.path.isdir(f'./{self.dir}'):
raise # ValueError('This folder already exists! Please try again.')
else:
... | 24.724638 | 79 | 0.635404 |
4a25fec3ad8ffa3d00b2180b2bacebf5e670eeb0 | 480 | py | Python | PYTHON/python-datastructures/algorithms/algorithms/arrays/missing_ranges.py | Web-Dev-Collaborative/DS-ALGO-OFFICIAL | 6d7195d33c28a0fe22f12231efffb39f4bf05c97 | [
"Apache-2.0"
] | 11 | 2021-02-18T04:53:44.000Z | 2022-01-16T10:57:39.000Z | PYTHON/python-datastructures/algorithms/algorithms/arrays/missing_ranges.py | Web-Dev-Collaborative/DS-ALGO-OFFICIAL | 6d7195d33c28a0fe22f12231efffb39f4bf05c97 | [
"Apache-2.0"
] | 162 | 2021-03-09T01:52:11.000Z | 2022-03-12T01:09:07.000Z | PYTHON/python-datastructures/algorithms/algorithms/arrays/missing_ranges.py | Web-Dev-Collaborative/DS-ALGO-OFFICIAL | 6d7195d33c28a0fe22f12231efffb39f4bf05c97 | [
"Apache-2.0"
] | 8 | 2021-02-18T05:12:34.000Z | 2022-03-06T19:02:14.000Z | """
Find missing ranges between low and high in the given array.
Ex) [3, 5] lo=1 hi=10 => answer: [(1, 2), (4, 4), (6, 10)]
"""
def missing_ranges(arr, lo, hi):
res = []
start = lo
for n in arr:
if n == start:
start += 1
elif n > start:
res.append((start, n - 1))... | 20 | 60 | 0.510417 |
4a25fefdc109991ae3c152cf1b28621469514b63 | 2,821 | py | Python | projects/scale_hyperprior_lightning/vimeo.py | tallamjr/NeuralCompression | 21d05ec0d9f8c52d8742fde36f569b4dad2842a5 | [
"MIT"
] | 233 | 2021-07-19T18:50:21.000Z | 2022-03-30T22:06:40.000Z | projects/scale_hyperprior_lightning/vimeo.py | tallamjr/NeuralCompression | 21d05ec0d9f8c52d8742fde36f569b4dad2842a5 | [
"MIT"
] | 79 | 2021-07-22T13:33:45.000Z | 2022-02-09T16:38:42.000Z | projects/scale_hyperprior_lightning/vimeo.py | tallamjr/NeuralCompression | 21d05ec0d9f8c52d8742fde36f569b4dad2842a5 | [
"MIT"
] | 21 | 2021-07-29T18:27:59.000Z | 2022-02-28T02:32:53.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import List, Optional, Sequence, Union
from pytorch_lightning import LightningDataModule
from torch.utils.data import DataLoade... | 32.802326 | 78 | 0.649061 |
4a25ff119f06e33c1cd8e0332802c77847ff5fa3 | 3,180 | py | Python | helios/pipeViewer/pipe_view/gui/widgets/transaction_list.py | debjyoti0891/map | abdae67964420d7d36255dcbf83e4240a1ef4295 | [
"MIT"
] | 44 | 2019-12-13T06:39:13.000Z | 2022-03-29T23:09:28.000Z | helios/pipeViewer/pipe_view/gui/widgets/transaction_list.py | debjyoti0891/map | abdae67964420d7d36255dcbf83e4240a1ef4295 | [
"MIT"
] | 222 | 2020-01-14T21:58:56.000Z | 2022-03-31T20:05:12.000Z | helios/pipeViewer/pipe_view/gui/widgets/transaction_list.py | debjyoti0891/map | abdae67964420d7d36255dcbf83e4240a1ef4295 | [
"MIT"
] | 19 | 2020-01-03T19:03:22.000Z | 2022-01-09T08:36:20.000Z | import wx
from gui.font_utils import GetMonospaceFont
# # This class is a GUI list control element that shows transactions.
class TransactionList(wx.ListCtrl):
def __init__(self, parent, id, canvas, name = '', style = wx.LC_REPORT | wx.SUNKEN_BORDER):
wx.ListCtrl.__init__(self, parent = parent, id = wx.N... | 36.976744 | 96 | 0.66478 |
4a25ff80ca81de3d80b18cf54a848c6870885e31 | 1,042 | py | Python | picam.py | hxydebug/FR | dfb54acc8eab79204ee55f7eb1cdc547566c6466 | [
"MIT"
] | 1 | 2021-12-08T03:22:46.000Z | 2021-12-08T03:22:46.000Z | picam.py | hxydebug/FR | dfb54acc8eab79204ee55f7eb1cdc547566c6466 | [
"MIT"
] | null | null | null | picam.py | hxydebug/FR | dfb54acc8eab79204ee55f7eb1cdc547566c6466 | [
"MIT"
] | null | null | null | """
Pi camera device capture class for OpenCV. This class allows you to capture a
single image from the pi camera as an OpenCV image.
"""
import io
import time
import cv2
import numpy as np
import picamera
import config
class OpenCVCapture(object):
def read(self):
"""Read a single frame from the camera... | 31.575758 | 100 | 0.661228 |
4a25ff8b2fa182faaf4f4ce8909c9ec2e9b55ccc | 4,334 | py | Python | ppocr/utils/utility.py | chccc1994/PaddleOCR | 03e768b26ff769a8af1adfec062c472fe54bb640 | [
"Apache-2.0"
] | null | null | null | ppocr/utils/utility.py | chccc1994/PaddleOCR | 03e768b26ff769a8af1adfec062c472fe54bb640 | [
"Apache-2.0"
] | null | null | null | ppocr/utils/utility.py | chccc1994/PaddleOCR | 03e768b26ff769a8af1adfec062c472fe54bb640 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 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... | 32.833333 | 76 | 0.617213 |
4a25ff8be9712851407ab150e1c31fa4487b4d8e | 330 | py | Python | script.py | likelion/script.tubecast | 33c6bd7f87dfdca3e86a0dc2239a31d3f43a0450 | [
"MIT"
] | 83 | 2018-03-16T21:42:59.000Z | 2022-03-13T20:51:41.000Z | script.py | likelion/script.tubecast | 33c6bd7f87dfdca3e86a0dc2239a31d3f43a0450 | [
"MIT"
] | 52 | 2018-03-29T01:35:10.000Z | 2022-03-01T15:48:24.000Z | script.py | likelion/script.tubecast | 33c6bd7f87dfdca3e86a0dc2239a31d3f43a0450 | [
"MIT"
] | 34 | 2018-03-28T13:58:46.000Z | 2021-12-06T11:13:48.000Z | # -*- coding: utf-8 -*-
from resources.lib.kodi.utils import get_string, yes_no
from resources.lib.tubecast.youtube.pairing import generate_pairing_code
if __name__ == "__main__":
dg = yes_no(get_string(32008),
yeslabel=get_string(32009), nolabel=get_string(32010))
if dg:
generate_pairi... | 33 | 72 | 0.706061 |
4a2600ded2ff6b7b2a3d8935d83407f524008e07 | 9,897 | py | Python | web_console_v2/api/fedlearner_webconsole/k8s/models.py | duanbing/fedlearner | 5cce3c1fe09abe66879274a0ad3dc8e2f25a322d | [
"Apache-2.0"
] | null | null | null | web_console_v2/api/fedlearner_webconsole/k8s/models.py | duanbing/fedlearner | 5cce3c1fe09abe66879274a0ad3dc8e2f25a322d | [
"Apache-2.0"
] | null | null | null | web_console_v2/api/fedlearner_webconsole/k8s/models.py | duanbing/fedlearner | 5cce3c1fe09abe66879274a0ad3dc8e2f25a322d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The FedLearner Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.346429 | 76 | 0.582197 |
4a2600f6a0ad09c6dfc7df50333e70dbcb04fe17 | 6,115 | py | Python | shoogie/admin.py | counterjack/django-shoogie | 96f0b1178a7f08b1a980274d610b131ca1fc0f89 | [
"MIT"
] | null | null | null | shoogie/admin.py | counterjack/django-shoogie | 96f0b1178a7f08b1a980274d610b131ca1fc0f89 | [
"MIT"
] | null | null | null | shoogie/admin.py | counterjack/django-shoogie | 96f0b1178a7f08b1a980274d610b131ca1fc0f89 | [
"MIT"
] | 1 | 2021-04-03T07:31:49.000Z | 2021-04-03T07:31:49.000Z | from django.contrib import admin
from django.contrib.admin.views.main import ChangeList
try:
from django.conf.urls import url
except ImportError:
from django.conf.urls import url
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from . import models, utils, views
def get_name(u... | 38.21875 | 121 | 0.628618 |
4a2601226669c55c36c016a5a9ef915b3224757b | 3,410 | py | Python | sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_qna_response.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_qna_response.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_qna_response.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""
FILE: sample_analyze_orchestration_app_qna_response.py
DESCRIPTION:
This sample demonstrates how to analyze user query using an orchestration pr... | 40.117647 | 106 | 0.676833 |
4a2603845d35b4b4dc36e6ae25c9ad0bb815f71e | 867 | py | Python | var/spack/repos/builtin/packages/dnstracer/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/dnstracer/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/dnstracer/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Dnstracer(Package):
"""Dnstracer determines where a given Domain Name Server gets
its ... | 28.9 | 73 | 0.672434 |
4a260391c23291acb9ce469940ae518e2e90b45c | 2,626 | py | Python | square__heisenberg__static/square_heisenberg_linearoperator.py | ryuikaneko/quspin_example | 931ca2ea5e6bbe02ebdd6d6a22d90db24d6c760c | [
"BSD-3-Clause"
] | null | null | null | square__heisenberg__static/square_heisenberg_linearoperator.py | ryuikaneko/quspin_example | 931ca2ea5e6bbe02ebdd6d6a22d90db24d6c760c | [
"BSD-3-Clause"
] | null | null | null | square__heisenberg__static/square_heisenberg_linearoperator.py | ryuikaneko/quspin_example | 931ca2ea5e6bbe02ebdd6d6a22d90db24d6c760c | [
"BSD-3-Clause"
] | null | null | null | ## http://weinbe58.github.io/QuSpin/generated/quspin.basis.spin_basis_general.html#quspin.basis.spin_basis_general
## http://weinbe58.github.io/QuSpin/generated/quspin.operators.quantum_LinearOperator.html
from __future__ import print_function, division
#from quspin.operators import hamiltonian # operators
from quspin.... | 52.52 | 153 | 0.714014 |
4a26053aff24417fd2b56efd74ae8de312b64ecf | 23,683 | py | Python | src/twisted/conch/scripts/tkconch.py | apjanke/twisted | 22f949f7ce187513f0c218b73186c8a73baa00b4 | [
"Unlicense",
"MIT"
] | 1 | 2021-01-03T01:54:14.000Z | 2021-01-03T01:54:14.000Z | src/twisted/conch/scripts/tkconch.py | zerospam/twisted | e23b5e2040a4d643bc6a43785621358569886a0d | [
"MIT",
"Unlicense"
] | null | null | null | src/twisted/conch/scripts/tkconch.py | zerospam/twisted | e23b5e2040a4d643bc6a43785621358569886a0d | [
"MIT",
"Unlicense"
] | null | null | null | # -*- test-case-name: twisted.conch.test.test_scripts -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Implementation module for the `tkconch` command.
"""
from twisted.conch import error
from twisted.conch.ui import tkvt100
from twisted.conch.ssh import transport, userauth, connection... | 35.667169 | 88 | 0.564793 |
4a2605eeb99af01df307854567dadef8bd6860a5 | 5,159 | py | Python | sdk/python/pulumi_aws_native/iotcoredeviceadvisor/get_suite_definition.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/iotcoredeviceadvisor/get_suite_definition.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/iotcoredeviceadvisor/get_suite_definition.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.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, overload
from .. import _utilities
from... | 41.943089 | 159 | 0.721845 |
4a2605f4d05f23ddf75b147f827fb14199d03569 | 4,627 | py | Python | rlalgos/a2c/agent.py | ludc/rlstructures | 99fa91bb4e955d31348bed007f25b41641c9fa73 | [
"MIT"
] | null | null | null | rlalgos/a2c/agent.py | ludc/rlstructures | 99fa91bb4e955d31348bed007f25b41641c9fa73 | [
"MIT"
] | null | null | null | rlalgos/a2c/agent.py | ludc/rlstructures | 99fa91bb4e955d31348bed007f25b41641c9fa73 | [
"MIT"
] | null | null | null | #
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import rlstructures.logging as logging
from rlstructures import DictTensor
from rlstructures import Ag... | 34.529851 | 86 | 0.625027 |
4a26064f977d8d8a2be39a6137e9775d9a18824f | 1,133 | py | Python | www/www/wsgi.py | mattvenn/cursivedata | 43e43263bef6f01698166d87bcff00b246957277 | [
"CC-BY-4.0"
] | 1 | 2015-12-31T01:46:09.000Z | 2015-12-31T01:46:09.000Z | www/www/wsgi.py | mattvenn/cursivedata | 43e43263bef6f01698166d87bcff00b246957277 | [
"CC-BY-4.0"
] | 5 | 2015-04-06T19:15:15.000Z | 2015-07-25T21:45:16.000Z | www/www/wsgi.py | mattvenn/cursivedata | 43e43263bef6f01698166d87bcff00b246957277 | [
"CC-BY-4.0"
] | null | null | null | """
WSGI config for testsite project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION``... | 39.068966 | 79 | 0.806708 |
4a260669bb4f6aac0cfacd80645cfe8f299f0e1d | 572 | py | Python | 034-factorialsum.py | johnsonZhaoxin/ProjectEuler | 74f3755d5f0e305897556b46515babe55429a834 | [
"MIT"
] | null | null | null | 034-factorialsum.py | johnsonZhaoxin/ProjectEuler | 74f3755d5f0e305897556b46515babe55429a834 | [
"MIT"
] | null | null | null | 034-factorialsum.py | johnsonZhaoxin/ProjectEuler | 74f3755d5f0e305897556b46515babe55429a834 | [
"MIT"
] | null | null | null | from functools import lru_cache
@lru_cache(maxsize=None)
def factorial(n):
if n == 1 or n == 0:
return 1
else:
return n*factorial(n-1)
def seperate_num(num):
digits = []
[digits.append(int(i)) for i in str(num)]
return digits
def get_digit_factorial(num):
digits = seperate_num(... | 22 | 48 | 0.63986 |
4a2607283fda685daf05574ba370eefd33a66826 | 459 | py | Python | cli/maestro_cli/settings.py | Farfetch/maestro | 837d93866123aea8b90ad0e2aaf3f13bf3ef6907 | [
"MIT"
] | 21 | 2022-02-02T11:52:14.000Z | 2022-02-06T02:44:16.000Z | cli/maestro_cli/settings.py | Farfetch/maestro | 837d93866123aea8b90ad0e2aaf3f13bf3ef6907 | [
"MIT"
] | 78 | 2022-02-02T12:13:12.000Z | 2022-03-29T08:10:42.000Z | cli/maestro_cli/settings.py | Farfetch/maestro | 837d93866123aea8b90ad0e2aaf3f13bf3ef6907 | [
"MIT"
] | null | null | null | import os
import pathlib
from dotenv import load_dotenv
from maestro_cli.enums import LogLevel
load_dotenv()
def parse_bool(str_value):
return str_value.lower() in ["true", "1"]
APP_NAME = "maestro_cli"
LOG_LEVEL = os.environ.get("LOG_LEVEL", LogLevel.INFO.value)
ROOT_DIRECTORY = pathlib.Path().absolute()
... | 20.863636 | 78 | 0.75817 |
4a26079bd9655c1e57ba0b77f14ba00682a7bdc2 | 193 | py | Python | code/backend/src/api/blueprints/__init__.py | tobiasclaas/semantic-data-lake | 16fc25a74918c9ac4d95f14bf3c15af053cee53e | [
"MIT"
] | 1 | 2022-02-23T14:32:38.000Z | 2022-02-23T14:32:38.000Z | code/backend/src/api/blueprints/__init__.py | tobiasclaas/semantic-data-lake | 16fc25a74918c9ac4d95f14bf3c15af053cee53e | [
"MIT"
] | null | null | null | code/backend/src/api/blueprints/__init__.py | tobiasclaas/semantic-data-lake | 16fc25a74918c9ac4d95f14bf3c15af053cee53e | [
"MIT"
] | null | null | null | from .user import USER_BLUEPRINT
from .auth import AUTH_BLUEPRINT
from .datamarts import DATAMARTS_BLUEPRINT
from .workspace import WORKSPACE_BLUEPRINT
from .ontology import ONTOLOGY_BLUEPRINT
| 32.166667 | 42 | 0.870466 |
4a260885931cefdd544dfb83f58a6a8fa6577a51 | 1,605 | py | Python | base_extractors.py | leondz/entity_recognition | f5ef5aafc259139b20c2d54dd54dc1f6f239b605 | [
"Apache-2.0"
] | 63 | 2015-11-11T16:03:21.000Z | 2022-02-23T08:23:59.000Z | base_extractors.py | leondz/entity_recognition | f5ef5aafc259139b20c2d54dd54dc1f6f239b605 | [
"Apache-2.0"
] | 14 | 2015-11-09T19:03:12.000Z | 2015-11-12T08:29:26.000Z | base_extractors.py | leondz/entity-recognition | f5ef5aafc259139b20c2d54dd54dc1f6f239b605 | [
"Apache-2.0"
] | 15 | 2015-11-06T12:35:30.000Z | 2020-06-28T06:47:52.000Z | #!/usr/bin/env python3
# X : list of lists of instances, each instance is a list of feature reprs
# y : list of lists of labels
def word2features(sent, i):
word = sent[i]
features = [
'bias',
'word.lower=' + word.lower(),
'word[-3:]=' + word[-3:],
'word[-2:]=' + word[-2:],
... | 26.75 | 78 | 0.530841 |
4a2608f0806ed0157b74005f4f99da8b0d13c33f | 1,494 | py | Python | acme/agents/jax/sqil/builder_test.py | wookayin/acme | 71b2ab8577a118c103718f034fa62c5ad2c0fd97 | [
"Apache-2.0"
] | null | null | null | acme/agents/jax/sqil/builder_test.py | wookayin/acme | 71b2ab8577a118c103718f034fa62c5ad2c0fd97 | [
"Apache-2.0"
] | null | null | null | acme/agents/jax/sqil/builder_test.py | wookayin/acme | 71b2ab8577a118c103718f034fa62c5ad2c0fd97 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 DeepMind Technologies Limited. 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 ... | 33.2 | 80 | 0.685408 |
4a2609448c3d77719addc4bbbefed8f1e23e538f | 3,097 | py | Python | config/settings.py | Kimkykie/elite-tracker | 78e5da38e4eaaf0855946aeb8b0fa9cd36d8e2d3 | [
"MIT"
] | null | null | null | config/settings.py | Kimkykie/elite-tracker | 78e5da38e4eaaf0855946aeb8b0fa9cd36d8e2d3 | [
"MIT"
] | null | null | null | config/settings.py | Kimkykie/elite-tracker | 78e5da38e4eaaf0855946aeb8b0fa9cd36d8e2d3 | [
"MIT"
] | null | null | null | """
Django settings for config project.
Generated by 'django-admin startproject' using Django 1.11.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os... | 25.595041 | 91 | 0.695512 |
4a2609bcc1187b6e84d10ddc4e5b7da3e337791b | 4,664 | py | Python | feedforward_cuda.py | abhishekbhakat/pyML | 44bc9915e0b42a8cc440d6f9ec3e5d7c4635bb3e | [
"MIT"
] | null | null | null | feedforward_cuda.py | abhishekbhakat/pyML | 44bc9915e0b42a8cc440d6f9ec3e5d7c4635bb3e | [
"MIT"
] | null | null | null | feedforward_cuda.py | abhishekbhakat/pyML | 44bc9915e0b42a8cc440d6f9ec3e5d7c4635bb3e | [
"MIT"
] | null | null | null | import torch
import torchvision
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from torchvision.datasets import MNIST
from torchvision.transforms import ToTensor
from torch.utils.data.dataloader import DataLoader
from torch.utils.data import random_split
class MnistModel(nn.Module):
"""Fe... | 36.4375 | 115 | 0.647727 |
4a2609f7f049eca3c9e481e6a1bf212f6b2164c8 | 142 | py | Python | pkg/__init__.py | bruce30262/idapkg | 5d6af9bd59c5dc886d68335119fae41491f06ea7 | [
"MIT"
] | 125 | 2019-04-04T22:54:53.000Z | 2021-12-15T02:13:12.000Z | pkg/__init__.py | bruce30262/idapkg | 5d6af9bd59c5dc886d68335119fae41491f06ea7 | [
"MIT"
] | 19 | 2019-04-02T15:56:37.000Z | 2022-03-17T09:12:52.000Z | pkg/__init__.py | Jinmo/pm | 5d6af9bd59c5dc886d68335119fae41491f06ea7 | [
"MIT"
] | 14 | 2019-05-29T17:31:08.000Z | 2021-09-26T01:34:42.000Z | __version__ = '0.1.4'
import sys
from .commands import *
# expose 'pkg' in global namespace
__builtins__[__name__] = sys.modules[__name__]
| 15.777778 | 46 | 0.739437 |
4a260a7e799b9c56ad641a198b80501941eae2c2 | 165 | py | Python | matrixscreener/__init__.py | arve0/matrixscreener | 48789576b51e7c35539b6bca9c80c130ea339425 | [
"MIT"
] | 6 | 2015-02-09T08:52:41.000Z | 2021-07-09T02:24:13.000Z | matrixscreener/__init__.py | arve0/matrixscreener | 48789576b51e7c35539b6bca9c80c130ea339425 | [
"MIT"
] | 2 | 2015-02-19T19:03:47.000Z | 2016-05-25T12:32:41.000Z | matrixscreener/__init__.py | arve0/matrixscreener | 48789576b51e7c35539b6bca9c80c130ea339425 | [
"MIT"
] | 4 | 2015-02-09T08:52:49.000Z | 2016-08-04T07:51:19.000Z | """
Interfacing with Leica LAS AF MatrixScreener.
"""
__all__ = [ 'cam', 'experiment', 'utils']
from matrixscreener import cam, experiment, utils
VERSION = '0.6.1'
| 20.625 | 49 | 0.70303 |
4a260aed1dfbee812a569601f1e6689347df9c79 | 125 | py | Python | ex029.1.py | zWillsz/exsvscode | ba507dca6de748e3c82c306731137bb5f6f0c918 | [
"MIT"
] | null | null | null | ex029.1.py | zWillsz/exsvscode | ba507dca6de748e3c82c306731137bb5f6f0c918 | [
"MIT"
] | null | null | null | ex029.1.py | zWillsz/exsvscode | ba507dca6de748e3c82c306731137bb5f6f0c918 | [
"MIT"
] | null | null | null | n = str(input('Digite seu nome todo: ')).split()
print('Seu primeiro nome é {} e seu ultimo nome é {}.'.format(n[0], n[-1]))
| 41.666667 | 75 | 0.616 |
4a260bd6dcb973e165c9e154b8b9e914d44aea31 | 497 | py | Python | tests/tools/test_rules.py | a5kin/xentica | ca08fac9f85af71c9d6d98545a33d50323f851b3 | [
"MIT"
] | 23 | 2018-02-24T23:38:54.000Z | 2022-02-16T15:20:46.000Z | tests/tools/test_rules.py | a5kin/xentica | ca08fac9f85af71c9d6d98545a33d50323f851b3 | [
"MIT"
] | 39 | 2017-11-20T21:54:30.000Z | 2020-09-01T12:43:57.000Z | tests/tools/test_rules.py | a5kin/xentica | ca08fac9f85af71c9d6d98545a33d50323f851b3 | [
"MIT"
] | 4 | 2019-04-23T03:56:44.000Z | 2021-05-14T11:12:54.000Z | """Tests for ``xentica.tools.rules`` module."""
import unittest
from xentica.tools.rules import LifeLike
class TestLifelike(unittest.TestCase):
"""Tests for Lifelike rules helpers."""
def test_golly(self):
"""Test conversion from Golly and vice versa."""
rule_str = "B3/S23"
rule_int ... | 29.235294 | 56 | 0.688129 |
4a260c66f84c6098563e847bbd8c75979483888b | 429 | py | Python | confirmation/migrations/0011_alter_confirmation_expiry_date.py | dumpmemory/zulip | 496273ddbc567330a0022699d6d6eb5c646e5da5 | [
"Apache-2.0"
] | 4 | 2021-09-16T16:46:55.000Z | 2022-02-06T13:00:21.000Z | confirmation/migrations/0011_alter_confirmation_expiry_date.py | dumpmemory/zulip | 496273ddbc567330a0022699d6d6eb5c646e5da5 | [
"Apache-2.0"
] | null | null | null | confirmation/migrations/0011_alter_confirmation_expiry_date.py | dumpmemory/zulip | 496273ddbc567330a0022699d6d6eb5c646e5da5 | [
"Apache-2.0"
] | 1 | 2022-02-04T05:15:12.000Z | 2022-02-04T05:15:12.000Z | # Generated by Django 3.2.9 on 2021-11-30 17:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("confirmation", "0010_alter_confirmation_expiry_date"),
]
operations = [
migrations.AlterField(
model_name="confirmation",
... | 22.578947 | 65 | 0.631702 |
4a260c67b4d050d44f02c8c51668e4f5f979459e | 6,454 | py | Python | kubernetes/client/models/v1_network_policy.py | Scalr/kubernetes-client-python | 07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38 | [
"Apache-2.0"
] | 3 | 2019-05-19T05:05:37.000Z | 2020-03-20T04:56:20.000Z | kubernetes/client/models/v1_network_policy.py | Scalr/kubernetes-client-python | 07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_network_policy.py | Scalr/kubernetes-client-python | 07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38 | [
"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.13.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 30.587678 | 281 | 0.605981 |
4a260e4b9ba93bd40c7fd67a4ee6fc79ae7d65da | 5,621 | py | Python | hypertrainer/htplatform.py | mpelchat04/hypertrainer | 0a6aa3a20c222c0280101ab5a6d72e7b0afddc29 | [
"MIT"
] | 1 | 2019-07-08T13:28:47.000Z | 2019-07-08T13:28:47.000Z | hypertrainer/htplatform.py | mpelchat04/hypertrainer | 0a6aa3a20c222c0280101ab5a6d72e7b0afddc29 | [
"MIT"
] | null | null | null | hypertrainer/htplatform.py | mpelchat04/hypertrainer | 0a6aa3a20c222c0280101ab5a6d72e7b0afddc29 | [
"MIT"
] | 4 | 2019-02-27T15:59:04.000Z | 2019-09-18T19:39:30.000Z | import time
from pathlib import Path
from typing import List, Iterable, Dict
import redis.exceptions
from redis import Redis
from rq import Queue
from rq.job import Job, cancel_job as cancel_rq_job
from hypertrainer.computeplatform import ComputePlatform
from hypertrainer.computeplatformtype import ComputePlatformTyp... | 40.438849 | 115 | 0.666785 |
4a260ebb52a6c33c681b12bffaf71925cc9bedf7 | 1,177 | py | Python | demos/disassembler_special_ins.py | IOsipov/androguard | 13df1b45e93706eb20231626b0cd6bf15390f844 | [
"Apache-2.0"
] | 24 | 2018-10-09T02:08:17.000Z | 2021-08-03T21:39:16.000Z | demos/disassembler_special_ins.py | IOsipov/androguard | 13df1b45e93706eb20231626b0cd6bf15390f844 | [
"Apache-2.0"
] | 3 | 2019-06-21T12:05:39.000Z | 2021-11-09T07:23:37.000Z | demos/disassembler_special_ins.py | IOsipov/androguard | 13df1b45e93706eb20231626b0cd6bf15390f844 | [
"Apache-2.0"
] | 4 | 2018-12-12T21:34:37.000Z | 2021-09-03T19:42:10.000Z | #!/usr/bin/env python
import sys, hashlib
PATH_INSTALL = "./"
sys.path.append(PATH_INSTALL)
from androguard.core.androgen import AndroguardS
from androguard.core.analysis import analysis
TEST = 'examples/android/TestsAndroguard/bin/classes.dex'
a = AndroguardS( TEST )
x = analysis.VMAnalysis( a.get_vm() )
for met... | 30.973684 | 123 | 0.587086 |
4a260fc343794a37486e10aae0aa364ca3f95dd4 | 184 | py | Python | Darlington/phase1/python Basic 1/day 3 solution/qtn4.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Darlington/phase1/python Basic 1/day 3 solution/qtn4.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Darlington/phase1/python Basic 1/day 3 solution/qtn4.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | #differences in date of the day
import datetime
#import timedelta
from datetime import date
first = date(2014, 7, 2)
second = date(2014, 7, 11)
diff = second - first
print(diff.days) | 18.4 | 31 | 0.73913 |
4a260ff1ca3f3b1fda1e6b3071781605756d0281 | 12,122 | py | Python | lib/MotorPDE.py | youngmp/NoisyMotors | a2c860e0be3ff298a48685a48b0d29e5c53384b8 | [
"MIT"
] | null | null | null | lib/MotorPDE.py | youngmp/NoisyMotors | a2c860e0be3ff298a48685a48b0d29e5c53384b8 | [
"MIT"
] | 2 | 2021-07-14T18:22:33.000Z | 2021-07-14T18:22:50.000Z | lib/MotorPDE.py | youngmp/NoisyMotors | a2c860e0be3ff298a48685a48b0d29e5c53384b8 | [
"MIT"
] | 1 | 2021-07-28T04:26:38.000Z | 2021-07-28T04:26:38.000Z | """
TODO:
-add ground truth steady-state distribution in phi
-determine correct boudnary condition
Trying to apply upwind/downwind to our problem.
The equation I derived is ...see below
"""
import time
#import matplotlib
#import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import solve... | 29.857143 | 79 | 0.46824 |
4a26114321a7344825a88a254bdb94f121bdf846 | 6,200 | bzl | Python | bazel/closure_grpc_web_library.bzl | zhouqiangWang/grpc-web | a470a75000c7b0789adc38028ff8d2cf491405eb | [
"Apache-2.0"
] | null | null | null | bazel/closure_grpc_web_library.bzl | zhouqiangWang/grpc-web | a470a75000c7b0789adc38028ff8d2cf491405eb | [
"Apache-2.0"
] | null | null | null | bazel/closure_grpc_web_library.bzl | zhouqiangWang/grpc-web | a470a75000c7b0789adc38028ff8d2cf491405eb | [
"Apache-2.0"
] | null | null | null | # This rule was inspired by rules_closure`s implementation of
# |closure_proto_library|, licensed under Apache 2.
# https://github.com/bazelbuild/rules_closure/blob/3555e5ba61fdcc17157dd833eaf7d19b313b1bca/closure/protobuf/closure_proto_library.bzl
load(
"@io_bazel_rules_closure//closure/compiler:closure_js_librar... | 31.313131 | 134 | 0.610484 |
4a2611610d569dba39326a12ccb6ec967cc90111 | 6,291 | py | Python | tagger-ds-temp/tagger/message_retriever.py | filchyboy/TaggerMail | 4166a49842817ad999a8fbb6262de7cb7e765a5a | [
"MIT"
] | null | null | null | tagger-ds-temp/tagger/message_retriever.py | filchyboy/TaggerMail | 4166a49842817ad999a8fbb6262de7cb7e765a5a | [
"MIT"
] | 6 | 2021-01-28T21:23:23.000Z | 2022-01-22T13:06:54.000Z | tagger-ds-temp/tagger/message_retriever.py | filchyboy/TaggerMail | 4166a49842817ad999a8fbb6262de7cb7e765a5a | [
"MIT"
] | null | null | null | # Module imports / focused on Google API
import base64
from bs4 import BeautifulSoup
import json
import re
import pandas as pd
from collections import Counter
from googleapiclient.discovery import build
from gensim.corpora import Dictionary
from gensim.models.ldamulticore import LdaMulticore
import spacy
import nltk
fr... | 37.005882 | 78 | 0.545382 |
4a26119341e4a8c3c36794f6c8993b9ae0af5fb8 | 21,112 | py | Python | stable_baselines/logger.py | yfletberliac/Actor-with-Variance-Estimated-Critic | 294ef39d05f31067907bb6ff9405183d4a530244 | [
"MIT"
] | 4 | 2020-10-04T02:15:47.000Z | 2020-10-13T15:24:22.000Z | stable_baselines/logger.py | yfletberliac/actor-with-variance-estimated-critic | 294ef39d05f31067907bb6ff9405183d4a530244 | [
"MIT"
] | null | null | null | stable_baselines/logger.py | yfletberliac/actor-with-variance-estimated-critic | 294ef39d05f31067907bb6ff9405183d4a530244 | [
"MIT"
] | 1 | 2021-05-06T08:55:24.000Z | 2021-05-06T08:55:24.000Z | import os
import sys
import shutil
import json
import time
import datetime
import tempfile
import warnings
from collections import defaultdict
from typing import Optional
import tensorflow as tf
from tensorflow.python import pywrap_tensorflow
from tensorflow.core.util import event_pb2
from tensorflow.python.util impor... | 28.376344 | 117 | 0.575881 |
4a26119c2990d982aee640d62ea718e71873636b | 11,486 | py | Python | airflow/secrets/local_filesystem.py | shashijangra/airflow-1 | c3e340584bf1892c4f73aa9e7495b5823dab0c40 | [
"Apache-2.0"
] | 1 | 2020-09-15T02:32:55.000Z | 2020-09-15T02:32:55.000Z | airflow/secrets/local_filesystem.py | shashijangra/airflow-1 | c3e340584bf1892c4f73aa9e7495b5823dab0c40 | [
"Apache-2.0"
] | 14 | 2019-12-03T02:54:42.000Z | 2020-02-27T16:08:10.000Z | airflow/secrets/local_filesystem.py | shashijangra/airflow-1 | c3e340584bf1892c4f73aa9e7495b5823dab0c40 | [
"Apache-2.0"
] | 1 | 2020-11-04T03:10:24.000Z | 2020-11-04T03:10:24.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 35.670807 | 110 | 0.670643 |
4a2611a8d3d41b8f8cc3849b8bf1324d7cba3a07 | 3,248 | py | Python | bin/eoIngestPd.py | lsst-camera-dh/eotask-gen3 | 41e7de97c607c5a8b21c4f7164b3852e7d07359a | [
"BSD-3-Clause-LBNL"
] | null | null | null | bin/eoIngestPd.py | lsst-camera-dh/eotask-gen3 | 41e7de97c607c5a8b21c4f7164b3852e7d07359a | [
"BSD-3-Clause-LBNL"
] | 33 | 2021-04-23T17:43:34.000Z | 2022-01-17T19:15:14.000Z | bin/eoIngestPd.py | lsst-camera-dh/eotask-gen3 | 41e7de97c607c5a8b21c4f7164b3852e7d07359a | [
"BSD-3-Clause-LBNL"
] | null | null | null | #! /usr/bin/env python
import os
import argparse
from astropy.table import Table
from lsst.daf.butler import Butler, DatasetType
def getDataIdRecords(butler, filename):
tokens = os.path.splitext(os.path.basename(filename))[0].split('_')
dayObs = int(tokens[2])
seqNum = int(tokens[3])
where = "expos... | 33.142857 | 99 | 0.615148 |
4a2612813fa6bd5a4d162fe061fbc0c123b91355 | 21,578 | py | Python | Projects/Parameter Estimation and Bayesian Statistics/_2_Exercise_2.py | aleixlopezpascual/aleixlopezpascual.github.io | 89b7449cf7f358d53a2b8f4030b88cbaf8884ef6 | [
"MIT"
] | null | null | null | Projects/Parameter Estimation and Bayesian Statistics/_2_Exercise_2.py | aleixlopezpascual/aleixlopezpascual.github.io | 89b7449cf7f358d53a2b8f4030b88cbaf8884ef6 | [
"MIT"
] | null | null | null | Projects/Parameter Estimation and Bayesian Statistics/_2_Exercise_2.py | aleixlopezpascual/aleixlopezpascual.github.io | 89b7449cf7f358d53a2b8f4030b88cbaf8884ef6 | [
"MIT"
] | null | null | null | import numpy as np
from scipy import stats, special
import matplotlib.pyplot as plt
from math import sqrt, factorial
exercise = 15
#################################################################
# exercise 2.2
if exercise == 2:
x_axis = np.linspace(0,300, 10000)
plt.plot(x_axis, stats.norm.pdf(... | 34.469649 | 130 | 0.577579 |
4a2612c2df1749b8637876f31226895e87bc86e3 | 1,906 | py | Python | M.py | Hassan0072/CP_HS99 | 365ecd119e19fcf2c69ccaef42b278a1a9256741 | [
"MIT"
] | null | null | null | M.py | Hassan0072/CP_HS99 | 365ecd119e19fcf2c69ccaef42b278a1a9256741 | [
"MIT"
] | 3 | 2019-05-05T16:30:58.000Z | 2019-05-11T00:23:02.000Z | M.py | Hassan0072/CP_HS99 | 365ecd119e19fcf2c69ccaef42b278a1a9256741 | [
"MIT"
] | 1 | 2019-04-21T18:46:01.000Z | 2019-04-21T18:46:01.000Z | # server2.py
import socket
from threading import Thread
from socketserver import ThreadingMixIn
TCP_IP = 'localhost'
TCP_PORT = 9001
BUFFER_SIZE = 1024
class ClientThread(Thread):
def __init__(self,ip,port,sock):
Thread.__init__(self)
self.ip = ip
self.port = port
s... | 24.435897 | 62 | 0.570829 |
4a26132a2e3e7309e9f2a865b8a0fa72267cf888 | 27,428 | py | Python | seleniumbase/fixtures/js_utils.py | hyahiaoui/SeleniumBase | 8c7fc30cadf289731767953f22eeab3c92271760 | [
"MIT"
] | null | null | null | seleniumbase/fixtures/js_utils.py | hyahiaoui/SeleniumBase | 8c7fc30cadf289731767953f22eeab3c92271760 | [
"MIT"
] | null | null | null | seleniumbase/fixtures/js_utils.py | hyahiaoui/SeleniumBase | 8c7fc30cadf289731767953f22eeab3c92271760 | [
"MIT"
] | null | null | null | """
This module contains useful Javascript utility methods for base_case.py
These helper methods SHOULD NOT be called directly from tests.
"""
import re
import requests
import time
from selenium.common.exceptions import WebDriverException
from seleniumbase import config as sb_config
from seleniumbase.common import deco... | 34.500629 | 102 | 0.615575 |
4a26146997532734ab2746ca6f76c97f8535393c | 4,545 | py | Python | api/tests/test_run_kubeseal.py | UiP9AV6Y/kubeseal-webgui | 36f1460ff5bb74497f186d8655db018bf87bfe73 | [
"Apache-2.0"
] | null | null | null | api/tests/test_run_kubeseal.py | UiP9AV6Y/kubeseal-webgui | 36f1460ff5bb74497f186d8655db018bf87bfe73 | [
"Apache-2.0"
] | null | null | null | api/tests/test_run_kubeseal.py | UiP9AV6Y/kubeseal-webgui | 36f1460ff5bb74497f186d8655db018bf87bfe73 | [
"Apache-2.0"
] | null | null | null | import pytest
from app.kubeseal import decode_base64_string, run_kubeseal, valid_k8s_name
@pytest.mark.parametrize(
"value",
[
"abc",
"l" + "o" * 60 + "ng",
"some-1-too-check",
"ends-on-digit-1",
"1starts-with-it",
"some.dots.or_underscore",
"long-" + "... | 31.5625 | 88 | 0.677668 |
4a261475bfd1809707105daaea185010bc5c754e | 782 | py | Python | Weighted_Strings.py | nabiharaza/LeetCode_Practise | eca35722ea671870c4d65a28df7b8d66184c6217 | [
"Apache-2.0"
] | null | null | null | Weighted_Strings.py | nabiharaza/LeetCode_Practise | eca35722ea671870c4d65a28df7b8d66184c6217 | [
"Apache-2.0"
] | null | null | null | Weighted_Strings.py | nabiharaza/LeetCode_Practise | eca35722ea671870c4d65a28df7b8d66184c6217 | [
"Apache-2.0"
] | null | null | null | dict_alphabets = dict()
def smallestString(weight):
ascii_value = 66
final_string = ''
sum = 1
dict_alphabets[1] = sum
for index in range(1, 26):
sum = (index + 1) * sum + sum
dict_alphabets[index + 1] = sum
ascii_value += 1
print(dict_alphabets)
while weight != 0:... | 24.4375 | 74 | 0.626598 |
4a261541c2dc52ce08ff7e3252994195ba9340dc | 986 | py | Python | python3/koans/triangle.py | Dawn0fTime/python-koans-solutions | 76a3d292e541c26313aa50d837ff73e21c10d581 | [
"MIT"
] | null | null | null | python3/koans/triangle.py | Dawn0fTime/python-koans-solutions | 76a3d292e541c26313aa50d837ff73e21c10d581 | [
"MIT"
] | null | null | null | python3/koans/triangle.py | Dawn0fTime/python-koans-solutions | 76a3d292e541c26313aa50d837ff73e21c10d581 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Triangle Project Code.
# Triangle analyzes the lengths of the sides of a triangle
# (represented by a, b and c) and returns the type of triangle.
#
# It returns:
# 'equilateral' if all sides are equal
# 'isosceles' if exactly 2 sides are equal
# 'scalene' ... | 26.648649 | 83 | 0.633874 |
4a261860f5ba1f5e30d2ef1a5af48a102c280f62 | 4,838 | py | Python | docs/conf.py | wuchaochen/ai-flow | 811029f05a6d192f91a738b15d1eba090bfaed4b | [
"Apache-2.0"
] | null | null | null | docs/conf.py | wuchaochen/ai-flow | 811029f05a6d192f91a738b15d1eba090bfaed4b | [
"Apache-2.0"
] | null | null | null | docs/conf.py | wuchaochen/ai-flow | 811029f05a6d192f91a738b15d1eba090bfaed4b | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.837037 | 97 | 0.696982 |
4a2618a51286fd1113255fde9ead50419cbe2d2e | 6,663 | py | Python | vod_converter/voc.py | supernlogn/vod-converter | d39b2357f5742fe347daaddc8584292b4c983a26 | [
"MIT"
] | null | null | null | vod_converter/voc.py | supernlogn/vod-converter | d39b2357f5742fe347daaddc8584292b4c983a26 | [
"MIT"
] | null | null | null | vod_converter/voc.py | supernlogn/vod-converter | d39b2357f5742fe347daaddc8584292b4c983a26 | [
"MIT"
] | 1 | 2018-07-10T08:34:14.000Z | 2018-07-10T08:34:14.000Z | """
Ingestor and egestor for VOC formats.
http://host.robots.ox.ac.uk/pascal/VOC/voc2012/htmldoc/index.html
"""
import os
import shutil
from converter import Ingestor, Egestor
import xml.etree.ElementTree as ET
class VOCIngestor(Ingestor):
def validate(self, root):
path = "{}/VOC2012".format(root)
... | 36.016216 | 115 | 0.535194 |
4a261971638981c03ec8985ddde35748bb14296a | 1,948 | py | Python | app/models/util/join_token.py | bunchiestudios/schedulr | 996ae5c4d51d5df17946f65515adf5fdb2a468ab | [
"Apache-2.0"
] | 2 | 2019-01-20T09:37:40.000Z | 2019-02-03T09:15:50.000Z | app/models/util/join_token.py | bunchiestudios/schedulr | 996ae5c4d51d5df17946f65515adf5fdb2a468ab | [
"Apache-2.0"
] | 19 | 2019-01-10T05:39:13.000Z | 2019-02-06T01:31:45.000Z | app/models/util/join_token.py | bunchiestudios/schedulr | 996ae5c4d51d5df17946f65515adf5fdb2a468ab | [
"Apache-2.0"
] | null | null | null | from typing import Optional
from app import db
from app.models import JoinToken, Team
def team_by_join_token(join_token_str: str) -> Optional[Team]:
"""
Returns the team associated with a given join token.
:param join_token_str: The join token to search over
:return: Returns a Team if the join token ... | 29.969231 | 78 | 0.682238 |
4a261a9f24616625acd1c92dd6b66c82c5c8f064 | 3,610 | py | Python | ultimate_hosts_blacklist/test_launcher/defaults/pyfunceble.py | Ultimate-Hosts-Blacklist/test-launcher | 8b120b3ee844918866d7a15d4015ee3664bfee55 | [
"MIT"
] | 2 | 2021-03-11T08:05:16.000Z | 2021-05-03T09:37:09.000Z | ultimate_hosts_blacklist/test_launcher/defaults/pyfunceble.py | Ultimate-Hosts-Blacklist/test-launcher | 8b120b3ee844918866d7a15d4015ee3664bfee55 | [
"MIT"
] | null | null | null | ultimate_hosts_blacklist/test_launcher/defaults/pyfunceble.py | Ultimate-Hosts-Blacklist/test-launcher | 8b120b3ee844918866d7a15d4015ee3664bfee55 | [
"MIT"
] | 1 | 2021-05-03T09:30:24.000Z | 2021-05-03T09:30:24.000Z | """
The test launcher of the Ultimate-Hosts-Blacklist project.
This is the module that will provides all our pyfunceble related settings or
defaults.
Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
License:
::
MIT License
Copyright (c) 2019, 2020, 2021 Ultimate-Hosts-Blacklist
Copy... | 32.818182 | 87 | 0.638504 |
4a261b2840aa333dea5bb87b531702f9ce7598a2 | 639 | py | Python | languages/python/networking_email1.py | Andilyn/learntosolveit | fd15345c74ef543e4e26f4691bf91cb6dac568a4 | [
"BSD-3-Clause"
] | 136 | 2015-03-06T18:11:21.000Z | 2022-03-10T22:31:40.000Z | languages/python/networking_email1.py | Andilyn/learntosolveit | fd15345c74ef543e4e26f4691bf91cb6dac568a4 | [
"BSD-3-Clause"
] | 27 | 2015-01-07T01:38:03.000Z | 2021-12-22T19:20:15.000Z | languages/python/networking_email1.py | Andilyn/learntosolveit | fd15345c74ef543e4e26f4691bf91cb6dac568a4 | [
"BSD-3-Clause"
] | 1,582 | 2015-01-01T20:37:06.000Z | 2022-03-30T12:29:24.000Z | # Import smtplib for the actual sending function
import smtplib
# Import the email modules we'll need
from email.mime.text import MIMEText
# Open a plain text file for reading. For this example, assume that
# the text file contains only ASCII characters.
fp = open('content.txt', 'rb')
# Create a text/plain message
m... | 25.56 | 68 | 0.716745 |
4a261bb60fd461e3a7fbdf1fb6df238bc12510ab | 785 | py | Python | monitor.py | spring520/fpeg | dac8164d793eb65e41f2a11e425f3f8a9f676864 | [
"RSA-MD"
] | null | null | null | monitor.py | spring520/fpeg | dac8164d793eb65e41f2a11e425f3f8a9f676864 | [
"RSA-MD"
] | null | null | null | monitor.py | spring520/fpeg | dac8164d793eb65e41f2a11e425f3f8a9f676864 | [
"RSA-MD"
] | null | null | null | class Monitor:
"""
Monitor of pipes in a pipeline.
Monitor gathers the data recieved and sended by pipes. When monitor is not waking, do not send data to it.
"""
def __init__(self):
self.data = []
self.logs = []
self.params = []
self.waking = False
def gather(self, name, data, log, param... | 22.428571 | 108 | 0.626752 |
4a261c39361ebbbd674ab448ede0a56e30ca1731 | 2,144 | py | Python | homeassistant/components/lightwave/light.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 4 | 2021-07-11T09:11:00.000Z | 2022-02-27T14:43:50.000Z | homeassistant/components/lightwave/light.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 277 | 2021-10-04T06:39:33.000Z | 2021-12-28T22:04:17.000Z | homeassistant/components/lightwave/light.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 3 | 2022-01-02T18:49:54.000Z | 2022-01-25T02:03:54.000Z | """Support for LightwaveRF lights."""
from __future__ import annotations
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
SUPPORT_BRIGHTNESS,
LightEntity,
)
from homeassistant.const import CONF_NAME
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import ... | 29.369863 | 72 | 0.702425 |
4a261dc0a6703bcb051dddce61e369aad167aa6e | 4,812 | py | Python | neural_field.py | brianjsl/ndf_mnist | 936b6616c5aca2d555cf88c134ff92f3ff57c08b | [
"MIT"
] | 1 | 2022-03-15T04:32:40.000Z | 2022-03-15T04:32:40.000Z | neural_field.py | brianjsl/ndf_mnist | 936b6616c5aca2d555cf88c134ff92f3ff57c08b | [
"MIT"
] | null | null | null | neural_field.py | brianjsl/ndf_mnist | 936b6616c5aca2d555cf88c134ff92f3ff57c08b | [
"MIT"
] | null | null | null | import torch
from dataloader_ndf import OverlapMNISTNDF
import torchvision.transforms
from torch.utils.data import DataLoader
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as transforms
import torch.optim as optim
import time
from tqdm import tqdm
from constants import IMG_DIR
impo... | 32.513514 | 98 | 0.612219 |
4a261e3d6ad5c2780bf7610a256c7bcae8e89e13 | 1,156 | py | Python | scatter_squares.py | CowryGolden/matplotlib-test | 1ecaf7f2bbb3ef77f81958dc4272dd528c20a7f3 | [
"Apache-2.0"
] | null | null | null | scatter_squares.py | CowryGolden/matplotlib-test | 1ecaf7f2bbb3ef77f81958dc4272dd528c20a7f3 | [
"Apache-2.0"
] | null | null | null | scatter_squares.py | CowryGolden/matplotlib-test | 1ecaf7f2bbb3ef77f81958dc4272dd528c20a7f3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
r'''
绘制自然数平方数列的简单散点图
'''
import matplotlib.pyplot as plt
# x_values = [1, 2, 3, 4, 5]
# y_values = [1, 4, 9, 16, 25]
x_values = list(range(1, 1001))
y_values = [x ** 2 for x in x_values]
# plt.scatter(x_values, y_values, s=40) # s表示绘制点的尺寸
# plt.scatter(x_values, y_val... | 39.862069 | 169 | 0.704152 |
4a261ea55672a663569b72325a91eebecbb3429a | 2,594 | py | Python | bloom/ll/models/application.py | A5rocks/bloom | c5426bf1a8070187736fca8fea3a487cafb76bda | [
"Apache-2.0"
] | 7 | 2021-05-01T03:55:54.000Z | 2022-02-02T02:02:16.000Z | bloom/ll/models/application.py | A5rocks/bloom | c5426bf1a8070187736fca8fea3a487cafb76bda | [
"Apache-2.0"
] | 13 | 2021-05-05T01:10:43.000Z | 2021-09-02T00:21:52.000Z | bloom/ll/models/application.py | A5rocks/bloom | c5426bf1a8070187736fca8fea3a487cafb76bda | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import enum
import typing
import attr
from bloom.ll.models.base import UNKNOWN, Snowflake, Unknownish
from bloom.ll.models.teams import Team
# docs in this module are copied from the Discord Documentation
@attr.frozen(kw_only=True)
class Application:
#: the id of the app
... | 37.057143 | 77 | 0.708558 |
4a26205b724fe9926e8bd6eba65649f1bf7c9268 | 381 | py | Python | edd/wsgi.py | TeselaGen/jbei-edd | 92792fb30bbd504143b2f75bf08d05b141a7ef6f | [
"BSD-3-Clause-LBNL"
] | null | null | null | edd/wsgi.py | TeselaGen/jbei-edd | 92792fb30bbd504143b2f75bf08d05b141a7ef6f | [
"BSD-3-Clause-LBNL"
] | null | null | null | edd/wsgi.py | TeselaGen/jbei-edd | 92792fb30bbd504143b2f75bf08d05b141a7ef6f | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
WSGI config for edd project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "edd.settings")
from django.core.wsgi impo... | 25.4 | 78 | 0.784777 |
4a26208847cd2086cb93fe3ed53665f0dece96d8 | 15,760 | py | Python | bokeh/util/compiler.py | kinghows/bokeh | aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7 | [
"BSD-3-Clause"
] | null | null | null | bokeh/util/compiler.py | kinghows/bokeh | aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7 | [
"BSD-3-Clause"
] | null | null | null | bokeh/util/compiler.py | kinghows/bokeh | aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7 | [
"BSD-3-Clause"
] | null | null | null | ''' Provide functions and classes to help with various JS and CSS compilation.
'''
from __future__ import absolute_import
import logging
logger = logging.getLogger(__name__)
import io
import re
import os
import sys
import six
import json
import hashlib
from os.path import dirname, join, abspath, exists, isabs
from s... | 28.602541 | 111 | 0.614467 |
4a2621943873c3202b949b62a414d552f4d74978 | 1,597 | py | Python | reinvent-2019/rhythm-cloud/lambda/Greengrass_startSong/boto3/compat.py | kienpham2000/aws-builders-fair-projects | 6c4075c0945a6318b217355a6fc663e35ffb9dba | [
"Apache-2.0"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | reinvent-2019/rhythm-cloud/lambda/Greengrass_startSong/boto3/compat.py | kienpham2000/aws-builders-fair-projects | 6c4075c0945a6318b217355a6fc663e35ffb9dba | [
"Apache-2.0"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | reinvent-2019/rhythm-cloud/lambda/Greengrass_startSong/boto3/compat.py | kienpham2000/aws-builders-fair-projects | 6c4075c0945a6318b217355a6fc663e35ffb9dba | [
"Apache-2.0"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | # Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 32.591837 | 73 | 0.693175 |
4a2621a1d2b14a1a8061e23944cb15c113b03b36 | 3,949 | py | Python | official/vision/gan/megengine_mimicry/metrics/fid/fid_utils.py | pepperonibo/Models | abc32993529e70cb019ab5ee2f1022ac01ba2398 | [
"Apache-2.0"
] | 294 | 2020-03-23T05:55:04.000Z | 2022-03-31T01:31:17.000Z | official/vision/gan/megengine_mimicry/metrics/fid/fid_utils.py | pepperonibo/Models | abc32993529e70cb019ab5ee2f1022ac01ba2398 | [
"Apache-2.0"
] | 83 | 2020-03-24T12:06:25.000Z | 2021-12-13T10:43:26.000Z | official/vision/gan/megengine_mimicry/metrics/fid/fid_utils.py | pepperonibo/Models | abc32993529e70cb019ab5ee2f1022ac01ba2398 | [
"Apache-2.0"
] | 103 | 2020-03-24T07:31:18.000Z | 2022-03-23T01:46:18.000Z | # Copyright (c) 2020 Kwot Sin Lee
# This code is licensed under MIT license
# (https://github.com/kwotsin/mimicry/blob/master/LICENSE)
# ------------------------------------------------------------------------------
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-202... | 37.609524 | 104 | 0.646493 |
4a262337fd6f86f8f696ba205e79abf77c753d9c | 910 | py | Python | ezerase/source/ataeraser.py | ebangin127/nstools | 2a0bb4e6fd3688afd74afd4c7d69eeb46f096a99 | [
"MIT"
] | 15 | 2016-02-12T14:55:53.000Z | 2021-08-17T09:44:12.000Z | ezerase/source/ataeraser.py | ebangin127/nstools | 2a0bb4e6fd3688afd74afd4c7d69eeb46f096a99 | [
"MIT"
] | 1 | 2020-10-28T12:19:56.000Z | 2020-10-28T12:19:56.000Z | ezerase/source/ataeraser.py | ebangin127/nstools | 2a0bb4e6fd3688afd74afd4c7d69eeb46f096a99 | [
"MIT"
] | 7 | 2016-08-21T23:57:47.000Z | 2022-02-14T03:26:21.000Z | import passwordSetter
import atahdparmeraser
import passwordCleaner
import defroster
import confirmView
import completeView
import eraseType
import freezeType
class ATAEraser:
def erase(self, selected, model, serial):
erasestate = eraseType.EraseType.failed
passwordcleared = False
laststate ... | 37.916667 | 91 | 0.717582 |
4a2623575dd03c724745511d6e0aa64047877828 | 2,039 | py | Python | banner/tests/__init__.py | praekelt/jmbo-banner | f8eed0f28b989a8d5d305e95f6e6661b328cad0b | [
"BSD-3-Clause"
] | null | null | null | banner/tests/__init__.py | praekelt/jmbo-banner | f8eed0f28b989a8d5d305e95f6e6661b328cad0b | [
"BSD-3-Clause"
] | 4 | 2017-10-30T15:00:42.000Z | 2017-11-09T09:11:32.000Z | banner/tests/__init__.py | praekelt/jmbo-banner | f8eed0f28b989a8d5d305e95f6e6661b328cad0b | [
"BSD-3-Clause"
] | null | null | null | # import os
#
# from django.test import TestCase as BaseTestCase
# from django.test.client import Client as BaseClient, RequestFactory
# from django.contrib.auth.models import User
# from django.template import RequestContext, loader
# from django.core.files.base import ContentFile
#
# from banner.models import ImageBa... | 30.893939 | 74 | 0.594899 |
4a26238a530d846f51771f92375edca99471cda4 | 318 | py | Python | birp/__version__.py | evtn/birp | fe54669f296ca99eb8cc5296ab3ec4896ad8cfc0 | [
"MIT"
] | 21 | 2021-10-09T07:30:12.000Z | 2022-01-04T12:15:14.000Z | birp/__version__.py | evtn/birp | fe54669f296ca99eb8cc5296ab3ec4896ad8cfc0 | [
"MIT"
] | 1 | 2021-10-18T10:49:59.000Z | 2021-10-18T10:49:59.000Z | birp/__version__.py | evtn/birp | fe54669f296ca99eb8cc5296ab3ec4896ad8cfc0 | [
"MIT"
] | null | null | null | """
__version__.py
~~~~~~~~~~~~~~
Information about the current version of birp package.
"""
__title__ = "birp"
__description__ = "birp — большой русский питон (BIg Russian Python)"
__version__ = "0.1.8"
__author__ = "evtn"
__author_email__ = "g@evtn.ru"
__license__ = "MIT"
__url__ = "https://github.com/evtn/birp"
| 21.2 | 69 | 0.691824 |
4a2624270e9eae9cd68d80eb4a7df6143d859eae | 342 | py | Python | fluidlab/_version.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | 4 | 2020-01-19T04:12:12.000Z | 2021-11-09T08:30:25.000Z | fluidlab/_version.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | null | null | null | fluidlab/_version.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | null | null | null | """
Module where the version is written.
It is executed in setup.py and imported in fluiddyn/__init__.py.
See:
http://en.wikipedia.org/wiki/Software_versioning
http://legacy.python.org/dev/peps/pep-0386/
'a' or 'alpha' means alpha version (internal testing),
'b' or 'beta' means beta version (external testing).
"""
... | 22.8 | 64 | 0.733918 |
4a26243c1ad4e67759aa8fdd4e35b25d250e8df8 | 668 | py | Python | beautifulsoup.py | Smartproxy/BeautifulSoup | f4a1d91cb3c018a2eb7fa5e40a84d4c36c7b6350 | [
"MIT"
] | 6 | 2019-07-09T15:30:45.000Z | 2020-12-31T18:29:41.000Z | beautifulsoup/beautifulsoup.py | Kiofo/Smartproxy | 29685fa0f09e03597bf6474d3ba3f452f5143ecf | [
"MIT"
] | null | null | null | beautifulsoup/beautifulsoup.py | Kiofo/Smartproxy | 29685fa0f09e03597bf6474d3ba3f452f5143ecf | [
"MIT"
] | 2 | 2020-11-24T17:08:19.000Z | 2021-07-15T09:52:25.000Z | import requests
from bs4 import BeautifulSoup
url = 'https://www.whatismyip.com/'
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'}
proxies = {'https': 'https://gate.smartproxy.com:7000'} # Your desired endpoint within... | 37.111111 | 148 | 0.730539 |
4a2624bfe03df9435e8a1fd87b0f7f0253dc0b47 | 21,390 | py | Python | cir/doc_views.py | xsunfeng/cir | 03790384c160276652fd87b614c719c6363f1802 | [
"MIT"
] | null | null | null | cir/doc_views.py | xsunfeng/cir | 03790384c160276652fd87b614c719c6363f1802 | [
"MIT"
] | null | null | null | cir/doc_views.py | xsunfeng/cir | 03790384c160276652fd87b614c719c6363f1802 | [
"MIT"
] | 1 | 2018-06-23T21:11:53.000Z | 2018-06-23T21:11:53.000Z | import json
from django.template.loader import render_to_string
from django.http import HttpResponse
from django.utils import timezone
from cir.models import *
def api_doc(request):
response = {}
action = request.REQUEST.get('action')
forum = Forum.objects.get(id=request.session['forum_id'])
if actio... | 52.814815 | 178 | 0.60561 |
4a2624eb6f811e1664aa8d54e894814659c3cabf | 819 | py | Python | tests/test_requests.py | libero/search | f13c7fe2aa5f3cd1e2f62234995788bed7147b91 | [
"MIT"
] | null | null | null | tests/test_requests.py | libero/search | f13c7fe2aa5f3cd1e2f62234995788bed7147b91 | [
"MIT"
] | 14 | 2019-01-31T08:34:30.000Z | 2019-11-21T10:06:13.000Z | tests/test_requests.py | libero/search | f13c7fe2aa5f3cd1e2f62234995788bed7147b91 | [
"MIT"
] | 3 | 2019-01-30T10:49:01.000Z | 2019-06-11T14:42:03.000Z | import logging
from search.requests import request_data
def test_request_data_returns_response(requests_mock):
url = 'http://some-url.com'
response_text = 'response received'
requests_mock.get(url, text=response_text)
response = request_data(url)
assert response.status_code == 200
assert res... | 29.25 | 84 | 0.737485 |
4a2628394093227b6adb7e6d3afbed3ad99adbb2 | 1,291 | py | Python | ccontrol/model.py | ThomasLecat/udacity-continuous-control | fa63aef00abc4446c860160ef17ef28c32ec71d8 | [
"MIT"
] | null | null | null | ccontrol/model.py | ThomasLecat/udacity-continuous-control | fa63aef00abc4446c860160ef17ef28c32ec71d8 | [
"MIT"
] | null | null | null | ccontrol/model.py | ThomasLecat/udacity-continuous-control | fa63aef00abc4446c860160ef17ef28c32ec71d8 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class Actor(nn.Module):
"""MultiLayer perceptron. Approximates \argmax_a{Q(s,a)}"""
def __init__(self, state_size, num_actions):
super().__init__()
self.fc1 = nn.Linear(state_size, 128)
self.fc2 = nn.Linear(128, 128)
... | 29.340909 | 63 | 0.60031 |
4a262850658056b2f99c0bd0225c1f7e5593496e | 188 | py | Python | Radius.py | Dhiviani/python-program | 30f1a84ff8888987ecb7fb5e25543305a9f93984 | [
"MIT"
] | null | null | null | Radius.py | Dhiviani/python-program | 30f1a84ff8888987ecb7fb5e25543305a9f93984 | [
"MIT"
] | null | null | null | Radius.py | Dhiviani/python-program | 30f1a84ff8888987ecb7fb5e25543305a9f93984 | [
"MIT"
] | null | null | null | #area of circle
r=1.1
A=3.14*r**2
Print("Area of circle:", A)
#file extension
File=input("enter the file:")
Extension=File.spilt(".")
Print("Extension of file:",repr(Extension[-1]))
| 18.8 | 48 | 0.664894 |
4a262934201bb00c171ab64c91ae79223b4f5314 | 2,210 | py | Python | training/misc.py | hedscan/stylegan2-ada | d6142988f6301cd7089833c4793e83a42ea03682 | [
"BSD-Source-Code"
] | null | null | null | training/misc.py | hedscan/stylegan2-ada | d6142988f6301cd7089833c4793e83a42ea03682 | [
"BSD-Source-Code"
] | null | null | null | training/misc.py | hedscan/stylegan2-ada | d6142988f6301cd7089833c4793e83a42ea03682 | [
"BSD-Source-Code"
] | null | null | null | import glob
import os
import re
from pathlib import Path
def get_parent_dir(run_dir):
out_dir = Path(run_dir).parent
return out_dir
def locate_latest_pkl(out_dir):
all_pickle_names = sorted(glob.glob(os.path.join(out_dir, '0*', 'network-*.pkl')))
try:
latest_pickle_name = all_pickle_names[-... | 32.985075 | 86 | 0.659729 |
4a26295bf7ff3eae5912aa9b90e5266f6ad03d39 | 805 | py | Python | core/showlist.py | plonibarploni/DarkSpiritz | f4c63db82e0785dc7f4594dca44891a1bd359d4e | [
"MIT"
] | null | null | null | core/showlist.py | plonibarploni/DarkSpiritz | f4c63db82e0785dc7f4594dca44891a1bd359d4e | [
"MIT"
] | null | null | null | core/showlist.py | plonibarploni/DarkSpiritz | f4c63db82e0785dc7f4594dca44891a1bd359d4e | [
"MIT"
] | 1 | 2019-02-01T14:37:05.000Z | 2019-02-01T14:37:05.000Z | # -*- coding: utf-8 -*-
import glob
def showlist():
print("""
Categories:
===========
""")
for d in glob.iglob('*'):
if "LICENSE" not in d:
if "README.md" not in d:
if "config" not in d:
if "core" not in d:
... | 38.333333 | 85 | 0.295652 |
4a262976f54eb54dbe27c6170cc784a8ab0beb9b | 91,097 | py | Python | tests/test_50_server.py | geops/pysaml2 | b2335fc07d6feeaa9a05fd6f9c84f5137a48b040 | [
"Apache-2.0"
] | null | null | null | tests/test_50_server.py | geops/pysaml2 | b2335fc07d6feeaa9a05fd6f9c84f5137a48b040 | [
"Apache-2.0"
] | null | null | null | tests/test_50_server.py | geops/pysaml2 | b2335fc07d6feeaa9a05fd6f9c84f5137a48b040 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
import copy
import os
from contextlib import closing
from six.moves.urllib.parse import parse_qs
import uuid
from saml2.cert import OpenSSLWrapper
from saml2.sigver import make_temp, DecryptError, EncryptError, CertificateError
from saml2.assertion import Pol... | 39.03042 | 120 | 0.581446 |
4a2629daf63d7e67302e15bfa60687ea669c14f6 | 23,223 | py | Python | pandas/core/reshape/concat.py | mavismonica/pandas | dbdc55c9d59f25589d58cc60247af193f06c3c66 | [
"BSD-3-Clause"
] | 2 | 2021-06-11T12:31:28.000Z | 2021-08-17T10:56:52.000Z | pandas/core/reshape/concat.py | mavismonica/pandas | dbdc55c9d59f25589d58cc60247af193f06c3c66 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/reshape/concat.py | mavismonica/pandas | dbdc55c9d59f25589d58cc60247af193f06c3c66 | [
"BSD-3-Clause"
] | null | null | null | """
Concat routines.
"""
from collections import abc
from typing import (
TYPE_CHECKING,
Iterable,
List,
Mapping,
Optional,
Type,
Union,
cast,
overload,
)
import numpy as np
from pandas._typing import FrameOrSeriesUnion, Label
from pandas.core.dtypes.concat import concat_compat
f... | 32.031724 | 88 | 0.552986 |
4a262a1267035c54c1a0f9b5b44bb0a4c5750b4a | 1,798 | py | Python | observations/r/freeny.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 199 | 2017-07-24T01:34:27.000Z | 2022-01-29T00:50:55.000Z | observations/r/freeny.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 46 | 2017-09-05T19:27:20.000Z | 2019-01-07T09:47:26.000Z | observations/r/freeny.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 45 | 2017-07-26T00:10:44.000Z | 2022-03-16T20:44:59.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def freeny(path):
"""Freeny's Revenue Data
Freeny's data on quarterly ... | 29.47541 | 71 | 0.697998 |
4a262ca81c1827af6bd559bab4224b9a268018ae | 2,967 | py | Python | flakeheaven/_patched/_style_guide.py | snmishra/flakeheaven | 20f94457744c47d965d4520d3b22def538b0cc49 | [
"MIT"
] | 24 | 2022-01-06T14:20:37.000Z | 2022-03-31T14:47:38.000Z | flakeheaven/_patched/_style_guide.py | snmishra/flakeheaven | 20f94457744c47d965d4520d3b22def538b0cc49 | [
"MIT"
] | 47 | 2022-01-04T09:19:34.000Z | 2022-03-30T12:53:01.000Z | flakeheaven/_patched/_style_guide.py | snmishra/flakeheaven | 20f94457744c47d965d4520d3b22def538b0cc49 | [
"MIT"
] | 5 | 2022-01-05T03:32:59.000Z | 2022-02-05T14:47:58.000Z | # built-in
from functools import lru_cache
# external
from flake8.style_guide import StyleGuide, StyleGuideManager
# app
from ._violation import FlakeHeavenViolation
class FlakeHeavenStyleGuideManager(StyleGuideManager):
def __init__(self, options, formatter, decider=None):
"""Initialize our StyleGuide.... | 30.587629 | 82 | 0.607347 |
4a262cbb6180f533ce24e26ffe9f59c70a598423 | 2,347 | py | Python | configs/r3det/datasets/dotav1_rotational_detection.py | cameronchoi/r3det-docker | 30af0b845b2baa4dcb7dccdc4ccd3238fd72bf75 | [
"Apache-2.0"
] | 176 | 2020-06-18T12:35:30.000Z | 2022-03-28T02:20:57.000Z | configs/r3det/datasets/dotav1_rotational_detection.py | cameronchoi/r3det-docker | 30af0b845b2baa4dcb7dccdc4ccd3238fd72bf75 | [
"Apache-2.0"
] | 35 | 2020-06-28T07:03:24.000Z | 2022-01-09T01:20:46.000Z | configs/r3det/datasets/dotav1_rotational_detection.py | cameronchoi/r3det-docker | 30af0b845b2baa4dcb7dccdc4ccd3238fd72bf75 | [
"Apache-2.0"
] | 44 | 2020-06-20T07:51:01.000Z | 2022-02-10T01:17:54.000Z | # dataset settings
dataset_type = 'DOTADatasetV1'
# dataset root path:
data_root = '/data/dota/'
trainsplit_ann_folder = 'trainsplit/labelTxt'
trainsplit_img_folder = 'trainsplit/images'
valsplit_ann_folder = 'valsplit/labelTxt'
valsplit_img_folder = 'valsplit/images'
val_ann_folder = 'val/labelTxt'
val_img_folder = 'v... | 30.881579 | 85 | 0.618662 |
4a262ce2753411137ab683833823302d6ff655fb | 2,523 | py | Python | utils/estimate_pose.py | chingchichuang/PRNet | 4b7125bcf465d178093bc5e1ce3e4926c72c3016 | [
"MIT"
] | null | null | null | utils/estimate_pose.py | chingchichuang/PRNet | 4b7125bcf465d178093bc5e1ce3e4926c72c3016 | [
"MIT"
] | null | null | null | utils/estimate_pose.py | chingchichuang/PRNet | 4b7125bcf465d178093bc5e1ce3e4926c72c3016 | [
"MIT"
] | null | null | null | import numpy as np
from math import cos, sin, atan2, asin
def isRotationMatrix(R):
''' checks if a matrix is a valid rotation matrix(whether orthogonal or not)
'''
Rt = np.transpose(R)
shouldBeIdentity = np.dot(Rt, R)
I = np.identity(3, dtype = R.dtype)
n = np.linalg.norm(I - shouldBeIdentity)... | 26.28125 | 114 | 0.561237 |
4a262d31341c8d1909219928f4cc6482ba541cc5 | 16,436 | py | Python | scripts/Crawlers/OSFCrawler.py | mathdugre/conp-dataset | f117b9a2f8191d654de6d3aad57e6c352a6e881e | [
"MIT"
] | null | null | null | scripts/Crawlers/OSFCrawler.py | mathdugre/conp-dataset | f117b9a2f8191d654de6d3aad57e6c352a6e881e | [
"MIT"
] | null | null | null | scripts/Crawlers/OSFCrawler.py | mathdugre/conp-dataset | f117b9a2f8191d654de6d3aad57e6c352a6e881e | [
"MIT"
] | null | null | null | from scripts.Crawlers.BaseCrawler import BaseCrawler
from git import Repo
import os
import json
import requests
import humanize
import datetime
def _create_osf_tracker(path, dataset):
with open(path, "w") as f:
data = {
"version": dataset["version"],
"title": dataset["title"]
... | 42.360825 | 119 | 0.532733 |
4a262e1a8c2381db1bc99c05e9d64a1d0feecca5 | 1,173 | py | Python | src/adaf/python_scripts/plotLumBXB.py | eduardomgutierrez/RIAF_radproc | 0e4166f04cce27fed2cbd2c7078023c10e0e8d12 | [
"MIT"
] | 1 | 2021-08-30T06:56:03.000Z | 2021-08-30T06:56:03.000Z | src/adaf/python_scripts/plotLumBXB.py | eduardomgutierrez/RIAF_radproc | 0e4166f04cce27fed2cbd2c7078023c10e0e8d12 | [
"MIT"
] | null | null | null | src/adaf/python_scripts/plotLumBXB.py | eduardomgutierrez/RIAF_radproc | 0e4166f04cce27fed2cbd2c7078023c10e0e8d12 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from matplotlib import rc # TO MANAGE MATPLOTLIB PARAMETERS"
rc('font',family='serif')
rc('text',usetex = True)
import scipy.optimize as optimization
nu,eV,Sy,Br,IC,pp,CD,Refl,Tot = np.loadtxt('lum.txt',unpack=True)
NT_logeV,NT_logSye,NT_log... | 30.868421 | 81 | 0.728048 |
4a262edbdb74da0df79148885dbd9a1b0dbc2699 | 4,806 | py | Python | tools/infer_submission_simple.py | swkpku/Detectron | cf27871b2d092fad2afee47c44a622b4bb974cd0 | [
"Apache-2.0"
] | null | null | null | tools/infer_submission_simple.py | swkpku/Detectron | cf27871b2d092fad2afee47c44a622b4bb974cd0 | [
"Apache-2.0"
] | null | null | null | tools/infer_submission_simple.py | swkpku/Detectron | cf27871b2d092fad2afee47c44a622b4bb974cd0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2017-present, Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 31.006452 | 99 | 0.643987 |
4a262f2d7926b61c2d456712cf39637c9d5d9116 | 4,344 | py | Python | solidity/python/MongoTestSale.py | dabdevelop/bancorprotocol-contracts | 53894df7f4c31828188b11c9a974da6413579799 | [
"Apache-2.0"
] | null | null | null | solidity/python/MongoTestSale.py | dabdevelop/bancorprotocol-contracts | 53894df7f4c31828188b11c9a974da6413579799 | [
"Apache-2.0"
] | null | null | null | solidity/python/MongoTestSale.py | dabdevelop/bancorprotocol-contracts | 53894df7f4c31828188b11c9a974da6413579799 | [
"Apache-2.0"
] | null | null | null | import sys
import math
import pymongo
import FormulaSolidityPort
import FormulaNativePython
USERNAME = ''
PASSWORD = ''
SERVER_NAME = '127.0.0.1:27017'
DATABASE_NAME = 'test'
MINIMUM_VALUE_SUPPLY = 100
MAXIMUM_VALUE_SUPPLY = 10**34
GROWTH_FACTOR_SUPPLY = 1.5
MINIMUM_VALUE_RESERVE = 100
MAXIMUM_VALU... | 40.598131 | 179 | 0.596685 |
4a26307cfa315312eee48378039c786116a11ba0 | 10,235 | py | Python | pacu/models/awsapi/codestar-notifications.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | 1 | 2022-03-09T14:51:54.000Z | 2022-03-09T14:51:54.000Z | pacu/models/awsapi/codestar-notifications.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | pacu/models/awsapi/codestar-notifications.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | # generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2021-12-31T02:46:40+00:00
from __future__ import annotations
from datetime import datetime
from enum import Enum
from typing import Annotated, Any, List, Optional
from pydantic import BaseModel, Extra, Field, SecretStr
class EventTypeId(B... | 23.582949 | 351 | 0.740303 |
4a2630ae576f412f14ba699d698800f2224c3489 | 1,460 | py | Python | pset8/hello/request.py | mar1zzo/cs50-havard-edx | d20bf4dbe45c2633f70704f0dbed7904a2b22841 | [
"MIT"
] | 1 | 2021-01-12T02:54:01.000Z | 2021-01-12T02:54:01.000Z | pset8/hello/request.py | mar1zzo/cs50-havard-edx | d20bf4dbe45c2633f70704f0dbed7904a2b22841 | [
"MIT"
] | null | null | null | pset8/hello/request.py | mar1zzo/cs50-havard-edx | d20bf4dbe45c2633f70704f0dbed7904a2b22841 | [
"MIT"
] | null | null | null | # programa para criar uma pagina web com flask
import random
from flask import Flask, render_template, request
# criando a variavel que vai instanciar a biblioteca flask
app = Flask(__name__)
# criando nossa primeira rota padrao
@app.route("/")
# criando uma funcao qq que retorna uma mensagem de texto na tela
def ind... | 20.857143 | 65 | 0.528082 |
4a2630dbbfd26626d96d040b4e85d162afa93ac2 | 11,512 | py | Python | apis/voca.py | sighill/shade_app | 2b42d6411bc6e292b112a5e6be3598de8edadee1 | [
"MIT"
] | null | null | null | apis/voca.py | sighill/shade_app | 2b42d6411bc6e292b112a5e6be3598de8edadee1 | [
"MIT"
] | null | null | null | apis/voca.py | sighill/shade_app | 2b42d6411bc6e292b112a5e6be3598de8edadee1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# voca.py
# Python 3.4.3
# Django 1.9
# Script rassemblant des fonctions python3 pour modifier les fichiers
# des dossiers ###_raw
#####################################################################
# README !
# Les fonctions suivantes sont là pour être appelées au sein d'un
# s... | 39.560137 | 138 | 0.564541 |
4a2631bb56bcc0e982f037bdd17f161ee9a918f4 | 5,436 | py | Python | coffelli/dashboard/utils.py | coffeestudio/django-coffelli | cd0e6fbcfc169d8335351072c5816fb1d1639429 | [
"BSD-3-Clause"
] | null | null | null | coffelli/dashboard/utils.py | coffeestudio/django-coffelli | cd0e6fbcfc169d8335351072c5816fb1d1639429 | [
"BSD-3-Clause"
] | null | null | null | coffelli/dashboard/utils.py | coffeestudio/django-coffelli | cd0e6fbcfc169d8335351072c5816fb1d1639429 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""
Admin ui common utilities.
"""
# PYTHON IMPORTS
from __future__ import unicode_literals
from fnmatch import fnmatch
from importlib import import_module
# DJANGO IMPORTS
from django.conf import settings
from django.contrib import admin
from django.core.urlresolvers import reverse
def _get_dashbo... | 32.746988 | 97 | 0.611111 |
4a2633ab6e0338e6ed92ec16f91938e7851f53a3 | 644 | py | Python | gemlib/mcmc/__init__.py | ThomFNC/covid19uk | ca7e700259b23e4f909b4206d1c160803b5cc0a0 | [
"MIT"
] | null | null | null | gemlib/mcmc/__init__.py | ThomFNC/covid19uk | ca7e700259b23e4f909b4206d1c160803b5cc0a0 | [
"MIT"
] | null | null | null | gemlib/mcmc/__init__.py | ThomFNC/covid19uk | ca7e700259b23e4f909b4206d1c160803b5cc0a0 | [
"MIT"
] | null | null | null | """MCMC kernel addons"""
from gemlib.mcmc.adaptive_random_walk_metropolis import (
AdaptiveRandomWalkMetropolis,
)
from gemlib.mcmc.event_time_mh import (
UncalibratedEventTimesUpdate,
TransitionTopology,
)
from gemlib.mcmc.gibbs_kernel import GibbsKernel
from gemlib.mcmc.multi_scan_kernel import MultiScan... | 26.833333 | 65 | 0.791925 |
4a2634db250a238aeb5f072c2b697dfee398fd98 | 1,329 | py | Python | app/modules/users/controller.py | awesomedeba10/ocr-automation-api | 23e1773de7db74cae323c948d2050815d51e8724 | [
"BSD-2-Clause"
] | null | null | null | app/modules/users/controller.py | awesomedeba10/ocr-automation-api | 23e1773de7db74cae323c948d2050815d51e8724 | [
"BSD-2-Clause"
] | null | null | null | app/modules/users/controller.py | awesomedeba10/ocr-automation-api | 23e1773de7db74cae323c948d2050815d51e8724 | [
"BSD-2-Clause"
] | null | null | null | from re import template
from flask import Blueprint, json, request
import os
from app import app
from app.helper import *
from app.middleware import login_required, param_required
from app.modules.users.schema import *
user_blueprint = Blueprint('user_blueprint', __name__)
@user_blueprint.route('/create', methods=['... | 31.642857 | 114 | 0.650865 |
4a2635d4f40d98d1427e86851b92975e57801958 | 792 | py | Python | tests/integration/framework/lwm2m_test.py | cerkiewny/Anjay | b38ac519225cb27369c9a411f3f96899075c1216 | [
"Apache-2.0"
] | 161 | 2017-02-08T12:07:22.000Z | 2022-03-20T11:10:10.000Z | tests/integration/framework/lwm2m_test.py | cerkiewny/Anjay | b38ac519225cb27369c9a411f3f96899075c1216 | [
"Apache-2.0"
] | 53 | 2017-03-15T12:58:40.000Z | 2022-01-20T09:31:54.000Z | tests/integration/framework/lwm2m_test.py | cerkiewny/Anjay | b38ac519225cb27369c9a411f3f96899075c1216 | [
"Apache-2.0"
] | 68 | 2017-02-21T15:02:02.000Z | 2022-03-19T06:24:21.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2017-2021 AVSystem <avsystem@avsystem.com>
#
# 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 ... | 33 | 74 | 0.756313 |
4a26360940cdee6d81cd4845c33b1291169f4f13 | 882 | py | Python | docs/en/conf.py | guanglinchen/esp-moonlight | 285df0c5edbda9e7cbbcd6fc6b6185974887b797 | [
"Apache-2.0"
] | 2 | 2021-03-31T22:14:11.000Z | 2021-12-03T03:40:34.000Z | docs/en/conf.py | guanglinchen/esp-moonlight | 285df0c5edbda9e7cbbcd6fc6b6185974887b797 | [
"Apache-2.0"
] | null | null | null | docs/en/conf.py | guanglinchen/esp-moonlight | 285df0c5edbda9e7cbbcd6fc6b6185974887b797 | [
"Apache-2.0"
] | 2 | 2021-04-06T01:59:39.000Z | 2021-12-11T13:26:53.000Z | # -*- coding: utf-8 -*-
#
# English Language RTD & Sphinx config file
#
# Uses ../conf_common.py for most non-language-specific settings.
# Importing conf_common adds all the non-language-specific
# parts to this conf module
import sys, os
sys.path.insert(0, os.path.abspath('../'))
from conf_common import *
# General... | 31.5 | 74 | 0.730159 |
4a2637d006c0ea50e9840efd717ab9a632a11306 | 947 | py | Python | package/cloudshell/cp/azure/common/parsers/security_group_parser.py | yaroslavNqualisystems/Azure-Shell | 51e376fa60b8276570cc7763b1b1be70655e0b4d | [
"Apache-2.0"
] | 5 | 2016-09-08T08:33:47.000Z | 2020-02-10T12:31:15.000Z | package/cloudshell/cp/azure/common/parsers/security_group_parser.py | yaroslavNqualisystems/Azure-Shell | 51e376fa60b8276570cc7763b1b1be70655e0b4d | [
"Apache-2.0"
] | 505 | 2016-08-09T07:41:03.000Z | 2021-02-08T20:26:46.000Z | package/cloudshell/cp/azure/common/parsers/security_group_parser.py | yaroslavNqualisystems/Azure-Shell | 51e376fa60b8276570cc7763b1b1be70655e0b4d | [
"Apache-2.0"
] | 5 | 2016-12-21T12:52:55.000Z | 2021-07-08T09:50:42.000Z | from cloudshell.cp.azure.common.parsers.port_group_attribute_parser import PortGroupAttributeParser
from cloudshell.cp.azure.models.app_security_groups_model import SecurityGroupConfiguration
class SecurityGroupParser(object):
def __init__(self):
pass
@staticmethod
def parse_security_group_config... | 33.821429 | 108 | 0.704329 |
4a26381c58fbbdf536b5b4e3e172091b13c984d1 | 2,602 | py | Python | main_lqr.py | longwang-jhu/Complex-Step-SPSA | 0db187d0add89c64c3ca11d8cfd1ee372b82538b | [
"MIT"
] | 1 | 2021-10-15T08:09:33.000Z | 2021-10-15T08:09:33.000Z | main_lqr.py | longwang-jhu/Complex-Step-SPSA | 0db187d0add89c64c3ca11d8cfd1ee372b82538b | [
"MIT"
] | null | null | null | main_lqr.py | longwang-jhu/Complex-Step-SPSA | 0db187d0add89c64c3ca11d8cfd1ee372b82538b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Last updated: 2021-03-14
@author: Long Wang
"""
from datetime import date
import numpy as np
import matplotlib.pyplot as plt
from utility import norm_error
# import algorithms
from algorithms.spsa import SPSA
from algorithms.cs_spsa import CsSPSA
# import objective
f... | 29.235955 | 92 | 0.688701 |
4a263948777fca6c046fd297740329bc5081ddef | 12,841 | py | Python | flow/networks/bottleneck.py | cuijiaxun/MITC | a226308424237a69b5e938baf72949de9b1b4bf2 | [
"MIT"
] | 1 | 2021-06-17T03:25:13.000Z | 2021-06-17T03:25:13.000Z | flow/networks/bottleneck.py | cuijiaxun/MITC | a226308424237a69b5e938baf72949de9b1b4bf2 | [
"MIT"
] | null | null | null | flow/networks/bottleneck.py | cuijiaxun/MITC | a226308424237a69b5e938baf72949de9b1b4bf2 | [
"MIT"
] | 1 | 2021-03-18T16:20:57.000Z | 2021-03-18T16:20:57.000Z | """Contains the bottleneck network class."""
from flow.core.params import InitialConfig
from flow.core.params import TrafficLightParams
from flow.networks.base import Network
import numpy as np
ADDITIONAL_NET_PARAMS = {
# the factor multiplying number of lanes.
"scaling": 1,
# edge speed limit
'speed_... | 28.221978 | 79 | 0.410015 |
4a263b70239d3c463f832998ceef11c478c71da4 | 1,776 | py | Python | samples/python/13.core-bot/envs/chat_bot_02/Lib/site-packages/adal/__init__.py | luzeunice/BotBuilder-Samples | b62be4e8863125a567902b736b7b74313d9d4f28 | [
"MIT"
] | 1 | 2021-10-16T19:33:56.000Z | 2021-10-16T19:33:56.000Z | samples/python/13.core-bot/envs/chat_bot_02/Lib/site-packages/adal/__init__.py | luzeunice/BotBuilder-Samples | b62be4e8863125a567902b736b7b74313d9d4f28 | [
"MIT"
] | 1 | 2021-04-30T20:41:19.000Z | 2021-04-30T20:41:19.000Z | venv/lib/python2.7/site-packages/adal/__init__.py | 784134748/kubernetes-install | 5df59632c2619632e422948b667fb68eab9ff5be | [
"MIT"
] | 1 | 2019-07-25T15:09:05.000Z | 2019-07-25T15:09:05.000Z | #------------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation.
# All rights reserved.
#
# This code is licensed under the MIT License.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated document... | 39.466667 | 80 | 0.696509 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.