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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a27c6d7f9f3fe0e2a780d6baa10c63fc2939f15 | 1,191 | py | Python | tests/pyboard/execScript_adc_son_fft.py | david-therincourt/physique | add85faef564359252da93dca9b7dbb35bd6b4ab | [
"MIT"
] | null | null | null | tests/pyboard/execScript_adc_son_fft.py | david-therincourt/physique | add85faef564359252da93dca9b7dbb35bd6b4ab | [
"MIT"
] | null | null | null | tests/pyboard/execScript_adc_son_fft.py | david-therincourt/physique | add85faef564359252da93dca9b7dbb35bd6b4ab | [
"MIT"
] | null | null | null | from physique import Pyboard
import numpy as np
import matplotlib.pyplot as plt
from numpy.fft import fft
script = """
from pyb import Pin, ADC, Timer, delay
import array
f = 20000 # fréquence d'échantillonnage
nb = 1000 # nombre de points
adc = ADC(Pin('A2')) # Activation du CAN sur la ... | 22.903846 | 83 | 0.646516 |
4a27c712c4ba96ad083cf65f36aa1d94cc93aac7 | 276 | py | Python | authors/apps/articles/migrations/0024_merge_20190130_0649.py | andela/ah-django-unchained | a4e5f6cd11fdc0b9422020693ac1200b849cf0f3 | [
"BSD-3-Clause"
] | null | null | null | authors/apps/articles/migrations/0024_merge_20190130_0649.py | andela/ah-django-unchained | a4e5f6cd11fdc0b9422020693ac1200b849cf0f3 | [
"BSD-3-Clause"
] | 26 | 2019-01-07T14:22:05.000Z | 2019-02-28T17:11:48.000Z | authors/apps/articles/migrations/0024_merge_20190130_0649.py | andela/ah-django-unchained | a4e5f6cd11fdc0b9422020693ac1200b849cf0f3 | [
"BSD-3-Clause"
] | 3 | 2019-09-19T22:16:09.000Z | 2019-10-16T21:16:16.000Z | # Generated by Django 2.1.5 on 2019-01-30 06:49
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('articles', '0023_merge_20190129_0617'),
('articles', '0023_auto_20190129_1219'),
]
operations = [
]
| 18.4 | 49 | 0.652174 |
4a27c81c1440b9420ebda80dd5cd4b348f790715 | 1,728 | py | Python | configs/_base_/datasets/icdar2019_tracka_modern_instance.py | vansin/tabnet | 2403c8134c23a704940522ace92a75b0fc6f5d99 | [
"Apache-2.0"
] | 2 | 2021-10-18T02:52:18.000Z | 2022-01-21T08:54:18.000Z | configs/_base_/datasets/icdar2019_tracka_modern_instance.py | vansin/tabnet | 2403c8134c23a704940522ace92a75b0fc6f5d99 | [
"Apache-2.0"
] | null | null | null | configs/_base_/datasets/icdar2019_tracka_modern_instance.py | vansin/tabnet | 2403c8134c23a704940522ace92a75b0fc6f5d99 | [
"Apache-2.0"
] | null | null | null | # dataset settings
dataset_type = 'TableDataset'
data_root = 'data/table/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
dict(type='Resize', i... | 34.56 | 77 | 0.629051 |
4a27c8285f91dbb3a65facbb430585dda6274885 | 5,751 | py | Python | Scripts/python/scripts mundo 1/Desafios/ALGUEM ME MATA.py | BrenoNAlmeida/Scripts-Escola | 20d886d0401ef7f40a4a46e307eadbf5b1c0a5eb | [
"Apache-2.0"
] | null | null | null | Scripts/python/scripts mundo 1/Desafios/ALGUEM ME MATA.py | BrenoNAlmeida/Scripts-Escola | 20d886d0401ef7f40a4a46e307eadbf5b1c0a5eb | [
"Apache-2.0"
] | null | null | null | Scripts/python/scripts mundo 1/Desafios/ALGUEM ME MATA.py | BrenoNAlmeida/Scripts-Escola | 20d886d0401ef7f40a4a46e307eadbf5b1c0a5eb | [
"Apache-2.0"
] | null | null | null | nome = input('\033[34;1mOla, você esta na biblioteca python. Qual o seu nome ?\033[m')
print('\033[1;34mBem vindo ao primeiro mundo do curso de python {} !\033[m'.format(nome))
print('\033[34;1mAs fases desse curso são essas {}:\033[m\n'
'\033[1;33m1 = Seja um programador\n'
'2 = Para que serve o Python\n'
... | 38.34 | 95 | 0.630499 |
4a27c82f8b117750422de2ef83f18859fbc93328 | 1,126 | py | Python | cdtools/CPA/__init__.py | jg-you/cascading_detection | a08f443f5f7bf46167277b2cb0571f5d94a341c6 | [
"MIT"
] | 4 | 2015-09-28T05:09:15.000Z | 2019-10-25T15:16:16.000Z | cdtools/CPA/__init__.py | jg-you/cascading_detection | a08f443f5f7bf46167277b2cb0571f5d94a341c6 | [
"MIT"
] | null | null | null | cdtools/CPA/__init__.py | jg-you/cascading_detection | a08f443f5f7bf46167277b2cb0571f5d94a341c6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# cdtools -- a python library for cascading community detection on networks
# @author: Jean-Gabriel Young <jean.gabriel.young@gmail.com>
#
# cdtools/CPA/__init__.py -- Init script of the CPA submodule.
# Notes on CPA:
# The Clique Percolation Algorithm was introduced by G. Palla et al. in
#
#... | 33.117647 | 77 | 0.694494 |
4a27c9677bae0d915ff7f933fcdd1d84eab7b008 | 2,951 | py | Python | recipes/Python/119466_Dijkstralgorithm_shortest/recipe-119466.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/119466_Dijkstralgorithm_shortest/recipe-119466.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/119466_Dijkstralgorithm_shortest/recipe-119466.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | # Dijkstra's algorithm for shortest paths
# David Eppstein, UC Irvine, 4 April 2002
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/117228
from priodict import priorityDictionary
def Dijkstra(G,start,end=None):
"""
Find shortest paths from the start vertex to all
vertices nearer than or equal to the end.... | 33.534091 | 64 | 0.731278 |
4a27c99294943e26cc151bf61fc257cbb1f616a5 | 863 | py | Python | onelab/share/doc/gmsh/demos/api/step_assembly.py | Christophe-Foyer/PyFEA | 344996d6b075ee4b2214283f0af8159d86d154fd | [
"MIT"
] | 2 | 2021-08-13T21:46:21.000Z | 2022-01-15T15:59:54.000Z | onelab/share/doc/gmsh/demos/api/step_assembly.py | Christophe-Foyer/pyFEA | 344996d6b075ee4b2214283f0af8159d86d154fd | [
"MIT"
] | null | null | null | onelab/share/doc/gmsh/demos/api/step_assembly.py | Christophe-Foyer/pyFEA | 344996d6b075ee4b2214283f0af8159d86d154fd | [
"MIT"
] | 1 | 2020-12-15T13:47:23.000Z | 2020-12-15T13:47:23.000Z | import gmsh
gmsh.initialize()
# load step file
gmsh.open('as1-tu-203.stp')
# get all model entities
ent = gmsh.model.getEntities()
physicals = {}
for e in ent:
n = gmsh.model.getEntityName(e[0], e[1])
# get entity labels read from STEP and create a physical group for all
# entities having the same 3rd l... | 27.83871 | 74 | 0.596756 |
4a27c9b8b66eea7bd199ce3ffb1963eb2f53926b | 18,882 | py | Python | sdk/python/pulumi_azure_native/cdn/v20190615/endpoint.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cdn/v20190615/endpoint.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cdn/v20190615/endpoint.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 58.277778 | 1,648 | 0.693253 |
4a27c9fc2b2bc7fd8e819a3deb5b2fd4c4afce93 | 198 | py | Python | src/typefit/__init__.py | Xowap/typefit | a1beedcc4b05be6d22063719e7e2aa8c3f2c35b3 | [
"WTFPL"
] | 5 | 2019-10-28T15:40:03.000Z | 2021-03-16T21:07:25.000Z | src/typefit/__init__.py | Xowap/typefit | a1beedcc4b05be6d22063719e7e2aa8c3f2c35b3 | [
"WTFPL"
] | 32 | 2019-10-19T08:40:12.000Z | 2022-01-21T19:07:09.000Z | src/typefit/__init__.py | Xowap/typefit | a1beedcc4b05be6d22063719e7e2aa8c3f2c35b3 | [
"WTFPL"
] | 3 | 2019-10-28T15:42:49.000Z | 2022-01-18T19:18:06.000Z | from . import httpx_models
from .fitting import Fitter, T, typefit
from .meta import meta, other_field
from .reporting import LogErrorReporter, PrettyJson5Formatter
from .serialize import serialize
| 33 | 61 | 0.833333 |
4a27cc5403be8c0bba8bc65721a0785f3bcc0608 | 160 | py | Python | app/main/__init__.py | koyoo-maxwel/news | 656166c47a5dc79b9f4b8516153c90a57f808cc9 | [
"MIT"
] | 2 | 2019-01-21T09:04:16.000Z | 2019-01-21T09:04:17.000Z | app/main/__init__.py | koyoo-maxwel/news | 656166c47a5dc79b9f4b8516153c90a57f808cc9 | [
"MIT"
] | null | null | null | app/main/__init__.py | koyoo-maxwel/news | 656166c47a5dc79b9f4b8516153c90a57f808cc9 | [
"MIT"
] | 2 | 2019-02-17T11:33:28.000Z | 2019-06-24T06:36:43.000Z | from flask import Blueprint
main = Blueprint('main',__name__)
from . import views
# Here we import the blueprint class from flask to avoid circular dependancies | 40 | 78 | 0.80625 |
4a27cc76ff15925a02c05ecf41a293a1c91330b2 | 4,000 | py | Python | criteo_marketing_transition/models/campaign_bid_change_response_message_with_details.py | criteo/criteo-python-marketing-transition-sdk | d6d19a23d87ab62eb4810f41490cebab9c72882f | [
"Apache-2.0"
] | null | null | null | criteo_marketing_transition/models/campaign_bid_change_response_message_with_details.py | criteo/criteo-python-marketing-transition-sdk | d6d19a23d87ab62eb4810f41490cebab9c72882f | [
"Apache-2.0"
] | null | null | null | criteo_marketing_transition/models/campaign_bid_change_response_message_with_details.py | criteo/criteo-python-marketing-transition-sdk | d6d19a23d87ab62eb4810f41490cebab9c72882f | [
"Apache-2.0"
] | 1 | 2022-02-21T11:16:20.000Z | 2022-02-21T11:16:20.000Z | # coding: utf-8
"""
Criteo API Transition Swagger
This is used to help Criteo clients transition from MAPI to Criteo API # noqa: E501
The version of the OpenAPI document: 1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class CampaignBidChang... | 28.776978 | 102 | 0.60125 |
4a27cc94c3305c6090718a2fe23e2ddb9a683a18 | 225 | py | Python | wallet_app/admin.py | Vicky-Rathod/django_ewallet_app | 7f5b6e5f06743225b2ee2e9fcad3ac336d1b3e95 | [
"MIT"
] | null | null | null | wallet_app/admin.py | Vicky-Rathod/django_ewallet_app | 7f5b6e5f06743225b2ee2e9fcad3ac336d1b3e95 | [
"MIT"
] | null | null | null | wallet_app/admin.py | Vicky-Rathod/django_ewallet_app | 7f5b6e5f06743225b2ee2e9fcad3ac336d1b3e95 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Transaction,Type,TopUp,Wallet
# Register your models here.
admin.site.register(Transaction)
admin.site.register(Type)
admin.site.register(TopUp)
admin.site.register(Wallet) | 32.142857 | 49 | 0.826667 |
4a27ccdbde4e06290df91bfa14f0e51677f5283b | 1,302 | py | Python | manage.py | Arlington1985/nn_rest_api_example | c17c61dcbbec4c59ad868293f495c621c533158b | [
"MIT"
] | null | null | null | manage.py | Arlington1985/nn_rest_api_example | c17c61dcbbec4c59ad868293f495c621c533158b | [
"MIT"
] | 1 | 2021-10-20T06:34:02.000Z | 2021-10-20T06:34:02.000Z | manage.py | Arlington1985/nn_rest_api_example | c17c61dcbbec4c59ad868293f495c621c533158b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Manager for maintenance works
import os
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app.db import db
from app import app
from app.models import UserModel, OperationModel
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('db', Mig... | 30.27907 | 86 | 0.751152 |
4a27cd77d62a127951fd75f377c61e0e2e4f7095 | 404 | py | Python | tests/test_models.py | AndreGuerra123/django-portrait | e777816ca7467ad3f354abe8bcddbdf4ae559bda | [
"MIT"
] | null | null | null | tests/test_models.py | AndreGuerra123/django-portrait | e777816ca7467ad3f354abe8bcddbdf4ae559bda | [
"MIT"
] | null | null | null | tests/test_models.py | AndreGuerra123/django-portrait | e777816ca7467ad3f354abe8bcddbdf4ae559bda | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_django-portrait
------------
Tests for `django-portrait` models module.
"""
from django.test import TestCase
from django_portrait import models
class TestDjango_portrait(TestCase):
def setUp(self):
self.portrait = models.Portrait()
def test_... | 15.538462 | 42 | 0.655941 |
4a27ce52a64da5a53d524f58d7613669171d5662 | 1,745 | py | Python | ppocr/modeling/heads/__init__.py | edencfc/PaddleOCR | 82c5966a642d07f99502d779c70a707fe3edbcb0 | [
"Apache-2.0"
] | 4 | 2021-07-29T13:57:22.000Z | 2022-03-21T09:47:53.000Z | ppocr/modeling/heads/__init__.py | edencfc/PaddleOCR | 82c5966a642d07f99502d779c70a707fe3edbcb0 | [
"Apache-2.0"
] | 1 | 2022-02-16T01:37:48.000Z | 2022-02-16T01:37:48.000Z | ppocr/modeling/heads/__init__.py | edencfc/PaddleOCR | 82c5966a642d07f99502d779c70a707fe3edbcb0 | [
"Apache-2.0"
] | 1 | 2021-07-28T15:49:38.000Z | 2021-07-28T15:49:38.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 31.727273 | 80 | 0.719771 |
4a27cf83e844893e6fe711fd9c82fc8d6280f97f | 1,004 | py | Python | logs.py | shinohe/mst-solution | 022fdae17d7464680db5cac3b81126d8b782afa8 | [
"MIT"
] | 1 | 2019-08-25T03:16:25.000Z | 2019-08-25T03:16:25.000Z | logs.py | shinohe/mst-solution | 022fdae17d7464680db5cac3b81126d8b782afa8 | [
"MIT"
] | null | null | null | logs.py | shinohe/mst-solution | 022fdae17d7464680db5cac3b81126d8b782afa8 | [
"MIT"
] | 1 | 2019-08-25T03:20:07.000Z | 2019-08-25T03:20:07.000Z | import os
import logging
from logging.handlers import RotatingFileHandler
def not_exist_makedirs(path):
if not os.path.exists(path):
os.makedirs(path)
def init_app(app, log_dir='.'):
formatter = logging.Formatter(
'%(asctime)s %(levelname)s: %(message)s '
'[in %(pathname)s:%(lineno)d]'
)
debug_log = os.path... | 28.685714 | 58 | 0.780876 |
4a27d297d2fccaf31f5704964f113813cd4f65a7 | 1,618 | py | Python | Gathered CTF writeups/2017-11-09-defcamp-final/fedora_shop/fedora.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:00:41.000Z | 2022-03-27T06:00:41.000Z | Gathered CTF writeups/2017-11-09-defcamp-final/fedora_shop/fedora.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | null | null | null | Gathered CTF writeups/2017-11-09-defcamp-final/fedora_shop/fedora.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:01:42.000Z | 2022-03-27T06:01:42.000Z | import re
from time import sleep
import requests
s = requests.session()
session = "XYZ"
def main():
url = "https://fedora-shop.dctf-f1nals-2017.def.camp/complet.php"
telephone_script = """
<script>
window.onload=function(){
eval(document.getElementsByTagName('td')[15].innerText);
};
</script... | 27.896552 | 108 | 0.61063 |
4a27d33a80701ecea7ba56b42ba72cad83e7e2c3 | 2,377 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/png.py | google-ar/chromium | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 777 | 2017-08-29T15:15:32.000Z | 2022-03-21T05:29:41.000Z | third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/png.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 66 | 2017-08-30T18:31:18.000Z | 2021-08-02T10:59:35.000Z | third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/png.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 123 | 2017-08-30T01:19:34.000Z | 2022-03-17T22:55:31.000Z | # Copyright (C) 2012 Balazs Ankes (bank@inf.u-szeged.hu) University of Szeged
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this lis... | 49.520833 | 119 | 0.737484 |
4a27d429ee50a2a206a2f5360772a9005ec3d913 | 4,371 | py | Python | python/async_shared_example.py | Saevon/Recipes | ab8ca9b5244805d545da2dd1d80d249f1ec6057d | [
"MIT"
] | null | null | null | python/async_shared_example.py | Saevon/Recipes | ab8ca9b5244805d545da2dd1d80d249f1ec6057d | [
"MIT"
] | null | null | null | python/async_shared_example.py | Saevon/Recipes | ab8ca9b5244805d545da2dd1d80d249f1ec6057d | [
"MIT"
] | null | null | null | from async_shared import async_handler, sync_shared
# Async Creep
# ------------------------------------------------------------------------------
# Ways to handle it
# Writing Blocking primary code
# * Spin off ProcessPool or ThreadPool
# * But now you cannot get any async benefits (max blocking calls equals th... | 22.884817 | 100 | 0.602837 |
4a27d47bff0ebcade592252aa76fda0ff4829b3c | 2,616 | py | Python | test/test_phones_and_emails.py | PaulRumyantsev/python_QA | 3d6809e49c2522da8cd912d2fe6f790df4293f5d | [
"Apache-2.0"
] | null | null | null | test/test_phones_and_emails.py | PaulRumyantsev/python_QA | 3d6809e49c2522da8cd912d2fe6f790df4293f5d | [
"Apache-2.0"
] | null | null | null | test/test_phones_and_emails.py | PaulRumyantsev/python_QA | 3d6809e49c2522da8cd912d2fe6f790df4293f5d | [
"Apache-2.0"
] | null | null | null | import re
from model.contacts import Contacts
from random import randrange
def test_phones_on_home_page(app):
if app.contacts.count() == 0:
app.contacts.create(Contacts(firstname="test"))
index = randrange(len(app.contacts.get_contacts_list()))
contact_from_home_page = app.contacts.get_contacts_l... | 50.307692 | 117 | 0.72133 |
4a27d47fa8742ccda2129af5468bf5b89ca295d9 | 335 | py | Python | apps/manager/purpleserver/manager/migrations/0008_remove_shipment_doc_images.py | rcknr/purplship-server | f8ec35af3da870fada0e989c20a8349c958c637c | [
"ECL-2.0",
"Apache-2.0"
] | 12 | 2020-02-03T08:11:21.000Z | 2021-04-13T02:00:38.000Z | apps/manager/purpleserver/manager/migrations/0008_remove_shipment_doc_images.py | rcknr/purplship-server | f8ec35af3da870fada0e989c20a8349c958c637c | [
"ECL-2.0",
"Apache-2.0"
] | 9 | 2020-02-12T00:25:08.000Z | 2021-04-20T10:31:59.000Z | apps/manager/purpleserver/manager/migrations/0008_remove_shipment_doc_images.py | rcknr/purplship-server | f8ec35af3da870fada0e989c20a8349c958c637c | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2020-02-03T08:10:50.000Z | 2021-04-13T15:17:12.000Z | # Generated by Django 3.1.7 on 2021-03-14 03:34
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('manager', '0007_merge_20210311_1428'),
]
operations = [
migrations.RemoveField(
model_name='shipment',
name='doc_images',
... | 18.611111 | 48 | 0.6 |
4a27d4a7f4a2c4087aac72a3f2bc8857b71627b3 | 1,567 | py | Python | homeassistant/components/lightwave/__init__.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 23 | 2017-11-15T21:03:53.000Z | 2021-03-29T21:33:48.000Z | homeassistant/components/lightwave/__init__.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | homeassistant/components/lightwave/__init__.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 10 | 2018-01-01T00:12:51.000Z | 2021-12-21T23:08:05.000Z | """Support for device connected via Lightwave WiFi-link hub."""
from lightwave.lightwave import LWLink
import voluptuous as vol
from homeassistant.const import CONF_HOST, CONF_LIGHTS, CONF_NAME, CONF_SWITCHES
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.discovery import async_load_pl... | 29.018519 | 83 | 0.608168 |
4a27d53a4e44a1de396d94429584682d940f9b3e | 80 | py | Python | src/atcoder/score.py | competitive-programming-helper/atcoder-api | 2e90b73349ad30a35a944e546b96af3eef75706b | [
"MIT"
] | 1 | 2022-02-09T07:35:28.000Z | 2022-02-09T07:35:28.000Z | src/atcoder/score.py | competitive-programming-helper/atcoder-api | 2e90b73349ad30a35a944e546b96af3eef75706b | [
"MIT"
] | 3 | 2022-02-02T04:39:08.000Z | 2022-02-07T23:40:14.000Z | src/atcoder/score.py | competitive-programming-helper/atcoder-api | 2e90b73349ad30a35a944e546b96af3eef75706b | [
"MIT"
] | null | null | null | import requests
def _get_my_score_page() -> requests.models.Response:
...
| 13.333333 | 53 | 0.7125 |
4a27d696a65d060ffb78249514d2eb95ca41870c | 3,087 | py | Python | .history/src/data/data_20191018141404.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/data/data_20191018141404.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/data/data_20191018141404.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | import pandas as pd
from typing import Union
from pathlib import Path
from nameparser import HumanName
class ExtractData:
title_translator = {
"Mlle.": "Mrs.",
"Mme.": "Mrs.",
"Sir.": "Mr.",
"Ms.": "Mrs.",
"": "Mr.",
"Col.": "Mr.",
"Capt.": "Mr.",
"... | 29.4 | 114 | 0.550049 |
4a27d7a86c2f4dd8f0a2fecadb9faf60c9922361 | 2,172 | py | Python | util/caffe_.py | saicoco/SA-Text | 353a73d84246a54962f3b7ffb7c7ca2e35f235e8 | [
"MIT"
] | 47 | 2020-02-21T23:36:28.000Z | 2021-12-21T01:34:38.000Z | util/caffe_.py | sapjunior/SA-Text | 353a73d84246a54962f3b7ffb7c7ca2e35f235e8 | [
"MIT"
] | 4 | 2020-04-03T04:59:54.000Z | 2021-11-04T08:14:52.000Z | util/caffe_.py | sapjunior/SA-Text | 353a73d84246a54962f3b7ffb7c7ca2e35f235e8 | [
"MIT"
] | 18 | 2020-02-21T10:06:34.000Z | 2021-09-15T01:50:55.000Z | # encoding=utf-8
import util
def get_data(net, name):
import caffe
if isinstance(net, caffe._caffe.Solver):
net = net.net
return net.blobs[name].data[...]
def get_params(net, name = None):
import caffe
if isinstance(net, caffe._caffe.Solver):
net = net.net
params = net.para... | 31.941176 | 101 | 0.535451 |
4a27d7cf6b516c363a43116f3c53224c9d786ca0 | 15,928 | py | Python | mycluster/schedulers/sge.py | zenotech/MyCluster | 0399e2bb95c31efd8f99c6f0f3941d0c1f7d42c4 | [
"BSD-3-Clause"
] | 7 | 2017-05-04T13:38:16.000Z | 2020-09-28T02:44:01.000Z | mycluster/schedulers/sge.py | zenotech/MyCluster | 0399e2bb95c31efd8f99c6f0f3941d0c1f7d42c4 | [
"BSD-3-Clause"
] | 27 | 2015-01-05T13:39:22.000Z | 2020-01-16T11:56:56.000Z | mycluster/schedulers/sge.py | zenotech/MyCluster | 0399e2bb95c31efd8f99c6f0f3941d0c1f7d42c4 | [
"BSD-3-Clause"
] | 4 | 2017-05-21T17:01:18.000Z | 2019-12-11T15:31:18.000Z | # BSD 3 - Clause License
# Copyright(c) 2021, Zenotech
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of c... | 40.841026 | 88 | 0.458312 |
4a27d873156de2cbb7a548f4f35e07f26d2703de | 2,001 | py | Python | Features/steps/add_flight.py | tbielski/flights-planner | ad2f7a6ef4ef80b71a1d71d1655c4101131b54a6 | [
"MIT"
] | null | null | null | Features/steps/add_flight.py | tbielski/flights-planner | ad2f7a6ef4ef80b71a1d71d1655c4101131b54a6 | [
"MIT"
] | null | null | null | Features/steps/add_flight.py | tbielski/flights-planner | ad2f7a6ef4ef80b71a1d71d1655c4101131b54a6 | [
"MIT"
] | null | null | null | from behave import *
from datetime import datetime
from flights_planner.FlightRepository import FlightRepository
from flights_planner.EconomyFlight import EconomyFlight
from flights_planner.BusinessFlight import BusinessFlight
from flights_planner.PremiumFlight import PremiumFlight
use_step_matcher("re")
@given("the... | 29.426471 | 103 | 0.758121 |
4a27d918d95292fa7160c40d342a0faa671f33a4 | 31,008 | py | Python | homeassistant/components/homematic/__init__.py | Tony763/home-assistant | fa1df2e015d76abfc6cfd7d795eb439130f5d0ea | [
"Apache-2.0"
] | null | null | null | homeassistant/components/homematic/__init__.py | Tony763/home-assistant | fa1df2e015d76abfc6cfd7d795eb439130f5d0ea | [
"Apache-2.0"
] | 3 | 2021-09-08T03:29:36.000Z | 2022-03-12T00:59:48.000Z | homeassistant/components/homematic/__init__.py | akhan69/home-assistant | fb460a325e25fdea9043136bccaf546ec1c04eab | [
"Apache-2.0"
] | null | null | null | """Support for HomeMatic devices."""
from datetime import timedelta
from functools import partial
import logging
import socket
import voluptuous as vol
from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_NAME, CONF_HOST, CONF_HOSTS, CONF_PASSWORD,
CONF_PLATFORM, CONF_SSL, CONF_USERNAME, CONF_VERIFY_SSL,
... | 34.840449 | 79 | 0.627354 |
4a27da033fe99116e80f26987518a3c68e02146b | 322 | py | Python | project_euler/library/number_theory/test_euler_totient.py | cryvate/project-euler | 6ed13880d7916c34554559f5f71662a863735eda | [
"MIT"
] | null | null | null | project_euler/library/number_theory/test_euler_totient.py | cryvate/project-euler | 6ed13880d7916c34554559f5f71662a863735eda | [
"MIT"
] | 9 | 2017-02-20T23:41:40.000Z | 2017-04-16T15:36:54.000Z | project_euler/library/number_theory/test_euler_totient.py | cryvate/project-euler | 6ed13880d7916c34554559f5f71662a863735eda | [
"MIT"
] | null | null | null | import pytest
from .euler_totient import phi, phi_range
from .gcd import gcd
@pytest.mark.parametrize('n', range(100, 115))
def test_phi(n: int) -> None:
assert phi(n) == len([a for a in range(n) if gcd(a, n) == 1])
def test_phi_range(n: int=100):
assert [phi(n) for n in range(1, n + 1)] == phi_range(n)[1:... | 23 | 65 | 0.645963 |
4a27ddee11e3f0341ecce51046ba415d44b78ab6 | 595 | py | Python | parser/functions/help.py | UHH-ISS/honeygrove-console | 9ff7bd1ab9609276fa4008d0180fdeb500fb9484 | [
"MIT"
] | 1 | 2019-03-12T16:35:33.000Z | 2019-03-12T16:35:33.000Z | parser/functions/help.py | UHH-ISS/honeygrove-console | 9ff7bd1ab9609276fa4008d0180fdeb500fb9484 | [
"MIT"
] | null | null | null | parser/functions/help.py | UHH-ISS/honeygrove-console | 9ff7bd1ab9609276fa4008d0180fdeb500fb9484 | [
"MIT"
] | null | null | null | def help(parser,logic,logging,args=0):
if args:
for k in args[0]:
try:
with open("parser/functions/help/" + str(k) + ".txt") as f:
for line in f:
parser.print(line[:len(line)-1])
except IOError as e:
parser.p... | 33.055556 | 75 | 0.440336 |
4a27ddffd07c9efa007b7b70c6ac6947e91e0fba | 4,616 | py | Python | pyTrader/trade_stream.py | evanhenri/neural-network-trading-bot | a75b6c118c67ba6e00cffe68b04cbb424c759b3e | [
"MIT"
] | 18 | 2016-05-31T09:32:20.000Z | 2021-08-15T17:41:14.000Z | pyTrader/trade_stream.py | nav3van/RNN-Trading-Bot | a75b6c118c67ba6e00cffe68b04cbb424c759b3e | [
"MIT"
] | 2 | 2016-06-19T14:12:37.000Z | 2017-03-28T23:18:50.000Z | pyTrader/trade_stream.py | nav3van/RNN-Trading-Bot | a75b6c118c67ba6e00cffe68b04cbb424c759b3e | [
"MIT"
] | 9 | 2016-02-15T12:50:48.000Z | 2020-03-18T03:31:22.000Z | import os, sys, time, datetime
import urllib.request, urllib.parse, json, codecs, socket
from file_check import parent_dir
# Dynamically imports the class required for the extension returned by get_output_type
# Returns the name of the class and the imported module containing that class
def import_class_module():
... | 37.225806 | 130 | 0.660745 |
4a27de18ec7994b8a36402ede71dde14dc6b4a7a | 2,303 | py | Python | runtime/config.py | netturpin/enjoliver | 9700470939da40ff84304af6e8c7210a5fd693a4 | [
"MIT"
] | 11 | 2017-11-06T08:42:55.000Z | 2021-01-08T11:01:02.000Z | runtime/config.py | netturpin/enjoliver | 9700470939da40ff84304af6e8c7210a5fd693a4 | [
"MIT"
] | 7 | 2017-12-28T12:05:50.000Z | 2021-04-02T15:04:46.000Z | runtime/config.py | netturpin/enjoliver | 9700470939da40ff84304af6e8c7210a5fd693a4 | [
"MIT"
] | 4 | 2017-11-08T10:03:31.000Z | 2018-06-03T17:59:43.000Z | #! /usr/bin/env python3
import json
import os
def rkt_path_d(path):
rkt_data = "/tmp/rkt-data"
data = {
"rktKind": "paths",
"rktVersion": "v1",
"data": rkt_data,
"stage1-images": "%s/rkt" % path
}
try:
os.makedirs("%s/paths.d/" % path)
except OSError:
... | 24.763441 | 93 | 0.508467 |
4a27dfb560d1dd57b6f7ca7ec4fcd258965e5c3a | 606 | py | Python | Cuatrimestres/1/TeoriadeControlI/python/trayectoriafiltrada.py | chelizalde/DCA | 34fd4d500117a9c0a75b979b8b0f121c1992b9dc | [
"MIT"
] | null | null | null | Cuatrimestres/1/TeoriadeControlI/python/trayectoriafiltrada.py | chelizalde/DCA | 34fd4d500117a9c0a75b979b8b0f121c1992b9dc | [
"MIT"
] | null | null | null | Cuatrimestres/1/TeoriadeControlI/python/trayectoriafiltrada.py | chelizalde/DCA | 34fd4d500117a9c0a75b979b8b0f121c1992b9dc | [
"MIT"
] | 1 | 2021-03-20T12:44:13.000Z | 2021-03-20T12:44:13.000Z | #!/usr/bin/env python
from matplotlib.pyplot import plot, text, axis, grid, gca, xticks, yticks, savefig
from numpy import exp, abs, linspace, sin
x = linspace(0, 1.2, 200)
fun = exp(-4.5*x)*(1-sin(13*x))
exp = exp(-3*x) + 0.1
plot(x, fun)
plot(x, exp)
text(0.22, 0.15, r'$\xi(t)$', fontsize=28)
text(0.425, 0.425, r... | 23.307692 | 89 | 0.653465 |
4a27e0b7767999ba6bbb28b8529830843554582f | 1,086 | py | Python | password_policies/urls.py | BuildingRobotics/django-password-policies | 8b754ca8d10a4cf2b56a8c5f9e46f5384f492eb9 | [
"BSD-3-Clause"
] | null | null | null | password_policies/urls.py | BuildingRobotics/django-password-policies | 8b754ca8d10a4cf2b56a8c5f9e46f5384f492eb9 | [
"BSD-3-Clause"
] | 1 | 2019-09-17T10:09:29.000Z | 2019-09-17T16:56:54.000Z | password_policies/urls.py | BuildingRobotics/django-password-policies | 8b754ca8d10a4cf2b56a8c5f9e46f5384f492eb9 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from django.conf.urls import url
from password_policies.views import PasswordChangeFormView
from password_policies.views import PasswordChangeDoneView
from password_policies.views import PasswordResetCompleteView
from password_policies.views import PasswordResetConfirmView
from p... | 43.44 | 89 | 0.754144 |
4a27e11eb834c0d073b2977c55c63d8a636565c8 | 719 | py | Python | src/bin/device.py | a-t-0/python-keyboard-drivers | 47535bf8cafb4c10ffba653be8fed3712d05de57 | [
"BSD-2-Clause"
] | 2 | 2018-08-25T09:45:55.000Z | 2021-03-04T14:20:06.000Z | src/bin/device.py | a-t-0/python-keyboard-drivers | 47535bf8cafb4c10ffba653be8fed3712d05de57 | [
"BSD-2-Clause"
] | null | null | null | src/bin/device.py | a-t-0/python-keyboard-drivers | 47535bf8cafb4c10ffba653be8fed3712d05de57 | [
"BSD-2-Clause"
] | 1 | 2021-03-04T14:59:40.000Z | 2021-03-04T14:59:40.000Z |
"""
See LICENSE for more information.
See README.md for building instructions
and usage examples.
"""
import evdev # coomunicate w/ kernel I/O interface
import sys # access system calls
class DEVICE (object):
def __init__ (self):
self.device_file = '/dev/input/event5'
# create kernel interface
self.devic... | 18.435897 | 52 | 0.703755 |
4a27e1a35d2f427467f736dd00edc6996919d915 | 34,625 | py | Python | Filters/General/Testing/Python/clipQuadraticCells.py | jasper-yeh/VtkDotNet | 84b56f781cb511694e4380cebfb245bbefe2560b | [
"BSD-3-Clause"
] | 3 | 2020-06-20T23:31:06.000Z | 2021-01-11T02:17:16.000Z | Filters/General/Testing/Python/clipQuadraticCells.py | jasper-yeh/VtkDotNet | 84b56f781cb511694e4380cebfb245bbefe2560b | [
"BSD-3-Clause"
] | 1 | 2020-12-01T23:21:02.000Z | 2020-12-02T23:44:43.000Z | Filters/General/Testing/Python/clipQuadraticCells.py | jasper-yeh/VtkDotNet | 84b56f781cb511694e4380cebfb245bbefe2560b | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | #!/usr/bin/env python
import sys
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Prevent .pyc files being created.
# Stops the vtk source being polluted
# by .pyc files.
sys.dont_write_bytecode = True
import backdrop
# clip every quadratic cell type... | 34.555888 | 75 | 0.784087 |
4a27e20dab5555f7c75a799cc1fb9c0fada4d32a | 24,018 | py | Python | tuning.py | droully/Graph-Embedding | 820ee2bcb57c7883dc41bec6da0e12222a537331 | [
"BSD-3-Clause"
] | null | null | null | tuning.py | droully/Graph-Embedding | 820ee2bcb57c7883dc41bec6da0e12222a537331 | [
"BSD-3-Clause"
] | null | null | null | tuning.py | droully/Graph-Embedding | 820ee2bcb57c7883dc41bec6da0e12222a537331 | [
"BSD-3-Clause"
] | null | null | null | #%%
"""imports"""
import itertools
import os
import pickle
import random
import time
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
from openne.models import gae, gf, grarep, lap, line, lle, node2vec, sdne, vgae
from tqdm import tqdm
from evalne.evaluation.... | 40.708475 | 230 | 0.568657 |
4a27e34a4fb4adebd3c4077449fe206c39e1a93a | 5,093 | py | Python | awwards/settings.py | abdirahman-ahmednoor/django-awwards | 6502d2eb4dfd3e80943c3d086bb85bb299dd7f18 | [
"MIT"
] | null | null | null | awwards/settings.py | abdirahman-ahmednoor/django-awwards | 6502d2eb4dfd3e80943c3d086bb85bb299dd7f18 | [
"MIT"
] | null | null | null | awwards/settings.py | abdirahman-ahmednoor/django-awwards | 6502d2eb4dfd3e80943c3d086bb85bb299dd7f18 | [
"MIT"
] | null | null | null | """
Django settings for awwards project.
Generated by 'django-admin startproject' using Django 3.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib... | 25.852792 | 91 | 0.690752 |
4a27e3753d3d12af47e54d3f15c2fbb9804c37bd | 3,429 | py | Python | torch/_deploy.py | xiaohanhuang/pytorch | a31aea8eaa99a5ff72b5d002c206cd68d5467a5e | [
"Intel"
] | 183 | 2018-04-06T21:10:36.000Z | 2022-03-30T15:05:24.000Z | torch/_deploy.py | xiaohanhuang/pytorch | a31aea8eaa99a5ff72b5d002c206cd68d5467a5e | [
"Intel"
] | 818 | 2020-02-07T02:36:44.000Z | 2022-03-31T23:49:44.000Z | torch/_deploy.py | xiaohanhuang/pytorch | a31aea8eaa99a5ff72b5d002c206cd68d5467a5e | [
"Intel"
] | 58 | 2018-06-05T16:40:18.000Z | 2022-03-16T15:37:29.000Z | import io
import torch
from torch.package._package_pickler import create_pickler
from torch.package._package_unpickler import PackageUnpickler
from torch.package import sys_importer, OrderedImporter, PackageImporter, Importer
from torch.serialization import _maybe_decode_ascii
def _save_storages(importer, obj):
se... | 34.636364 | 104 | 0.657334 |
4a27e396af3f46aea4bdd5c6e868758680795ec8 | 10,256 | py | Python | allauth/account/app_settings.py | chidg/django-allauth | 69fe36a5cc542b016d046d716c287ee4b2383797 | [
"MIT"
] | null | null | null | allauth/account/app_settings.py | chidg/django-allauth | 69fe36a5cc542b016d046d716c287ee4b2383797 | [
"MIT"
] | null | null | null | allauth/account/app_settings.py | chidg/django-allauth | 69fe36a5cc542b016d046d716c287ee4b2383797 | [
"MIT"
] | null | null | null | class AppSettings(object):
class AuthenticationMethod:
USERNAME = 'username'
EMAIL = 'email'
USERNAME_EMAIL = 'username_email'
class EmailVerificationMethod:
# After signing up, keep the user account inactive until the email
# address is verified
MANDATORY = 'ma... | 31.363914 | 79 | 0.63046 |
4a27e3e1b22bcab46c535f74fbe4c005647a1005 | 8,869 | py | Python | applications/incompressible_fluid_application/test_examples/StillWater_Edgebased.gid/StillWater_Edgebased_script.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 2 | 2019-10-25T09:28:10.000Z | 2019-11-21T12:51:46.000Z | applications/incompressible_fluid_application/test_examples/StillWater_Edgebased.gid/StillWater_Edgebased_script.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 13 | 2019-10-07T12:06:51.000Z | 2020-02-18T08:48:33.000Z | applications/incompressible_fluid_application/test_examples/StillWater_Edgebased.gid/StillWater_Edgebased_script.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 1 | 2020-06-12T08:51:24.000Z | 2020-06-12T08:51:24.000Z | from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7
import edgebased_levelset_var
#
#
# setting the domain size for the problem to be solved
domain_size = edgebased_levelset_var.domain_size
import math
# import cProfile
#
#
# ATTENTION... | 33.467925 | 134 | 0.700755 |
4a27e3f30e68df4070b8924c9feda6e3a58dc632 | 1,831 | py | Python | InvenTree/common/serializers.py | andytorrestb/InvenTree | a24ad197414b7ec35cd602dc9190e86de5f66ad3 | [
"MIT"
] | 1 | 2021-11-18T12:32:03.000Z | 2021-11-18T12:32:03.000Z | InvenTree/common/serializers.py | andytorrestb/InvenTree | a24ad197414b7ec35cd602dc9190e86de5f66ad3 | [
"MIT"
] | null | null | null | InvenTree/common/serializers.py | andytorrestb/InvenTree | a24ad197414b7ec35cd602dc9190e86de5f66ad3 | [
"MIT"
] | null | null | null | """
JSON serializers for common components
"""
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from InvenTree.serializers import InvenTreeModelSerializer
from rest_framework import serializers
from common.models import InvenTreeSetting, InvenTreeUserSetting
class SettingsSerializer(InvenTreeModelS... | 21.290698 | 71 | 0.57728 |
4a27e439cf3ecc1f0918ad3b51bf5141028f20d7 | 2,299 | py | Python | scripts/diabetes_training_file.py | rohitashwachaks/dp100 | 7223e75688b0982f757f2a92ecb7b86a71c3f20b | [
"MIT"
] | null | null | null | scripts/diabetes_training_file.py | rohitashwachaks/dp100 | 7223e75688b0982f757f2a92ecb7b86a71c3f20b | [
"MIT"
] | null | null | null | scripts/diabetes_training_file.py | rohitashwachaks/dp100 | 7223e75688b0982f757f2a92ecb7b86a71c3f20b | [
"MIT"
] | null | null | null | # Import libraries
import os
import argparse
from azureml.core import Dataset, Run
import pandas as pd
import numpy as np
import joblib
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import roc_auc_score
from sklearn.metrics import roc_curve... | 37.080645 | 174 | 0.77251 |
4a27e62bd86932f44883ba5c7db8012df411c4be | 2,859 | py | Python | code/utils.py | Run542968/Self_Attention_Pytorch | 35b5c520904c709f35a9d3e44c0cdba92a35d10b | [
"Apache-2.0"
] | null | null | null | code/utils.py | Run542968/Self_Attention_Pytorch | 35b5c520904c709f35a9d3e44c0cdba92a35d10b | [
"Apache-2.0"
] | null | null | null | code/utils.py | Run542968/Self_Attention_Pytorch | 35b5c520904c709f35a9d3e44c0cdba92a35d10b | [
"Apache-2.0"
] | null | null | null | from codecs import open
import torch
def visualize_attention(wts,x_test_pad,word_to_id,filename):
wts_add = torch.sum(wts,1)
wts_add_np = wts_add.data.numpy()
wts_add_list = wts_add_np.tolist()
print(wts_add_list)
print(len(wts_add_list))
id_to_word = {v:k for k,v in word_to_id.items()}
te... | 28.306931 | 124 | 0.564533 |
4a27e6de72ab7c0fd56731ed9995d1ba7d1ad357 | 66,785 | py | Python | rdflib/graph.py | mwatts15/rdflib | 047e3e9781a28966ff9b6fd46ec20e459a5a0f11 | [
"BSD-3-Clause"
] | 1 | 2021-08-09T16:32:00.000Z | 2021-08-09T16:32:00.000Z | rdflib/graph.py | mwatts15/rdflib | 047e3e9781a28966ff9b6fd46ec20e459a5a0f11 | [
"BSD-3-Clause"
] | null | null | null | rdflib/graph.py | mwatts15/rdflib | 047e3e9781a28966ff9b6fd46ec20e459a5a0f11 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from rdflib.term import Literal # required for doctests
assert Literal # avoid warning
from rdflib.namespace import Namespace # required for doctests
assert Namespace # avoid warning
__doc__ = """\
RDFLib ... | 34.425258 | 118 | 0.593082 |
4a27e703da09fdadff9171e305f9e3a2a96ed97a | 5,386 | py | Python | pyvista/jupyter/notebook.py | rohankumardubey/pyvista | ec5aa343d857d0c7e6a79aeeba340797bc868ced | [
"MIT"
] | null | null | null | pyvista/jupyter/notebook.py | rohankumardubey/pyvista | ec5aa343d857d0c7e6a79aeeba340797bc868ced | [
"MIT"
] | null | null | null | pyvista/jupyter/notebook.py | rohankumardubey/pyvista | ec5aa343d857d0c7e6a79aeeba340797bc868ced | [
"MIT"
] | null | null | null | """
Support dynamic or static jupyter notebook plotting.
Includes:
* ``ipyvtklink``
* ``panel``
"""
import warnings
import os
import numpy as np
# This module should not be imported at the __init__ level, only as a
# lazy import when trying to plot using jupyter notebooks
try:
import IPython
from IPython i... | 32.059524 | 95 | 0.657631 |
4a27e81efe57fc33ebb3711a55ff640c858c9263 | 6,282 | py | Python | rexnet/rexnet.py | cymqqqq/AI-research | b344667adc217959abe314a3a5b08206a533222d | [
"MIT"
] | null | null | null | rexnet/rexnet.py | cymqqqq/AI-research | b344667adc217959abe314a3a5b08206a533222d | [
"MIT"
] | null | null | null | rexnet/rexnet.py | cymqqqq/AI-research | b344667adc217959abe314a3a5b08206a533222d | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from math import ceil
USE_MEMORY_EFFICIENT_SiLU = True
if USE_MEMORY_EFFICIENT_SiLU:
@torch.jit.script
def silu_fwd(x):
return x.mul(torch.sigmoid(x))
@torch.jit.script
def silu_bwd(x, grad_output):
x_sigmoid = torch.sigmoid(x)
return grad_ou... | 34.327869 | 118 | 0.587233 |
4a27e8a417ebb07878a27c45130fce57fd370802 | 10,164 | py | Python | notebooks/81.3-BDP-community.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | notebooks/81.3-BDP-community.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | notebooks/81.3-BDP-community.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | #%%
import os
import pickle
import warnings
from operator import itemgetter
from pathlib import Path
from timeit import default_timer as timer
import colorcet as cc
import community as cm
import matplotlib.colors as mplc
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
impor... | 29.806452 | 88 | 0.652696 |
4a27e8c8d649c4cb9ae961bffafc7ad824b63b25 | 5,411 | py | Python | research/object_detection/models/embedded_ssd_mobilenet_v1_feature_extractor_tf1_test.py | gujralsanyam22/models | d96f8f043dbe2b5ca8ea1785f57df8faf68d8875 | [
"Apache-2.0"
] | 82,518 | 2016-02-05T12:07:23.000Z | 2022-03-31T23:09:47.000Z | research/object_detection/models/embedded_ssd_mobilenet_v1_feature_extractor_tf1_test.py | yangxl-2014-fe/models | 11ea5237818e791a5717716d5413977f4c4db1e3 | [
"Apache-2.0"
] | 9,021 | 2016-03-08T01:02:05.000Z | 2022-03-31T08:06:35.000Z | research/object_detection/models/embedded_ssd_mobilenet_v1_feature_extractor_tf1_test.py | yangxl-2014-fe/models | 11ea5237818e791a5717716d5413977f4c4db1e3 | [
"Apache-2.0"
] | 54,341 | 2016-02-06T17:19:55.000Z | 2022-03-31T10:27:44.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.684211 | 80 | 0.692293 |
4a27e92ab64631535ed5120c681f67b653628056 | 8,765 | py | Python | queue_advanced_samples.py | tamram/storage-queue-python-getting-started | a99597814950beb79397ab8b4abd82f89e55f5e0 | [
"MIT"
] | null | null | null | queue_advanced_samples.py | tamram/storage-queue-python-getting-started | a99597814950beb79397ab8b4abd82f89e55f5e0 | [
"MIT"
] | null | null | null | queue_advanced_samples.py | tamram/storage-queue-python-getting-started | a99597814950beb79397ab8b4abd82f89e55f5e0 | [
"MIT"
] | null | null | null | #----------------------------------------------------------------------------------
# Microsoft Developer & Platform Evangelism
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT... | 44.045226 | 147 | 0.616885 |
4a27e9b25c4342286aea0f16006d90f6d8b0fda9 | 140 | py | Python | loldib/getratings/models/NA/na_bard/__init__.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_bard/__init__.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_bard/__init__.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | from .na_bard_top import *
from .na_bard_jng import *
from .na_bard_mid import *
from .na_bard_bot import *
from .na_bard_sup import *
| 23.333333 | 27 | 0.75 |
4a27e9cd0daf7177376030759c92fb92f6edf18f | 1,201 | py | Python | test_nfp.py | zhuyuanxiang/irregular_packing-1 | 5de4bf7ca51b6263ef44c1c7a6495e8b215e900c | [
"MIT"
] | 1 | 2022-02-15T19:59:59.000Z | 2022-02-15T19:59:59.000Z | test_nfp.py | zhuyuanxiang/irregular_packing-1 | 5de4bf7ca51b6263ef44c1c7a6495e8b215e900c | [
"MIT"
] | null | null | null | test_nfp.py | zhuyuanxiang/irregular_packing-1 | 5de4bf7ca51b6263ef44c1c7a6495e8b215e900c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import ast
import pandas as pd
from nfp_function import content_loop_rate
from nfp_function import Nester
from settings import BIN_CUT_BIG
from settings import BIN_NORMAL
from settings import BIN_WIDTH
from settings import LOOP_TIME
lingjian = pd.read_csv('.\L0002_lingjian.csv')
if __name__ ... | 24.02 | 66 | 0.565362 |
4a27e9fc7f2c4b7c99689da35bed05009b02b4be | 184 | py | Python | domain/rastrigin/rastrigin_ValidateChildren.py | Sascha0912/SAIL | 5dfb8d0b925d5e61933bf10591d959433fffaf26 | [
"MIT"
] | 2 | 2019-03-12T10:21:54.000Z | 2019-07-17T14:56:33.000Z | domain/rastrigin/rastrigin_ValidateChildren.py | Sascha0912/SAIL | 5dfb8d0b925d5e61933bf10591d959433fffaf26 | [
"MIT"
] | null | null | null | domain/rastrigin/rastrigin_ValidateChildren.py | Sascha0912/SAIL | 5dfb8d0b925d5e61933bf10591d959433fffaf26 | [
"MIT"
] | 1 | 2020-08-31T07:22:09.000Z | 2020-08-31T07:22:09.000Z | import numpy as np
def rastrigin_ValidateChildren(children, d):
validInds = np.full(children.shape[0], True)
# print("validChilds")
# print(validInds)
return validInds | 26.285714 | 48 | 0.711957 |
4a27ea3fd8871d3b3a5c62582c7cc65b2144c3c1 | 10,332 | py | Python | python/paddle/fluid/trainer_desc.py | 0YuanZhang0/Paddle | 118e585b8c28e56da6c39c2fcf21002625a67934 | [
"Apache-2.0"
] | 2 | 2020-02-11T08:53:05.000Z | 2020-02-20T08:06:25.000Z | python/paddle/fluid/trainer_desc.py | xixiaoyao/Paddle | a2e10930cf2781b58875abb9c475375e1282e575 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/trainer_desc.py | xixiaoyao/Paddle | a2e10930cf2781b58875abb9c475375e1282e575 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 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 app... | 36.508834 | 80 | 0.662698 |
4a27ea4b044e7fdd3deef98f9bec5b156c57f587 | 3,587 | py | Python | fastai_extensions/exp/nb_BatchLossFilter.py | leoitcode/bugslife | bc2af0816bc37320a5125f9d901e98503d24b6fe | [
"MIT"
] | 1 | 2020-01-25T19:03:17.000Z | 2020-01-25T19:03:17.000Z | fastai_extensions/exp/nb_BatchLossFilter.py | leoitcode/bugslife | bc2af0816bc37320a5125f9d901e98503d24b6fe | [
"MIT"
] | 8 | 2020-03-07T02:35:28.000Z | 2022-03-12T00:13:16.000Z | fastai_extensions/exp/nb_BatchLossFilter.py | leoitcode/bugslife | bc2af0816bc37320a5125f9d901e98503d24b6fe | [
"MIT"
] | null | null | null | #AUTOGENERATED! DO NOT EDIT! file to edit: ./BatchLossFilter.ipynb (unless otherwise specified)
import torch
import numpy as np
from fastai.basic_train import *
import functools
from functools import partial
import warnings
warnings.filterwarnings("ignore", category=UserWarning, module="torch.nn.functional")
from IPyt... | 43.216867 | 108 | 0.684974 |
4a27ea920e7dc49afdce00257497b306e2048fa2 | 196 | py | Python | als_to_midi/__init__.py | kovaacs/als_to_midi | 116b7a5a55f140b2a5e18402a188bc74e7bd5748 | [
"MIT"
] | null | null | null | als_to_midi/__init__.py | kovaacs/als_to_midi | 116b7a5a55f140b2a5e18402a188bc74e7bd5748 | [
"MIT"
] | null | null | null | als_to_midi/__init__.py | kovaacs/als_to_midi | 116b7a5a55f140b2a5e18402a188bc74e7bd5748 | [
"MIT"
] | null | null | null | import datetime
__author__ = "Marcell Kovacs"
__author_email__ = "me@marcellkovacs.com"
__version__ = datetime.datetime.now().strftime('%y.%m.%d')
__description__ = "Extract MIDI from ALS files"
| 28 | 58 | 0.765306 |
4a27ead303274a96e3eaa26d288cf1540cca3654 | 647 | py | Python | FitLib/FunctionsLibrary/General.py | skelton-group/FitLib | 84481cbcdae2bf0575e162717866b4035187d57a | [
"MIT"
] | null | null | null | FitLib/FunctionsLibrary/General.py | skelton-group/FitLib | 84481cbcdae2bf0575e162717866b4035187d57a | [
"MIT"
] | null | null | null | FitLib/FunctionsLibrary/General.py | skelton-group/FitLib | 84481cbcdae2bf0575e162717866b4035187d57a | [
"MIT"
] | null | null | null | # FitLib/FunctionsLibrary/General.py
# ----------------
# Module Docstring
# ----------------
""" Common functions for fitting. """
# -------
# Imports
# -------
import numpy as np
from FitLib.Function import CreateFunction
# ---------
# Functions
# ---------
def Polynomial(x, *p):
""" General polynomial ... | 18.485714 | 90 | 0.554869 |
4a27ebfcf5f3aca1418e7c2109e3a2f6315a7078 | 2,761 | py | Python | raytracer/raytracer.py | codacy-badger/RayTracer | 64da4c0dce238ee07488966c4103f863a38e411f | [
"MIT"
] | null | null | null | raytracer/raytracer.py | codacy-badger/RayTracer | 64da4c0dce238ee07488966c4103f863a38e411f | [
"MIT"
] | null | null | null | raytracer/raytracer.py | codacy-badger/RayTracer | 64da4c0dce238ee07488966c4103f863a38e411f | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
import subprocess as sp
import sys, os
from typing import Dict
from distutils.dir_util import copy_tree
def commit(cwd: str, cargo: Dict[str, str]):
gitworkflow = [
["git", "add", "-u"],
["git", "commit", "-m", sys.argv[2]],
["git", "pull", "--rebase"],
["g... | 31.375 | 104 | 0.531329 |
4a27ec34c19265d6d39bda91634bd43e4fa16a80 | 903 | py | Python | portscanner.py | kamalkum9r/python | 04409d6bc531fe102d1006f3a6033c1a44fac539 | [
"MIT"
] | 1 | 2021-07-17T07:30:30.000Z | 2021-07-17T07:30:30.000Z | portscanner.py | kamalkum9r/python | 04409d6bc531fe102d1006f3a6033c1a44fac539 | [
"MIT"
] | null | null | null | portscanner.py | kamalkum9r/python | 04409d6bc531fe102d1006f3a6033c1a44fac539 | [
"MIT"
] | null | null | null | # port scanner
# please dont use it for wrong purposes
import sys
import socket
print("PORT SCANNER")
if len(sys.argv) == 2:
target = socket.gethostbyname(sys.argv[1])
else:
print("Invalid ammount of Argument you must enter the IP")
print("Scanning Port: " + target)
try:
for port in range(... | 25.8 | 63 | 0.599114 |
4a27ecbc424bd285fce09aaefd441513f3613f1a | 1,084 | py | Python | kubernetes/test/test_v1beta1_custom_resource_definition.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | 1 | 2018-10-20T19:37:57.000Z | 2018-10-20T19:37:57.000Z | kubernetes/test/test_v1beta1_custom_resource_definition.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta1_custom_resource_definition.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | 2 | 2018-07-27T19:39:34.000Z | 2020-12-25T02:48:27.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 24.088889 | 110 | 0.741697 |
4a27ee948763d760f453b3f9591ab291b6b0c303 | 213 | py | Python | simple_peewee_flask_webapi/__init__.py | prbpedro/simple_peewee_flask_webapi | 9f70e2cf034d2ff53b6c730f1362e03a37cc9a59 | [
"MIT"
] | null | null | null | simple_peewee_flask_webapi/__init__.py | prbpedro/simple_peewee_flask_webapi | 9f70e2cf034d2ff53b6c730f1362e03a37cc9a59 | [
"MIT"
] | null | null | null | simple_peewee_flask_webapi/__init__.py | prbpedro/simple_peewee_flask_webapi | 9f70e2cf034d2ff53b6c730f1362e03a37cc9a59 | [
"MIT"
] | null | null | null | from simple_peewee_flask_webapi import app_models
from simple_peewee_flask_webapi import simple_table
from simple_peewee_flask_webapi import join_table
from simple_peewee_flask_webapi import application_start
| 42.6 | 57 | 0.906103 |
4a27ef9d66933e1a6c4f915d65f557b6a516bb5c | 2,369 | py | Python | nonebot_plugin_nokia/nokia.py | kexue-z/nonebot-plugin-nokia | c47a5fb79ff1626cc5cddc8e9809f8772c020dad | [
"MIT"
] | 3 | 2021-11-30T10:18:59.000Z | 2022-01-20T07:15:24.000Z | nonebot_plugin_nokia/nokia.py | kexue-z/nonebot-plugin-nokia | c47a5fb79ff1626cc5cddc8e9809f8772c020dad | [
"MIT"
] | null | null | null | nonebot_plugin_nokia/nokia.py | kexue-z/nonebot-plugin-nokia | c47a5fb79ff1626cc5cddc8e9809f8772c020dad | [
"MIT"
] | null | null | null | import base64
from io import BytesIO
from os.path import dirname
from typing import Tuple
from collections import deque
from PIL import Image, ImageFont, ImageDraw, ImageOps
font_size = 70
line_gap = 20
body_pos = (205, 340)
subtitle_pos = (790, 320)
body_color = (0, 0, 0, 255)
subtitle_color = (129, 212, 250, 255)
li... | 28.202381 | 73 | 0.641621 |
4a27efe66b599c8a8649f2e466aade421e5d6a40 | 72,330 | py | Python | gcimpute/gaussian_copula.py | udellgroup/gcimpute | b29650e61785af904a3bff753ffc2995449883cf | [
"MIT"
] | null | null | null | gcimpute/gaussian_copula.py | udellgroup/gcimpute | b29650e61785af904a3bff753ffc2995449883cf | [
"MIT"
] | null | null | null | gcimpute/gaussian_copula.py | udellgroup/gcimpute | b29650e61785af904a3bff753ffc2995449883cf | [
"MIT"
] | null | null | null | from .transform_function import TransformFunction
from .online_transform_function import OnlineTransformFunction
from .embody import _latent_operation_body_, get_truncnorm_moments_vec
from scipy.stats import norm, truncnorm
import numpy as np
import pandas as pd
from concurrent.futures import ProcessPoolExecutor
from s... | 43.02796 | 309 | 0.585953 |
4a27f0991bd31104f17f258a92f228eaee27c2e7 | 3,103 | py | Python | modules/dbnd-airflow/setup.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | modules/dbnd-airflow/setup.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | modules/dbnd-airflow/setup.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | from os import path
import setuptools
from setuptools.config import read_configuration
BASE_PATH = path.dirname(__file__)
CFG_PATH = path.join(BASE_PATH, "setup.cfg")
config = read_configuration(CFG_PATH)
version = config["metadata"]["version"]
requirements_for_airflow = [
"WTForms<2.3.0", # fixing ImportErr... | 42.506849 | 160 | 0.643248 |
4a27f12ea41bbbc50f94fda7f6ce37f2af654098 | 6,425 | py | Python | test/functional/rpc_bind.py | Jurdefur/dhb-core | 9d9d5ce6be37f07fd14c98abcfa0b3435c5d2211 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | Jurdefur/dhb-core | 9d9d5ce6be37f07fd14c98abcfa0b3435c5d2211 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | Jurdefur/dhb-core | 9d9d5ce6be37f07fd14c98abcfa0b3435c5d2211 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 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 running dhbcoind with the -rpcbind and -rpcallowip options."""
import sys
from test_framework.ne... | 49.423077 | 172 | 0.633152 |
4a27f1876c51fdb5bb1c33a71cf4d6858bd15f89 | 952 | py | Python | tests/test_stack.py | AjithPanneerselvam/algo | e73402dbcd9c0ab7856a36d3a3703a5cc2897cd2 | [
"MIT"
] | 2 | 2017-07-10T08:55:01.000Z | 2018-05-26T07:53:58.000Z | tests/test_stack.py | AjithPanneerselvam/algo | e73402dbcd9c0ab7856a36d3a3703a5cc2897cd2 | [
"MIT"
] | 5 | 2017-03-19T10:01:23.000Z | 2017-08-31T07:00:19.000Z | tests/test_stack.py | AjithPanneerselvam/algo | e73402dbcd9c0ab7856a36d3a3703a5cc2897cd2 | [
"MIT"
] | 3 | 2016-09-27T15:09:54.000Z | 2017-08-31T03:34:47.000Z | """
module test_stack
~~~~~~~~~~~~~~
Tests for the stack data structure.
:copyright: (c) 2017 by 0xE8551CCB.
:license: MIT, see LICENSE for more details.
"""
import pytest
from pyalgorithm.datastructures.stack import DequeStack, ListStack
@pytest.fixture(params=[DequeStack, ListStack])
def... | 20.255319 | 66 | 0.643908 |
4a27f356b1e35204d8213d72f0fe2873217f3413 | 7,820 | py | Python | tools/nntool/utils/stats_funcs.py | 00-01/gap_sdk | 25444d752b26ccf0b848301c381692d77172852c | [
"Apache-2.0"
] | 118 | 2018-05-22T08:45:59.000Z | 2022-03-30T07:00:45.000Z | tools/nntool/utils/stats_funcs.py | 00-01/gap_sdk | 25444d752b26ccf0b848301c381692d77172852c | [
"Apache-2.0"
] | 213 | 2018-07-25T02:37:32.000Z | 2022-03-30T18:04:01.000Z | tools/nntool/utils/stats_funcs.py | 00-01/gap_sdk | 25444d752b26ccf0b848301c381692d77172852c | [
"Apache-2.0"
] | 76 | 2018-07-04T08:19:27.000Z | 2022-03-24T09:58:05.000Z | # Copyright (C) 2020 GreenWaves Technologies, SAS
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This progr... | 35.384615 | 112 | 0.590665 |
4a27f493a0d095f1a2d3ca1d16f2d2abd31ae7a1 | 17,544 | py | Python | tests/test_package.py | pedrorgirardi/Tutkain | 3cbb6c8999279ea5da2bb2f656a45ac3693b7f0e | [
"Apache-2.0"
] | null | null | null | tests/test_package.py | pedrorgirardi/Tutkain | 3cbb6c8999279ea5da2bb2f656a45ac3693b7f0e | [
"Apache-2.0"
] | null | null | null | tests/test_package.py | pedrorgirardi/Tutkain | 3cbb6c8999279ea5da2bb2f656a45ac3693b7f0e | [
"Apache-2.0"
] | null | null | null | import queue
from Tutkain.api import edn
from Tutkain.package import source_root, start_logging, stop_logging
from Tutkain.src.repl import views
from Tutkain.src.repl.client import BabashkaClient, JVMClient, JSClient
from Tutkain.src import base64
from Tutkain.src import state
from .mock import Server
from .util impo... | 34.066019 | 109 | 0.570964 |
4a27f6086e40d5c3a7624d057288a4b8246d1325 | 2,019 | py | Python | anime_downloader/extractors/init.py | danielb2/anime-downloader | 0bebd6f9e8a7ea6264fcc6c4436570596f299213 | [
"Unlicense"
] | null | null | null | anime_downloader/extractors/init.py | danielb2/anime-downloader | 0bebd6f9e8a7ea6264fcc6c4436570596f299213 | [
"Unlicense"
] | null | null | null | anime_downloader/extractors/init.py | danielb2/anime-downloader | 0bebd6f9e8a7ea6264fcc6c4436570596f299213 | [
"Unlicense"
] | null | null | null | from importlib import import_module
ALL_EXTRACTORS = [
{
'sitename': 'rapidvideo',
'modulename': 'rapidvideo',
'regex': 'rapidvideo',
'class': 'RapidVideo'
},
{
'sitename': 'no_extractor',
'modulename': 'fake_extractor',
'regex': 'no_extractor',
... | 23.206897 | 56 | 0.47053 |
4a27f967fd7493dfbdc90bd8055b1e598085138d | 18,038 | py | Python | src/bitmessagemain.py | kaue/PyBitmessage | 7b8bf082ff0d569f507d65e087000e4e3d6ccf3f | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/bitmessagemain.py | kaue/PyBitmessage | 7b8bf082ff0d569f507d65e087000e4e3d6ccf3f | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/bitmessagemain.py | kaue/PyBitmessage | 7b8bf082ff0d569f507d65e087000e4e3d6ccf3f | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | null | null | null | #!/usr/bin/python2.7
"""
The PyBitmessage startup script
"""
# Copyright (c) 2012-2016 Jonathan Warren
# Copyright (c) 2012-2020 The Bitmessage developers
# Distributed under the MIT/X11 software license. See the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Right now, PyBitmessa... | 36.293763 | 79 | 0.581328 |
4a27fa3cc31c48f3def1383e05bed2d84b896810 | 3,836 | py | Python | amp/data_utils/csv.py | szczurek-lab/hydramp | be4eb6defe227fe3fef4fe9882a85a0b717301c6 | [
"MIT"
] | 4 | 2022-03-04T15:57:24.000Z | 2022-03-24T11:13:01.000Z | amp/data_utils/csv.py | szczurek-lab/hydramp | be4eb6defe227fe3fef4fe9882a85a0b717301c6 | [
"MIT"
] | null | null | null | amp/data_utils/csv.py | szczurek-lab/hydramp | be4eb6defe227fe3fef4fe9882a85a0b717301c6 | [
"MIT"
] | 1 | 2022-03-07T16:44:11.000Z | 2022-03-07T16:44:11.000Z | import csv
from sklearn.model_selection import train_test_split
from amp.data_utils import sequence
MIN_LENGTH = 0
INPUT_PATH = 'data/interim/Uniprot_0_200_no_duplicates.csv'
class CSVSplitter:
"""Perform splitting csv file in training, test and validation subsets."""
def __init__(
self,
... | 30.204724 | 100 | 0.570647 |
4a27fdeb6bc3828e758ef6e52c8b7e33bd457611 | 2,278 | py | Python | python/src/worker/tasks/dotplot.py | hms-dbmi-cellenics/worker | 9eb9f9823e0c194384a207c56ffcc487873a481a | [
"MIT"
] | 1 | 2022-03-28T10:28:53.000Z | 2022-03-28T10:28:53.000Z | python/src/worker/tasks/dotplot.py | hms-dbmi-cellenics/worker | 9eb9f9823e0c194384a207c56ffcc487873a481a | [
"MIT"
] | 30 | 2022-01-12T20:32:18.000Z | 2022-03-25T08:08:26.000Z | python/src/worker/tasks/dotplot.py | hms-dbmi-cellenics/worker | 9eb9f9823e0c194384a207c56ffcc487873a481a | [
"MIT"
] | 1 | 2022-03-07T12:00:12.000Z | 2022-03-07T12:00:12.000Z | import json
import backoff
import requests
from aws_xray_sdk.core import xray_recorder
from exceptions import raise_if_error
from ..config import config
from ..helpers.s3 import get_cell_sets
from ..result import Result
from ..tasks import Task
class DotPlot(Task):
def __init__(self, msg):
super().__ini... | 28.835443 | 86 | 0.615013 |
4a27ff974c8404908d66290e12fe1f87d84be8ad | 11,091 | py | Python | ckan/tests/legacy/__init__.py | hackhit/ckan | 53b9442509b46525d653f2f705e98319752ceb2d | [
"BSD-3-Clause"
] | 6 | 2015-11-09T00:44:51.000Z | 2019-11-21T14:56:01.000Z | ckan/tests/legacy/__init__.py | hackhit/ckan | 53b9442509b46525d653f2f705e98319752ceb2d | [
"BSD-3-Clause"
] | 39 | 2015-02-18T17:32:23.000Z | 2022-03-11T18:03:36.000Z | ckan/tests/legacy/__init__.py | hackhit/ckan | 53b9442509b46525d653f2f705e98319752ceb2d | [
"BSD-3-Clause"
] | 17 | 2015-03-13T18:05:05.000Z | 2020-11-06T13:55:32.000Z | # encoding: utf-8
"""Pylons application test package
When the test runner finds and executes tests within this directory,
this file will be loaded to setup the test environment.
It registers the root directory of the project in sys.path and
pkg_resources, in case the project hasn't been installed with
setuptools.
""... | 26.985401 | 79 | 0.640339 |
4a280053f3eae39c7a31fec9a24c61660db7340b | 4,846 | py | Python | app.py | Darepapi/flask_todo_app | 742c23b0518e2563abc9dd5cffcf00fa33fe812c | [
"Unlicense",
"MIT"
] | 1 | 2020-07-22T03:01:21.000Z | 2020-07-22T03:01:21.000Z | app.py | Darepapi/flask_todo_app | 742c23b0518e2563abc9dd5cffcf00fa33fe812c | [
"Unlicense",
"MIT"
] | null | null | null | app.py | Darepapi/flask_todo_app | 742c23b0518e2563abc9dd5cffcf00fa33fe812c | [
"Unlicense",
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, flash, url_for, flash
from flask_mysqldb import MySQL
from werkzeug.security import generate_password_hash,check_password_hash
from flask_login import LoginManager, UserMixin, login_required, login_user, logout_user, current_user
from datetime import timedelt... | 32.743243 | 110 | 0.657656 |
4a28006d71a4b46910ee03915c3b5797bc3b3c8c | 4,829 | py | Python | ursina/prefabs/first_person_controller.py | flipcoder/ursina | f761ccd69160d0bef5d13e7b34ca55d66d54b523 | [
"MIT"
] | null | null | null | ursina/prefabs/first_person_controller.py | flipcoder/ursina | f761ccd69160d0bef5d13e7b34ca55d66d54b523 | [
"MIT"
] | null | null | null | ursina/prefabs/first_person_controller.py | flipcoder/ursina | f761ccd69160d0bef5d13e7b34ca55d66d54b523 | [
"MIT"
] | 1 | 2020-10-03T03:44:16.000Z | 2020-10-03T03:44:16.000Z | from ursina import *
class FirstPersonController(Entity):
def __init__(self, **kwargs):
super().__init__()
self.speed = 5
self.cursor = Entity(parent=camera.ui, model='quad', color=color.pink, scale=.008, rotation_z=45)
self.position = (0, 1, 1)
camera.position = self.pos... | 34.248227 | 146 | 0.595154 |
4a2800fafde3d27a45b0b84b7f79108c370b3dd3 | 2,223 | py | Python | stopwatch.py | sgmoratilla/genetic-drawing | 60c29b8f1fb07f24ea45941b8a8f90773ae30347 | [
"MIT"
] | 2 | 2021-02-15T00:26:37.000Z | 2022-03-06T14:01:02.000Z | stopwatch.py | sgmoratilla/genetic-drawing | 60c29b8f1fb07f24ea45941b8a8f90773ae30347 | [
"MIT"
] | null | null | null | stopwatch.py | sgmoratilla/genetic-drawing | 60c29b8f1fb07f24ea45941b8a8f90773ae30347 | [
"MIT"
] | 1 | 2021-09-28T17:45:41.000Z | 2021-09-28T17:45:41.000Z | """
MIT License
Copyright (c) 2018 Free TNT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | 32.691176 | 90 | 0.68466 |
4a2801b760511374e550ecf85d560ee10c0b00fa | 5,240 | py | Python | src/koncert/main.py | jiwonMe/k-on-cert | acf6cc608489a8af766955238678c1bff7adf7dd | [
"MIT"
] | null | null | null | src/koncert/main.py | jiwonMe/k-on-cert | acf6cc608489a8af766955238678c1bff7adf7dd | [
"MIT"
] | null | null | null | src/koncert/main.py | jiwonMe/k-on-cert | acf6cc608489a8af766955238678c1bff7adf7dd | [
"MIT"
] | null | null | null | import re
import requests
import pprint
import time
import json
from bs4 import BeautifulSoup as bs
from io import BytesIO
import base64
from requests.sessions import Session
from urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
class PASSAg... | 26.464646 | 84 | 0.50458 |
4a2801d6dbbd6d520597c7493205f3fbe945b789 | 1,484 | py | Python | pyds8k/resources/ds8k/v1/lss.py | IBM/pyds8k | fb58f270e1ca8377ae0877a1f351cc222a937b49 | [
"Apache-2.0"
] | 7 | 2020-04-16T11:20:02.000Z | 2021-04-21T13:39:14.000Z | pyds8k/resources/ds8k/v1/lss.py | IBM/pyds8k | fb58f270e1ca8377ae0877a1f351cc222a937b49 | [
"Apache-2.0"
] | 1 | 2020-07-15T02:56:56.000Z | 2020-08-03T17:16:53.000Z | pyds8k/resources/ds8k/v1/lss.py | IBM/pyds8k | fb58f270e1ca8377ae0877a1f351cc222a937b49 | [
"Apache-2.0"
] | 6 | 2020-01-03T05:54:26.000Z | 2022-03-31T09:42:27.000Z | ##############################################################################
# Copyright 2019 IBM Corp.
#
# 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/LI... | 30.916667 | 78 | 0.602426 |
4a28024edb5f5bc4ec2aad092817a9f2dc0fa4ea | 1,778 | py | Python | instapy_cli/__main__.py | MacherIT/pybuho | a0ceffe4bb5cf3d2e3ec1f32a39aafdb9601a952 | [
"MIT"
] | null | null | null | instapy_cli/__main__.py | MacherIT/pybuho | a0ceffe4bb5cf3d2e3ec1f32a39aafdb9601a952 | [
"MIT"
] | null | null | null | instapy_cli/__main__.py | MacherIT/pybuho | a0ceffe4bb5cf3d2e3ec1f32a39aafdb9601a952 | [
"MIT"
] | null | null | null | import sys
from platform import python_version
from instapy_cli.cli import InstapyCli as client
from optparse import OptionParser
import pkg_resources # part of setuptools
version = pkg_resources.require('instapy_cli')[0].version
'''
TODO:
- use instapy_cli.media to download image link and use it for upload and conf... | 33.54717 | 88 | 0.666479 |
4a2802fcb82074da25c63c8f17ecc70356df3da9 | 10,278 | py | Python | astropath/bayesian.py | FRBs/path | 9a8d50a9f7c6f48167e5fde06c0b0d1eb6784757 | [
"BSD-3-Clause"
] | null | null | null | astropath/bayesian.py | FRBs/path | 9a8d50a9f7c6f48167e5fde06c0b0d1eb6784757 | [
"BSD-3-Clause"
] | null | null | null | astropath/bayesian.py | FRBs/path | 9a8d50a9f7c6f48167e5fde06c0b0d1eb6784757 | [
"BSD-3-Clause"
] | null | null | null | """Methods related to Bayesian association analysis"""
import warnings
from typing import IO
import numpy as np
from astropy import units
from astropath import localization
from IPython import embed
sqarcsec_steradians = 4 * np.pi * (1 / 3600 / 3600) / (180. / np.pi) ** 2
def pw_Oi(theta, phi, theta_prior):
... | 32.628571 | 120 | 0.595349 |
4a28031db8d9850f65de7f669b11456b16141a56 | 6,437 | py | Python | utokenize/utokenize.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | null | null | null | utokenize/utokenize.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | null | null | null | utokenize/utokenize.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | null | null | null | # (c) 2019 Paul Sokolovsky, MIT license
# This module is part of the Pycopy project, https://github.com/pfalcon/pycopy
from token import *
from ucollections import namedtuple
import uio
COMMENT = N_TOKENS + 0
NL = N_TOKENS + 1
ENCODING = N_TOKENS + 2
tok_name[COMMENT] = "COMMENT"
tok_name[NL] = "NL"
tok_name[ENCODING... | 32.841837 | 126 | 0.388069 |
4a2803d6746a029ea0407a9a1734144e056fbe30 | 4,209 | py | Python | cogs/images.py | Stift007/OctoCat | 0ea54c106ae6321a62e9ab459aede7efd2116c3e | [
"MIT"
] | null | null | null | cogs/images.py | Stift007/OctoCat | 0ea54c106ae6321a62e9ab459aede7efd2116c3e | [
"MIT"
] | null | null | null | cogs/images.py | Stift007/OctoCat | 0ea54c106ae6321a62e9ab459aede7efd2116c3e | [
"MIT"
] | null | null | null | import os
import discord
import random
from io import BytesIO
import aiohttp
from discord.ext import commands
import praw
import requests
from data import reddit
from PIL import Image
APP_ID = reddit.APP_ID
SECRET = reddit.SECRET
class Images(commands.Cog):
def __init__(self,bot):
self.bot = bot
@comm... | 36.284483 | 107 | 0.594916 |
4a280667fb44f8652873298c09961a3156df0849 | 315 | py | Python | variation1.py | benjamin-wilkins/trigonometry-circles | c366f72e520c4556c82699652e0345b5b3e15f32 | [
"MIT"
] | null | null | null | variation1.py | benjamin-wilkins/trigonometry-circles | c366f72e520c4556c82699652e0345b5b3e15f32 | [
"MIT"
] | null | null | null | variation1.py | benjamin-wilkins/trigonometry-circles | c366f72e520c4556c82699652e0345b5b3e15f32 | [
"MIT"
] | null | null | null | import math, turtle
turtle = turtle.Turtle()
turtle.speed(0)
def findPoints(radius):
for i in range(361):
y = radius * math.sin(0.01745329 * i)
yield [0, y]
x = radius * math.cos(0.01745329 * i)
yield [x, 0]
yield [x, y]
for i in findPoints(200):
turtle.goto(i) | 22.5 | 45 | 0.565079 |
4a280761fc7b947add578c843533b7d744117363 | 7,034 | py | Python | src/feature/feature.py | Adam1679/fraud-detection | b84169ad2ab9383e9cc463fb286aba26a31fd161 | [
"MIT"
] | null | null | null | src/feature/feature.py | Adam1679/fraud-detection | b84169ad2ab9383e9cc463fb286aba26a31fd161 | [
"MIT"
] | null | null | null | src/feature/feature.py | Adam1679/fraud-detection | b84169ad2ab9383e9cc463fb286aba26a31fd161 | [
"MIT"
] | null | null | null | from sklearn.base import BaseEstimator, TransformerMixin
import json
import numpy as np
import pandas as pd
from itertools import product
class Email_Engineering(BaseEstimator, TransformerMixin):
"""
对太多的域名进行了降纬分类,处理
credit to ``https://www.kaggle.com/amirhmi/a-comprehensive-guide-to-get-0-9492``
"""
... | 33.179245 | 122 | 0.579471 |
4a28081b8e8d2b7841d36bfcb59f0867aa0d58c5 | 2,583 | py | Python | geometry_analysis/tests/test_geometry_analysis.py | HanboHong/geometry_analysis | 4c73fb9119b8a38d149ce022f2425c30afff2464 | [
"BSD-3-Clause"
] | null | null | null | geometry_analysis/tests/test_geometry_analysis.py | HanboHong/geometry_analysis | 4c73fb9119b8a38d149ce022f2425c30afff2464 | [
"BSD-3-Clause"
] | null | null | null | geometry_analysis/tests/test_geometry_analysis.py | HanboHong/geometry_analysis | 4c73fb9119b8a38d149ce022f2425c30afff2464 | [
"BSD-3-Clause"
] | null | null | null | """
Unit and regression test for the geometry_analysis package.
"""
# Import package, test suite, and other packages as needed
import geometry_analysis
import pytest
import sys
import numpy as np
def test_geometry_analysis_imported():
"""Sample test, will always pass so long as import statement worked"""
asse... | 24.140187 | 74 | 0.675184 |
4a2808410dd100a720d3100d0c2d8cb7a3588835 | 2,023 | py | Python | rllib/agents/pg/pg_tf_policy.py | daobook/ray | af9f1ef4dc160e0671206556b387f8017f3c3930 | [
"Apache-2.0"
] | 33 | 2020-05-27T14:25:24.000Z | 2022-03-22T06:11:30.000Z | rllib/agents/pg/pg_tf_policy.py | daobook/ray | af9f1ef4dc160e0671206556b387f8017f3c3930 | [
"Apache-2.0"
] | 125 | 2018-01-31T06:57:41.000Z | 2022-03-26T07:07:14.000Z | rllib/agents/pg/pg_tf_policy.py | daobook/ray | af9f1ef4dc160e0671206556b387f8017f3c3930 | [
"Apache-2.0"
] | 5 | 2020-08-06T15:53:07.000Z | 2022-02-09T03:31:31.000Z | """
TensorFlow policy class used for PG.
"""
from typing import List, Type, Union
import ray
from ray.rllib.agents.pg.utils import post_process_advantages
from ray.rllib.evaluation.postprocessing import Postprocessing
from ray.rllib.models.action_dist import ActionDistribution
from ray.rllib.models.modelv2 import Mod... | 35.491228 | 78 | 0.739496 |
4a280a2b21daa731de9f5b32caf41b88135ec9b4 | 2,962 | py | Python | tfx/components/infra_validator/model_server_runners/factory.py | BioGeek/tfx | 3d30ae8a1e2f33367c592ca86562cf555193cfb6 | [
"Apache-2.0"
] | 1 | 2020-11-24T16:59:37.000Z | 2020-11-24T16:59:37.000Z | tfx/components/infra_validator/model_server_runners/factory.py | BioGeek/tfx | 3d30ae8a1e2f33367c592ca86562cf555193cfb6 | [
"Apache-2.0"
] | null | null | null | tfx/components/infra_validator/model_server_runners/factory.py | BioGeek/tfx | 3d30ae8a1e2f33367c592ca86562cf555193cfb6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC. 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 a... | 37.974359 | 83 | 0.770088 |
4a280b93ccf38ea88b851d49a2d3f16716ca7ac4 | 302 | py | Python | odooku_data/serialization/fields.py | odooku/odooku-data | c9f47eb04d7f04cbd2e204779a7023e9e59ec9ab | [
"Apache-2.0"
] | null | null | null | odooku_data/serialization/fields.py | odooku/odooku-data | c9f47eb04d7f04cbd2e204779a7023e9e59ec9ab | [
"Apache-2.0"
] | null | null | null | odooku_data/serialization/fields.py | odooku/odooku-data | c9f47eb04d7f04cbd2e204779a7023e9e59ec9ab | [
"Apache-2.0"
] | 1 | 2020-10-06T12:00:02.000Z | 2020-10-06T12:00:02.000Z | from odooku_data.serialization.base import BaseFieldSerializer
class FieldSerializer(BaseFieldSerializer):
def serialize(self, record, context):
return record.read([self.field_name])[0][self.field_name]
def deserialize(self, values, context):
return values[self.field_name]
| 27.454545 | 65 | 0.751656 |
4a280cfd33a4222a136048f49d7199d6ce60dbca | 7,401 | py | Python | mahiru/components/asset_store.py | SecConNet/proof_of_concept | 80f6b27ff6b97796803e554387ca2881a792be79 | [
"Apache-2.0"
] | 4 | 2021-03-26T09:17:51.000Z | 2021-05-17T10:31:59.000Z | mahiru/components/asset_store.py | SecConNet/proof_of_concept | 80f6b27ff6b97796803e554387ca2881a792be79 | [
"Apache-2.0"
] | 58 | 2020-03-02T10:02:51.000Z | 2021-07-09T09:23:49.000Z | mahiru/components/asset_store.py | SecConNet/proof_of_concept | 80f6b27ff6b97796803e554387ca2881a792be79 | [
"Apache-2.0"
] | null | null | null | """Storage and exchange of data and compute assets."""
from copy import copy
import logging
from pathlib import Path
from shutil import copyfile, move, rmtree
from tempfile import mkdtemp
from typing import Dict, Optional
from mahiru.definitions.assets import Asset, ComputeAsset, DataAsset
from mahiru.definitions.conn... | 36.458128 | 77 | 0.617619 |
4a280de6b716fd3569d0d2290eb06686641fd523 | 279 | py | Python | pirates/ai/HolidayManager.py | ksmit799/POTCO-PS | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 8 | 2017-01-24T04:33:29.000Z | 2020-11-01T08:36:24.000Z | pirates/ai/HolidayManager.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 1 | 2017-03-02T18:05:17.000Z | 2017-03-14T06:47:10.000Z | pirates/ai/HolidayManager.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 11 | 2017-03-02T18:46:07.000Z | 2020-11-01T08:36:26.000Z | from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal
class HolidayManager(DistributedObject.DistributedObject):
notify = DirectNotifyGlobal.directNotify.newCategory('HolidayManager')
neverDisable = 1
def __init__(self):
pass | 31 | 71 | 0.845878 |
4a280e7c514abfa1c148c27212741ff85c839cf5 | 5,621 | py | Python | tensorflow/python/training/momentum.py | fraudies/tensorflow | a42423e302b71893bbd24aa896869941013c07fb | [
"Apache-2.0"
] | 52 | 2018-11-12T06:39:35.000Z | 2022-03-08T05:31:27.000Z | tensorflow/python/training/momentum.py | fraudies/tensorflow | a42423e302b71893bbd24aa896869941013c07fb | [
"Apache-2.0"
] | 2 | 2018-12-04T08:35:40.000Z | 2020-10-22T16:17:39.000Z | tensorflow/python/training/momentum.py | fraudies/tensorflow | a42423e302b71893bbd24aa896869941013c07fb | [
"Apache-2.0"
] | 17 | 2019-03-11T01:17:16.000Z | 2022-02-21T00:44:47.000Z | # Copyright 2015 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... | 41.947761 | 80 | 0.71304 |
4a2810299a52aa3370468a40f5e5e157e6faf395 | 946 | py | Python | test/integration/states/services/test_ecs.py | mattsb42/rhodes | 86d5c86fea1f069ce6f896d2cfea1ed6056392dc | [
"Apache-2.0"
] | 1 | 2019-11-18T07:34:36.000Z | 2019-11-18T07:34:36.000Z | test/integration/states/services/test_ecs.py | mattsb42/rhodes | 86d5c86fea1f069ce6f896d2cfea1ed6056392dc | [
"Apache-2.0"
] | 55 | 2019-10-18T05:32:34.000Z | 2020-01-10T07:54:04.000Z | test/integration/states/services/test_ecs.py | mattsb42/rhodes | 86d5c86fea1f069ce6f896d2cfea1ed6056392dc | [
"Apache-2.0"
] | null | null | null | """Integration tests for ``rhodes.states.services.ecs``."""
import pytest
from rhodes.states.services.ecs import AmazonEcs
from rhodes.structures import Parameters
from ...integration_test_utils import build_and_try_single_step_state_machine
pytestmark = [pytest.mark.integ]
def test_ecs_minimal():
step = Amazo... | 30.516129 | 94 | 0.713531 |
4a28104bfe070c072906d4f65b49dd11bd935de5 | 3,297 | py | Python | Acquire/ObjectStore/_objstore.py | michellab/BioSimSpaceCloud | 456b146a2131565e354352872d3e75a08c3652d1 | [
"Apache-2.0"
] | 2 | 2019-02-15T16:04:19.000Z | 2019-02-19T15:42:27.000Z | Acquire/ObjectStore/_objstore.py | michellab/BioSimSpaceCloud | 456b146a2131565e354352872d3e75a08c3652d1 | [
"Apache-2.0"
] | null | null | null | Acquire/ObjectStore/_objstore.py | michellab/BioSimSpaceCloud | 456b146a2131565e354352872d3e75a08c3652d1 | [
"Apache-2.0"
] | null | null | null |
import io as _io
import datetime as _datetime
import uuid as _uuid
import json as _json
import os as _os
from ._errors import ObjectStoreError
__all__ = ["ObjectStore", "set_object_store_backend",
"use_testing_object_store_backend",
"use_oci_object_store_backend"]
_objstore_backend = None
de... | 29.4375 | 78 | 0.729754 |
4a281063542312f7977712aaf6024b70832e60d0 | 1,398 | py | Python | stubs.min/System/Windows/Forms/__init___parts/UICuesEventArgs.py | denfromufa/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2017-07-07T11:15:45.000Z | 2017-07-07T11:15:45.000Z | stubs.min/System/Windows/Forms/__init___parts/UICuesEventArgs.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Forms/__init___parts/UICuesEventArgs.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class UICuesEventArgs(EventArgs):
"""
Provides data for the System.Windows.Forms.Control.ChangeUICues event.
UICuesEventArgs(uicues: UICues)
"""
@staticmethod
def __new__(self,uicues):
""" __new__(cls: type,uicues: UICues) """
pass
Changed=property(lambda self: object(),lambda self,v: None,lamb... | 29.744681 | 86 | 0.709585 |
4a281132d92b229850ecfd1acf3883022a49f240 | 1,643 | py | Python | masakari/cmd/api.py | sampathP/openstack-masakari | 108d988165271b7bafd66d985ff1000537ef3183 | [
"Apache-2.0"
] | null | null | null | masakari/cmd/api.py | sampathP/openstack-masakari | 108d988165271b7bafd66d985ff1000537ef3183 | [
"Apache-2.0"
] | null | null | null | masakari/cmd/api.py | sampathP/openstack-masakari | 108d988165271b7bafd66d985ff1000537ef3183 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 NTT DATA
# 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... | 28.327586 | 77 | 0.688984 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.