hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0b519d2443bbd7f033d131ee60b0e78ef279c2a7 | 256 | py | Python | xai_court/predictors/__init__.py | michaeljneely/court-of-xai | 37eded49f46b3a05ad56986c1a9bb22eee3ac4b1 | [
"MIT"
] | 4 | 2021-05-07T09:40:11.000Z | 2022-03-27T18:19:07.000Z | xai_court/predictors/__init__.py | michaeljneely/court-of-xai | 37eded49f46b3a05ad56986c1a9bb22eee3ac4b1 | [
"MIT"
] | 1 | 2021-05-10T09:31:05.000Z | 2021-05-10T09:31:05.000Z | xai_court/predictors/__init__.py | michaeljneely/court-of-xai | 37eded49f46b3a05ad56986c1a9bb22eee3ac4b1 | [
"MIT"
] | 1 | 2021-06-06T18:45:39.000Z | 2021-06-06T18:45:39.000Z | from xai_court.predictors.jain_wallace_attention_binary_predictor import JWAEDPredictor
from xai_court.predictors.pair_sequence_predictor import PairSequencePredictor
from xai_court.predictors.distilbert import DistilBertForSequenceClassificationPredictor
| 64 | 88 | 0.929688 |
1a78d1534df6395ff59a78ecfb0bb7893186b878 | 812 | py | Python | Chapter 10/10-10.py | Nolazco1/pythonProjects | 33938487cb2e4771ea4ff6716703868844d04e52 | [
"MIT"
] | null | null | null | Chapter 10/10-10.py | Nolazco1/pythonProjects | 33938487cb2e4771ea4ff6716703868844d04e52 | [
"MIT"
] | null | null | null | Chapter 10/10-10.py | Nolazco1/pythonProjects | 33938487cb2e4771ea4ff6716703868844d04e52 | [
"MIT"
] | null | null | null | # This program demonstrates the BankAccount class
# with the __str__ method added to it.
import bankaccount2
def main():
# Get the starting balance
start_bal = float(input('Enter your starting balance: '))
# Create a BankAccount object.
savings = bankaccount2.BankAccount(start_bal)
#... | 26.193548 | 65 | 0.665025 |
b021152f418288ce3ab759061bf8de35007abc4a | 305 | py | Python | ROT13/app.py | davwheat/btec-python-challenges | 4cd0aee6ff67e50518f61f29b982cb182cafed36 | [
"MIT"
] | null | null | null | ROT13/app.py | davwheat/btec-python-challenges | 4cd0aee6ff67e50518f61f29b982cb182cafed36 | [
"MIT"
] | null | null | null | ROT13/app.py | davwheat/btec-python-challenges | 4cd0aee6ff67e50518f61f29b982cb182cafed36 | [
"MIT"
] | null | null | null | import codecs
option = input("Press 1 to decode or 2 to encode by ROT13.")
if option == "1":
text = input("Enter text to encode with ROT13: ")
print(codecs.encode(text, "rot_13"))
elif option == "2":
text = input("Enter text to decode from ROT13: ")
print(codecs.decode(text, "rot_13"))
| 27.727273 | 60 | 0.652459 |
6abbf26584b8ca594f2d572054148ee3bf94e340 | 2,880 | py | Python | tests/test_RC3.py | lukasgehrke/paraheat | 551caf98fd760bebb5ca8af4a51c9acdf58da914 | [
"BSD-2-Clause"
] | null | null | null | tests/test_RC3.py | lukasgehrke/paraheat | 551caf98fd760bebb5ca8af4a51c9acdf58da914 | [
"BSD-2-Clause"
] | null | null | null | tests/test_RC3.py | lukasgehrke/paraheat | 551caf98fd760bebb5ca8af4a51c9acdf58da914 | [
"BSD-2-Clause"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
# import class
from heat.first_level import OLS, GLM
from heat.multcomp import MCC_MNE
import heat.modeling as modeling
import heat.plot as ph
df = pd.read_csv('/Users/lukasgehrke/Documents/temp/chatham/LG_data_crd... | 30.638298 | 120 | 0.668403 |
1c6acd002f238e9b623b88ca091a1153c3efc81d | 51 | py | Python | CrashingComputers/CrashingWindows.py | l1n3rd4/PyHackingScripts | 76e6901085f4b8043c82f011f78ffff575fcff85 | [
"MIT"
] | null | null | null | CrashingComputers/CrashingWindows.py | l1n3rd4/PyHackingScripts | 76e6901085f4b8043c82f011f78ffff575fcff85 | [
"MIT"
] | null | null | null | CrashingComputers/CrashingWindows.py | l1n3rd4/PyHackingScripts | 76e6901085f4b8043c82f011f78ffff575fcff85 | [
"MIT"
] | null | null | null | import os
while True:
os.startfile("cmd.exe") | 12.75 | 27 | 0.666667 |
12ef0e1d6f59094ce9ef0d2b11bf2dde96c23e1b | 4,086 | py | Python | screen.py | chrisb2/air-quality | 9dd0c7b836467b3a262d7e09ae86d4bce6ac8e00 | [
"MIT"
] | 17 | 2018-07-24T17:41:58.000Z | 2021-06-23T12:02:21.000Z | screen.py | chrisb2/air-quality | 9dd0c7b836467b3a262d7e09ae86d4bce6ac8e00 | [
"MIT"
] | null | null | null | screen.py | chrisb2/air-quality | 9dd0c7b836467b3a262d7e09ae86d4bce6ac8e00 | [
"MIT"
] | 3 | 2018-07-24T17:41:59.000Z | 2019-09-19T19:17:31.000Z | """Air quality monitor screen."""
import epaper2in9
from machine import SPI
from display_buffer import Buffer
class Screen:
"""Air quality monitor screen."""
# Text size scales
_TINY_TEXT = 0.3
_SMALL_TEXT = 0.6
_LARGE_TEXT = 1.5
# Screen
_HALF_WIDTH = int(epaper2in9.EPD_WIDTH / 2)
_H... | 37.145455 | 79 | 0.603524 |
ce8cc4fa95ec00c6d2dc2c9f694ac8b6161c4bc4 | 1,727 | py | Python | agent/tests/test_kraken_pylint.py | kinsanras/kraken | 3938ee4e65ba8f67ec5ee0e912b43fad84548f2c | [
"Apache-2.0"
] | 1 | 2021-08-15T19:46:44.000Z | 2021-08-15T19:46:44.000Z | agent/tests/test_kraken_pylint.py | kinsanras/kraken | 3938ee4e65ba8f67ec5ee0e912b43fad84548f2c | [
"Apache-2.0"
] | null | null | null | agent/tests/test_kraken_pylint.py | kinsanras/kraken | 3938ee4e65ba8f67ec5ee0e912b43fad84548f2c | [
"Apache-2.0"
] | null | null | null | import json
from unittest.mock import patch
import pytest
from kraken.agent import kraken_pylint
@pytest.mark.parametrize("git_url", [
'git@github.com:Kraken-CI/kraken.git',
'https://github.com/Kraken-CI/kraken.git',
'https://github.com/Kraken-CI/kraken'
])
def test__get_git_url(git_url):
values = [... | 30.298246 | 122 | 0.563405 |
ce122e2d9e5e8d1a07be63a05a5a5726ac847d1f | 686 | py | Python | app/core/migrations/0003_ingredient.py | DamienPond001/recipe-app-api | 586aa3c37175ef6628da4971120880d2c3c2bae2 | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | DamienPond001/recipe-app-api | 586aa3c37175ef6628da4971120880d2c3c2bae2 | [
"MIT"
] | 2 | 2020-08-31T09:25:54.000Z | 2020-08-31T10:30:17.000Z | app/core/migrations/0003_ingredient.py | DamienPond001/recipe-app-api | 586aa3c37175ef6628da4971120880d2c3c2bae2 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-08-06 06:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0002_tag'),
]
operations = [
migrations.CreateModel(
... | 28.583333 | 118 | 0.618076 |
e6d005aa9ed6c53477fd7c9e85454e2af36373f2 | 14,779 | py | Python | boadata/data/field_types.py | janpipek/boadata | 3da00de9e014b764d40040c0db89aaaebc87fa18 | [
"MIT"
] | 2 | 2016-04-22T06:27:04.000Z | 2017-12-04T18:50:28.000Z | boadata/data/field_types.py | janpipek/boadata | 3da00de9e014b764d40040c0db89aaaebc87fa18 | [
"MIT"
] | 18 | 2015-03-19T10:24:04.000Z | 2017-02-22T17:12:21.000Z | boadata/data/field_types.py | janpipek/boadata | 3da00de9e014b764d40040c0db89aaaebc87fa18 | [
"MIT"
] | null | null | null | import os
from collections import OrderedDict
import numpy as np
import pandas as pd
import xarray as xr
from boadata.core import DataObject
from boadata.core.data_conversion import (
ChainConversion,
DataConversion,
IdentityConversion,
MethodConversion,
)
from .pandas_types import PandasDataFrameBas... | 33.512472 | 128 | 0.575276 |
f29cd2ef3386954a633296ce4affebd36b6b9663 | 1,046 | py | Python | Hacker_Rank/Lists.py | Jai-kishan/Practice-Questions | cf3a3eb5c2e930fcfcb762d822430060bb5deb2d | [
"Apache-2.0"
] | 1 | 2019-05-04T09:21:00.000Z | 2019-05-04T09:21:00.000Z | Hacker_Rank/Lists.py | Jai-kishan/Practice-Questions | cf3a3eb5c2e930fcfcb762d822430060bb5deb2d | [
"Apache-2.0"
] | null | null | null | Hacker_Rank/Lists.py | Jai-kishan/Practice-Questions | cf3a3eb5c2e930fcfcb762d822430060bb5deb2d | [
"Apache-2.0"
] | null | null | null | if __name__ == '__main__':
N = int(input())
user=[]
if N ==12:
user.insert(0,5)
user.insert(1,10)
user.insert(0,6)
print(user)
user.remove(6)
user.append(9)
user.append(1)
user.sort()
print(user)
user.pop()
user.reverse(... | 21.791667 | 26 | 0.471319 |
7a68ba4fee3a105ade481618389fcac7e484f3ba | 149 | py | Python | make_mozilla/events/model_forms.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 4 | 2015-05-08T16:58:53.000Z | 2019-09-06T05:30:59.000Z | make_mozilla/events/model_forms.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 2 | 2019-02-17T17:44:53.000Z | 2019-03-28T03:54:39.000Z | make_mozilla/events/model_forms.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 7 | 2015-05-21T15:38:29.000Z | 2019-10-28T23:39:06.000Z | from django.forms import ModelForm
from make_mozilla.events import models
class VenueForm(ModelForm):
class Meta:
model = models.Venue
| 18.625 | 38 | 0.751678 |
423a75d08dd46acb8470ba8d2d006b73dfbd7856 | 5,769 | py | Python | gramex/handlers/openapihandler.py | MSanKeys963/gramex | 8ac5fd6e79d100982fdc9e9308d9a6250ce021e2 | [
"MIT"
] | null | null | null | gramex/handlers/openapihandler.py | MSanKeys963/gramex | 8ac5fd6e79d100982fdc9e9308d9a6250ce021e2 | [
"MIT"
] | null | null | null | gramex/handlers/openapihandler.py | MSanKeys963/gramex | 8ac5fd6e79d100982fdc9e9308d9a6250ce021e2 | [
"MIT"
] | null | null | null | from fnmatch import fnmatch
import inspect
import json
import re
import gramex
from typing import get_type_hints
from textwrap import dedent
from gramex.config import merge
from gramex.transforms.transforms import typelist, Header
from gramex.handlers import BaseHandler
error_codes = {
'200': {
'descriptio... | 38.46 | 87 | 0.538395 |
e0d03f218716c4b307d1a5d3704af1bb6c747db4 | 17,222 | py | Python | beginner_source/fgsm_tutorial.py | RodrigoGonzalez/tutorials | fd44c1b36255b158b3690ed4223e09985221b961 | [
"BSD-3-Clause"
] | 2 | 2020-01-03T03:07:56.000Z | 2021-08-03T12:11:12.000Z | beginner_source/fgsm_tutorial.py | RodrigoGonzalez/tutorials | fd44c1b36255b158b3690ed4223e09985221b961 | [
"BSD-3-Clause"
] | null | null | null | beginner_source/fgsm_tutorial.py | RodrigoGonzalez/tutorials | fd44c1b36255b158b3690ed4223e09985221b961 | [
"BSD-3-Clause"
] | 2 | 2018-07-01T17:54:42.000Z | 2019-10-12T16:59:23.000Z | # -*- coding: utf-8 -*-
"""
Adversarial Example Generation
==============================
**Author:** `Nathan Inkawhich <https://github.com/inkawhich>`__
If you are reading this, hopefully you can appreciate how effective some
machine learning models are. Research is constantly pushing ML models to
be faster, more ac... | 41.29976 | 147 | 0.681047 |
81d013ad36bbadf083c8aede33968029214319a8 | 4,701 | py | Python | tests/parsers/test_url.py | mrossinek/cobib | 4093fc6ff59b8415250c0d94dcecd6f031a5f80d | [
"MIT"
] | 9 | 2020-09-27T19:22:35.000Z | 2022-02-27T20:00:58.000Z | tests/parsers/test_url.py | mrossinek/cobib | 4093fc6ff59b8415250c0d94dcecd6f031a5f80d | [
"MIT"
] | null | null | null | tests/parsers/test_url.py | mrossinek/cobib | 4093fc6ff59b8415250c0d94dcecd6f031a5f80d | [
"MIT"
] | 2 | 2020-12-07T15:26:03.000Z | 2021-10-03T18:04:57.000Z | """Tests for coBib's URLParser."""
# pylint: disable=no-self-use,unused-argument
import logging
from typing import Callable, Dict, Optional
import pytest
from cobib.config import Event
from cobib.database import Entry
from cobib.parsers import URLParser
from .parser_test import ParserTest
from .test_arxiv import as... | 35.345865 | 100 | 0.625824 |
6f41d67e5b12a4cb8ecf621ec4d30f4d59045914 | 398 | py | Python | lab_7/lab_5/boardsproj/wsgi.py | jennifernolan/Software-for-the-Global-Market | 9a219dd0c0ceb284b3458cd7ad3fe103859fbfe8 | [
"MIT"
] | null | null | null | lab_7/lab_5/boardsproj/wsgi.py | jennifernolan/Software-for-the-Global-Market | 9a219dd0c0ceb284b3458cd7ad3fe103859fbfe8 | [
"MIT"
] | null | null | null | lab_7/lab_5/boardsproj/wsgi.py | jennifernolan/Software-for-the-Global-Market | 9a219dd0c0ceb284b3458cd7ad3fe103859fbfe8 | [
"MIT"
] | null | null | null | """
WSGI config for boardsproj 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.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... | 23.411765 | 78 | 0.788945 |
97f8c5312c61f36976bf146ab35786bae7e6ec9b | 24,933 | py | Python | nmigen/hdl/xfrm.py | Fatsie/amaranth | 0b28a97ca00b44301fb35e2426d571e4f6640040 | [
"BSD-2-Clause"
] | 1 | 2022-02-21T16:04:10.000Z | 2022-02-21T16:04:10.000Z | nmigen/hdl/xfrm.py | Fatsie/amaranth | 0b28a97ca00b44301fb35e2426d571e4f6640040 | [
"BSD-2-Clause"
] | 5 | 2021-03-19T00:08:54.000Z | 2021-10-02T15:02:28.000Z | nmigen/hdl/xfrm.py | Fatsie/amaranth | 0b28a97ca00b44301fb35e2426d571e4f6640040 | [
"BSD-2-Clause"
] | null | null | null | from abc import ABCMeta, abstractmethod
from collections import OrderedDict
from collections.abc import Iterable
from .._utils import flatten
from .. import tracer
from .ast import *
from .ast import _StatementList
from .cd import *
from .ir import *
from .rec import *
__all__ = ["ValueVisitor", "ValueTransformer",
... | 33.512097 | 98 | 0.6345 |
8d9ef9043a87279fac4fb96ca234678945004880 | 11,321 | py | Python | steam/protobufs/steammessages_clientserver_friends.py | smtp639/steam.py | bd67e8d91ac17984ef0657fa4625eb2fca81fb68 | [
"MIT"
] | null | null | null | steam/protobufs/steammessages_clientserver_friends.py | smtp639/steam.py | bd67e8d91ac17984ef0657fa4625eb2fca81fb68 | [
"MIT"
] | null | null | null | steam/protobufs/steammessages_clientserver_friends.py | smtp639/steam.py | bd67e8d91ac17984ef0657fa4625eb2fca81fb68 | [
"MIT"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: steammessages_clientserver_friends.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import List
import betterproto
@dataclass(eq=False, repr=False)
class CMsgClientFriendMsg(betterproto.Message):
steamid: int =... | 37.486755 | 105 | 0.78085 |
9f0655af285efca0a0601167370be8af87f62b65 | 1,115 | py | Python | open-rpa/Scripts/rst2html5.py | rmdelossantos/open-rpa | 1b4f68cb0318e69b888f3ef1f938a8a708789e94 | [
"MIT"
] | null | null | null | open-rpa/Scripts/rst2html5.py | rmdelossantos/open-rpa | 1b4f68cb0318e69b888f3ef1f938a8a708789e94 | [
"MIT"
] | null | null | null | open-rpa/Scripts/rst2html5.py | rmdelossantos/open-rpa | 1b4f68cb0318e69b888f3ef1f938a8a708789e94 | [
"MIT"
] | null | null | null | #!d:\russ\github\open-rpa\open-rpa\scripts\python.exe
# -*- coding: utf8 -*-
# :Copyright: © 2015 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty prov... | 31.857143 | 78 | 0.715695 |
77c1f7475549fd7e711ee5e8cf96af745796232a | 210 | py | Python | {{cookiecutter.github_project_name}}/tests/test_version.py | DerThorsten/py_cookiecutter | 9fb5aa9d192686ed8e3a4e0ad266d564c05d380f | [
"BSD-3-Clause"
] | 1 | 2020-02-21T12:28:06.000Z | 2020-02-21T12:28:06.000Z | {{cookiecutter.github_project_name}}/tests/test_version.py | DerThorsten/py_cookiecutter | 9fb5aa9d192686ed8e3a4e0ad266d564c05d380f | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.github_project_name}}/tests/test_version.py | DerThorsten/py_cookiecutter | 9fb5aa9d192686ed8e3a4e0ad266d564c05d380f | [
"BSD-3-Clause"
] | null | null | null | import {{cookiecutter.python_package_name}}
class TestVersion(object):
def test_version(self):
v = {{cookiecutter.python_package_name}}.__version__
assert v == '{{cookiecutter.version}}'
| 23.333333 | 60 | 0.7 |
7c055aae63e6660f07c2809c14b88ed5bc623156 | 6,140 | py | Python | img_scale.py | CTJChen/ctc_astropylib | a4194147b8d114fdf6fe8677aa48c3c9d59517a5 | [
"Apache-2.0"
] | 5 | 2021-11-18T13:27:30.000Z | 2021-12-05T00:15:33.000Z | dust/img_scale.py | interstellarmedium/interstellarmedium.github.io | 0440a5bd80052ab87575e70fc39acd4bf8e225b3 | [
"CC0-1.0"
] | null | null | null | dust/img_scale.py | interstellarmedium/interstellarmedium.github.io | 0440a5bd80052ab87575e70fc39acd4bf8e225b3 | [
"CC0-1.0"
] | null | null | null | #
# Written by Min-Su Shin
# Department of Astrophysical Sciences, Princeton University
#
# You can freely use the code.
#
import numpy
import math
def sky_median_sig_clip(input_arr, sig_fract, percent_fract, max_iter=100):
"""Estimating sky value for a given number of iterations
@type input_arr: numpy array
@pa... | 28.691589 | 92 | 0.734202 |
005ea1fbbf3479d9633f88a70aa016d6bd9d162b | 2,278 | py | Python | modules/wiki/samples.py | dgerod/cb4oru | b5fb3bd52193ab21b30b6917232a799ac41b6c32 | [
"Apache-2.0"
] | null | null | null | modules/wiki/samples.py | dgerod/cb4oru | b5fb3bd52193ab21b30b6917232a799ac41b6c32 | [
"Apache-2.0"
] | null | null | null | modules/wiki/samples.py | dgerod/cb4oru | b5fb3bd52193ab21b30b6917232a799ac41b6c32 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 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 required by applicable law or ... | 35.046154 | 74 | 0.742757 |
d9e59defb77c7bd2f5c437ffd0329af961a50a43 | 15,488 | py | Python | InternalPythonModules/android/operabrowser.py | drwetter/autopsy | ec91e3611159b148a6f205a667a44dd6a070ae13 | [
"Apache-2.0"
] | 1,473 | 2015-01-02T06:13:10.000Z | 2022-03-30T09:45:34.000Z | InternalPythonModules/android/operabrowser.py | drwetter/autopsy | ec91e3611159b148a6f205a667a44dd6a070ae13 | [
"Apache-2.0"
] | 1,068 | 2015-02-04T14:33:38.000Z | 2022-03-31T03:49:28.000Z | InternalPythonModules/android/operabrowser.py | drwetter/autopsy | ec91e3611159b148a6f205a667a44dd6a070ae13 | [
"Apache-2.0"
] | 510 | 2015-01-09T19:46:08.000Z | 2022-03-23T13:25:34.000Z | """
Autopsy Forensic Browser
Copyright 2019-2021 Basis Technology Corp.
Contact: carrier <at> sleuthkit <dot> org
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... | 58.889734 | 146 | 0.574574 |
41840ce2b244ecb77d361f120bc4ce71531b7173 | 922 | py | Python | tests/wfc3/test_uvis_25single.py | rendinam/hstcal | e08676b02e4c7cd06e3d5630b62f7b59951ac8c3 | [
"BSD-3-Clause"
] | 8 | 2016-07-28T15:14:27.000Z | 2020-04-02T16:37:23.000Z | tests/wfc3/test_uvis_25single.py | rendinam/hstcal | e08676b02e4c7cd06e3d5630b62f7b59951ac8c3 | [
"BSD-3-Clause"
] | 484 | 2016-03-14T20:44:42.000Z | 2022-03-31T15:54:38.000Z | tests/wfc3/test_uvis_25single.py | rendinam/hstcal | e08676b02e4c7cd06e3d5630b62f7b59951ac8c3 | [
"BSD-3-Clause"
] | 21 | 2016-03-14T14:22:35.000Z | 2022-02-07T18:41:49.000Z | import subprocess
import pytest
from ..helpers import BaseWFC3
class TestUVIS25Single(BaseWFC3):
"""
Test pos UVIS2 NGC7318B data
"""
detector = 'uvis'
def _single_raw_calib(self, rootname):
raw_file = '{}_raw.fits'.format(rootname)
# Prepare input file.
self.get_in... | 24.918919 | 56 | 0.567245 |
ca0fe76d3ee2ef9110e09f71b0bffa24ef95ca55 | 3,370 | py | Python | improver_tests/psychrometric_calculations/test_calculate_svp_in_air.py | nivnac/improver | c16c794f62598017cebc6ae4f99af8f317219a77 | [
"BSD-3-Clause"
] | null | null | null | improver_tests/psychrometric_calculations/test_calculate_svp_in_air.py | nivnac/improver | c16c794f62598017cebc6ae4f99af8f317219a77 | [
"BSD-3-Clause"
] | 3 | 2020-04-25T12:55:42.000Z | 2020-07-23T11:50:46.000Z | improver_tests/psychrometric_calculations/test_calculate_svp_in_air.py | Kat-90/improver | a5c31be3430df429ae38e7c16e267fcbc2af1858 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2020 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 43.766234 | 80 | 0.71365 |
7dc09db33128528b242038ecac0298b16decfd13 | 11,546 | py | Python | tests/io/test_video.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/io/test_video.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/io/test_video.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | import pytest
import os
import h5py
import numpy as np
from sleap.io.video import Video, HDF5Video, MediaVideo, DummyVideo
from tests.fixtures.videos import (
TEST_H5_FILE,
TEST_SMALL_ROBOT_MP4_FILE,
TEST_H5_DSET,
TEST_H5_INPUT_FORMAT,
)
# FIXME:
# Parameterizing fixtures with fixtures is annoying so... | 29.911917 | 88 | 0.697211 |
2baeefc2fa4c25f7182f28b7dc15aa301a2d6832 | 3,908 | py | Python | stratopy/IO.py | jorobledo/StratoPy | c2a705cb57f6ca13758d6d7a5f93ef9f5faa4d5d | [
"MIT"
] | null | null | null | stratopy/IO.py | jorobledo/StratoPy | c2a705cb57f6ca13758d6d7a5f93ef9f5faa4d5d | [
"MIT"
] | null | null | null | stratopy/IO.py | jorobledo/StratoPy | c2a705cb57f6ca13758d6d7a5f93ef9f5faa4d5d | [
"MIT"
] | null | null | null | import io
import os
import pathlib
import tempfile
from ftplib import FTP
from diskcache import Cache
from diskcache.core import ENOVAL
import s3fs
from . import merger
from .cloudsat import read_hdf
from .goes import read_nc
# type: ignore
DEFAULT_CACHE_PATH = pathlib.Path(
os.path.expanduser(os.path.join("~",... | 26.585034 | 79 | 0.652764 |
1b6bfe7af21e5d9293ea9eb484527a749727df2d | 888 | py | Python | pi/robot/camera.py | maxschwe/PiCar | 81d83cd0f8a32d4c0faf8c36a13e09da732244d3 | [
"MIT"
] | null | null | null | pi/robot/camera.py | maxschwe/PiCar | 81d83cd0f8a32d4c0faf8c36a13e09da732244d3 | [
"MIT"
] | null | null | null | pi/robot/camera.py | maxschwe/PiCar | 81d83cd0f8a32d4c0faf8c36a13e09da732244d3 | [
"MIT"
] | null | null | null | import time
import cv2
import numpy as np
from imutils.video.pivideostream import PiVideoStream
import logging
class Camera(object):
def __init__(self, flip=False):
try:
self.vs = PiVideoStream(resolution=(320, 240))
self.vs.start()
except:
logging.error("Failed... | 24.666667 | 77 | 0.577703 |
72f6421b98fad1b4d699781c85c673dc12fd4746 | 3,553 | py | Python | backend/autobets/apimb/migrations/0018_reportsbets_reportsmarket_reportsselections.py | slarkjm0803/autobets | f92a5d999acaf5d7c83ca2768a260c2282eabbee | [
"MIT"
] | 1 | 2020-03-06T14:29:12.000Z | 2020-03-06T14:29:12.000Z | backend/autobets/apimb/migrations/0018_reportsbets_reportsmarket_reportsselections.py | slarkjm0803/autobets | f92a5d999acaf5d7c83ca2768a260c2282eabbee | [
"MIT"
] | null | null | null | backend/autobets/apimb/migrations/0018_reportsbets_reportsmarket_reportsselections.py | slarkjm0803/autobets | f92a5d999acaf5d7c83ca2768a260c2282eabbee | [
"MIT"
] | null | null | null | # Generated by Django 2.0.6 on 2019-11-26 12:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('apimb', '0017_sessiontoken'),
]
operations = [
migrations.CreateModel(
name='ReportsBets',
fields=[
... | 53.029851 | 114 | 0.580918 |
7718833a093991bfdb648325eb7d170c74628b76 | 3,134 | py | Python | test/test_include.py | iafisher/hera-py | 773729870cd593f0dc55ac6fe8b9c8690faa73c1 | [
"MIT"
] | 2 | 2020-10-27T19:16:45.000Z | 2020-10-27T19:26:44.000Z | test/test_include.py | iafisher/hera-py | 773729870cd593f0dc55ac6fe8b9c8690faa73c1 | [
"MIT"
] | 141 | 2018-11-20T16:55:06.000Z | 2021-03-29T01:07:59.000Z | test/test_include.py | iafisher/hera-py | 773729870cd593f0dc55ac6fe8b9c8690faa73c1 | [
"MIT"
] | 1 | 2019-02-27T22:02:33.000Z | 2019-02-27T22:02:33.000Z | import pytest
from hera.main import main
from .utils import execute_program_helper
def test_basic_include():
program = """\
#include "test/assets/include/lib/add.hera"
SET(R1, 20)
SET(R2, 22)
CALL(R12, add)
"""
vm = execute_program_helper(program)
assert vm.registers[1] == 20
assert vm.register... | 25.479675 | 87 | 0.687939 |
2fb6eefcf6c5187dd590facee6c9475da1343579 | 2,404 | py | Python | bzt/six/py3.py | IamSaurabh1/taurus | 928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff | [
"Apache-2.0"
] | 1 | 2019-12-05T14:57:58.000Z | 2019-12-05T14:57:58.000Z | bzt/six/py3.py | IamSaurabh1/taurus | 928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff | [
"Apache-2.0"
] | null | null | null | bzt/six/py3.py | IamSaurabh1/taurus | 928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff | [
"Apache-2.0"
] | null | null | null | """
Module for reporting into http://www.blazemeter.com/ service
Copyright 2015 BlazeMeter 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
Unles... | 23.568627 | 76 | 0.761647 |
21cf7ee60e2efc1d13010cad457f74e39fc79af8 | 2,473 | py | Python | otcextensions/tests/unit/sdk/nat/v2/test_snat.py | spielkind/python-otcextensions | 47ba917df2d85db6cb347f2038fd7f79a8a806b7 | [
"Apache-2.0"
] | null | null | null | otcextensions/tests/unit/sdk/nat/v2/test_snat.py | spielkind/python-otcextensions | 47ba917df2d85db6cb347f2038fd7f79a8a806b7 | [
"Apache-2.0"
] | null | null | null | otcextensions/tests/unit/sdk/nat/v2/test_snat.py | spielkind/python-otcextensions | 47ba917df2d85db6cb347f2038fd7f79a8a806b7 | [
"Apache-2.0"
] | null | null | null | # 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 writing, software
# distributed ... | 39.887097 | 76 | 0.682572 |
1d8c1a46d481f2f2cc69b3f0865f664027894dc5 | 1,228 | py | Python | solum/builder/controllers/root.py | ed-/solum | 2d23edb7fb53e1bdeff510710824658575d166c4 | [
"Apache-2.0"
] | null | null | null | solum/builder/controllers/root.py | ed-/solum | 2d23edb7fb53e1bdeff510710824658575d166c4 | [
"Apache-2.0"
] | null | null | null | solum/builder/controllers/root.py | ed-/solum | 2d23edb7fb53e1bdeff510710824658575d166c4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 - Rackspace Hosting
#
# 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 ... | 35.085714 | 75 | 0.673453 |
9ceb2a1566477b4dbfa8608f5d8f5276eef8b752 | 419 | py | Python | venv/Lib/site-packages/praw/models/reddit/mixins/fullname.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | 1 | 2022-03-29T06:49:06.000Z | 2022-03-29T06:49:06.000Z | venv/Lib/site-packages/praw/models/reddit/mixins/fullname.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | 12 | 2021-04-11T19:46:06.000Z | 2021-06-18T16:08:37.000Z | venv/Lib/site-packages/praw/models/reddit/mixins/fullname.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | 1 | 2021-07-07T16:07:13.000Z | 2021-07-07T16:07:13.000Z | """Provide the FullnameMixin class."""
class FullnameMixin:
"""Interface for classes that have a fullname."""
_kind = None
@property
def fullname(self) -> str:
"""Return the object's fullname.
A fullname is an object's kind mapping like ``t3`` followed by an underscore and
t... | 23.277778 | 88 | 0.610979 |
b6ef376687384ad348aaf2838889ab23b1d24de6 | 2,767 | py | Python | common/migrations/0001_initial.py | ikks/flisol-connect | 2fcfb2efadfac5b9519410d690fa098ed620266d | [
"MIT"
] | null | null | null | common/migrations/0001_initial.py | ikks/flisol-connect | 2fcfb2efadfac5b9519410d690fa098ed620266d | [
"MIT"
] | null | null | null | common/migrations/0001_initial.py | ikks/flisol-connect | 2fcfb2efadfac5b9519410d690fa098ed620266d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | 49.410714 | 147 | 0.595591 |
4ebd6415ba449f4b48334dc34d951543a24ae65e | 874 | py | Python | Exercicio 01/minhas_compras/core/migrations/0001_initial.py | thiagorocha503/BACK-END-EXERCICIOS | e30fd7e790b2c722072dd12ae0924a906e275c91 | [
"Apache-2.0"
] | 1 | 2019-09-13T21:21:03.000Z | 2019-09-13T21:21:03.000Z | Exercicio 01/minhas_compras/core/migrations/0001_initial.py | thiagorocha503/BACK-END-EXERCICIOS | e30fd7e790b2c722072dd12ae0924a906e275c91 | [
"Apache-2.0"
] | 1 | 2020-06-06T14:01:18.000Z | 2020-06-06T14:01:18.000Z | Exercicio 01/minhas_compras/core/migrations/0001_initial.py | thiagorocha503/BACK-END-EXERCICIOS | e30fd7e790b2c722072dd12ae0924a906e275c91 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.4 on 2019-08-28 13:51
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Produto',
fields=[
('id', models.AutoField(... | 32.37037 | 114 | 0.592677 |
28293b42c00466f1218e8fe79809ba9c39e0f4e6 | 465 | py | Python | tests/if/if21.py | ktok07b6/polyphony | 657c5c7440520db6b4985970bd50547407693ac4 | [
"MIT"
] | 83 | 2015-11-30T09:59:13.000Z | 2021-08-03T09:12:28.000Z | tests/if/if21.py | jesseclin/polyphony | 657c5c7440520db6b4985970bd50547407693ac4 | [
"MIT"
] | 4 | 2017-02-10T01:43:11.000Z | 2020-07-14T03:52:25.000Z | tests/if/if21.py | jesseclin/polyphony | 657c5c7440520db6b4985970bd50547407693ac4 | [
"MIT"
] | 11 | 2016-11-18T14:39:15.000Z | 2021-02-23T10:05:20.000Z | from polyphony import testbench
def if21(x):
y = 0
if x < 100:
if x < 10:
y = 10
else:
y = 20
#y += 1
else:
if x < 200:
y = 100
else:
y = 200
y += 2
return y
@testbench
def test():
assert 10 == if21(0... | 15 | 31 | 0.427957 |
773d07cb88f0ebfafe5de95bf53d112bdc22197d | 299 | py | Python | office365/sharepoint/fields/fieldMultiUserValue.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/fields/fieldMultiUserValue.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/fields/fieldMultiUserValue.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.sharepoint.fields.fieldMultiLookupValue import FieldMultiLookupValue
from office365.sharepoint.fields.fieldUserValue import FieldUserValue
class FieldMultiUserValue(FieldMultiLookupValue):
def __init__(self):
super().__init__()
self._item_type = FieldUserValue
| 29.9 | 83 | 0.80602 |
4f060c6920f45eb14e758b898c6418dc6c246cdd | 937 | py | Python | examples/twitter/app.py | tirkarthi/firenado | d5a041707eff48a1ebb948e2b98eff1cd0b9afdc | [
"Apache-2.0"
] | 13 | 2015-06-01T02:04:06.000Z | 2022-01-09T20:28:20.000Z | examples/twitter/app.py | tirkarthi/firenado | d5a041707eff48a1ebb948e2b98eff1cd0b9afdc | [
"Apache-2.0"
] | 198 | 2015-05-30T18:23:11.000Z | 2022-03-30T18:41:52.000Z | examples/twitter/app.py | tirkarthi/firenado | d5a041707eff48a1ebb948e2b98eff1cd0b9afdc | [
"Apache-2.0"
] | 11 | 2015-05-25T01:35:50.000Z | 2021-07-22T15:16:56.000Z | #!/usr/bin/env python
#
# Copyright 2015-2016 Flavio Garcia
#
# 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... | 32.310345 | 74 | 0.722519 |
e88cfba87f47e4c9b92460499c1528cc242b1b13 | 2,948 | py | Python | discord/context_managers.py | Awayume/discord.py | a5307af5bfe373d425b184633be81e8157c14abe | [
"MIT"
] | null | null | null | discord/context_managers.py | Awayume/discord.py | a5307af5bfe373d425b184633be81e8157c14abe | [
"MIT"
] | null | null | null | discord/context_managers.py | Awayume/discord.py | a5307af5bfe373d425b184633be81e8157c14abe | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Awayume
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 r... | 33.123596 | 75 | 0.714383 |
dfe9914b6de02201bdb878946a6cf0773b4eacdb | 171 | py | Python | blogs/urls.py | akshitbhatia/Python-Django-Project | d64f02eb8682e14243c38241af660b54a22d0db9 | [
"bzip2-1.0.6"
] | null | null | null | blogs/urls.py | akshitbhatia/Python-Django-Project | d64f02eb8682e14243c38241af660b54a22d0db9 | [
"bzip2-1.0.6"
] | null | null | null | blogs/urls.py | akshitbhatia/Python-Django-Project | d64f02eb8682e14243c38241af660b54a22d0db9 | [
"bzip2-1.0.6"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('',views.allblogs, name='blogs'),
path('<int:blog_id>/',views.detail_blog, name='detail')
]
| 21.375 | 59 | 0.678363 |
031da70e11d780778029f37eb30f7447d8294b8f | 801 | py | Python | AzureFunctions/F_get_runs/__init__.py | kloudkrafts01/kspyder | 109e7ea4b671c09da8744bf1cb2c2277b349bdba | [
"MIT"
] | 3 | 2021-03-29T13:08:29.000Z | 2021-04-02T15:27:17.000Z | AzureFunctions/F_get_runs/__init__.py | kloudkrafts01/kspyder | 109e7ea4b671c09da8744bf1cb2c2277b349bdba | [
"MIT"
] | null | null | null | AzureFunctions/F_get_runs/__init__.py | kloudkrafts01/kspyder | 109e7ea4b671c09da8744bf1cb2c2277b349bdba | [
"MIT"
] | null | null | null | #!python3
import json
import azure.functions as func
import azure.durable_functions as df
from common.spLogging import logger
async def main(req: func.HttpRequest, starter: str) -> None:
client = df.DurableOrchestrationClient(starter)
instances = await client.get_status_all()
instances_list = []
# ... | 24.272727 | 60 | 0.621723 |
fd9ee05dfff202df04c30034afc7af0862be56db | 1,625 | py | Python | baekjoon/python/airport_10775.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | null | null | null | baekjoon/python/airport_10775.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | 1 | 2019-11-04T06:44:04.000Z | 2019-11-04T06:46:55.000Z | baekjoon/python/airport_10775.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | null | null | null | # Title: 공항
# Link: https://www.acmicpc.net/problem/10775
import sys
from copy import deepcopy
sys.setrecursionlimit(10 ** 6)
read_single_int = lambda: int(sys.stdin.readline().strip())
class MaxSegment:
def __init__(self, ns: list, n: int):
self.n = n
self.tree = [0 for _ in range(n)] + deep... | 23.550725 | 70 | 0.508923 |
502b53f80368d491c455cee618cf236de9c238ab | 374 | py | Python | proxy/proxy_client.py | MailG/code_py | c21a27c871c5c42625aadf45d51a0ba325095739 | [
"MIT"
] | null | null | null | proxy/proxy_client.py | MailG/code_py | c21a27c871c5c42625aadf45d51a0ba325095739 | [
"MIT"
] | null | null | null | proxy/proxy_client.py | MailG/code_py | c21a27c871c5c42625aadf45d51a0ba325095739 | [
"MIT"
] | null | null | null | from socket import *
HOST = '127.0.0.1' # The remote host
PORT = 9090 # The same port as used by the server
s = socket(AF_INET, SOCK_STREAM)
s.connect((HOST, PORT))
s.sendall('Hello, world')
data = s.recv(1024)
print 'Received', repr(data)
while 1:
indata = raw_input("input command:")
s.sendall(indata)
data = s... | 23.375 | 49 | 0.681818 |
cfc0df8b3bcf15d5ceda77d86c5dcf8330bf00c2 | 1,105 | py | Python | tests/bm_mesh_laplacian_smoothing.py | theycallmepeter/pytorch3d_PBR | bc83c23969ff7843fc05d2da001952b368926174 | [
"BSD-3-Clause"
] | null | null | null | tests/bm_mesh_laplacian_smoothing.py | theycallmepeter/pytorch3d_PBR | bc83c23969ff7843fc05d2da001952b368926174 | [
"BSD-3-Clause"
] | null | null | null | tests/bm_mesh_laplacian_smoothing.py | theycallmepeter/pytorch3d_PBR | bc83c23969ff7843fc05d2da001952b368926174 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from itertools import product
import torch
from fvcore.common.benchmark import benchmark
from test_m... | 26.95122 | 75 | 0.654299 |
41cf8379f2f0f3d221d0c6d96636f694e3f7fb9c | 23,645 | py | Python | gui/uis/windows/main_window/setup_main_window.py | sikros/FileDownloadManager | 93b66604f6e78c8cd2c62d37e8ace68233232fe1 | [
"Apache-2.0"
] | null | null | null | gui/uis/windows/main_window/setup_main_window.py | sikros/FileDownloadManager | 93b66604f6e78c8cd2c62d37e8ace68233232fe1 | [
"Apache-2.0"
] | null | null | null | gui/uis/windows/main_window/setup_main_window.py | sikros/FileDownloadManager | 93b66604f6e78c8cd2c62d37e8ace68233232fe1 | [
"Apache-2.0"
] | null | null | null | # IMPORT PACKAGES AND MODULES
# ///////////////////////////////////////////////////////////////
from gui.widgets.py_table_widget.py_table_widget import PyTableWidget
from . functions_main_window import *
import sys
import os
import winreg
# IMPORT QT CORE
# //////////////////////////////////////////////////////////////... | 40.979203 | 118 | 0.5476 |
cf60ffef1a70f4de48fa2f1d8619f6a14917c2e3 | 316 | py | Python | doc/examples/arrays/true_model.py | act-elegancy/consumet | 291eb6ad1cfbb1ca4f04ed3bc7a97c05783183b0 | [
"MIT"
] | 4 | 2019-10-04T14:55:31.000Z | 2022-03-20T07:22:13.000Z | doc/examples/arrays/true_model.py | act-elegancy/consumet | 291eb6ad1cfbb1ca4f04ed3bc7a97c05783183b0 | [
"MIT"
] | null | null | null | doc/examples/arrays/true_model.py | act-elegancy/consumet | 291eb6ad1cfbb1ca4f04ed3bc7a97c05783183b0 | [
"MIT"
] | 2 | 2019-10-04T15:01:12.000Z | 2021-08-08T16:45:55.000Z | import numpy as np
def simulate(x):
'''
This function defines a function z = simulate(x), where x is an 2D variable and
z is a 2D variable. This file combines the `rosenbrock` and `ripples` examples.
'''
z = []
z.append( (1-x[0])**2+100*(x[1]-x[0]**2)**2 )
z.append( np.sin(np.sqrt(np.dot(x,x))) )
return z
| 26.333333 | 80 | 0.639241 |
b8487ef0f0283bbe80054997ba21dcbc07f87877 | 25,063 | py | Python | scripts/generate_emission_spectra.py | hmvege/ElementSound | 976cd8a4c0a77b31fd5c1b1f230c8866c4fc0a89 | [
"MIT"
] | null | null | null | scripts/generate_emission_spectra.py | hmvege/ElementSound | 976cd8a4c0a77b31fd5c1b1f230c8866c4fc0a89 | [
"MIT"
] | 5 | 2021-03-02T22:24:57.000Z | 2021-03-13T14:55:14.000Z | scripts/generate_emission_spectra.py | hmvege/Elemental | 976cd8a4c0a77b31fd5c1b1f230c8866c4fc0a89 | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import List, Tuple
import click
import numba as nb
import numpy as np
import matplotlib.pyplot as plt
# from matplotlib import rcParams
from scipy.interpolate import interp1d
from tqdm import tqdm
from elemental.elemental import Elemental
from elemental.utils import get_element, c... | 28.097534 | 79 | 0.555041 |
05b2c854b6fb8475d5e25b46e07a2b415177dc9e | 23,184 | py | Python | utils/resizeNetwork.py | ctorney/deepWildCount | 4db03252740ff236ad19b4b0cf474bc940f24137 | [
"MIT"
] | 2 | 2019-11-06T04:28:44.000Z | 2019-12-18T17:29:34.000Z | utils/resizeNetwork.py | ctorney/deepWildCount | 4db03252740ff236ad19b4b0cf474bc940f24137 | [
"MIT"
] | null | null | null | utils/resizeNetwork.py | ctorney/deepWildCount | 4db03252740ff236ad19b4b0cf474bc940f24137 | [
"MIT"
] | 1 | 2021-01-13T15:11:52.000Z | 2021-01-13T15:11:52.000Z | import argparse
import os
import numpy as np
from keras.layers import Conv2D, Input, BatchNormalization, LeakyReLU, ZeroPadding2D, UpSampling2D
from keras.layers.merge import add, concatenate
from keras.models import Model
import struct
import cv2
from keras.utils import plot_model
#os.environ["CUDA_DEVICE_ORDER"]="PC... | 47.508197 | 136 | 0.520057 |
6a11c3f5c9a1f2e6be51729c2754fba5000ee5c8 | 1,300 | py | Python | model.py | googleglass/mirror-catfacts-python | 31d957cf9236128f8f4606668ce168b5e1470030 | [
"Apache-2.0"
] | 4 | 2016-10-13T22:17:52.000Z | 2020-08-08T18:29:23.000Z | model.py | googleglass/mirror-catfacts-python | 31d957cf9236128f8f4606668ce168b5e1470030 | [
"Apache-2.0"
] | null | null | null | model.py | googleglass/mirror-catfacts-python | 31d957cf9236128f8f4606668ce168b5e1470030 | [
"Apache-2.0"
] | 5 | 2015-02-21T09:04:13.000Z | 2020-02-02T00:01:38.000Z | #!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 31.707317 | 79 | 0.75 |
3696ece3c3bd4e356ed1e9c02d26a2abe4cc5885 | 7,667 | py | Python | Tests/pens/pointInsidePen_test.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 240 | 2021-01-11T14:49:24.000Z | 2022-03-29T22:33:49.000Z | Tests/pens/pointInsidePen_test.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 77 | 2021-01-12T20:23:30.000Z | 2022-03-28T12:14:34.000Z | Tests/pens/pointInsidePen_test.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 28 | 2021-01-17T05:44:11.000Z | 2022-01-11T19:58:46.000Z | from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.pens.pointInsidePen import PointInsidePen
import unittest
class PointInsidePenTest(unittest.TestCase):
def test_line(self):
def draw_triangles(pen):
pen.moveTo((0,0)); pen.lineTo((... | 33.924779 | 102 | 0.503326 |
742651417dced8c648167ae1ed684c851b1d6556 | 7,937 | py | Python | custom_components/apple_tv/media_player.py | elsingaa/Home-Assistant-Config | d20a2dabf5deeef8f087fa6d34a371617da9c4cd | [
"MIT"
] | 1 | 2019-12-22T12:59:01.000Z | 2019-12-22T12:59:01.000Z | custom_components/apple_tv/media_player.py | elsingaa/Home-Assistant-Config | d20a2dabf5deeef8f087fa6d34a371617da9c4cd | [
"MIT"
] | 28 | 2019-12-22T10:33:13.000Z | 2020-08-09T04:46:46.000Z | custom_components/apple_tv/media_player.py | elsingaa/Home-Assistant-Config | d20a2dabf5deeef8f087fa6d34a371617da9c4cd | [
"MIT"
] | null | null | null | """Support for Apple TV media player."""
import logging
from pyatv.const import DeviceState, MediaType
from homeassistant.components.media_player import MediaPlayerDevice
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MUSIC,
MEDIA_TYPE_TVSHOW,
MEDIA_TYPE_VIDEO,
SUPPORT_NEXT_TRACK... | 30.178707 | 87 | 0.632859 |
cc70fa1d40c68890ead2786cedee7873bdf9401c | 114 | py | Python | businesswebsite/services/urls.py | luckdeluxe/business-website | 78993636e156506aced55e44385d0e5778414a50 | [
"MIT"
] | 1 | 2021-12-17T02:04:16.000Z | 2021-12-17T02:04:16.000Z | businesswebsite/services/urls.py | luckdeluxe/business-website | 78993636e156506aced55e44385d0e5778414a50 | [
"MIT"
] | 15 | 2019-05-27T19:23:50.000Z | 2022-03-11T23:53:17.000Z | webempresa/services/urls.py | JulioAlbertoTum/web-emp-django2 | f4ee48885f5f0166d3620c27569f7cbcaf997561 | [
"MIT"
] | 1 | 2018-09-24T12:10:19.000Z | 2018-09-24T12:10:19.000Z | from django.urls import path
from . import views
urlpatterns = [
path('', views.services, name="services"),
] | 19 | 46 | 0.692982 |
2dd4937079c76048535221114bdb61c8ec69907b | 6,851 | py | Python | tests/statemachine_test.py | FelixSchwarz/pymta | ac9b3e23e136bc1387fb9c359eabe6087e5264c8 | [
"MIT"
] | null | null | null | tests/statemachine_test.py | FelixSchwarz/pymta | ac9b3e23e136bc1387fb9c359eabe6087e5264c8 | [
"MIT"
] | 6 | 2018-10-11T09:01:48.000Z | 2020-10-07T08:15:40.000Z | tests/statemachine_test.py | FelixSchwarz/pymta | ac9b3e23e136bc1387fb9c359eabe6087e5264c8 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
# SPDX-License-Identifier: MIT
from __future__ import print_function, unicode_literals
from pythonic_testcase import *
from pymta.statemachine import StateMachine, StateMachineDefinitionError, \
StateMachineError
class StateMachineTest(PythonicTestCase):
def setUp(self):
se... | 41.023952 | 96 | 0.643848 |
be0cd770a4918fd64a0dd583c51d264ea1d2a0ac | 18,185 | py | Python | var/spack/repos/builtin/packages/perl/package.py | fluidnumerics-joe/spack | 7b8db35410e80cc2e9908a15b9f4df4863f60d0f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/perl/package.py | fluidnumerics-joe/spack | 7b8db35410e80cc2e9908a15b9f4df4863f60d0f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 18 | 2021-03-12T16:22:58.000Z | 2022-03-02T17:07:08.000Z | var/spack/repos/builtin/packages/perl/package.py | fluidnumerics-joe/spack | 7b8db35410e80cc2e9908a15b9f4df4863f60d0f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#
# Author: Milton Woods <milton.woods@bom.gov.au>
# Date: March 22, 2017
# Author: George Hartzell <hartzell@alerce.com>
... | 42.889151 | 241 | 0.645587 |
3b8e2953f8d246bc7f8145a521b856cb0919b992 | 1,883 | py | Python | server.py | PaulLockett/OSConferenceCall | 93c165da54efd3fac67dd4e54c7619f7d312c1a5 | [
"MIT"
] | null | null | null | server.py | PaulLockett/OSConferenceCall | 93c165da54efd3fac67dd4e54c7619f7d312c1a5 | [
"MIT"
] | null | null | null | server.py | PaulLockett/OSConferenceCall | 93c165da54efd3fac67dd4e54c7619f7d312c1a5 | [
"MIT"
] | null | null | null | from serverlib import *
import tkinter as tk
import tkinter.simpledialog as tkSimpleDialog
import socket
import threading
# ask if user wants a gui or comandline
def ask_gui():
gui = input("Do you want a gui? (y/n) ")
if gui == "y":
return True
elif gui == "n":
return False
else:
... | 26.9 | 92 | 0.672331 |
51689019f31b435a54fee4459085870bfec4d823 | 625 | py | Python | 2D_array.py | YannMjl/Coding-Interview-Problems | 84ecf237da52aca7822fc3074823f3faeb360e8b | [
"MIT"
] | null | null | null | 2D_array.py | YannMjl/Coding-Interview-Problems | 84ecf237da52aca7822fc3074823f3faeb360e8b | [
"MIT"
] | null | null | null | 2D_array.py | YannMjl/Coding-Interview-Problems | 84ecf237da52aca7822fc3074823f3faeb360e8b | [
"MIT"
] | null | null | null | # 2 - Dimmensional array
# Is implemented as array of array or list of list in python
# initialize an 2D array
array_2D = [[1, 2, 3, 4],
["a", "b", "c", "d"]]
# or
array_2d = [[5,6,7,8],
[3,5,2,9]]
# print the second item in the first row
print(array_2d[0][1])
print(array_2D[0][1])
# print ... | 20.833333 | 60 | 0.6016 |
dd6d90b6ea22ebd0ff64ca7a4a0118a65e216581 | 1,331 | py | Python | Demo/sgi/gl/glstdwin/glstdwmenu.py | 1byte2bytes/cpython | 7fbaeb819ca7b20dca048217ff585ec195e999ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | 1 | 2019-10-25T21:41:07.000Z | 2019-10-25T21:41:07.000Z | Demo/sgi/gl/glstdwin/glstdwmenu.py | 1byte2bytes/cpython | 7fbaeb819ca7b20dca048217ff585ec195e999ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | null | null | null | Demo/sgi/gl/glstdwin/glstdwmenu.py | 1byte2bytes/cpython | 7fbaeb819ca7b20dca048217ff585ec195e999ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | null | null | null | # Define menu operations for GL stdwin
import gl
from glstdwin import key2code
class MenuObject:
#
def _init(self, win, title):
self._win = win
self._title = title
self._items = []
return self
#
def close(self):
self._win.remove(self)
del self._win
#
def additem(self, *args):
if len(args) == 2:
... | 21.126984 | 44 | 0.592787 |
b8de74199c8146a4cec35d3efaffb218d9e4b35e | 13,510 | py | Python | qiskit/aqua/operators/primitive_ops/pauli_op.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 504 | 2018-12-15T16:34:03.000Z | 2022-03-26T11:24:53.000Z | qiskit/aqua/operators/primitive_ops/pauli_op.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 746 | 2018-12-16T16:44:42.000Z | 2021-07-10T16:59:43.000Z | qiskit/aqua/operators/primitive_ops/pauli_op.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 421 | 2018-12-22T14:49:00.000Z | 2022-03-04T09:47:07.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 42.351097 | 99 | 0.623686 |
8705dc4eb89308369dc919cc75af090f9a5a80ea | 8,235 | py | Python | conv/z80conv/lexer.py | hughpyle/GW-BASIC | f0c1ef3c9655b36cd312d18e4620bb076f03afd3 | [
"MIT"
] | 26 | 2020-05-23T18:09:05.000Z | 2022-01-30T10:07:04.000Z | conv/z80conv/lexer.py | hughpyle/GW-BASIC | f0c1ef3c9655b36cd312d18e4620bb076f03afd3 | [
"MIT"
] | 1 | 2020-06-25T06:20:01.000Z | 2020-06-25T06:20:01.000Z | conv/z80conv/lexer.py | hughpyle/GW-BASIC | f0c1ef3c9655b36cd312d18e4620bb076f03afd3 | [
"MIT"
] | 4 | 2020-05-23T12:36:44.000Z | 2022-01-16T00:20:20.000Z | #!/usr/bin/python
# Copyright (c) 2020 Leandro Pereira <leandro@hardinfo.org>
# Licensed under GPLv2.
from collections import deque
class Lexer:
def __init__(self, fp):
self.state = self._lexer_asm
self.start = 0
self.pos = 0
self.contents = fp.read()
self.end = self.pos +... | 27.634228 | 92 | 0.485124 |
3f67d83e86603dd449eb99e3bcaf488d842a6e6e | 1,278 | py | Python | app.py | Malvikabhalla99/codeFury | ac02d443d7dd89a3dccea4e1e992b5b14e5aa9be | [
"MIT"
] | 15 | 2019-10-01T13:55:13.000Z | 2019-10-23T02:09:44.000Z | app.py | Malvikabhalla99/codeFury | ac02d443d7dd89a3dccea4e1e992b5b14e5aa9be | [
"MIT"
] | 7 | 2019-09-30T18:07:42.000Z | 2020-09-30T09:40:10.000Z | app.py | Malvikabhalla99/codeFury | ac02d443d7dd89a3dccea4e1e992b5b14e5aa9be | [
"MIT"
] | 31 | 2019-09-30T18:33:16.000Z | 2020-02-27T11:11:49.000Z | from flask import Flask, render_template,request,url_for
from flask_bootstrap import Bootstrap
# NLP Packages
from textblob import TextBlob,Word
import random
import time
app = Flask(__name__)
Bootstrap(app)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/analyse',methods=['POST... | 29.72093 | 206 | 0.712833 |
803116b5736b5763604e463ae8eb4d27a64dea2a | 1,363 | py | Python | tests/test_middleware.py | yunojuno/django-nps | a7f904f85f17f1f7735193e0b9aeb1010ecf9feb | [
"MIT"
] | 3 | 2016-06-21T21:56:19.000Z | 2019-10-02T13:04:37.000Z | tests/test_middleware.py | yunojuno/django-nps | a7f904f85f17f1f7735193e0b9aeb1010ecf9feb | [
"MIT"
] | 5 | 2016-02-22T14:05:44.000Z | 2020-06-03T18:32:09.000Z | tests/test_middleware.py | yunojuno/django-nps | a7f904f85f17f1f7735193e0b9aeb1010ecf9feb | [
"MIT"
] | 4 | 2016-03-27T02:51:28.000Z | 2017-07-05T16:20:07.000Z | from unittest import mock
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.http import HttpResponse
from django.test import RequestFactory, TransactionTestCase
from net_promoter_score.middleware import NPSMiddleware
from net_promoter_score.models import U... | 36.837838 | 78 | 0.701394 |
b6f565947440c2d9aadaf344751445e21fa3a128 | 5,370 | py | Python | dreamwidget/boshclient_bar.py | dreamplatform/dream-widget | 2fc237bda8418613a73a835ed683a6057da58e47 | [
"BSD-3-Clause"
] | null | null | null | dreamwidget/boshclient_bar.py | dreamplatform/dream-widget | 2fc237bda8418613a73a835ed683a6057da58e47 | [
"BSD-3-Clause"
] | null | null | null | dreamwidget/boshclient_bar.py | dreamplatform/dream-widget | 2fc237bda8418613a73a835ed683a6057da58e47 | [
"BSD-3-Clause"
] | null | null | null | import sys, os
import httplib, urllib
import random, binascii
from urlparse import urlparse
from punjab.httpb import HttpbParse
from twisted.words.xish import domish
from twisted.words.protocols.jabber import jid
TLS_XMLNS = 'urn:ietf:params:xml:ns:xmpp-tls'
SASL_XMLNS = 'urn:ietf:params:xml:ns:xmpp-sasl'
BIND_XMLNS... | 35.562914 | 80 | 0.506145 |
e150349a49398a7acf442f6a0b0eb59b785ae21c | 9,477 | py | Python | app/lib_master_python/ds_salesforce.py | docusign/sfdc-recipe-soap-auto-provisioning | 50621220e91360306e60be6d7753943c95feb57d | [
"MIT"
] | 2 | 2021-11-14T17:10:50.000Z | 2021-12-29T21:41:58.000Z | app/lib_master_python/ds_salesforce.py | docusign/sfdc-recipe-auto-provisioning | 50621220e91360306e60be6d7753943c95feb57d | [
"MIT"
] | 2 | 2021-03-22T17:15:31.000Z | 2021-12-13T19:41:55.000Z | app/lib_master_python/ds_salesforce.py | docusign/sfdc-recipe-auto-provisioning | 50621220e91360306e60be6d7753943c95feb57d | [
"MIT"
] | 5 | 2017-01-28T05:50:53.000Z | 2020-12-03T01:00:09.000Z | # DocuSign Salesforce
#
# Set encoding to utf8. See http://stackoverflow.com/a/21190382/64904
import sys; reload(sys); sys.setdefaultencoding('utf8')
import os, base64, json, requests, logging, random
from app.lib_master_python import ds_recipe_lib
from urlparse import urlparse
from string import Template
from simple_... | 45.5625 | 221 | 0.630685 |
815601f799cb4e0c512db183200d6102c4717299 | 3,396 | py | Python | hisa/learn/sentiment/sentiment.py | rittikaadhikari/stock-recommendation | 1f14276a955301b1c6fa1c00bd88b00cf5668d8c | [
"MIT"
] | null | null | null | hisa/learn/sentiment/sentiment.py | rittikaadhikari/stock-recommendation | 1f14276a955301b1c6fa1c00bd88b00cf5668d8c | [
"MIT"
] | null | null | null | hisa/learn/sentiment/sentiment.py | rittikaadhikari/stock-recommendation | 1f14276a955301b1c6fa1c00bd88b00cf5668d8c | [
"MIT"
] | null | null | null | import re
import json
import datetime
from datetime import datetime
from datetime import timedelta
import pandas as pd
from pandas.io.json import json_normalize
import numpy as np
from nltk.sentiment.vader import SentimentIntensityAnalyzer
import argparse
import os
import csv
class ProcessTweets(object):
def __in... | 33.96 | 109 | 0.594817 |
89bda000909dd4b56f5c4f42f9e99543eef4dc96 | 17,864 | py | Python | synapse/app/_base.py | rhetenor/synapse | 5154afc00d841c7685a97700be3cd1398e633e05 | [
"Apache-2.0"
] | null | null | null | synapse/app/_base.py | rhetenor/synapse | 5154afc00d841c7685a97700be3cd1398e633e05 | [
"Apache-2.0"
] | null | null | null | synapse/app/_base.py | rhetenor/synapse | 5154afc00d841c7685a97700be3cd1398e633e05 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 New Vector Ltd
# Copyright 2019-2021 The Matrix.org Foundation C.I.C
#
# 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
#
# Un... | 35.165354 | 91 | 0.687248 |
82aa893b089e393da9961ad861c5639845615db4 | 50 | py | Python | python/perspective/perspective/core/_version.py | admariner/perspective | 15e1788cecfc14a515c3e5bafd4ed88e1001195e | [
"Apache-2.0"
] | 1 | 2022-01-09T12:14:25.000Z | 2022-01-09T12:14:25.000Z | python/perspective/perspective/core/_version.py | wenner/perspective | 15e1788cecfc14a515c3e5bafd4ed88e1001195e | [
"Apache-2.0"
] | 36 | 2021-10-12T08:32:00.000Z | 2021-12-23T23:59:26.000Z | python/perspective/perspective/core/_version.py | admariner/perspective | 15e1788cecfc14a515c3e5bafd4ed88e1001195e | [
"Apache-2.0"
] | null | null | null | __version__ = "1.1.0"
major_minor_version = "1.1"
| 16.666667 | 27 | 0.7 |
24488a670b076d68ef8ccfc032a8e0cdb1309009 | 10,778 | py | Python | onetask/__init__.py | onetask-ai/onetask-python | ea810a3092a029d5b30f6af9e9a5f17567e0b901 | [
"MIT"
] | 7 | 2021-06-06T10:57:08.000Z | 2022-02-04T15:11:55.000Z | onetask/__init__.py | onetask-ai/onetask-python | ea810a3092a029d5b30f6af9e9a5f17567e0b901 | [
"MIT"
] | 3 | 2021-07-15T11:57:57.000Z | 2022-01-17T17:27:55.000Z | onetask/__init__.py | onetask-ai/onetask-python | ea810a3092a029d5b30f6af9e9a5f17567e0b901 | [
"MIT"
] | 1 | 2021-06-06T10:57:16.000Z | 2021-06-06T10:57:16.000Z | # -*- coding: utf-8 -*-
from typing import Callable, Dict, List, Optional, Union
from wasabi import msg
import pandas as pd
import numpy as np
from tqdm import tqdm
import json
from onetask import api_calls, settings, util, auto_lf, embedding
import numpy as np
from bertopic import BERTopic
from collections import def... | 40.825758 | 193 | 0.613472 |
2dc6b5313cc6ab70a69cfd085b4a2aeae9444208 | 92,889 | py | Python | tests/infer/test_valid_models.py | sjfleming/pyro | c8dc40a75cc4ff1f43c6ff9178d91c08155d7973 | [
"Apache-2.0"
] | 1 | 2021-09-30T05:39:23.000Z | 2021-09-30T05:39:23.000Z | tests/infer/test_valid_models.py | liyunlong10/pyro | eadca9c9ed9654573037acdf4f48b34ea40037fe | [
"Apache-2.0"
] | null | null | null | tests/infer/test_valid_models.py | liyunlong10/pyro | eadca9c9ed9654573037acdf4f48b34ea40037fe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import logging
import warnings
from collections import defaultdict
import pytest
import torch
from torch.distributions import constraints
import pyro
import pyro.distributions as dist
import pyro.poutine as poutine
from pyro.dist... | 33.58243 | 88 | 0.581737 |
e56c83311bb9ec90172a6cd85010f27d7b05e0c3 | 208 | py | Python | gammagl/utils/check.py | BUPT-GAMMA/GammaGL | 2b9f32e1ac3533cb75a063243e8a2fa654466d18 | [
"Apache-2.0"
] | null | null | null | gammagl/utils/check.py | BUPT-GAMMA/GammaGL | 2b9f32e1ac3533cb75a063243e8a2fa654466d18 | [
"Apache-2.0"
] | null | null | null | gammagl/utils/check.py | BUPT-GAMMA/GammaGL | 2b9f32e1ac3533cb75a063243e8a2fa654466d18 | [
"Apache-2.0"
] | null | null | null | import numpy as np
def check_is_numpy(*data):
"""
Check if the given datas have numpy.array
"""
for d in data:
if isinstance(d, np.ndarray):
return True
return False
| 17.333333 | 45 | 0.591346 |
5b641468b9cb92249cd7f042a110329fe1ec29a0 | 2,739 | py | Python | resources/sksl/update_fuzzer.py | fourgrad/skia | b9b550e9bb1b73001088ba89483e2f9bbe46c3db | [
"BSD-3-Clause"
] | 1 | 2022-03-11T02:34:47.000Z | 2022-03-11T02:34:47.000Z | resources/sksl/update_fuzzer.py | Wal1e/skia | eda97288bdc8e87afea817b25d561724c2b6a2f8 | [
"BSD-3-Clause"
] | null | null | null | resources/sksl/update_fuzzer.py | Wal1e/skia | eda97288bdc8e87afea817b25d561724c2b6a2f8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2021 Google LLC
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This tool updates the OSS-Fuzz corpus using Google Cloud's 'gsutil' tool.
# You will need to be given access to the Google Storage fuzzer repo (at
# gs://skia-f... | 42.796875 | 96 | 0.606061 |
831c7cc49c1459b24e86df5acf61d5e8f6fe51d6 | 994 | py | Python | sphinxcontrib/collections/drivers/copy_folder.py | useblocks/sphinx-collections | 4f1fd7d4f4682a2df47cdde98b9668d59b2983ff | [
"MIT"
] | 4 | 2020-05-22T16:22:14.000Z | 2021-11-09T11:48:04.000Z | sphinxcontrib/collections/drivers/copy_folder.py | useblocks/sphinx-collections | 4f1fd7d4f4682a2df47cdde98b9668d59b2983ff | [
"MIT"
] | 1 | 2020-07-10T23:03:24.000Z | 2020-07-10T23:03:24.000Z | sphinxcontrib/collections/drivers/copy_folder.py | useblocks/sphinx-collections | 4f1fd7d4f4682a2df47cdde98b9668d59b2983ff | [
"MIT"
] | 1 | 2020-05-22T17:27:39.000Z | 2020-05-22T17:27:39.000Z | import os
from shutil import copytree, ignore_patterns, rmtree
from sphinxcontrib.collections.drivers import Driver
class CopyFolderDriver(Driver):
def run(self):
self.info('Copy folder...')
if not os.path.exists(self.config['source']):
self.error('Source {} does not exist'.format(... | 31.0625 | 99 | 0.590543 |
b2e019bcf07e2d4e1e8384684ca03264dfe05538 | 8,442 | py | Python | Curso06.py | DarlanNoetzold/DeepLearning_Alura | efe67f85bfe5cf591263d253f24f502a90ec0b5d | [
"MIT"
] | 1 | 2022-03-02T14:24:09.000Z | 2022-03-02T14:24:09.000Z | Curso06.py | DarlanNoetzold/DeepLearning_Alura | efe67f85bfe5cf591263d253f24f502a90ec0b5d | [
"MIT"
] | null | null | null | Curso06.py | DarlanNoetzold/DeepLearning_Alura | efe67f85bfe5cf591263d253f24f502a90ec0b5d | [
"MIT"
] | null | null | null | import pandas as pd
dados_portugues = pd.read_csv("stackoverflow_portugues.csv")
dados_portugues.head()
questao_portugues = dados_portugues.Questão[5]
print(questao_portugues)
dados_ingles = pd.read_csv("stackoverflow_ingles.csv")
dados_ingles.head()
questao_ingles = dados_ingles.Questão[0]
print(questao_ingles)
im... | 34.040323 | 90 | 0.715826 |
ced241c91dd4f735ef3afa077be474f7aed0ee83 | 765 | py | Python | spider/Config_International_Relations_od.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | spider/Config_International_Relations_od.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | 2 | 2021-03-31T18:54:16.000Z | 2021-12-13T19:49:08.000Z | spider/Config_International_Relations_od.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# got文件、MongoDB数据库和Redis数据库配置文件
# 开放域Health Environment事件的配置信息
import os
import sys
import pymongo
import redis
def get_noau_config():
# got文件
if sys.version_info[0] < 3:
import got
else:
import got3 as got
# MongoDB数据库
client = pymongo.... | 24.677419 | 73 | 0.652288 |
4365f4b4f7feeb6285d6a68edc16b08c091433c7 | 5,869 | py | Python | web/src/survey/models.py | frhumanes/consulting | 400df4fc59240d2cd1c5807feaabacd056fdce03 | [
"Apache-2.0"
] | null | null | null | web/src/survey/models.py | frhumanes/consulting | 400df4fc59240d2cd1c5807feaabacd056fdce03 | [
"Apache-2.0"
] | null | null | null | web/src/survey/models.py | frhumanes/consulting | 400df4fc59240d2cd1c5807feaabacd056fdce03 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.text import truncate_words
from log.models import TraceableModel
from formula.models import Variable
from django.conf import settings
class Survey(TraceableModel):
blocks = models.Ma... | 28.769608 | 82 | 0.591924 |
3b879592220a1df925d6bb661b75cbb0e2f56821 | 1,250 | py | Python | Toolbox/test_functions/test_day2week2month.py | AndresPenuela/MHA-Workshop | 69ce4cedc1396e8ee57ccde3b2eea194c58599ea | [
"MIT"
] | 1 | 2021-05-25T13:12:09.000Z | 2021-05-25T13:12:09.000Z | Toolbox/test_functions/test_day2week2month.py | AndresPenuela/MHA-Workshop | 69ce4cedc1396e8ee57ccde3b2eea194c58599ea | [
"MIT"
] | null | null | null | Toolbox/test_functions/test_day2week2month.py | AndresPenuela/MHA-Workshop | 69ce4cedc1396e8ee57ccde3b2eea194c58599ea | [
"MIT"
] | 1 | 2020-05-27T01:43:01.000Z | 2020-05-27T01:43:01.000Z | # -*- coding: utf-8 -*-
"""
This is a function to test the day2week2month functions
@author: Andres Peñuela
"""
import pandas as pd
import numpy as np
from numpy.testing import assert_array_equal
if __name__ == '__main__':
import sys
sys.path.append("..") # Adds higher directory to python modules path.
### Fu... | 29.761905 | 103 | 0.6928 |
475979e9f715c0fb43d2276e1aa36cb809548e60 | 1,628 | py | Python | Sorter/utils/CameraWebsocketHandler.py | Gadgeteering/project-teachable-sorter | b275bb267b67a0b9019adfcb99cf57a2e7fc0443 | [
"Apache-2.0"
] | 35 | 2019-11-14T19:13:45.000Z | 2021-09-15T13:26:18.000Z | Sorter/utils/CameraWebsocketHandler.py | Gadgeteering/project-teachable-sorter | b275bb267b67a0b9019adfcb99cf57a2e7fc0443 | [
"Apache-2.0"
] | 14 | 2019-12-08T16:27:33.000Z | 2022-03-31T21:59:50.000Z | Sorter/utils/CameraWebsocketHandler.py | Gadgeteering/project-teachable-sorter | b275bb267b67a0b9019adfcb99cf57a2e7fc0443 | [
"Apache-2.0"
] | 12 | 2019-11-24T17:18:47.000Z | 2022-01-10T18:11:54.000Z | # Copyright 2019 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, ... | 26.688525 | 74 | 0.722973 |
3c25b3115263578fda514cd193d75798ccd7e93c | 2,023 | py | Python | source/conf.py | MinecraftMediaLibrary/MinecraftMediaLibrary-Wiki | 4e7b3e50019fddbd357b3b85926e65cc6722add5 | [
"MIT"
] | 1 | 2021-05-04T03:01:19.000Z | 2021-05-04T03:01:19.000Z | source/conf.py | MinecraftMediaLibrary/MinecraftMediaLibrary-Wiki | 4e7b3e50019fddbd357b3b85926e65cc6722add5 | [
"MIT"
] | null | null | null | source/conf.py | MinecraftMediaLibrary/MinecraftMediaLibrary-Wiki | 4e7b3e50019fddbd357b3b85926e65cc6722add5 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 36.125 | 79 | 0.67474 |
5739356097bddf3112e4d1310a358c45ff9d26e3 | 3,216 | py | Python | zmail/utils.py | choosingausernameisannoying/zmail | ff1e9c2a1736af57f28506489cecb5f7b1ddf1d3 | [
"MIT"
] | null | null | null | zmail/utils.py | choosingausernameisannoying/zmail | ff1e9c2a1736af57f28506489cecb5f7b1ddf1d3 | [
"MIT"
] | null | null | null | zmail/utils.py | choosingausernameisannoying/zmail | ff1e9c2a1736af57f28506489cecb5f7b1ddf1d3 | [
"MIT"
] | null | null | null | """
zmail.utils
~~~~~~~~~~~~
This module contains some useful function power zmail.
"""
import os
from typing import Optional
from .helpers import get_abs_path, make_list
from .parser import parse_mail
from .structures import CaseInsensitiveDict
def save_attachment(mail: CaseInsensitiveDict, target_path: Optional[s... | 32.816327 | 124 | 0.602612 |
77d22b90312a4beb73fc29069fc503cef7bc42f9 | 2,705 | py | Python | scripts/tombstone_scale.py | IMCG/RamCloud | dad96cf34d330608acb43b009d12949ed2d938f4 | [
"0BSD"
] | 5 | 2015-11-14T16:49:06.000Z | 2019-09-03T13:21:30.000Z | scripts/tombstone_scale.py | behnamm/cs244b_project | 957e8b3979e4ca24814edd73254cc4c69ea14126 | [
"0BSD"
] | null | null | null | scripts/tombstone_scale.py | behnamm/cs244b_project | 957e8b3979e4ca24814edd73254cc4c69ea14126 | [
"0BSD"
] | 1 | 2018-02-25T11:16:27.000Z | 2018-02-25T11:16:27.000Z | #!/usr/bin/env python
# Copyright (c) 2011 Stanford University
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ... | 39.202899 | 80 | 0.684658 |
47a93b0eb4d56ddc3c3baf081d36353d14036954 | 1,713 | py | Python | gpMgmt/bin/gpcheckcat_modules/mirror_matching_check.py | khuddlefish/gpdb | 2d20bae838c5ed433eecf6ecceca1b8dd5221197 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | gpMgmt/bin/gpcheckcat_modules/mirror_matching_check.py | khuddlefish/gpdb | 2d20bae838c5ed433eecf6ecceca1b8dd5221197 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | gpMgmt/bin/gpcheckcat_modules/mirror_matching_check.py | khuddlefish/gpdb | 2d20bae838c5ed433eecf6ecceca1b8dd5221197 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | from gppylib.gparray import get_gparray_from_config
class MirrorMatchingCheck:
def run_check(self, db_connection, logger):
logger.info('-----------------------------------')
logger.info('Checking mirroring_matching')
is_config_mirror_enabled = get_gparray_from_config().hasMirrors
... | 46.297297 | 140 | 0.659661 |
f3aa841f0d270a98b3e51741120637b5f0e594be | 220 | py | Python | app/main/__init__.py | sbybfai/flask_blog | f08bcb6a73d85a926992d1d451f1a2075331a34f | [
"Apache-2.0"
] | null | null | null | app/main/__init__.py | sbybfai/flask_blog | f08bcb6a73d85a926992d1d451f1a2075331a34f | [
"Apache-2.0"
] | 3 | 2020-03-24T16:41:57.000Z | 2021-06-01T23:14:22.000Z | app/main/__init__.py | sbybfai/flask_blog | f08bcb6a73d85a926992d1d451f1a2075331a34f | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint
main = Blueprint('main', __name__)
from . import views, errors
from ..models import Permission
@main.app_context_processor
def inject_permissions():
return dict(Permission=Permission) | 20 | 38 | 0.781818 |
03b7e697c4cfc2104ad0c6403314515bf76c20e0 | 124 | py | Python | run.py | isaacrivas10/fb_chatbot | 01a78e690e698609a5b89dc8f04c216b248f5047 | [
"MIT"
] | null | null | null | run.py | isaacrivas10/fb_chatbot | 01a78e690e698609a5b89dc8f04c216b248f5047 | [
"MIT"
] | 5 | 2019-12-24T08:14:37.000Z | 2019-12-24T08:56:39.000Z | run.py | isaacrivas10/fb_chatbot | 01a78e690e698609a5b89dc8f04c216b248f5047 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from store import create_App
app= create_App()
if __name__ == "__main__":
app.run(debug=True) | 15.5 | 28 | 0.653226 |
d8a5f3a827e173c8d95e45cdf8b896394e09a7bb | 3,429 | py | Python | designate/openstack/deprecated/exception.py | melodous/designate | c0da0c464c07d34a9855ab704302d7662beb7c1d | [
"Apache-2.0"
] | null | null | null | designate/openstack/deprecated/exception.py | melodous/designate | c0da0c464c07d34a9855ab704302d7662beb7c1d | [
"Apache-2.0"
] | null | null | null | designate/openstack/deprecated/exception.py | melodous/designate | c0da0c464c07d34a9855ab704302d7662beb7c1d | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 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.apac... | 23.979021 | 78 | 0.664334 |
34d37aca7adda32d511da9b4f4463075c1e4bbce | 537 | py | Python | export_readiness/migrations/0032_auto_20190307_1512.py | kaedroho/dit-directory-cms | 67c15eeed19e7b3583f1fce1969230ddf83b6813 | [
"MIT"
] | 6 | 2018-03-20T11:19:07.000Z | 2021-10-05T07:53:11.000Z | export_readiness/migrations/0032_auto_20190307_1512.py | kaedroho/dit-directory-cms | 67c15eeed19e7b3583f1fce1969230ddf83b6813 | [
"MIT"
] | 802 | 2018-02-05T14:16:13.000Z | 2022-02-10T10:59:21.000Z | export_readiness/migrations/0032_auto_20190307_1512.py | kaedroho/dit-directory-cms | 67c15eeed19e7b3583f1fce1969230ddf83b6813 | [
"MIT"
] | 6 | 2019-01-22T13:19:37.000Z | 2019-07-01T10:35:26.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-03-07 15:12
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('export_readiness', '0031_internationallandingpage_squashed_0050_auto_20190219_1633'),
]... | 25.571429 | 95 | 0.666667 |
4f87210f5cc257cb2b6172bb09c3037a4b4d9c83 | 993 | py | Python | mayloop/protocol/fixed_length_message.py | amol9/mayloop | 9bf181ab0e0168596bbbf8f76f1b21b018dcd4ca | [
"MIT"
] | null | null | null | mayloop/protocol/fixed_length_message.py | amol9/mayloop | 9bf181ab0e0168596bbbf8f76f1b21b018dcd4ca | [
"MIT"
] | null | null | null | mayloop/protocol/fixed_length_message.py | amol9/mayloop | 9bf181ab0e0168596bbbf8f76f1b21b018dcd4ca | [
"MIT"
] | null | null | null | import struct
from .message import Message
class FixedLengthMessage(Message):
def __init__(self):
Message.__init__(self)
self._length = None
def dataReceived(self, data):
self._buffer += data
next_message_available = True
while(next_message_available):
if len(self._buffer) >= 4 and self._length is... | 24.219512 | 63 | 0.688822 |
d32baa89fdee3667f888ddf926ebe6b8df35c309 | 4,358 | py | Python | mmdet/models/necks/segprocess_head_neck.py | Gitgigabyte/mmd | 02cf37884d3ac9a6018656d1871695669966dfb3 | [
"Apache-2.0"
] | 1 | 2020-03-13T08:37:35.000Z | 2020-03-13T08:37:35.000Z | mmdet/models/necks/segprocess_head_neck.py | Gitgigabyte/mmd | 02cf37884d3ac9a6018656d1871695669966dfb3 | [
"Apache-2.0"
] | null | null | null | mmdet/models/necks/segprocess_head_neck.py | Gitgigabyte/mmd | 02cf37884d3ac9a6018656d1871695669966dfb3 | [
"Apache-2.0"
] | null | null | null | import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import kaiming_init
import torch
from mmdet.core import auto_fp16, force_fp32
from mmdet.models.registry import NECKS
from mmdet.models.utils import ConvModule
@NECKS.register_module
class SemanticProcessNeck(nn.Module):
def __init__(self,
... | 37.247863 | 105 | 0.514915 |
fb50080d71de9b1ff445d64536c7e82de9b45000 | 2,082 | py | Python | py4we/NM80PowerIO.py | gtpedrosa/Python4WindEnergy | f8ad09018420cfb3a419173f97b129de7118d814 | [
"Apache-2.0"
] | 48 | 2015-01-19T18:21:10.000Z | 2021-11-27T22:41:06.000Z | py4we/NM80PowerIO.py | arash7444/Python4WindEnergy | 8f97a5f86e81ce01d80dafb6f8104165fd3ad397 | [
"Apache-2.0"
] | 1 | 2016-05-24T06:07:07.000Z | 2016-05-24T08:26:29.000Z | py4we/NM80PowerIO.py | arash7444/Python4WindEnergy | 8f97a5f86e81ce01d80dafb6f8104165fd3ad397 | [
"Apache-2.0"
] | 24 | 2015-06-26T14:44:07.000Z | 2021-06-07T18:36:52.000Z | """ IO classes for NM80 Power Curve file types
Copyright (C) 2013 DTU Wind Energy
Author: Iva Hrgovan
Email: ivah@dtu.dk
Last revision: 29-01-2014
License: Apache v2.0, http://www.apache.org/licenses/LICENSE-2.0
"""
from __future__ import print_function
from we_file_io import WEFileIO, TestWEFileIO
import unittest... | 25.390244 | 77 | 0.496158 |
9ac63642de917d4f25c24377243a2f2a2a04144f | 619 | py | Python | shot_detector/filters/sliding_window/kurtosis_swfilter.py | w495/shot_detector | 617ff45c9c3c96bbd9a975aef15f1b2697282b9c | [
"BSD-3-Clause"
] | 18 | 2015-09-27T21:34:18.000Z | 2022-03-24T12:14:51.000Z | shot_detector/filters/sliding_window/kurtosis_swfilter.py | w495/shot_detector | 617ff45c9c3c96bbd9a975aef15f1b2697282b9c | [
"BSD-3-Clause"
] | 6 | 2021-03-18T21:21:35.000Z | 2022-03-11T23:32:55.000Z | shot_detector/filters/sliding_window/kurtosis_swfilter.py | w495/shot_detector | 617ff45c9c3c96bbd9a975aef15f1b2697282b9c | [
"BSD-3-Clause"
] | 3 | 2017-09-14T20:53:26.000Z | 2021-12-18T19:18:18.000Z | # -*- coding: utf8 -*-
"""
This is part of shot detector.
Produced by w495 at 2017.05.04 04:18:27
"""
from __future__ import absolute_import, division, print_function
import logging
from .scipy_stat_swfilter import SciPyStatSWFilter
class KurtosisSWFilter(SciPyStatSWFilter):
"""
...
"""
... | 21.344828 | 64 | 0.633279 |
0b01f4906dc10ef364b42cd1176c3ac7cbc35d6f | 6,807 | py | Python | indico/core/notifications.py | aiforrural/Digital-Events-Example | 628aaa8727b259b9367ac0ae1c5ba8e9e95eca82 | [
"MIT"
] | 1 | 2021-02-08T09:34:27.000Z | 2021-02-08T09:34:27.000Z | indico/core/notifications.py | pamirk/indico | c3b4e06b11cc21ad497f74d0b2ca901bc1b2a768 | [
"MIT"
] | null | null | null | indico/core/notifications.py | pamirk/indico | c3b4e06b11cc21ad497f74d0b2ca901bc1b2a768 | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import re
import time
from functools import wraps
from types import GeneratorType
from flask import g
fr... | 38.457627 | 114 | 0.643455 |
2d01031dae7c7db0250967eb777f4a0c97d35c1c | 28,012 | py | Python | tests/deployd/test_watchers.py | yuanxu-li/paasta | 5b04f45659293f873c65111a9d1d0909aeed4019 | [
"Apache-2.0"
] | null | null | null | tests/deployd/test_watchers.py | yuanxu-li/paasta | 5b04f45659293f873c65111a9d1d0909aeed4019 | [
"Apache-2.0"
] | null | null | null | tests/deployd/test_watchers.py | yuanxu-li/paasta | 5b04f45659293f873c65111a9d1d0909aeed4019 | [
"Apache-2.0"
] | null | null | null | import sys
import unittest
import mock
from pytest import raises
from requests.exceptions import RequestException
from paasta_tools.deployd.common import BaseServiceInstance
class FakePyinotify: # pragma: no cover
class ProcessEvent():
pass
@property
def WatchManager(self):
pass
@... | 44.322785 | 117 | 0.64251 |
245d5d32e040461dcc3bed9989ba952ff62db2d7 | 2,096 | py | Python | tests/integrations/android_sdk/AndroidSDK/test_update_emulator_config.py | pybee/briefcase | d7e9aa7bf15aa2abbc71e97aef9bea287129fdaa | [
"BSD-3-Clause"
] | 522 | 2015-07-28T16:06:18.000Z | 2019-03-25T17:16:55.000Z | tests/integrations/android_sdk/AndroidSDK/test_update_emulator_config.py | pybee/briefcase | d7e9aa7bf15aa2abbc71e97aef9bea287129fdaa | [
"BSD-3-Clause"
] | 154 | 2015-09-17T02:50:55.000Z | 2019-03-22T07:10:34.000Z | tests/integrations/android_sdk/AndroidSDK/test_update_emulator_config.py | pybee/briefcase | d7e9aa7bf15aa2abbc71e97aef9bea287129fdaa | [
"BSD-3-Clause"
] | 105 | 2015-09-25T08:43:26.000Z | 2019-03-25T15:59:27.000Z | import pytest
@pytest.fixture
def test_device(tmp_path):
"""Create an AVD configuration file."""
config_file = tmp_path / ".android" / "avd" / "testDevice.avd" / "config.ini"
config_file.parent.mkdir(parents=True)
# Write a default config. It contains:
# * blank lines
# * a key whose value ex... | 23.032967 | 81 | 0.653626 |
f4133db7c2fd02d5beb4b71ef52c83a1691ea026 | 758 | py | Python | projeto_escala/documento_fiscal.py | laurourbano/Projetos_Python | 50e7f4a7ff34158385ea7b635bac95ec8a0363a1 | [
"MIT"
] | 1 | 2021-12-28T02:51:34.000Z | 2021-12-28T02:51:34.000Z | projeto_escala/documento_fiscal.py | laurourbano/Projetos_Python | 50e7f4a7ff34158385ea7b635bac95ec8a0363a1 | [
"MIT"
] | null | null | null | projeto_escala/documento_fiscal.py | laurourbano/Projetos_Python | 50e7f4a7ff34158385ea7b635bac95ec8a0363a1 | [
"MIT"
] | null | null | null | class documento_fiscal:
def __init__(self):
self.__NUM_DV1 = []
self.__NUM_DV2 = []
def calcula_digito_verificador(self, documento, digito=1):
pass
def valido(self, documento):
documento = documento.replace('.', '').replace('/', '').replace('-', '')
if (not docume... | 27.071429 | 80 | 0.563325 |
ed14320ac7e6a2468e6ae28d70af02a17125142c | 635 | py | Python | backend/conferences/migrations/0012_auto_20191012_2038.py | marcoacierno/pycon | 2b7b47598c4929769cc73e322b3fce2c89151e21 | [
"MIT"
] | 56 | 2018-01-20T17:18:40.000Z | 2022-03-28T22:42:04.000Z | backend/conferences/migrations/0012_auto_20191012_2038.py | marcoacierno/pycon | 2b7b47598c4929769cc73e322b3fce2c89151e21 | [
"MIT"
] | 2,029 | 2018-01-20T11:37:24.000Z | 2022-03-31T04:10:51.000Z | backend/conferences/migrations/0012_auto_20191012_2038.py | marcoacierno/pycon | 2b7b47598c4929769cc73e322b3fce2c89151e21 | [
"MIT"
] | 17 | 2018-03-17T09:44:28.000Z | 2021-12-27T19:57:35.000Z | # Generated by Django 2.2.5 on 2019-10-12 20:38
from django.db import migrations
import i18n.fields
class Migration(migrations.Migration):
dependencies = [
('conferences', '0011_auto_20190921_2340'),
]
operations = [
migrations.AddField(
model_name='deadline',
na... | 25.4 | 95 | 0.612598 |
3e55298f335664fe774ef0b1070a0ed523055413 | 1,855 | py | Python | planning/GamesTests/games/tetris/matrix_rotation.py | ChristsY12Robots/Robots | 306f000f85b41731a9e1249847434858319e5415 | [
"MIT"
] | null | null | null | planning/GamesTests/games/tetris/matrix_rotation.py | ChristsY12Robots/Robots | 306f000f85b41731a9e1249847434858319e5415 | [
"MIT"
] | null | null | null | planning/GamesTests/games/tetris/matrix_rotation.py | ChristsY12Robots/Robots | 306f000f85b41731a9e1249847434858319e5415 | [
"MIT"
] | null | null | null | def rotate_array(array, angle, wide=False):
'''
Rotates a rectangular or diamond 2D array in increments of 45 degrees.
Parameters:
array (list): a list containing sliceable sequences, such as list, tuple, or str
angle (int): a positive angle for rotation, in 45-degree increments.
wid... | 44.166667 | 95 | 0.539623 |
697f3dfd62b2cc56315847a43f69fb649f1c83e6 | 5,181 | py | Python | src/openprocurement/tender/openuadefense/models.py | pontostroy/openprocurement.api | 6651ef29413d155c83f893ee64a611cf75f4daaf | [
"Apache-2.0"
] | null | null | null | src/openprocurement/tender/openuadefense/models.py | pontostroy/openprocurement.api | 6651ef29413d155c83f893ee64a611cf75f4daaf | [
"Apache-2.0"
] | 2 | 2021-03-25T23:27:04.000Z | 2022-03-21T22:18:15.000Z | src/openprocurement/tender/openuadefense/models.py | scrubele/prozorro-testing | 42b93ea2f25d8cc40e66c596f582c7c05e2a9d76 | [
"Apache-2.0"
] | 1 | 2020-08-20T06:09:14.000Z | 2020-08-20T06:09:14.000Z | # -*- coding: utf-8 -*-
from datetime import timedelta, datetime, time
from schematics.exceptions import ValidationError
from schematics.types import StringType
from schematics.types.compound import ModelType
from schematics.types.serializable import serializable
from zope.interface import implementer
from openprocurem... | 40.476563 | 148 | 0.73673 |
fd7e09319b36fd70962f38fe074a45bac23af24a | 23 | py | Python | data/studio21_generated/introductory/3103/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3103/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3103/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | def unique(integers):
| 11.5 | 21 | 0.73913 |
f839e73989e7d4a5d95b8d38c4ac910861e583bf | 4,452 | py | Python | app/main/views.py | Nobella-Nyarari-Ejiofor/PenBlog | 5c2e396adf827384888e44ced4e5623ceb6068cf | [
"MIT"
] | null | null | null | app/main/views.py | Nobella-Nyarari-Ejiofor/PenBlog | 5c2e396adf827384888e44ced4e5623ceb6068cf | [
"MIT"
] | null | null | null | app/main/views.py | Nobella-Nyarari-Ejiofor/PenBlog | 5c2e396adf827384888e44ced4e5623ceb6068cf | [
"MIT"
] | null | null | null | from flask import render_template,request,redirect,url_for,flash,abort
from ..requests import get_quotes
from . import main
from flask_login import login_required, current_user
from .forms import BlogForm,CommentForm,UpdateProfile
from ..models import Blog,Comment, User
from .. import db,photos
#Views
@main.route('/')... | 32.49635 | 92 | 0.677673 |
0f2c0b638cc09812edfed1443d452e35720fae92 | 378 | py | Python | apps/partner/admin.py | glenjasper/cobija-web | 9a623daae9fba1b423b8fd690a25139ed8d06d7c | [
"MIT"
] | null | null | null | apps/partner/admin.py | glenjasper/cobija-web | 9a623daae9fba1b423b8fd690a25139ed8d06d7c | [
"MIT"
] | null | null | null | apps/partner/admin.py | glenjasper/cobija-web | 9a623daae9fba1b423b8fd690a25139ed8d06d7c | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Partner
class PartnerAdmin(admin.ModelAdmin):
list_display = [
'__str__',
'type_partner',
'status',
]
readonly_fields = ['created', 'updated']
def type_partner(self, obj):
return ",\n".join([p.name for p in obj.typepa... | 23.625 | 66 | 0.650794 |
78496e5249b0a5cf6fe82107ba8e1559b5c1b8c5 | 23,607 | py | Python | pybind/slxos/v17r_2_00/brocade_vswitch_rpc/get_vnetwork_vswitches/output/vnetwork_vswitches/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v17r_2_00/brocade_vswitch_rpc/get_vnetwork_vswitches/output/vnetwork_vswitches/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v17r_2_00/brocade_vswitch_rpc/get_vnetwork_vswitches/output/vnetwork_vswitches/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 66.686441 | 904 | 0.715635 |
6ef3e64cf2232ce81cfdbec4d1d9867b36fe523a | 220 | py | Python | configs/hpt-pretrain/bdd/imagenet_r50_supervised_basetrain/50-iters.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | null | null | null | configs/hpt-pretrain/bdd/imagenet_r50_supervised_basetrain/50-iters.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | 6 | 2021-03-11T05:35:54.000Z | 2021-04-03T22:25:11.000Z | configs/hpt-pretrain/bdd/imagenet_r50_supervised_basetrain/50-iters.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | 1 | 2021-07-04T00:47:46.000Z | 2021-07-04T00:47:46.000Z | _base_="../base-bdd-config.py"
# this will merge with the parent
model=dict(pretrained='data/basetrain_chkpts/imagenet_r50_supervised.pth')
# epoch related
total_iters=50
checkpoint_config = dict(interval=total_iters)
| 24.444444 | 74 | 0.804545 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.