hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7962980cdee3c90b84bd04a5927826f1b8497264 | 180,555 | py | Python | fritzcall/src/plugin.py | Tanharo/enigma2-plugins | 590385e566015fcea33cbbf59ed15760716e3fd5 | [
"OLDAP-2.3"
] | null | null | null | fritzcall/src/plugin.py | Tanharo/enigma2-plugins | 590385e566015fcea33cbbf59ed15760716e3fd5 | [
"OLDAP-2.3"
] | null | null | null | fritzcall/src/plugin.py | Tanharo/enigma2-plugins | 590385e566015fcea33cbbf59ed15760716e3fd5 | [
"OLDAP-2.3"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Update rev
$Author: michael $
$Revision: 1527 $
$Date: 2018-05-20 16:41:35 +0200 (Sun, 20 May 2018) $
$Id: plugin.py 1527 2018-05-20 14:41:35Z michael $
'''
# C0111 (Missing docstring)
# C0103 (Invalid name)
# C0301 (line too long)
# W0603 (global statement)
# W0141 (map, filter, etc.)
# W... | 51.018649 | 276 | 0.665155 |
79629875813cbbf158b6bebb676c4734f7984dad | 534 | py | Python | hr/urls.py | Rupa-421/4_chain_list | 31cc845046c84bfc240b3a04f0fe182b764b7a0e | [
"MIT"
] | 1 | 2021-08-23T11:03:59.000Z | 2021-08-23T11:03:59.000Z | hr/urls.py | Rupa-421/4_chain_list | 31cc845046c84bfc240b3a04f0fe182b764b7a0e | [
"MIT"
] | null | null | null | hr/urls.py | Rupa-421/4_chain_list | 31cc845046c84bfc240b3a04f0fe182b764b7a0e | [
"MIT"
] | null | null | null | from django.urls import include, path
from . import views
urlpatterns = [
path('', views.PersonListView.as_view(), name='person_changelist'),
path('add/', views.PersonCreateView.as_view(), name='person_add'),
path('<int:pk>/', views.PersonUpdateView.as_view(), name='person_change'),
path('ajax/load-st... | 41.076923 | 83 | 0.715356 |
796298cbd98b779b1282447943094f7b22654f30 | 2,685 | py | Python | pyperiods/months.py | davidmarquis/pyperiods | 56f3e0c08982fb7ef79cbaa540109f8d35783d5d | [
"MIT"
] | null | null | null | pyperiods/months.py | davidmarquis/pyperiods | 56f3e0c08982fb7ef79cbaa540109f8d35783d5d | [
"MIT"
] | 3 | 2020-06-05T17:23:17.000Z | 2020-08-03T18:09:47.000Z | pyperiods/months.py | davidmarquis/pyperiods | 56f3e0c08982fb7ef79cbaa540109f8d35783d5d | [
"MIT"
] | null | null | null | import calendar
from datetime import date
from .period import Period, InvalidPeriodError, validate_year, validate_month
def not_empty(value):
if value is None:
return False
if isinstance(value, str):
return len(value) > 0
return True
class MonthPeriod(Period):
def __init__(self, yea... | 31.22093 | 97 | 0.598883 |
7962994d64ced3036eaab1849be3ebc05ec041f3 | 1,459 | py | Python | setup.py | visze/seqIOLib | debffc753de96d0d2eacc3c49c4baab46b6f1795 | [
"MIT"
] | 2 | 2020-05-19T08:51:42.000Z | 2021-04-04T12:07:10.000Z | setup.py | visze/seqIOLib | debffc753de96d0d2eacc3c49c4baab46b6f1795 | [
"MIT"
] | 1 | 2022-02-10T02:09:21.000Z | 2022-02-10T02:09:21.000Z | setup.py | visze/seqIOLib | debffc753de96d0d2eacc3c49c4baab46b6f1795 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = ["pyfaidx", "numpy<1.19.0", "tensorflow==2.2.1"]
setup_requir... | 30.395833 | 126 | 0.65867 |
79629a78090840ccdfb44b2731353db1c8dc51f9 | 864 | py | Python | hth/news/migrations/0001_initial.py | roperi/myband | ec1955626fe6997484fd92ed02127b6899cd7062 | [
"MIT"
] | 1 | 2016-04-12T17:38:26.000Z | 2016-04-12T17:38:26.000Z | hth/news/migrations/0001_initial.py | bhrutledge/jahhills.com | 74fe94a214f1ed5681bd45159315f0b68daf5a33 | [
"MIT"
] | 92 | 2015-04-03T10:04:55.000Z | 2021-07-17T11:13:52.000Z | hth/news/migrations/0001_initial.py | roperi/myband | ec1955626fe6997484fd92ed02127b6899cd7062 | [
"MIT"
] | 1 | 2021-01-26T18:02:49.000Z | 2021-01-26T18:02:49.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Post',
fields=[
('id', models.AutoField(primary... | 29.793103 | 114 | 0.540509 |
79629afd370383722b67f9e2febf24b921711585 | 3,437 | py | Python | bindings/python/ensmallen/datasets/string/boseaspwao.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/boseaspwao.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/boseaspwao.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Bosea sp. WAO.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein associat... | 32.733333 | 223 | 0.67268 |
79629b88bb4f88b095f671107eb207fe7e01f946 | 4,212 | py | Python | pypy3-v6.0.0-linux64/lib_pypy/_pypy_collections.py | uscheller/aws-lambda-runtime-pypy | 2c4824d49699f064e24d56fd8fd22141cb5dcfd3 | [
"Apache-2.0"
] | 10 | 2018-12-18T18:04:28.000Z | 2021-04-23T07:31:13.000Z | pypy3-v6.0.0-linux64/lib_pypy/_pypy_collections.py | uscheller/aws-lambda-runtime-pypy | 2c4824d49699f064e24d56fd8fd22141cb5dcfd3 | [
"Apache-2.0"
] | null | null | null | pypy3-v6.0.0-linux64/lib_pypy/_pypy_collections.py | uscheller/aws-lambda-runtime-pypy | 2c4824d49699f064e24d56fd8fd22141cb5dcfd3 | [
"Apache-2.0"
] | 3 | 2019-06-22T14:16:57.000Z | 2021-12-29T22:04:42.000Z | from __pypy__ import reversed_dict, move_to_end, objects_in_repr
from _operator import eq as _eq
import _collections_abc
class OrderedDict(dict):
'''Dictionary that remembers insertion order.
In PyPy all dicts are ordered anyway. This is mostly useful as a
placeholder to mean "this dict must be ordered ... | 34.243902 | 80 | 0.627018 |
79629b9d0036c162269e01bf72a5c348ec08a9d6 | 430 | py | Python | src/tests/test_utils.py | vchain-us/ledger-compliance-py | 30ae81e703178e8b8b4b7fb6a9b7d4467c607d53 | [
"Apache-2.0"
] | 3 | 2020-12-20T18:30:12.000Z | 2021-05-31T17:02:15.000Z | src/tests/test_utils.py | vchain-us/ledger-compliance-py | 30ae81e703178e8b8b4b7fb6a9b7d4467c607d53 | [
"Apache-2.0"
] | null | null | null | src/tests/test_utils.py | vchain-us/ledger-compliance-py | 30ae81e703178e8b8b4b7fb6a9b7d4467c607d53 | [
"Apache-2.0"
] | 1 | 2020-12-04T18:04:20.000Z | 2020-12-04T18:04:20.000Z | import LedgerCompliance.utils as utils
from dataclasses import dataclass
@dataclass
class Index:
index: int
def test_wrap():
idx=Index(index=12)
a1=utils.wrap_zindex_ref(b"gorilla",idx)
k1,v1=utils.unwrap_zindex_ref(a1)
assert(k1==b"gorilla")
assert(v1==12)
def test_nullwrap():
idx=Index(index=None)
a1=utils... | 20.47619 | 41 | 0.760465 |
79629c47bfd9aa63c68c50f010c0bcb23496a436 | 1,793 | py | Python | post/migrations/0003_auto_20210111_1607.py | Akshat-Kumar-0610/social_web_project | 5a49b89eece6078d6e45cf083f153a43f0996630 | [
"MIT"
] | 1 | 2021-01-17T21:21:05.000Z | 2021-01-17T21:21:05.000Z | post/migrations/0003_auto_20210111_1607.py | Akshat-Kumar-0610/social_web_project | 5a49b89eece6078d6e45cf083f153a43f0996630 | [
"MIT"
] | null | null | null | post/migrations/0003_auto_20210111_1607.py | Akshat-Kumar-0610/social_web_project | 5a49b89eece6078d6e45cf083f153a43f0996630 | [
"MIT"
] | 1 | 2022-01-28T20:09:45.000Z | 2022-01-28T20:09:45.000Z | # Generated by Django 3.1.4 on 2021-01-11 10:37
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('post', '0002_auto_202012... | 35.86 | 143 | 0.619074 |
79629c48435cd5f4ef975c83649b4150ba11e762 | 190 | py | Python | Team_KnowHow/member/views.py | qudwn1114/TestRepo | 4591cd685597962aeb2fc4b9877dca4a2f572933 | [
"Apache-2.0"
] | null | null | null | Team_KnowHow/member/views.py | qudwn1114/TestRepo | 4591cd685597962aeb2fc4b9877dca4a2f572933 | [
"Apache-2.0"
] | null | null | null | Team_KnowHow/member/views.py | qudwn1114/TestRepo | 4591cd685597962aeb2fc4b9877dca4a2f572933 | [
"Apache-2.0"
] | 1 | 2021-01-03T03:24:45.000Z | 2021-01-03T03:24:45.000Z | from django.shortcuts import render, redirect
def login(request):
return render(request, "login.html")
def member_register(request):
return render(request, "member_register.html")
| 23.75 | 50 | 0.763158 |
79629c7aaec0c65afd857e056fbe3590ca3a5f0c | 1,457 | py | Python | scripts/process_all.py | anton-petrov/uvicorn-gunicorn-fastapi-docker | 51e7369d7f8e4c1d722e095308b3cb05417ac5f7 | [
"MIT"
] | null | null | null | scripts/process_all.py | anton-petrov/uvicorn-gunicorn-fastapi-docker | 51e7369d7f8e4c1d722e095308b3cb05417ac5f7 | [
"MIT"
] | null | null | null | scripts/process_all.py | anton-petrov/uvicorn-gunicorn-fastapi-docker | 51e7369d7f8e4c1d722e095308b3cb05417ac5f7 | [
"MIT"
] | null | null | null | import os
import subprocess
import sys
environments = [
{"NAME": "latest", "PYTHON_VERSION": "3.9"},
{"NAME": "python3.9-alpine3.13", "PYTHON_VERSION": "3.9"},
{"NAME": "python3.9-slim", "PYTHON_VERSION": "3.9"},
{"NAME": "python3.9", "PYTHON_VERSION": "3.9"},
{"NAME": "mambaforge", "PYTHON_VERSION... | 26.490909 | 82 | 0.593686 |
79629d758097ee04b55ac27d7a965f0b0a2b2d13 | 2,251 | py | Python | features/__init__.py | aolabNeuro/brain-python-interface | 11590717e1a1a2d5cc89a0495f02170b1b5f3c08 | [
"Apache-2.0"
] | 2 | 2020-04-14T23:35:36.000Z | 2020-09-11T01:34:50.000Z | features/__init__.py | aolabNeuro/brain-python-interface | 11590717e1a1a2d5cc89a0495f02170b1b5f3c08 | [
"Apache-2.0"
] | 89 | 2020-08-03T16:54:08.000Z | 2022-03-09T19:56:19.000Z | features/__init__.py | aolabNeuro/brain-python-interface | 11590717e1a1a2d5cc89a0495f02170b1b5f3c08 | [
"Apache-2.0"
] | 3 | 2020-08-10T21:29:26.000Z | 2021-01-18T18:29:09.000Z | '''
Module for the core "features" that can be used to extend and customize a
task/experiment by multiple inheritance.
'''
from riglib.stereo_opengl.window import WindowWithExperimenterDisplay, Window2D
from .generator_features import Autostart, AdaptiveGenerator, IgnoreCorrectness
from .peripheral_device_features imp... | 39.491228 | 128 | 0.817414 |
79629db3a64654b92ec801fa370a87dd87cbd724 | 14,146 | py | Python | zaza/charm_lifecycle/utils.py | coreycb/zaza | 468245ac4fb4016648d8b3c35a64623dafb0d001 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zaza/charm_lifecycle/utils.py | coreycb/zaza | 468245ac4fb4016648d8b3c35a64623dafb0d001 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zaza/charm_lifecycle/utils.py | coreycb/zaza | 468245ac4fb4016648d8b3c35a64623dafb0d001 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2018 Canonical Ltd.
#
# 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 writin... | 31.86036 | 78 | 0.661035 |
79629db59f8591c60a37dbc047b658632b1c8ec4 | 3,594 | py | Python | terracotta/server/flask_api.py | vlro/terracotta | 26ef2f61bd8306fd8fecd27288df6426a6751534 | [
"MIT"
] | null | null | null | terracotta/server/flask_api.py | vlro/terracotta | 26ef2f61bd8306fd8fecd27288df6426a6751534 | [
"MIT"
] | null | null | null | terracotta/server/flask_api.py | vlro/terracotta | 26ef2f61bd8306fd8fecd27288df6426a6751534 | [
"MIT"
] | null | null | null | from typing import Callable, Any
import functools
from apispec import APISpec
import apispec.ext.flask
import apispec.ext.marshmallow
from flask import Flask, Blueprint, current_app, send_file, jsonify
from flask_cors import CORS
import marshmallow
from terracotta import exceptions, __version__
# define blueprint... | 31.80531 | 97 | 0.702838 |
79629df6d82c5f53aa2874d7700cf9ecc2f77e95 | 7,336 | py | Python | tests/components/tts/test_voicerss.py | shire210/home-assistant | 63cd8bbee6f1b74ae9c6c249ac820119a8a573d8 | [
"Apache-2.0"
] | 2 | 2017-02-25T00:27:06.000Z | 2017-02-25T03:09:30.000Z | tests/components/tts/test_voicerss.py | shire210/home-assistant | 63cd8bbee6f1b74ae9c6c249ac820119a8a573d8 | [
"Apache-2.0"
] | null | null | null | tests/components/tts/test_voicerss.py | shire210/home-assistant | 63cd8bbee6f1b74ae9c6c249ac820119a8a573d8 | [
"Apache-2.0"
] | 1 | 2020-08-26T20:54:14.000Z | 2020-08-26T20:54:14.000Z | """The tests for the VoiceRSS speech platform."""
import asyncio
import os
import shutil
import homeassistant.components.tts as tts
from homeassistant.components.media_player import (
SERVICE_PLAY_MEDIA, ATTR_MEDIA_CONTENT_ID, DOMAIN as DOMAIN_MP)
from homeassistant.setup import setup_component
from tests.common ... | 32.75 | 71 | 0.590649 |
79629f81299a8b50c47115f3f29f2398d21ea922 | 894 | py | Python | .history/gram/urls_20201124121526.py | Nyash-Mauro/Instagram-clone | 39f3b660b3bdd59996fa88816712c906d0e3fba5 | [
"MIT"
] | null | null | null | .history/gram/urls_20201124121526.py | Nyash-Mauro/Instagram-clone | 39f3b660b3bdd59996fa88816712c906d0e3fba5 | [
"MIT"
] | null | null | null | .history/gram/urls_20201124121526.py | Nyash-Mauro/Instagram-clone | 39f3b660b3bdd59996fa88816712c906d0e3fba5 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^image/$', views.upload, name='upload'),
url(r'^profile/$', views.profile_info, name='profile'),
url(r'^edit/$', v... | 38.869565 | 79 | 0.637584 |
7962a09357d98bfc8826ae7a391755430ecbdecc | 2,540 | py | Python | nora10/postmylake/comsat_temperature_profile.py | kojitominaga/scratch | 5eaf4de30c89ff1e855a6be493105d1201f07f74 | [
"FSFAP"
] | null | null | null | nora10/postmylake/comsat_temperature_profile.py | kojitominaga/scratch | 5eaf4de30c89ff1e855a6be493105d1201f07f74 | [
"FSFAP"
] | null | null | null | nora10/postmylake/comsat_temperature_profile.py | kojitominaga/scratch | 5eaf4de30c89ff1e855a6be493105d1201f07f74 | [
"FSFAP"
] | null | null | null | import numpy as np
import os
import sys
import datetime
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
ctd = \
np.genfromtxt('../comsat/CTD/COMSAT 2011 CTD.txt',
skip_header = 1,
dtype = 'i4,i4,i4,i4,S12,S14,'+','.join(['f8'] * 15),
... | 40.967742 | 99 | 0.561024 |
7962a0bd65dd0f19daa29e3ad0b5d819475007b5 | 9,051 | py | Python | python/utils/dict_utils.py | loumir/modelinstanceinvot-code | 246bd04b9eab558813ef09ad69a2a2f3ed7d2d92 | [
"Unlicense"
] | null | null | null | python/utils/dict_utils.py | loumir/modelinstanceinvot-code | 246bd04b9eab558813ef09ad69a2a2f3ed7d2d92 | [
"Unlicense"
] | 2 | 2022-03-09T18:39:21.000Z | 2022-03-11T16:27:45.000Z | python/utils/dict_utils.py | loumir/modelinstanceinvot-code | 246bd04b9eab558813ef09ad69a2a2f3ed7d2d92 | [
"Unlicense"
] | 1 | 2021-07-09T12:30:57.000Z | 2021-07-09T12:30:57.000Z | '''
Code imported from SVOM
Created on 29 mai 2019
@author: michel
'''
import json
import re
import urllib
import ssl
from utils import logger
from utils.json_encoder import MyEncoder
class DictUtils():
"""
static class processing implementing convenient operation on dictionaries
"""
@staticmethod
... | 34.545802 | 100 | 0.594962 |
7962a0e6da38b5c8642cc8537e9a49132184744f | 736 | py | Python | demo/crm_inbox/services.py | JanMalte/processlib | 3c8c938479a85b5ad82258244b3c5eeaa537641e | [
"BSD-3-Clause"
] | 1 | 2020-07-14T10:42:55.000Z | 2020-07-14T10:42:55.000Z | demo/crm_inbox/services.py | JanMalte/processlib | 3c8c938479a85b5ad82258244b3c5eeaa537641e | [
"BSD-3-Clause"
] | 2 | 2019-07-12T14:22:11.000Z | 2019-07-30T07:27:20.000Z | demo/crm_inbox/services.py | JanMalte/processlib | 3c8c938479a85b5ad82258244b3c5eeaa537641e | [
"BSD-3-Clause"
] | 2 | 2018-08-22T11:09:06.000Z | 2019-07-12T14:16:00.000Z |
def transmit_order_to_erp(erp_order_process):
# FIXME - submit order to erp
erp_order_process.erp_order_id = '1337'
erp_order_process.save()
def update_campaign_step(campaign_process):
# FIXME get campaign participation for the organisation/person and update to target values
pass
def create_ev... | 29.44 | 94 | 0.76087 |
7962a0e940a48822b19afc9efaa60f8c3c55ed27 | 4,300 | py | Python | calendar_data.py | flodieder/hwyd | 8a854d34ec2380ecf3083f917e2810c2c191503c | [
"MIT"
] | 1 | 2021-12-02T13:52:36.000Z | 2021-12-02T13:52:36.000Z | calendar_data.py | flodieder/hwyd | 8a854d34ec2380ecf3083f917e2810c2c191503c | [
"MIT"
] | 9 | 2020-10-28T16:36:19.000Z | 2021-12-23T14:19:20.000Z | calendar_data.py | flodieder/hwyd | 8a854d34ec2380ecf3083f917e2810c2c191503c | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
###########################################################
# KivyCalendar (X11/MIT License)
# Calendar & Date picker widgets for Kivy (http://kivy.org)
# https://bitbucket.org/xxblx/kivycalendar
#
# Oleg Kozlov (xxblx), 2015
# https://xxblx.bitbucket.org/
###################... | 26.708075 | 74 | 0.53814 |
7962a1379d47ea7af0d67672b8773219ee5e5969 | 4,892 | py | Python | experiments/chaotic_artist/cartist.py | enjalot/adventures_in_opencl | c222d15c076ee3f5f81b529eb47e87c8d8057096 | [
"MIT"
] | 152 | 2015-01-04T00:58:08.000Z | 2022-02-02T00:11:58.000Z | experiments/chaotic_artist/cartist.py | ahmadm-atallah/adventures_in_opencl | c222d15c076ee3f5f81b529eb47e87c8d8057096 | [
"MIT"
] | 1 | 2017-09-21T13:36:15.000Z | 2017-09-21T13:36:15.000Z | experiments/chaotic_artist/cartist.py | ahmadm-atallah/adventures_in_opencl | c222d15c076ee3f5f81b529eb47e87c8d8057096 | [
"MIT"
] | 71 | 2015-02-11T17:12:09.000Z | 2021-12-06T14:05:28.000Z | #from OpenGL.GL import GL_ARRAY_BUFFER, GL_DYNAMIC_DRAW, glFlush, glGenBuffers, glBindBuffer
from OpenGL.GL import *
from OpenGL.arrays import vbo
import numpy as np
import struct
import pyopencl as cl
from initialize import timings
class ChaoticArtist(object):
def __init__(self, ntracers, dt=.01, maxlife... | 30.962025 | 104 | 0.585854 |
7962a159d71a5191a60de855e61885a45fb1715c | 7,089 | py | Python | acquisition/Thorcam/acquire_images.py | idiap/hesm_distrib | ff37192733468b40f9bb7b7f573ff326a3aade14 | [
"BSD-2-Clause-Patent"
] | null | null | null | acquisition/Thorcam/acquire_images.py | idiap/hesm_distrib | ff37192733468b40f9bb7b7f573ff326a3aade14 | [
"BSD-2-Clause-Patent"
] | null | null | null | acquisition/Thorcam/acquire_images.py | idiap/hesm_distrib | ff37192733468b40f9bb7b7f573ff326a3aade14 | [
"BSD-2-Clause-Patent"
] | null | null | null | # License - for Non-Commercial Research and Educational Use Only
#
# Copyright (c) 2019, Idiap research institute
#
# All rights reserved.
#
# Run, copy, study, change, improve and redistribute source and binary forms, with or without modification, are permitted for non-commercial research and educational use ... | 35.984772 | 758 | 0.631401 |
7962a169a5115296e6fd27defbe43b007c5efcf9 | 3,061 | py | Python | story.py | KRHS-GameProgramming-2014/Steam-Punk-Game- | 08d2a80f095a56194a5fb9ed595c7068b909ada8 | [
"BSD-2-Clause"
] | null | null | null | story.py | KRHS-GameProgramming-2014/Steam-Punk-Game- | 08d2a80f095a56194a5fb9ed595c7068b909ada8 | [
"BSD-2-Clause"
] | null | null | null | story.py | KRHS-GameProgramming-2014/Steam-Punk-Game- | 08d2a80f095a56194a5fb9ed595c7068b909ada8 | [
"BSD-2-Clause"
] | null | null | null | import pygame, sys
from BackGround import BackGround
class TextWindow(pygame.sprite.Sprite):
def __init__(self, textFile, bgImage, pos):
pygame.sprite.Sprite.__init__(self, self.containers)
self.textSurface = self.makeTextImage(textFile)
self.image = pygame.image.load(bgImage)
... | 27.827273 | 80 | 0.552107 |
7962a354fce79f9cf9b2c8454eaf45cb0d19c3c2 | 3,548 | py | Python | test/functional/p2p_feefilter.py | sirgreyhat/verge | 3181a2658e01d2d8dceed6f57dca356d94c92be1 | [
"MIT"
] | 1,787 | 2016-02-20T23:38:23.000Z | 2020-02-11T14:10:01.000Z | test/functional/p2p_feefilter.py | sirgreyhat/verge | 3181a2658e01d2d8dceed6f57dca356d94c92be1 | [
"MIT"
] | 824 | 2016-03-09T22:08:06.000Z | 2020-01-24T12:01:15.000Z | test/functional/p2p_feefilter.py | sirgreyhat/verge | 3181a2658e01d2d8dceed6f57dca356d94c92be1 | [
"MIT"
] | 577 | 2016-02-10T20:26:47.000Z | 2020-01-13T09:22:44.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test processing of feefilter messages."""
from test_framework.mininode import *
from test_framework.te... | 37.744681 | 81 | 0.66009 |
7962a36775f6b952ed1301580052554854445a2e | 679 | py | Python | matrix_registration/constants.py | williamkray/matrix-registration | ef98d964dabc02fc09f7d75d84d3360864fee191 | [
"MIT"
] | null | null | null | matrix_registration/constants.py | williamkray/matrix-registration | ef98d964dabc02fc09f7d75d84d3360864fee191 | [
"MIT"
] | 1 | 2022-03-07T03:02:35.000Z | 2022-03-07T03:02:35.000Z | matrix_registration/constants.py | williamkray/matrix-registration | ef98d964dabc02fc09f7d75d84d3360864fee191 | [
"MIT"
] | 1 | 2022-03-07T20:50:19.000Z | 2022-03-07T20:50:19.000Z | # Standard library imports...
import os
import site
import sys
# Third-party imports...
from appdirs import user_config_dir
__location__ = os.path.realpath(os.path.join(os.getcwd(),
os.path.dirname(__file__)))
WORD_LIST_PATH = os.path.join(__location__, 'wordlist.txt')
# first check in... | 32.333333 | 73 | 0.708395 |
7962a39cf212cc75cc02ee34827493c65a3f767f | 12,095 | py | Python | deteksi_mandiri/views.py | immanuelnadeak/temenin-isoman | 8a497f7defe402820045ab9b748a447fc2e8a5f9 | [
"MIT"
] | null | null | null | deteksi_mandiri/views.py | immanuelnadeak/temenin-isoman | 8a497f7defe402820045ab9b748a447fc2e8a5f9 | [
"MIT"
] | null | null | null | deteksi_mandiri/views.py | immanuelnadeak/temenin-isoman | 8a497f7defe402820045ab9b748a447fc2e8a5f9 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.views.generic import ListView
from django.http import JsonResponse
from django.contrib.auth.decorators import login_required
from main.decorators import allowed_users
from django.contrib import messages
from django.forms import inlineformset_factory
from .form... | 36.212575 | 174 | 0.633733 |
7962a40d97ff970518c7c365e75432f08f542042 | 11,726 | py | Python | django/contrib/comments/templatetags/comments.py | FactFiber/django-ff | 04ee6ab0692e888ce5d7d223c36bc876e474146a | [
"BSD-3-Clause"
] | 4 | 2015-08-27T22:03:47.000Z | 2017-09-04T08:13:44.000Z | django/contrib/comments/templatetags/comments.py | FactFiber/django-ff | 04ee6ab0692e888ce5d7d223c36bc876e474146a | [
"BSD-3-Clause"
] | null | null | null | django/contrib/comments/templatetags/comments.py | FactFiber/django-ff | 04ee6ab0692e888ce5d7d223c36bc876e474146a | [
"BSD-3-Clause"
] | 1 | 2020-01-04T14:51:18.000Z | 2020-01-04T14:51:18.000Z | from django import template
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib import comments
from django.utils.encoding import smart_unicode
register = template.Library()
class BaseCommentNode(template.N... | 35.213213 | 127 | 0.633635 |
7962a4a457d96b37f9ef1c0b62dbaaf8d39ccb68 | 33,955 | py | Python | qiskit_ibm_runtime/qpy/binary_io/circuits.py | rathishcholarajan/qiskit-ibm-runtime | 315a088a844dc8aa4452bde6136b53694dfb3220 | [
"Apache-2.0"
] | null | null | null | qiskit_ibm_runtime/qpy/binary_io/circuits.py | rathishcholarajan/qiskit-ibm-runtime | 315a088a844dc8aa4452bde6136b53694dfb3220 | [
"Apache-2.0"
] | null | null | null | qiskit_ibm_runtime/qpy/binary_io/circuits.py | rathishcholarajan/qiskit-ibm-runtime | 315a088a844dc8aa4452bde6136b53694dfb3220 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 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 derivative wo... | 40.811298 | 101 | 0.623237 |
7962a58eeaca46d042828bb7b14f92c5b09e6832 | 2,747 | py | Python | Recurrent-Layer/Tensorflow.py | paperrune/deeplearning-practice | 77376c8e6963ea783ebee0402794d4d5ee0a7ff8 | [
"MIT"
] | null | null | null | Recurrent-Layer/Tensorflow.py | paperrune/deeplearning-practice | 77376c8e6963ea783ebee0402794d4d5ee0a7ff8 | [
"MIT"
] | null | null | null | Recurrent-Layer/Tensorflow.py | paperrune/deeplearning-practice | 77376c8e6963ea783ebee0402794d4d5ee0a7ff8 | [
"MIT"
] | 1 | 2019-12-09T04:49:37.000Z | 2019-12-09T04:49:37.000Z | import numpy as np
import tensorflow as tf
import time
batch_size = 128
epochs = 100
learning_rate = 0.005
momentum = 0.9
time_step = 28
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
x_train = x_train.reshape([x_train.shape[0], time_step, 784 // time_step]).astype('float32') ... | 39.242857 | 242 | 0.628686 |
7962a64fff5460e1089d923ac19b5a27d4d344e8 | 1,582 | py | Python | player_scraper.py | NahuLD/players-scraper | 5445486890c82516bcf6065746f2b8bbc8559c1e | [
"MIT"
] | null | null | null | player_scraper.py | NahuLD/players-scraper | 5445486890c82516bcf6065746f2b8bbc8559c1e | [
"MIT"
] | null | null | null | player_scraper.py | NahuLD/players-scraper | 5445486890c82516bcf6065746f2b8bbc8559c1e | [
"MIT"
] | null | null | null | import requests
import random
base_url = 'https://api.namemc.com/profile/{}/friends'
file = open('player-list.txt', 'w+')
# we will assume that the first profile used will have a friend list
def runner(kicker, characters):
known = []
next = kicker
while(True):
names, uuids = parse_user(next)
for index in rang... | 24.71875 | 68 | 0.675095 |
7962a66353076373f541f102ea389b613d3e3c08 | 207 | py | Python | hierarchical-decoding/Train.py | msobrevillac/Multilingual-RDF-Verbalizer | ba396693f65eaf74d1f60eb9aed3e78ab9593b22 | [
"MIT"
] | null | null | null | hierarchical-decoding/Train.py | msobrevillac/Multilingual-RDF-Verbalizer | ba396693f65eaf74d1f60eb9aed3e78ab9593b22 | [
"MIT"
] | null | null | null | hierarchical-decoding/Train.py | msobrevillac/Multilingual-RDF-Verbalizer | ba396693f65eaf74d1f60eb9aed3e78ab9593b22 | [
"MIT"
] | 1 | 2021-02-22T14:39:39.000Z | 2021-02-22T14:39:39.000Z |
from arguments import get_args
#from MultitaskTrainer import train
from BasicTrainer import train
import numpy as np
import random
if __name__ == "__main__":
args = get_args()
global step
train(args)
| 15.923077 | 35 | 0.777778 |
7962a8270b6ecde007c34a800f3b8b4150e8859a | 5,669 | py | Python | finetune/insert_msa.py | Yijia-Xiao/Protein-MSA | 86be48f15bee3052957a1c64aa80a2e9aa8f927b | [
"MIT"
] | 3 | 2022-01-10T10:11:04.000Z | 2022-01-10T12:50:43.000Z | finetune/insert_msa.py | Yijia-Xiao/Protein-MSA | 86be48f15bee3052957a1c64aa80a2e9aa8f927b | [
"MIT"
] | null | null | null | finetune/insert_msa.py | Yijia-Xiao/Protein-MSA | 86be48f15bee3052957a1c64aa80a2e9aa8f927b | [
"MIT"
] | null | null | null | import argparse
import math
from tqdm import tqdm
from Bio.SeqIO.FastaIO import Seq, SeqRecord
import lmdb
from typing import Union, List, Tuple, Sequence, Dict, Any, Optional, Collection
from copy import copy
from pathlib import Path
import pickle as pkl
import logging
import random
import json
import lmdb
import nu... | 32.210227 | 100 | 0.573293 |
7962a87b1825a4cd0a5c329d95f9b412b35a5f1d | 5,920 | py | Python | quickfund/getter.py | MapleCCC/Fund-Info-Fetcher | 9b461603ecf986aa71b45c72d894262bc353f12e | [
"MIT"
] | 3 | 2020-07-16T19:18:55.000Z | 2020-08-03T11:28:32.000Z | quickfund/getter.py | MapleCCC/Fund-Info-Fetcher | 9b461603ecf986aa71b45c72d894262bc353f12e | [
"MIT"
] | null | null | null | quickfund/getter.py | MapleCCC/Fund-Info-Fetcher | 9b461603ecf986aa71b45c72d894262bc353f12e | [
"MIT"
] | 1 | 2020-12-18T13:48:20.000Z | 2020-12-18T13:48:20.000Z | import asyncio
import pickle
import shelve
from collections.abc import Iterable
from contextlib import nullcontext
from datetime import date, datetime, time, timedelta, timezone
from pathlib import Path
from shelve import Shelf
from typing import cast
from platformdirs import user_cache_dir
from .__version__ import _... | 33.072626 | 129 | 0.733108 |
7962a96731f8fca530a57451f4a30e3bab5bff62 | 1,356 | py | Python | api/accounts/views.py | BuildForSDGCohort2/Team-1053 | 6b3fc485d9be22ca0d03832e0d658359ca88e1c7 | [
"Apache-2.0"
] | null | null | null | api/accounts/views.py | BuildForSDGCohort2/Team-1053 | 6b3fc485d9be22ca0d03832e0d658359ca88e1c7 | [
"Apache-2.0"
] | 7 | 2020-09-05T16:58:46.000Z | 2020-09-26T17:02:24.000Z | api/accounts/views.py | BuildForSDGCohort2/Team-1053 | 6b3fc485d9be22ca0d03832e0d658359ca88e1c7 | [
"Apache-2.0"
] | 2 | 2020-08-20T13:38:16.000Z | 2020-09-10T10:08:27.000Z | from rest_framework import viewsets
from rest_framework.authentication import (BasicAuthentication,
TokenAuthentication)
from rest_framework.decorators import action
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from .mode... | 35.684211 | 71 | 0.736726 |
7962a99dcff898f43a43d557dc8c0c496ce14f10 | 705 | py | Python | Tree/Nil.py | jakedoesgithub/prog_langs_project_scheme_interpreter | 87bc03ab291abd7691db067ab8d5c72282b13c1a | [
"MIT"
] | null | null | null | Tree/Nil.py | jakedoesgithub/prog_langs_project_scheme_interpreter | 87bc03ab291abd7691db067ab8d5c72282b13c1a | [
"MIT"
] | null | null | null | Tree/Nil.py | jakedoesgithub/prog_langs_project_scheme_interpreter | 87bc03ab291abd7691db067ab8d5c72282b13c1a | [
"MIT"
] | null | null | null | # Nil -- Parse tree node class for representing the empty list
from Tree import Node
from Print import Printer
class Nil(Node):
__instance = None
@staticmethod
def getInstance():
if Nil.__instance == None:
Nil()
return Nil.__instance
def __init__(self):
... | 22.741935 | 63 | 0.571631 |
7962a9fc70cf3e3cbbacc8c292118e241cb5c4a9 | 13,474 | py | Python | dp_ftrl/training_loop.py | amitport/google_research_federated | b0dea245eb484f731f28d80e460795816d938b16 | [
"BSD-3-Clause"
] | null | null | null | dp_ftrl/training_loop.py | amitport/google_research_federated | b0dea245eb484f731f28d80e460795816d938b16 | [
"BSD-3-Clause"
] | null | null | null | dp_ftrl/training_loop.py | amitport/google_research_federated | b0dea245eb484f731f28d80e460795816d938b16 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2021, Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 43.324759 | 112 | 0.719237 |
7962aa78e2906da7a066bcd64341a0789f8a6a3b | 538 | py | Python | actistream/admin.py | pennersr/django-actistream | 212c17c8dc2efe747f6b467a39db14cff7e36d06 | [
"MIT"
] | 42 | 2016-09-16T00:49:57.000Z | 2022-01-16T05:01:50.000Z | actistream/admin.py | pennersr/django-actistream | 212c17c8dc2efe747f6b467a39db14cff7e36d06 | [
"MIT"
] | 4 | 2016-10-05T11:26:38.000Z | 2017-06-05T09:38:37.000Z | actistream/admin.py | pennersr/django-actistream | 212c17c8dc2efe747f6b467a39db14cff7e36d06 | [
"MIT"
] | 9 | 2017-02-27T15:35:02.000Z | 2022-01-27T10:47:29.000Z | from django.contrib import admin
from .models import Activity, Notice
class NoticeAdmin(admin.ModelAdmin):
date_hierarchy = "created_at"
list_display = ("activity", "user", "created_at", "read_at", "archived_at")
raw_id_fields = ("user", "activity")
list_filter = ("created_at",)
class ActivityAdmin... | 25.619048 | 79 | 0.719331 |
7962adccbb79c048daf857c5b4366ee73dcb6e19 | 29,082 | py | Python | tests/ui_tests.py | leucosticte/speedypywikibot | f03d2070aa5d30a1f82540b0eda6fa603eb341f9 | [
"MIT"
] | 3 | 2019-02-14T13:59:34.000Z | 2021-11-08T09:23:03.000Z | tests/ui_tests.py | leucosticte/speedypywikibot | f03d2070aa5d30a1f82540b0eda6fa603eb341f9 | [
"MIT"
] | null | null | null | tests/ui_tests.py | leucosticte/speedypywikibot | f03d2070aa5d30a1f82540b0eda6fa603eb341f9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for the user interface."""
#
# (C) Pywikibot team, 2008-2018
#
# Distributed under the terms of the MIT license.
#
# NOTE FOR RUNNING WINDOWS UI TESTS
#
# Windows UI tests have to be run using the tests\ui_tests.bat helper script.
# This will set PYTHONPATH and PYWIKIBOT2_DIR, and then ... | 33.085324 | 98 | 0.638024 |
7962aec9d493497abe0f2162b875a761e985511f | 349 | py | Python | tests/utils.py | File5/lcdui | cb91c8659b7c0ffe663cf9961272d94a3a223c28 | [
"MIT"
] | null | null | null | tests/utils.py | File5/lcdui | cb91c8659b7c0ffe663cf9961272d94a3a223c28 | [
"MIT"
] | null | null | null | tests/utils.py | File5/lcdui | cb91c8659b7c0ffe663cf9961272d94a3a223c28 | [
"MIT"
] | null | null | null | from lcdui.utils import ensure_line_count
def test_ensure_line_count():
assert ensure_line_count([''], 4) == [''] * 4
assert ensure_line_count(['a', 'b', 'c'], 4) == ['a', 'b', 'c', '']
assert ensure_line_count([''] * 10, 4) == [''] * 4
assert ensure_line_count(
[i for i in 'abcdef'] * 10, 4
... | 31.727273 | 71 | 0.535817 |
7962af36b5606c8e0306552d4078ba2938d279d1 | 1,694 | py | Python | discord/base/migrations/0002_topic_room_host_message_room_topic.py | Anshul-GH/django | f0a0d3c8a6cf98dbef3ec9c5a056645ddd0f4ee6 | [
"MIT"
] | null | null | null | discord/base/migrations/0002_topic_room_host_message_room_topic.py | Anshul-GH/django | f0a0d3c8a6cf98dbef3ec9c5a056645ddd0f4ee6 | [
"MIT"
] | null | null | null | discord/base/migrations/0002_topic_room_host_message_room_topic.py | Anshul-GH/django | f0a0d3c8a6cf98dbef3ec9c5a056645ddd0f4ee6 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-08 16:47
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('base', '0001_initial'),
... | 37.644444 | 122 | 0.599174 |
7962b1f0d85ed82814dc215ff858a6b2d79ee422 | 4,949 | py | Python | Atividades/Trabalho12/curso.py | matheusmenezs/com220 | d699f00892df1259249ae012aa2a02f63ae0f06f | [
"MIT"
] | null | null | null | Atividades/Trabalho12/curso.py | matheusmenezs/com220 | d699f00892df1259249ae012aa2a02f63ae0f06f | [
"MIT"
] | null | null | null | Atividades/Trabalho12/curso.py | matheusmenezs/com220 | d699f00892df1259249ae012aa2a02f63ae0f06f | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import ttk
from tkinter import messagebox
from tkinter.constants import E
import os.path
import pickle
class Curso:
def __init__(self, nome):
self.__nome = nome
self.__alunos = []
def getNome(self):
return self.__nome
def getAlunos(self):
... | 34.368056 | 79 | 0.614266 |
7962b27d99f2e733fb922e79a5c4a689f7000e53 | 7,471 | py | Python | test/poll_tests.py | rjarv/poll | e34c422120cbb0cdee40f4f577f158d5c128d2ff | [
"MIT"
] | 1 | 2018-12-04T19:54:50.000Z | 2018-12-04T19:54:50.000Z | test/poll_tests.py | rjarv/poll | e34c422120cbb0cdee40f4f577f158d5c128d2ff | [
"MIT"
] | null | null | null | test/poll_tests.py | rjarv/poll | e34c422120cbb0cdee40f4f577f158d5c128d2ff | [
"MIT"
] | null | null | null | from unittest import mock
from poll import poll, poll_
from contexts import catch
import sys
import time
if '{}.{}'.format(sys.version_info.major, sys.version_info.minor) < '3.3':
from compat import TimeoutError
from compat import inspect as inspect
time.perf_counter = time.clock
class WhenConditionIsTru... | 30.369919 | 123 | 0.684647 |
7962b2c49cab0d0858c2b7aba5be4906b6256227 | 3,123 | py | Python | app/app/settings.py | adelvanL/recipe-app-api | 3977f961786a4b677259bdf90bbb37281cbc43c0 | [
"MIT"
] | null | null | null | app/app/settings.py | adelvanL/recipe-app-api | 3977f961786a4b677259bdf90bbb37281cbc43c0 | [
"MIT"
] | null | null | null | app/app/settings.py | adelvanL/recipe-app-api | 3977f961786a4b677259bdf90bbb37281cbc43c0 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.15.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bu... | 25.185484 | 91 | 0.694845 |
7962b3c3a2bca0449a2bc5449876505256fd368a | 12,118 | py | Python | cogs/games.py | thoughts3rased/BOTrased_PY | 75b707fcdc126a321b5cd49fe12fb3363ce2d8b7 | [
"MIT"
] | null | null | null | cogs/games.py | thoughts3rased/BOTrased_PY | 75b707fcdc126a321b5cd49fe12fb3363ce2d8b7 | [
"MIT"
] | null | null | null | cogs/games.py | thoughts3rased/BOTrased_PY | 75b707fcdc126a321b5cd49fe12fb3363ce2d8b7 | [
"MIT"
] | null | null | null | import asyncio
import itertools
import functools
import math
import re
from attr import __description__
import discord
import os
from discord.ext import tasks, commands
from discord.ext.commands.errors import MissingPermissions
from discord.user import Profile
from discord.utils import get
from dns.message ... | 57.704762 | 440 | 0.516917 |
7962b5132070a23563bf8b43cd415505f8ee6a23 | 8,427 | py | Python | tests/explainers/test_gradient.py | jotsif/shap | 5f8b718b4b7e59da24a14d31025248f340f7be26 | [
"MIT"
] | 1 | 2020-02-05T03:35:41.000Z | 2020-02-05T03:35:41.000Z | tests/explainers/test_gradient.py | behzad-nobakht/shap | 0391dea90baaf7446dfd54f994c741fa585e4a6a | [
"MIT"
] | null | null | null | tests/explainers/test_gradient.py | behzad-nobakht/shap | 0391dea90baaf7446dfd54f994c741fa585e4a6a | [
"MIT"
] | 1 | 2020-01-01T03:02:46.000Z | 2020-01-01T03:02:46.000Z | import matplotlib
import numpy as np
import shutil
matplotlib.use('Agg')
import shap
from .test_deep import _skip_if_no_pytorch, _skip_if_no_tensorflow
def test_tf_keras_mnist_cnn():
""" This is the basic mnist cnn example from keras.
"""
_skip_if_no_tensorflow()
import tensorflow as tf
from tens... | 37.453333 | 119 | 0.590246 |
7962b5352d4e0b56bb2bb7d79084ce7ab58aeea9 | 211 | py | Python | templates/__init__.py | jiachengpan/wechat-rent | f338e564fe4cbd6db70cad93b601ea677059cc27 | [
"MIT"
] | 1 | 2017-04-09T20:49:14.000Z | 2017-04-09T20:49:14.000Z | templates/__init__.py | jiachengpan/wechat-rent | f338e564fe4cbd6db70cad93b601ea677059cc27 | [
"MIT"
] | null | null | null | templates/__init__.py | jiachengpan/wechat-rent | f338e564fe4cbd6db70cad93b601ea677059cc27 | [
"MIT"
] | 1 | 2020-05-12T04:23:55.000Z | 2020-05-12T04:23:55.000Z | import jinja2
import os
JINJA_ENVIRONMENT = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), '..')),
extensions=['jinja2.ext.autoescape'],
autoescape=True)
| 26.375 | 82 | 0.739336 |
7962b6b1c05383b208a17a861e33f8aaa58f79bc | 3,793 | py | Python | homeassistant/components/zwave_js/discovery_data_template.py | nickna/core | c682d5d5e430de52e3da7e06026cd8b4087e864f | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | homeassistant/components/zwave_js/discovery_data_template.py | flexy2dd/core | 1019ee22ff13e5f542e868179d791e6a0d87369a | [
"Apache-2.0"
] | 77 | 2020-07-16T16:43:09.000Z | 2022-03-31T06:14:37.000Z | homeassistant/components/zwave_js/discovery_data_template.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | 7 | 2021-03-20T12:34:01.000Z | 2021-12-02T10:13:52.000Z | """Data template classes for discovery used to generate device specific data for setup."""
from __future__ import annotations
from collections.abc import Iterable
from dataclasses import dataclass
from typing import Any
from zwave_js_server.model.node import Node as ZwaveNode
from zwave_js_server.model.value import V... | 34.481818 | 90 | 0.658318 |
7962b6ce2690a1ff66b2c59249fd0b83bbd9926f | 633 | py | Python | depixlib/Rectangle.py | dangwenbo/Depix | 7cef563281b1d99c87933f4dbba3f80d2541c05d | [
"CC-BY-4.0"
] | 22,846 | 2020-12-06T17:48:50.000Z | 2022-03-31T18:37:48.000Z | depixlib/Rectangle.py | sakuraCY/Depix | 5a124f013c7c1ca37a9b3b67cff3ede2a2c24de5 | [
"CC-BY-4.0"
] | 70 | 2020-12-06T20:51:04.000Z | 2021-12-21T21:14:07.000Z | depixlib/Rectangle.py | sakuraCY/Depix | 5a124f013c7c1ca37a9b3b67cff3ede2a2c24de5 | [
"CC-BY-4.0"
] | 2,785 | 2020-12-06T17:56:40.000Z | 2022-03-31T04:15:27.000Z |
class Rectangle():
def __init__(self, startCoordinates, endCoordinates):
self.startCoordinates = startCoordinates
self.endCoordinates = endCoordinates
self.x = self.startCoordinates[0]
self.y = self.startCoordinates[1]
self.width = self.endCoordinates[0] - self.x
self.height = self.endCoordinates[... | 19.78125 | 71 | 0.728278 |
7962b777387c5018d76a160ec1079729c2d4ee38 | 1,165 | py | Python | sipa/defaults.py | agdsn/sipa | a733bce0a54ad3a79732de82e7f32b35bd87d4e2 | [
"MIT"
] | 22 | 2015-04-17T15:58:30.000Z | 2021-04-19T08:26:32.000Z | sipa/defaults.py | agdsn/sipa | a733bce0a54ad3a79732de82e7f32b35bd87d4e2 | [
"MIT"
] | 329 | 2015-04-14T23:34:31.000Z | 2022-01-21T03:02:46.000Z | sipa/defaults.py | agdsn/sipa | a733bce0a54ad3a79732de82e7f32b35bd87d4e2 | [
"MIT"
] | 18 | 2015-04-17T13:57:56.000Z | 2018-05-30T14:20:59.000Z | # -*- coding: utf-8; -*-
DEFAULT_CONFIG = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': ("%(levelname)s %(asctime)s %(module)s "
"%(process)d %(thread)d %(message)s")
},
'medium': {
'format': ... | 22.843137 | 64 | 0.391416 |
7962b81cbaac1d780dc4c7eda602b6ddd11f08be | 34,253 | py | Python | DNN_Experiments/MaskRCNN/utils.py | wmjpillow/FlameDetectionAPP | c3761c9e15adccbd084b17cd6b6f63c561c7f856 | [
"MIT"
] | 2 | 2019-12-28T21:46:18.000Z | 2020-01-10T03:41:03.000Z | DNN_Experiments/MaskRCNN/utils.py | wmjpillow/FlameDetectionAPP | c3761c9e15adccbd084b17cd6b6f63c561c7f856 | [
"MIT"
] | 10 | 2019-12-28T21:31:19.000Z | 2020-04-12T20:01:58.000Z | DNN_Experiments/MaskRCNN/utils.py | wmjpillow/FlameDetectionAPP | c3761c9e15adccbd084b17cd6b6f63c561c7f856 | [
"MIT"
] | null | null | null | """
Mask R-CNN
Common utility functions and classes.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import sys
import os
import logging
import math
import random
import numpy as np
import tensorflow as tf
import scipy
import skimage.color
imp... | 37.640659 | 104 | 0.614165 |
7962b9dded3cffb2c30175e99f67ac48ecefbad1 | 4,054 | py | Python | checks/check_affine.py | russoale/imgaug | 8dd78f10ec5ae2c133e87850d50addb9d7c67354 | [
"MIT"
] | null | null | null | checks/check_affine.py | russoale/imgaug | 8dd78f10ec5ae2c133e87850d50addb9d7c67354 | [
"MIT"
] | null | null | null | checks/check_affine.py | russoale/imgaug | 8dd78f10ec5ae2c133e87850d50addb9d7c67354 | [
"MIT"
] | null | null | null | from __future__ import print_function, division
import imageio
import numpy as np
from skimage import data
import imgaug as ia
from imgaug import augmenters as iaa
NB_ROWS = 10
NB_COLS = 10
HEIGHT = 200
WIDTH = 256
BB_X1 = 64
BB_X2 = WIDTH - 64
BB_Y1 = 64
BB_Y2 = HEIGHT - 64
def main():
image = data.astronaut(... | 37.88785 | 94 | 0.612728 |
7962b9e17c3ad41c9416e0882ed63f0d2dd2079c | 970 | py | Python | data-hub-api/apps/cdms_api/tests/rest/test_utils.py | uktrade/data-hub-api-old | 5ecf093d88692870982a638ced45de6a82d55672 | [
"MIT"
] | null | null | null | data-hub-api/apps/cdms_api/tests/rest/test_utils.py | uktrade/data-hub-api-old | 5ecf093d88692870982a638ced45de6a82d55672 | [
"MIT"
] | 18 | 2016-04-04T12:42:45.000Z | 2016-09-01T07:21:05.000Z | data-hub-api/apps/cdms_api/tests/rest/test_utils.py | uktrade/data-hub-api-old | 5ecf093d88692870982a638ced45de6a82d55672 | [
"MIT"
] | 1 | 2016-06-01T15:45:21.000Z | 2016-06-01T15:45:21.000Z | import datetime
from django.test.testcases import TestCase
from cdms_api.rest.utils import cdms_datetime_to_datetime, datetime_to_cdms_datetime
class CdmsDatetimeToDatetimeTestCase(TestCase):
def test_valid(self):
dt = datetime.datetime(2016, 1, 1).replace(tzinfo=datetime.timezone.utc)
self.ass... | 27.714286 | 84 | 0.696907 |
7962ba24b6af40691e7ce6e88ffcdb4fcd69196e | 989 | py | Python | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Upload/Gs/__init__.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 282 | 2016-06-16T14:41:44.000Z | 2022-03-02T03:43:02.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Upload/Gs/__init__.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 146 | 2016-06-16T08:55:45.000Z | 2020-09-08T10:37:32.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Upload/Gs/__init__.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 94 | 2016-06-16T10:49:07.000Z | 2022-03-28T09:14:03.000Z | from Gs import Gs # NOQA
def config(parser):
parser.add_argument("--upload.gs.project_id", dest="upload.gs.project_id", type=str,
help="Google Cloud Storage Project ID (required for GS upload)")
parser.add_argument("--upload.gs.access_key", dest="upload.gs.access_key", type=str,
... | 61.8125 | 109 | 0.665319 |
7962ba981acf7102b5e2ac5a79792527cb21420e | 4,897 | py | Python | src/core/tests/test_polypod/test_custom_resources/test_xgboost_job_crd.py | bobvdvelde/polyaxon | 90a8cc37143a9ba1dd7eaf040377100d7a33f0d1 | [
"Apache-2.0"
] | 18 | 2017-09-24T15:56:58.000Z | 2020-04-01T12:17:00.000Z | src/core/tests/test_polypod/test_custom_resources/test_xgboost_job_crd.py | bobvdvelde/polyaxon | 90a8cc37143a9ba1dd7eaf040377100d7a33f0d1 | [
"Apache-2.0"
] | 45 | 2017-09-24T15:42:30.000Z | 2020-07-01T18:08:18.000Z | src/core/tests/test_polypod/test_custom_resources/test_xgboost_job_crd.py | bobvdvelde/polyaxon | 90a8cc37143a9ba1dd7eaf040377100d7a33f0d1 | [
"Apache-2.0"
] | 21 | 2017-10-03T22:03:10.000Z | 2021-08-03T08:41:13.000Z | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | 36.819549 | 87 | 0.60486 |
7962bad437dff0354fcbaf38f400d5131b5a7977 | 4,856 | py | Python | src/main.py | nirbhayjm/GenEML | f6c08c8f3c69a009b565955231509633eda611d1 | [
"MIT"
] | 9 | 2017-08-25T22:15:09.000Z | 2020-03-23T18:25:55.000Z | src/main.py | nirbhayjm/GenEML | f6c08c8f3c69a009b565955231509633eda611d1 | [
"MIT"
] | 2 | 2018-03-11T03:41:22.000Z | 2018-03-13T02:08:20.000Z | src/main.py | nirbhayjm/GenEML | f6c08c8f3c69a009b565955231509633eda611d1 | [
"MIT"
] | 2 | 2019-04-12T18:05:40.000Z | 2019-11-07T16:12:57.000Z | import numpy as np
from model import initialize,update,saver,predict,predictPrecision
from ops import normalize,sparsify,shuffle
from inputs import argparser
from evaluation import *
import time
import os
np.seterr("raise") # To stop execution on overflow warnings
if __name__ == '__main__':
m_opts = argparser()
... | 41.152542 | 98 | 0.555601 |
7962bb87eddf771c2f254c2f747a2f37c101d179 | 5,765 | py | Python | flair/embeddings/base.py | lukasgarbas/flair | bba5b5ca2c5ae4e77c4abce2fa429aa29a4bd85b | [
"MIT"
] | 1 | 2022-01-06T03:15:26.000Z | 2022-01-06T03:15:26.000Z | flair/embeddings/base.py | AshishMahendra/flair-1 | 041c85cf3d45940dccd453fc350767c1c85aad49 | [
"MIT"
] | 1 | 2021-02-04T19:00:22.000Z | 2021-02-04T19:00:22.000Z | flair/embeddings/base.py | AshishMahendra/flair-1 | 041c85cf3d45940dccd453fc350767c1c85aad49 | [
"MIT"
] | 1 | 2020-05-19T11:39:49.000Z | 2020-05-19T11:39:49.000Z | import inspect
import logging
from abc import abstractmethod
from typing import Dict, Generic, List, Sequence, Union
import torch
from torch.nn import Parameter, ParameterList
import flair
from flair.data import DT
log = logging.getLogger("flair")
class Embeddings(torch.nn.Module, Generic[DT]):
"""Abstract bas... | 37.927632 | 122 | 0.635906 |
7962bc11f0e4d3c6881cbad5af5c8b3e3c2a80cc | 344 | py | Python | chainercv/functions/__init__.py | beam2d/chainercv | 55d34c07cbbd03642b71d375db579433859bd00e | [
"MIT"
] | 1,600 | 2017-06-01T15:37:52.000Z | 2022-03-09T08:39:09.000Z | chainercv/functions/__init__.py | beam2d/chainercv | 55d34c07cbbd03642b71d375db579433859bd00e | [
"MIT"
] | 547 | 2017-06-01T06:43:16.000Z | 2021-05-28T17:14:05.000Z | chainercv/functions/__init__.py | beam2d/chainercv | 55d34c07cbbd03642b71d375db579433859bd00e | [
"MIT"
] | 376 | 2017-06-02T01:29:10.000Z | 2022-03-13T11:19:59.000Z | from chainercv.functions.ps_roi_average_align_2d import ps_roi_average_align_2d # NOQA
from chainercv.functions.ps_roi_average_pooling_2d import ps_roi_average_pooling_2d # NOQA
from chainercv.functions.ps_roi_max_align_2d import ps_roi_max_align_2d # NOQA
from chainercv.functions.ps_roi_max_pooling_2d import ps_roi... | 68.8 | 91 | 0.883721 |
7962bc3d72c4a28e5cba40396baad199394ceea0 | 1,389 | py | Python | kmexpert/base/common_steps.py | Kaminario/kmexpert | 2b27f83e63a038786750250a77ab276dd903b4d8 | [
"Apache-2.0"
] | null | null | null | kmexpert/base/common_steps.py | Kaminario/kmexpert | 2b27f83e63a038786750250a77ab276dd903b4d8 | [
"Apache-2.0"
] | null | null | null | kmexpert/base/common_steps.py | Kaminario/kmexpert | 2b27f83e63a038786750250a77ab276dd903b4d8 | [
"Apache-2.0"
] | 1 | 2019-12-26T13:46:51.000Z | 2019-12-26T13:46:51.000Z | #
# (c) 2019 Kaminario Technologies, Ltd.
#
# This software is licensed solely under the terms of the Apache 2.0 license,
# the text of which is available at http://www.apache.org/licenses/LICENSE-2.0.
# All disclaimers and limitations of liability set forth in the Apache 2.0 license apply.
#
import os
import datetime... | 36.552632 | 117 | 0.62491 |
7962bd832b4045efae44e2739e85ed9923052a67 | 655 | py | Python | python3IBM/storeFormDB.py | csantanapr/openwhisk-demos | d5613658678363619f7af345f49ba0bf8727d9ed | [
"Apache-2.0"
] | null | null | null | python3IBM/storeFormDB.py | csantanapr/openwhisk-demos | d5613658678363619f7af345f49ba0bf8727d9ed | [
"Apache-2.0"
] | 1 | 2017-10-10T02:35:25.000Z | 2017-10-10T02:39:03.000Z | python3IBM/storeFormDB.py | csantanapr/openwhisk-demos | d5613658678363619f7af345f49ba0bf8727d9ed | [
"Apache-2.0"
] | 2 | 2016-09-18T20:15:10.000Z | 2020-07-03T07:37:19.000Z | import ibm_db
import datetime
def main(args):
global conn
customer_id = args["customer_id"]
text = args["payload"]
ssldsn = args["__bx_creds"]["dashDB"]["ssldsn"]
if globals().get("conn") is None:
conn = ibm_db.connect(ssldsn, "", "")
statement = "INSERT INTO CUSTOMER_FEEDBACK (CUST_ID... | 34.473684 | 90 | 0.645802 |
7962bdd56e2d9ef068e7cd6bbb7458028018a4bc | 10,647 | py | Python | workjets/torchnets/RAUnet3D/RAUnet3D.py | geekac/workjets | 0e4bca01e0579aade353aeaeb8e087bb8da2037b | [
"MIT"
] | null | null | null | workjets/torchnets/RAUnet3D/RAUnet3D.py | geekac/workjets | 0e4bca01e0579aade353aeaeb8e087bb8da2037b | [
"MIT"
] | null | null | null | workjets/torchnets/RAUnet3D/RAUnet3D.py | geekac/workjets | 0e4bca01e0579aade353aeaeb8e087bb8da2037b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import torch
import torch.nn as nn
from torch.nn import functional as F
class ResidualBlock(nn.Module):
"""
implemention of Residual Block 残差机制
https://arxiv.org/pdf/1603.05027.pdf
"""
def __init__(self, in_channels=None, out_channels=None):
super(ResidualB... | 39.143382 | 118 | 0.617263 |
7962bddf269d51482ef6218aa101f2ba551a1611 | 1,111 | py | Python | 1-50/015threeSum.py | zhaoxinlu/leetcode-algorithms | f5e1c94c99628e7fb04ba158f686a55a8093e933 | [
"MIT"
] | null | null | null | 1-50/015threeSum.py | zhaoxinlu/leetcode-algorithms | f5e1c94c99628e7fb04ba158f686a55a8093e933 | [
"MIT"
] | null | null | null | 1-50/015threeSum.py | zhaoxinlu/leetcode-algorithms | f5e1c94c99628e7fb04ba158f686a55a8093e933 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0?
Find all unique triplets in the array which gives the sum of zero.
Note: The solution set must not contain duplicate triplets.
# Time Limit Exceeded
"""
class Solution(object):
def threeSum(self, num... | 29.236842 | 88 | 0.477048 |
7962be40c9fda493c58b091ea4ff932355ca6f0c | 1,390 | py | Python | edalize/ascentlint.py | towoe/edalize | f60069ef1a4e89df49675e5bdb1db09ae136de0f | [
"BSD-2-Clause"
] | null | null | null | edalize/ascentlint.py | towoe/edalize | f60069ef1a4e89df49675e5bdb1db09ae136de0f | [
"BSD-2-Clause"
] | null | null | null | edalize/ascentlint.py | towoe/edalize | f60069ef1a4e89df49675e5bdb1db09ae136de0f | [
"BSD-2-Clause"
] | null | null | null | import logging
import re
import os
from collections import OrderedDict
from edalize.edatool import Edatool
logger = logging.getLogger(__name__)
class Ascentlint(Edatool):
_description = """ Real Intent Ascent Lint backend
Ascent Lint performs static source code analysis on HDL code and checks for
common coding... | 30.217391 | 80 | 0.589928 |
7962bf26ed8dc274c0ac27bc1c300f90443919f3 | 1,420 | py | Python | weather.py | q1e123/Hackathon_Tarrot | 8d5cf6d043165869d2f6885ebaf887a9ebf7f431 | [
"MIT"
] | null | null | null | weather.py | q1e123/Hackathon_Tarrot | 8d5cf6d043165869d2f6885ebaf887a9ebf7f431 | [
"MIT"
] | 1 | 2021-09-08T01:39:42.000Z | 2021-09-08T01:39:42.000Z | weather.py | q1e123/Hackathon_Tarrot | 8d5cf6d043165869d2f6885ebaf887a9ebf7f431 | [
"MIT"
] | null | null | null | import linear_regression as lr
import utils
utils.dataset_join()
data_file = open("dataset","r")
data_lines = data_file.readlines()
def get_x(date):
date = date.split('T')
x = 0
x += (utils.stoi(date[0],'-')*1000000)
x += utils.stoi(date[1],':')
return x
def get_year():
ds = open("dataset"... | 21.846154 | 51 | 0.530986 |
7962bfcc97c66fd19d922a49708334faccf08473 | 2,044 | py | Python | pyedgeiotframework/southbound/PyDSLRGateway.py | rassaifred/PyEdgeIoTFramework | 88763d4a461a0ef146597b6f81feb9188fca83bb | [
"MIT"
] | null | null | null | pyedgeiotframework/southbound/PyDSLRGateway.py | rassaifred/PyEdgeIoTFramework | 88763d4a461a0ef146597b6f81feb9188fca83bb | [
"MIT"
] | null | null | null | pyedgeiotframework/southbound/PyDSLRGateway.py | rassaifred/PyEdgeIoTFramework | 88763d4a461a0ef146597b6f81feb9188fca83bb | [
"MIT"
] | null | null | null | """
ToDo: add listen camera config chnage over PubSub from camera_id topic
ToDo: add listen photo number chnage over PubSub
* every gateway have exclusively single camera
"""
from PyEdgeIoTFramework.pyedgeiotframework.core.EdgeService import EdgeService
from PyEdgeIoTFramework.pyedgeiotframework.southbound.PyDSLR i... | 26.894737 | 78 | 0.490705 |
7962c17b224f0f0a55be98472525abecc342ea58 | 12,371 | py | Python | improver/generate_ancillaries/generate_ancillary.py | thbom001/improver | 6f6e334a1e8e44a151125cf123ecdda2c56dbec4 | [
"BSD-3-Clause"
] | null | null | null | improver/generate_ancillaries/generate_ancillary.py | thbom001/improver | 6f6e334a1e8e44a151125cf123ecdda2c56dbec4 | [
"BSD-3-Clause"
] | null | null | null | improver/generate_ancillaries/generate_ancillary.py | thbom001/improver | 6f6e334a1e8e44a151125cf123ecdda2c56dbec4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown copyright. The Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are me... | 35.446991 | 83 | 0.619756 |
7962c225b846daa1c2de51ba3dd07f0ba5561985 | 1,964 | py | Python | src/sdk/pynni/setup.py | logenBupt/nni | 699ec812e749ae8d060c3862d5775864ab043cd2 | [
"MIT"
] | 1 | 2019-06-27T16:31:20.000Z | 2019-06-27T16:31:20.000Z | src/sdk/pynni/setup.py | vipulgupta2048/nni | e14476838852357b8ec0cd5161e0445bafb54b25 | [
"MIT"
] | 4 | 2022-02-10T06:23:52.000Z | 2022-03-08T23:37:29.000Z | src/sdk/pynni/setup.py | ZeroInfinite/nni | b07309d9c63919f2fd601c596fda08114a9da0a6 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
#
# MIT 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 limitation the rights to u... | 37.769231 | 100 | 0.679226 |
7962c3fe7064fb53c31a7c9f3df504421bc7fa09 | 171 | py | Python | art_collections/art_collections/doctype/customer_item_directive/test_customer_item_directive.py | ashish-greycube/art_collections | 21de9ac19548bb43f4df3975fcebbdcf2d2540ce | [
"MIT"
] | 2 | 2021-12-10T17:27:33.000Z | 2022-02-18T04:25:49.000Z | art_collections/art_collections/doctype/customer_item_directive/test_customer_item_directive.py | ashish-greycube/art_collections | 21de9ac19548bb43f4df3975fcebbdcf2d2540ce | [
"MIT"
] | null | null | null | art_collections/art_collections/doctype/customer_item_directive/test_customer_item_directive.py | ashish-greycube/art_collections | 21de9ac19548bb43f4df3975fcebbdcf2d2540ce | [
"MIT"
] | 1 | 2021-12-10T11:42:33.000Z | 2021-12-10T11:42:33.000Z | # Copyright (c) 2021, GreyCube Technologies and Contributors
# See license.txt
# import frappe
import unittest
class TestCustomerItemDirective(unittest.TestCase):
pass
| 19 | 60 | 0.807018 |
7962c42823759cc3e3f898bbfaa2475beaef05f0 | 1,338 | py | Python | tests/tf/block/test_base.py | Jwmc999/Transformers4Rec | e6cdf13a7c0102303c0258120274f88b2d42c9c2 | [
"Apache-2.0"
] | 415 | 2021-09-20T20:47:34.000Z | 2022-03-31T16:51:03.000Z | tests/tf/block/test_base.py | Jwmc999/Transformers4Rec | e6cdf13a7c0102303c0258120274f88b2d42c9c2 | [
"Apache-2.0"
] | 128 | 2021-09-21T07:19:38.000Z | 2022-03-31T15:08:27.000Z | tests/tf/block/test_base.py | Jwmc999/Transformers4Rec | e6cdf13a7c0102303c0258120274f88b2d42c9c2 | [
"Apache-2.0"
] | 44 | 2021-09-23T07:25:36.000Z | 2022-03-29T04:17:53.000Z | #
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# 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 ... | 32.634146 | 91 | 0.753363 |
7962c44d96d0fbed458dc73b62462d2c7c984822 | 6,575 | py | Python | setup.py | LoveIsGrief/coveragepy | fdadbe8d442a0957d15b4e14035b73d9321cbdff | [
"Apache-2.0"
] | null | null | null | setup.py | LoveIsGrief/coveragepy | fdadbe8d442a0957d15b4e14035b73d9321cbdff | [
"Apache-2.0"
] | null | null | null | setup.py | LoveIsGrief/coveragepy | fdadbe8d442a0957d15b4e14035b73d9321cbdff | [
"Apache-2.0"
] | 2 | 2018-02-27T08:56:41.000Z | 2020-12-22T22:10:38.000Z | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Code coverage measurement for Python"""
# Distutils setup for coverage.py
# This file is used unchanged under all versions of Python, 2.x and 3.x.
import os
im... | 31.763285 | 101 | 0.645779 |
7962c45b87d1853204e4a97af698afbb8fce7be5 | 3,367 | py | Python | cron.py | Vman45/app | dd02a50bad75d99758e4fc78c6f5d2eeb97dcde4 | [
"MIT"
] | null | null | null | cron.py | Vman45/app | dd02a50bad75d99758e4fc78c6f5d2eeb97dcde4 | [
"MIT"
] | null | null | null | cron.py | Vman45/app | dd02a50bad75d99758e4fc78c6f5d2eeb97dcde4 | [
"MIT"
] | null | null | null | import argparse
import arrow
from app.config import IGNORED_EMAILS, ADMIN_EMAIL
from app.email_utils import send_email, send_trial_end_soon_email
from app.extensions import db
from app.log import LOG
from app.models import (
Subscription,
User,
GenEmail,
ForwardEmailLog,
ForwardEmail,
CustomDo... | 25.507576 | 113 | 0.632314 |
7962c4b07ab9944de7b829252c487e9288087397 | 1,024 | py | Python | sklearn_protocols/support.py | hmasdev/sklearn-protocols | 7906dabbd2a1f634fa08b5623cc41a2dc46e3c8d | [
"MIT"
] | null | null | null | sklearn_protocols/support.py | hmasdev/sklearn-protocols | 7906dabbd2a1f634fa08b5623cc41a2dc46e3c8d | [
"MIT"
] | null | null | null | sklearn_protocols/support.py | hmasdev/sklearn-protocols | 7906dabbd2a1f634fa08b5623cc41a2dc46e3c8d | [
"MIT"
] | null | null | null | from typing import Protocol, runtime_checkable
__all__ = [
"SupportFit",
"SupportPredict",
"SupportPredictProba",
"SupportPredictLogProba",
"SupportTransform",
"SupportFitPredict",
"SupportFitTransform",
]
@runtime_checkable
class SupportFit(Protocol):
def fit(self, X, y=None, **kwar... | 16.786885 | 49 | 0.666992 |
7962c4b5674ec707dd1f51db8c3ae65765acbab4 | 229 | py | Python | tools/__init__.py | depp/jetpack | 2f6a7df3c7db212c31fdf199f05b3080cbee5fd5 | [
"MIT"
] | null | null | null | tools/__init__.py | depp/jetpack | 2f6a7df3c7db212c31fdf199f05b3080cbee5fd5 | [
"MIT"
] | null | null | null | tools/__init__.py | depp/jetpack | 2f6a7df3c7db212c31fdf199f05b3080cbee5fd5 | [
"MIT"
] | null | null | null | # Copyright 2015 Dietrich Epp.
#
# This file is part of Dash and the Jetpack Space Pirates. The Dash
# and the Jetpack Space Pirates source code is distributed under the
# terms of the MIT license. See LICENSE.txt for details.
| 38.166667 | 68 | 0.764192 |
7962c5b9f38f6f07963757d569416757a41cf980 | 333 | py | Python | app_server/account/urls.py | Tomvictor/OAuth2 | 905f88ef7a811025f6cc5ca28a972b6ce9a4e569 | [
"MIT"
] | null | null | null | app_server/account/urls.py | Tomvictor/OAuth2 | 905f88ef7a811025f6cc5ca28a972b6ce9a4e569 | [
"MIT"
] | null | null | null | app_server/account/urls.py | Tomvictor/OAuth2 | 905f88ef7a811025f6cc5ca28a972b6ce9a4e569 | [
"MIT"
] | 2 | 2021-05-04T12:58:43.000Z | 2021-05-04T12:59:40.000Z | from django.urls import path
from account import views
app_name = "auth"
urlpatterns = [
path("v1/token/refresh/", views.RefreshAPIView.as_view(), name="token_refresh"),
path("v1/login/", views.LoginAPIView.as_view(), name="login_api"),
path("v1/profile/", views.UserProfileAPIView.as_view(), name="user_... | 25.615385 | 84 | 0.711712 |
7962c8c16314428c187115c9ad8030ab827ccf7f | 735 | py | Python | lisa/server/web/weblisa/utils/loaders/AbsolutePath.py | Seraf/LISA | 7233a0f024c7dac412cbf79d617be4e4f48b2b7d | [
"MIT"
] | 29 | 2015-01-01T20:28:34.000Z | 2018-09-28T00:54:23.000Z | lisa/server/web/weblisa/utils/loaders/AbsolutePath.py | Seraf/LISA | 7233a0f024c7dac412cbf79d617be4e4f48b2b7d | [
"MIT"
] | 6 | 2015-04-06T06:41:21.000Z | 2017-02-19T19:01:20.000Z | lisa/server/web/weblisa/utils/loaders/AbsolutePath.py | Seraf/LISA | 7233a0f024c7dac412cbf79d617be4e4f48b2b7d | [
"MIT"
] | 15 | 2015-03-16T02:39:08.000Z | 2021-11-25T16:25:42.000Z | __author__ = 'juliensyx'
from django.conf import settings
from django.template.loader import BaseLoader
from django.template.base import Template, TemplateDoesNotExist
class Loader(BaseLoader):
is_usable = True
def load_template(self, template_name, template_dirs=None):
source, origin = self.load_temp... | 36.75 | 80 | 0.717007 |
7962c8cb854a405a686c6c237b022ab85b48147b | 982 | py | Python | hormonal-hedonists/TLOA/entities/entity.py | CharlieADavies/code-jam-6 | 4de1527d0d54207c5b7b09fe2a7ad3ab8071bd95 | [
"MIT"
] | 76 | 2020-01-17T12:09:48.000Z | 2022-03-26T19:17:26.000Z | hormonal-hedonists/TLOA/entities/entity.py | 1nf1del/code-jam-6 | a7eb3b1256ae113c93f0337892c667768e8bc199 | [
"MIT"
] | 17 | 2020-01-21T23:13:34.000Z | 2020-02-07T00:07:04.000Z | hormonal-hedonists/TLOA/entities/entity.py | CharlieADavies/code-jam-6 | 4de1527d0d54207c5b7b09fe2a7ad3ab8071bd95 | [
"MIT"
] | 91 | 2020-01-17T12:01:06.000Z | 2022-03-22T20:38:59.000Z | from typing import Tuple
from TLOA.core.constants import MAX_SHIP_HEALTH
from kivy.event import EventDispatcher
from kivy.properties import BoundedNumericProperty
from kivy.uix.widget import Widget
class Entity(EventDispatcher):
id: str = ''
shape: Widget = None
def step(self, dt, game):
pass
... | 24.55 | 91 | 0.641548 |
7962c9499db293e55671e4c4a7a40d3cee902521 | 2,622 | py | Python | AAS_18-290_3dof/drdv_agent.py | Aerospace-AI/AAS-18-290_3dof | eed5d66de5514fdd2a19c48db8ae8120bd5e25ae | [
"MIT"
] | 3 | 2021-04-09T08:38:44.000Z | 2021-11-21T14:21:45.000Z | AAS_18-290_3dof/drdv_agent.py | Aerospace-AI/AAS-18-290_3dof | eed5d66de5514fdd2a19c48db8ae8120bd5e25ae | [
"MIT"
] | 1 | 2020-03-03T22:53:37.000Z | 2020-03-03T22:53:37.000Z | AAS_18-290_3dof_manuscript/drdv_agent.py | Aerospace-AI/AAS-18-290_3dof | eed5d66de5514fdd2a19c48db8ae8120bd5e25ae | [
"MIT"
] | 1 | 2021-11-21T14:21:40.000Z | 2021-11-21T14:21:40.000Z | import numpy as np
import env_utils as envu
import attitude_utils as attu
from time import time
class DRDV_agent(object):
def __init__(self, env):
self.env = env
self.state = {}
self.prev_state = {}
self.mass = 2000.
def get_thrust(self,state):
rg = state[0:3]
... | 33.615385 | 140 | 0.54386 |
7962c9a1a7d4a7d976a0cd01bd84e4549a9cfc40 | 1,446 | py | Python | dabi_licenses/elastic_models.py | dchaplinsky/ragoogle | dccb3d29334c3220ea12c46c725c443c8bd725c0 | [
"MIT"
] | 3 | 2018-06-10T21:20:56.000Z | 2021-04-04T11:21:06.000Z | dabi_licenses/elastic_models.py | dchaplinsky/ragoogle | dccb3d29334c3220ea12c46c725c443c8bd725c0 | [
"MIT"
] | 7 | 2018-08-14T20:54:49.000Z | 2020-06-05T18:17:30.000Z | dabi_licenses/elastic_models.py | dchaplinsky/ragoogle | dccb3d29334c3220ea12c46c725c443c8bd725c0 | [
"MIT"
] | 3 | 2018-06-27T12:53:13.000Z | 2020-09-25T19:41:46.000Z | from django.template.loader import render_to_string
from elasticsearch_dsl import Keyword
from django.urls import reverse
from abstract.elastic_models import (
BASIC_INDEX_SETTINGS,
AbstractDatasetMapping,
namesAutocompleteAnalyzer,
namesAutocompleteSearchAnalyzer,
ukrainianAddressesStopwordsAnalyz... | 30.125 | 72 | 0.737898 |
7962c9a22efed6d5e37eebff9b7262d0594f6632 | 399 | py | Python | utils/common.py | OliRafa/SRFR-GAN | b7995421f5a965d35dd83f3107e095d83446868b | [
"Unlicense"
] | null | null | null | utils/common.py | OliRafa/SRFR-GAN | b7995421f5a965d35dd83f3107e095d83446868b | [
"Unlicense"
] | 3 | 2021-04-30T21:14:05.000Z | 2022-02-10T01:29:47.000Z | utils/common.py | OliRafa/SRFR-GAN | b7995421f5a965d35dd83f3107e095d83446868b | [
"Unlicense"
] | 1 | 2020-07-11T18:43:48.000Z | 2020-07-11T18:43:48.000Z | import numpy as np
import tensorflow as tf
def tensor_to_image(tensor):
return (np.squeeze(tensor.numpy()).clip(0, 1) * 255).astype(np.uint8)
@tf.function
def denormalize_tensor(tensor):
tensor = tf.math.multiply(tensor, 128)
return tf.math.add(tensor, 127.5)
@tf.function
def tensor_to_uint8(tensor):
... | 22.166667 | 78 | 0.736842 |
7962c9b20f4a926418c4f975daea2c913c4dd2d1 | 1,219 | py | Python | Excerise_Tuple.py | karthi12ck/caiaptyhon | 3ab42a5ddb3f6814274b1f7a473b35254783ff4c | [
"Apache-2.0"
] | null | null | null | Excerise_Tuple.py | karthi12ck/caiaptyhon | 3ab42a5ddb3f6814274b1f7a473b35254783ff4c | [
"Apache-2.0"
] | null | null | null | Excerise_Tuple.py | karthi12ck/caiaptyhon | 3ab42a5ddb3f6814274b1f7a473b35254783ff4c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue May 21 09:47:17 2019
@author: Training28
"""
1.Write a Python program to create a tuple.
x=()
print(x)
b=tuple()
print(tuple)
2.Write a Python program to create a tuple with different data types
b=("tuple",3.213,12,'asd')
print(b)
3.Write a Python ... | 16.930556 | 75 | 0.612797 |
7962cb9b95560c4656f51b0c17d00701224cfbac | 86,830 | py | Python | lib/aff4.py | scudette/grr | d4257c5259af881e28a7d62e9837fa13352e2bf6 | [
"Apache-2.0"
] | 6 | 2015-04-03T02:25:28.000Z | 2021-11-17T21:42:59.000Z | lib/aff4.py | scudette/grr | d4257c5259af881e28a7d62e9837fa13352e2bf6 | [
"Apache-2.0"
] | null | null | null | lib/aff4.py | scudette/grr | d4257c5259af881e28a7d62e9837fa13352e2bf6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""AFF4 interface implementation.
This contains an AFF4 data model implementation.
"""
import __builtin__
import abc
import StringIO
import time
import zlib
import logging
from grr.lib import access_control
from grr.lib import config_lib
from grr.lib import data_store
from grr.lib import lex... | 34.010967 | 80 | 0.668179 |
7962cba96751a6472c8097eb78e3999dd7b6fae7 | 3,141 | py | Python | keystone/catalog/backends/kvs.py | citrix-openstack-build/keystone | a513ea77b87cc4705d33a3f33d6a75c3390a3e52 | [
"Apache-2.0"
] | null | null | null | keystone/catalog/backends/kvs.py | citrix-openstack-build/keystone | a513ea77b87cc4705d33a3f33d6a75c3390a3e52 | [
"Apache-2.0"
] | null | null | null | keystone/catalog/backends/kvs.py | citrix-openstack-build/keystone | a513ea77b87cc4705d33a3f33d6a75c3390a3e52 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack Foundation
#
# 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
#
# Unle... | 36.103448 | 79 | 0.67781 |
7962cc04c2cd7294c1a121c43b86c3a2b8617598 | 2,140 | py | Python | tag/Agent.py | AymericBasset/Reinforcment_Learning_Tag | d8ed1a21fc7ea31a5479297bdb9fdd7397f569a6 | [
"MIT"
] | null | null | null | tag/Agent.py | AymericBasset/Reinforcment_Learning_Tag | d8ed1a21fc7ea31a5479297bdb9fdd7397f569a6 | [
"MIT"
] | null | null | null | tag/Agent.py | AymericBasset/Reinforcment_Learning_Tag | d8ed1a21fc7ea31a5479297bdb9fdd7397f569a6 | [
"MIT"
] | null | null | null | import numpy as np
from Brain import Brain
import Parameters as p
class Agent():
def __init__(self,brain_spec=p.BRAIN_SPEC):
#State and Physics init
self.agent_reset()
#Think_center init
self.brain_spec = brain_spec
self.brain = Brain(brain_spec)
def agent_reset(se... | 25.47619 | 52 | 0.603738 |
7962cc8528fa815264d363ef464cfb2990cc4b25 | 6,528 | py | Python | numba/tests/test_slices.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | numba/tests/test_slices.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 108 | 2020-08-17T22:38:26.000Z | 2021-12-06T09:44:14.000Z | numba/tests/test_slices.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | from functools import partial
import itertools
from itertools import chain, product, starmap
import sys
import numpy as np
from numba import jit, typeof, TypingError
from numba.core import utils
from numba.tests.support import TestCase, MemoryLeakMixin
from numba.core.types.functions import _header_lead
import unitte... | 34.17801 | 87 | 0.501072 |
7962cced7b83525986a14ac877e692691bf7149d | 4,072 | py | Python | store/migrations/0001_initial.py | WesamAlmasri/book-store-api | 3947f193d7eb064e6a2089b8d1baf1d34351bf0a | [
"MIT"
] | null | null | null | store/migrations/0001_initial.py | WesamAlmasri/book-store-api | 3947f193d7eb064e6a2089b8d1baf1d34351bf0a | [
"MIT"
] | null | null | null | store/migrations/0001_initial.py | WesamAlmasri/book-store-api | 3947f193d7eb064e6a2089b8d1baf1d34351bf0a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-04-11 13:20
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('user... | 47.348837 | 149 | 0.595285 |
7962ccfa261cd047cb7996a9bb7131fc2ab28a9c | 4,513 | py | Python | benchmark/startQiskit_Class1390.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_Class1390.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_Class1390.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=58
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy as np
import networkx as ... | 32.235714 | 80 | 0.617328 |
7962cd4d21d525df0b2e7e40b1815ce65d8f24aa | 5,910 | py | Python | uhd_restpy/testplatform/sessions/ixnetwork/globals/protocolstack/ancpglobals/ancpdslprofile/ancpdslprofile.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/globals/protocolstack/ancpglobals/ancpdslprofile/ancpdslprofile.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/globals/protocolstack/ancpglobals/ancpdslprofile/ancpdslprofile.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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, ... | 37.643312 | 179 | 0.653299 |
7962cfcdee4f7b3b7afbf902baf41b9d9e0da411 | 63,376 | py | Python | tensorflow/python/keras/engine/base_layer_test.py | ashutom/tensorflow-upstream | c16069c19de9e286dd664abb78d0ea421e9f32d4 | [
"Apache-2.0"
] | 8 | 2021-08-03T03:57:10.000Z | 2021-12-13T01:19:02.000Z | tensorflow/python/keras/engine/base_layer_test.py | ashutom/tensorflow-upstream | c16069c19de9e286dd664abb78d0ea421e9f32d4 | [
"Apache-2.0"
] | 17 | 2021-08-12T19:38:42.000Z | 2022-01-27T14:39:35.000Z | tensorflow/python/keras/engine/base_layer_test.py | ashutom/tensorflow-upstream | c16069c19de9e286dd664abb78d0ea421e9f32d4 | [
"Apache-2.0"
] | 4 | 2022-01-13T11:23:44.000Z | 2022-03-02T11:11:42.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... | 35.484882 | 106 | 0.680194 |
7962d034e03f49c7196606d55da1ce03bce5b6b6 | 167 | py | Python | Lib/test/test_compiler/testcorpus/62_try_except_as.py | diogommartins/cinder | 79103e9119cbecef3b085ccf2878f00c26e1d175 | [
"CNRI-Python-GPL-Compatible"
] | 1,886 | 2021-05-03T23:58:43.000Z | 2022-03-31T19:15:58.000Z | Lib/test/test_compiler/testcorpus/62_try_except_as.py | diogommartins/cinder | 79103e9119cbecef3b085ccf2878f00c26e1d175 | [
"CNRI-Python-GPL-Compatible"
] | 70 | 2021-05-04T23:25:35.000Z | 2022-03-31T18:42:08.000Z | Lib/test/test_compiler/testcorpus/62_try_except_as.py | diogommartins/cinder | 79103e9119cbecef3b085ccf2878f00c26e1d175 | [
"CNRI-Python-GPL-Compatible"
] | 52 | 2021-05-04T21:26:03.000Z | 2022-03-08T18:02:56.000Z | try:
a
except Exc as b:
b
except Exc2 as c:
b
# Check that capturing vars are properly local
def foo():
try:
a
except Exc as b:
b
| 11.928571 | 46 | 0.550898 |
7962d07584bbe91b7484df7c6e8bbaffb70b60e0 | 4,314 | py | Python | test/test_DwalkParser.py | brockpalen/archivetar | d861df9538047dca1bd6e58c5be130c2ec800a2b | [
"MIT"
] | 7 | 2020-03-03T16:52:57.000Z | 2021-10-01T15:47:23.000Z | test/test_DwalkParser.py | brockpalen/archivetar | d861df9538047dca1bd6e58c5be130c2ec800a2b | [
"MIT"
] | 15 | 2020-07-14T03:44:26.000Z | 2022-02-09T16:27:08.000Z | test/test_DwalkParser.py | brockpalen/archivetar | d861df9538047dca1bd6e58c5be130c2ec800a2b | [
"MIT"
] | 1 | 2020-03-05T15:12:47.000Z | 2020-03-05T15:12:47.000Z | import os
import pathlib
from contextlib import ExitStack as does_not_raise
from unittest.mock import MagicMock
import pytest
from conftest import count_files_dir, count_lines_dir
from archivetar import DwalkLine, DwalkParser
@pytest.fixture
def example_data():
"""Example data setup"""
tdata = (
pat... | 31.26087 | 211 | 0.641168 |
7962d0e484f5d49bcc82c84e7420680d18bc5099 | 1,200 | py | Python | backend/officehoursqueue/settings/production.py | pennlabs/Office-Hours-Queue | f73ec90223c43595c9a167162d9d74abfb11ca42 | [
"MIT"
] | 8 | 2020-05-08T15:28:51.000Z | 2020-05-28T03:27:03.000Z | backend/officehoursqueue/settings/production.py | pennlabs/Office-Hours-Queue | f73ec90223c43595c9a167162d9d74abfb11ca42 | [
"MIT"
] | 2 | 2020-06-06T01:53:07.000Z | 2020-07-11T22:02:01.000Z | backend/officehoursqueue/settings/production.py | pennlabs/ohq | f73ec90223c43595c9a167162d9d74abfb11ca42 | [
"MIT"
] | null | null | null | import os
import sentry_sdk
from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.django import DjangoIntegration
from officehoursqueue.settings.base import * # noqa: F401, F403
from officehoursqueue.settings.base import DOMAINS, REDIS_URL
DEBUG = False
# Honour the 'X-Forwarde... | 27.906977 | 88 | 0.764167 |
7962d0e69446bc3fc50ba59c5478ef20fd916d88 | 1,668 | py | Python | pycocoevalcap/meteor/test_meteor.py | gabrielhuang/coco-caption | 5629d295417302f11a51224ed05e41e8aec36782 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pycocoevalcap/meteor/test_meteor.py | gabrielhuang/coco-caption | 5629d295417302f11a51224ed05e41e8aec36782 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pycocoevalcap/meteor/test_meteor.py | gabrielhuang/coco-caption | 5629d295417302f11a51224ed05e41e8aec36782 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import subprocess
import os
from time import time
TEST_METEOR = True
USE_COMMUNICATE = False
BUFSIZE=0
if TEST_METEOR:
meteor_p = subprocess.Popen(['java', '-jar', '-Xmx2G', 'meteor-1.5.jar',
'-', '-', '-stdio', '-l', 'en', '-norm'],
cwd=os.path.dirname(... | 37.909091 | 85 | 0.542566 |
7962d19ff99d507b411772cba7b6cff7a40dffb8 | 4,385 | py | Python | django/contrib/gis/db/backends/postgis/introspection.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | django/contrib/gis/db/backends/postgis/introspection.py | mradziej/django | 5d38965743a369981c9a738a298f467f854a2919 | [
"BSD-3-Clause"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | django/contrib/gis/db/backends/postgis/introspection.py | mradziej/django | 5d38965743a369981c9a738a298f467f854a2919 | [
"BSD-3-Clause"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | from django.db.backends.postgresql_psycopg2.introspection import DatabaseIntrospection
from django.contrib.gis.gdal import OGRGeomType
class GeoIntrospectionError(Exception):
pass
class PostGISIntrospection(DatabaseIntrospection):
# Reverse dictionary for PostGIS geometry types not populated until
# intro... | 45.677083 | 95 | 0.595667 |
7962d287131754e09811e9107b6bdc910b846c23 | 2,126 | py | Python | alembic/env.py | vigov5/oshougatsu2015 | 38cbf325675ee2c08a6965b8689fad8308eb84eb | [
"MIT"
] | null | null | null | alembic/env.py | vigov5/oshougatsu2015 | 38cbf325675ee2c08a6965b8689fad8308eb84eb | [
"MIT"
] | null | null | null | alembic/env.py | vigov5/oshougatsu2015 | 38cbf325675ee2c08a6965b8689fad8308eb84eb | [
"MIT"
] | null | null | null | from __future__ import with_statement
import os
import sys
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
sys.path.append(os.getcwd())
from app import app, db
# this is the Alembic Config object, which provides
# access to the values within the .in... | 26.911392 | 79 | 0.73095 |
7962d2c56efdd7fd200fbd112fcb5c589f1ff5db | 10,738 | py | Python | tests/test_cloudformation/fixtures/single_instance_with_ebs_volume.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 1 | 2020-01-13T21:45:21.000Z | 2020-01-13T21:45:21.000Z | tests/test_cloudformation/fixtures/single_instance_with_ebs_volume.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 17 | 2020-08-28T12:53:56.000Z | 2020-11-10T01:04:46.000Z | tests/test_cloudformation/fixtures/single_instance_with_ebs_volume.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 2 | 2017-03-02T05:59:52.000Z | 2020-09-03T13:25:44.000Z | from __future__ import unicode_literals
template = {
"Description": "AWS CloudFormation Sample Template Gollum_Single_Instance_With_EBS_Volume: Gollum is a simple wiki system built on top of Git that powers GitHub Wikis. This template installs a Gollum Wiki stack on a single EC2 instance with an EBS volume for sto... | 41.141762 | 569 | 0.366828 |
7962d304149b636c2d4d19b7e5d1de6eb87d7103 | 2,781 | py | Python | aries_cloudagent/protocols/introduction/v0_1/routes.py | ldej/aries-cloudagent-python | 25b7a9c08921e67b0962c434102489884ac403b2 | [
"Apache-2.0"
] | 1 | 2021-01-15T01:04:43.000Z | 2021-01-15T01:04:43.000Z | aries_cloudagent/protocols/introduction/v0_1/routes.py | ldej/aries-cloudagent-python | 25b7a9c08921e67b0962c434102489884ac403b2 | [
"Apache-2.0"
] | 1 | 2020-03-06T12:11:29.000Z | 2020-03-06T12:11:29.000Z | aries_cloudagent/protocols/introduction/v0_1/routes.py | ldej/aries-cloudagent-python | 25b7a9c08921e67b0962c434102489884ac403b2 | [
"Apache-2.0"
] | 1 | 2020-04-30T08:22:22.000Z | 2020-04-30T08:22:22.000Z | """Introduction service admin routes."""
import logging
from aiohttp import web
from aiohttp_apispec import docs, match_info_schema, querystring_schema
from marshmallow import fields
from ....messaging.models.openapi import OpenAPISchema
from ....messaging.valid import UUIDFour
from ....storage.error import Storage... | 29.585106 | 84 | 0.719166 |
7962d3e5afa8e8db1ef8e2a38d64169ffa2c7bd1 | 964 | py | Python | wxBufferedBitmap.py | Vivtek/markertool | 22f5fb8e67a8aafd91f7528d85b2faf10b79ad27 | [
"MIT"
] | 1 | 2020-11-07T07:49:12.000Z | 2020-11-07T07:49:12.000Z | wxBufferedBitmap.py | Vivtek/markertool | 22f5fb8e67a8aafd91f7528d85b2faf10b79ad27 | [
"MIT"
] | null | null | null | wxBufferedBitmap.py | Vivtek/markertool | 22f5fb8e67a8aafd91f7528d85b2faf10b79ad27 | [
"MIT"
] | null | null | null | #---------------------------------------------------------------------------
# Taken from https://wiki.wxpython.org/DoubleBufferedDrawing
# Updated to work with Phoenix
#---------------------------------------------------------------------------
import wx
import sys
from PIL import Image
from wxBufferedWindow import ... | 33.241379 | 76 | 0.539419 |
7962d4b1dd9507cff4456e56dce18cfe093d1333 | 287 | py | Python | apps/logs/migrations/0041_merge_20210327_1013.py | techlib/czechelib-stats | ca132e326af0924740a525710474870b1fb5fd37 | [
"MIT"
] | 1 | 2019-12-12T15:38:42.000Z | 2019-12-12T15:38:42.000Z | apps/logs/migrations/0041_merge_20210327_1013.py | techlib/czechelib-stats | ca132e326af0924740a525710474870b1fb5fd37 | [
"MIT"
] | null | null | null | apps/logs/migrations/0041_merge_20210327_1013.py | techlib/czechelib-stats | ca132e326af0924740a525710474870b1fb5fd37 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-03-27 09:13
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('logs', '0040_reporttype_approx_record_count'),
('logs', '0038_reporttype_materialization_date'),
]
operations = []
| 20.5 | 57 | 0.682927 |
7962d4fc0211241bc716fa9ba1d3d9497c0c1413 | 1,832 | py | Python | deepspeech/exps/deepspeech2/bin/export.py | qq1440837150/DeepSpeech | 068c2b1417dde3adcd49ddfb24da987c940db2e3 | [
"Apache-2.0"
] | null | null | null | deepspeech/exps/deepspeech2/bin/export.py | qq1440837150/DeepSpeech | 068c2b1417dde3adcd49ddfb24da987c940db2e3 | [
"Apache-2.0"
] | null | null | null | deepspeech/exps/deepspeech2/bin/export.py | qq1440837150/DeepSpeech | 068c2b1417dde3adcd49ddfb24da987c940db2e3 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 32.714286 | 74 | 0.718886 |
7962d58f47656edc0b3cccc10605c37157915681 | 1,267 | py | Python | arcade/__init__.py | Abeardevil/arcade | 359c5df3614e3a2cca764a8600831fcaded674f3 | [
"MIT"
] | null | null | null | arcade/__init__.py | Abeardevil/arcade | 359c5df3614e3a2cca764a8600831fcaded674f3 | [
"MIT"
] | null | null | null | arcade/__init__.py | Abeardevil/arcade | 359c5df3614e3a2cca764a8600831fcaded674f3 | [
"MIT"
] | null | null | null | """
The Arcade Library
A Python simple, easy to use module for creating 2D games.
"""
# Error out if we import Arcade with an incompatible version of Python.
import sys
import os
if sys.version_info[0] < 3 or (sys.version_info[0] == 3 and sys.version_info[1] < 6):
sys.exit("The Arcade Library requires Python 3.6... | 26.957447 | 85 | 0.783741 |
7962d5e9e3b652df4b886cfaa903060ca464071b | 9,858 | py | Python | David and Pooja/++Validating Linked Mods/Python-3.0/Lib/test/test_multibytecodec.py | LinkedModernismProject/web_code | 4cf6bf53d5c3249e52a75f0a3f57d106e31daf9e | [
"Apache-2.0"
] | 1 | 2015-05-21T23:47:54.000Z | 2015-05-21T23:47:54.000Z | front-end/testsuite-python-lib/Python-3.0/Lib/test/test_multibytecodec.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2015-10-29T20:51:31.000Z | 2015-10-29T20:51:31.000Z | front-end/testsuite-python-lib/Python-3.0/Lib/test/test_multibytecodec.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2019-04-11T11:27:01.000Z | 2019-04-11T11:27:01.000Z | #!/usr/bin/env python
#
# test_multibytecodec.py
# Unit test for multibytecodec itself
#
from test import support
from test import test_multibytecodec_support
from test.support import TESTFN
import unittest, io, codecs, sys, os
import _multibytecodec
ALL_CJKENCODINGS = [
# _codecs_cn
'gb2312', 'gbk', 'gb18030',... | 39.2749 | 77 | 0.586123 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.