hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
94a778b4a76d292db66c9b35094e2ac3501b3801 | 820 | py | Python | opac/queries/book/search.py | rimphyd/Django-OPAC | d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb | [
"MIT"
] | 1 | 2020-11-26T05:25:46.000Z | 2020-11-26T05:25:46.000Z | opac/queries/book/search.py | rimphyd/Django-OPAC | d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb | [
"MIT"
] | null | null | null | opac/queries/book/search.py | rimphyd/Django-OPAC | d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb | [
"MIT"
] | null | null | null | from functools import reduce
from operator import or_
from django.db.models import Q
from opac.models.masters import Book
| 27.333333 | 58 | 0.552439 |
94a79cf372e7ceb49593c1ecc1873397f424f8fd | 3,408 | py | Python | modules/superfetch_connector.py | dfrc-korea/carpe | 9afa8b624948fd462bb19c90cbc811228fd52c21 | [
"Apache-2.0"
] | 56 | 2019-02-07T06:21:45.000Z | 2022-03-21T08:19:24.000Z | modules/superfetch_connector.py | dfrc-korea/carpe | 9afa8b624948fd462bb19c90cbc811228fd52c21 | [
"Apache-2.0"
] | 5 | 2020-05-25T17:29:00.000Z | 2021-12-13T20:49:08.000Z | modules/superfetch_connector.py | dfrc-korea/carpe | 9afa8b624948fd462bb19c90cbc811228fd52c21 | [
"Apache-2.0"
] | 31 | 2019-03-13T10:23:49.000Z | 2021-11-04T12:14:58.000Z | # -*- coding: utf-8 -*-
"""module for Superfetch."""
import os, sys
import time
from datetime import datetime, timedelta
from modules import logger
from modules import manager
from modules import interface
from modules.windows_superfetch import sfexport2
from dfvfs.lib import definitions as dfvfs_definitions
manage... | 37.866667 | 126 | 0.632042 |
94a7f32aeb3e4b7407a1b59b692d58dd7cc09416 | 1,737 | py | Python | river_admin/views/function_view.py | pantyukhov/river-admin | 7ed37418a26a4a813fe853c36f33086f80e0309c | [
"BSD-3-Clause"
] | 75 | 2019-11-25T08:28:12.000Z | 2022-03-05T12:35:11.000Z | river_admin/views/function_view.py | pantyukhov/river-admin | 7ed37418a26a4a813fe853c36f33086f80e0309c | [
"BSD-3-Clause"
] | 21 | 2019-11-28T17:17:26.000Z | 2022-02-26T20:42:30.000Z | river_admin/views/function_view.py | pantyukhov/river-admin | 7ed37418a26a4a813fe853c36f33086f80e0309c | [
"BSD-3-Clause"
] | 19 | 2020-02-13T02:00:41.000Z | 2022-03-02T04:47:05.000Z | from rest_framework.generics import get_object_or_404
from rest_framework.response import Response
from rest_framework.status import HTTP_400_BAD_REQUEST, HTTP_200_OK
from river.models import Function
from river_admin.views import get, post, put, delete
from river_admin.views.serializers import UpdateFunctionDto, Crea... | 36.1875 | 92 | 0.754174 |
94a81ac899f2bf628bff10d9f428581207d15588 | 2,147 | py | Python | datasets/ETH_local_feature.py | The-Learning-And-Vision-Atelier-LAVA/PoSFeat | e8a42c05158384113e1a0eafecf84b516a88c1f1 | [
"Apache-2.0"
] | 1 | 2022-03-23T05:49:50.000Z | 2022-03-23T05:49:50.000Z | datasets/ETH_local_feature.py | The-Learning-And-Vision-Atelier-LAVA/PoSFeat | e8a42c05158384113e1a0eafecf84b516a88c1f1 | [
"Apache-2.0"
] | null | null | null | datasets/ETH_local_feature.py | The-Learning-And-Vision-Atelier-LAVA/PoSFeat | e8a42c05158384113e1a0eafecf84b516a88c1f1 | [
"Apache-2.0"
] | null | null | null | import torch
import numpy as np
from torch.utils.data import Dataset
import torchvision.transforms as transforms
import skimage.io as io
from path import Path
import cv2
import torch.nn.functional as F | 35.783333 | 93 | 0.541686 |
94a98c326885cec3ec1723a7fb5af15e7c22cef9 | 4,468 | py | Python | thirteen_tangram/image_utils.py | Wuziyi616/Artificial_Intelligence_Project1 | dcc26a99343e7d29199662ef3c9bf63f29513381 | [
"MIT"
] | 7 | 2019-10-20T03:17:06.000Z | 2021-10-31T16:52:35.000Z | thirteen_tangram/image_utils.py | Wuziyi616/Artificial_Intelligence_Project1 | dcc26a99343e7d29199662ef3c9bf63f29513381 | [
"MIT"
] | 2 | 2019-10-21T01:18:09.000Z | 2021-02-27T06:04:02.000Z | thirteen_tangram/image_utils.py | Wuziyi616/Artificial_Intelligence_Project1 | dcc26a99343e7d29199662ef3c9bf63f29513381 | [
"MIT"
] | 2 | 2020-05-12T23:07:26.000Z | 2020-06-25T18:21:45.000Z | """This file contains functions for processing image"""
import cv2
import math
import copy
import numpy as np
import matplotlib.pyplot as plt
def binarize_image(image):
"""Binarize image pixel values to 0 and 255."""
unique_values = np.unique(image)
if len(unique_values) == 2:
if (un... | 30.394558 | 107 | 0.611235 |
94a98ee6aeee8be2f3fadb488591e8be336e657e | 985 | py | Python | modules/dbnd-airflow/test_dbnd_airflow/test_logging.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | modules/dbnd-airflow/test_dbnd_airflow/test_logging.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 16 | 2020-03-11T09:37:58.000Z | 2022-01-26T10:22:08.000Z | modules/dbnd-airflow/test_dbnd_airflow/test_logging.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | import logging
from logging.config import dictConfig
import dbnd
from dbnd.testing.helpers import run_dbnd_subprocess__with_home
from dbnd_airflow_contrib.dbnd_airflow_default_logger import DEFAULT_LOGGING_CONFIG
if __name__ == "__main__":
print(
dbnd.__version__
) # we need it first to import, b... | 30.78125 | 94 | 0.742132 |
94ab3531f2df3de6d331fb3554afb88fc8859c51 | 2,416 | py | Python | erpnext_ecommerce/templates/pages/updateaddress.py | praveenbaghale/Erpnext_ecom | 67cdb84c091abc75f72f8c070d5ccfab967ca74d | [
"MIT"
] | null | null | null | erpnext_ecommerce/templates/pages/updateaddress.py | praveenbaghale/Erpnext_ecom | 67cdb84c091abc75f72f8c070d5ccfab967ca74d | [
"MIT"
] | null | null | null | erpnext_ecommerce/templates/pages/updateaddress.py | praveenbaghale/Erpnext_ecom | 67cdb84c091abc75f72f8c070d5ccfab967ca74d | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe.utils
from frappe import _
| 35.529412 | 85 | 0.479719 |
94ab966f8534c8de982a55b9999cfd4d7dd93d16 | 2,820 | py | Python | part2/day2/day2 - pandas image.py | toskpl/Challenge_DW | 8054bdefb9ea8717a6f443c5dbfd8ccef8c581f7 | [
"MIT"
] | 2 | 2020-02-20T22:55:05.000Z | 2020-02-20T22:56:59.000Z | part2/day2/day2 - pandas image.py | toskpl/Challenge_DW | 8054bdefb9ea8717a6f443c5dbfd8ccef8c581f7 | [
"MIT"
] | null | null | null | part2/day2/day2 - pandas image.py | toskpl/Challenge_DW | 8054bdefb9ea8717a6f443c5dbfd8ccef8c581f7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
#import bibliotek
from keras.applications.resnet50 import ResNet50, decode_predictions,preprocess_input
from keras.preprocessing import image
import numpy as np
import requests
from io import BytesIO
from PIL import Image
# In[2]:
#podbranie modelu ResNet50
model... | 19.859155 | 265 | 0.74539 |
94ad09ea90afd727a0a558f798e2d8fba1b75574 | 5,988 | py | Python | venv/Lib/site-packages/configurationutil/gui/add_edit_inheritable.py | avim2809/CameraSiteBlocker | bfc0434e75e8f3f95c459a4adc86b7673200816e | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/configurationutil/gui/add_edit_inheritable.py | avim2809/CameraSiteBlocker | bfc0434e75e8f3f95c459a4adc86b7673200816e | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/configurationutil/gui/add_edit_inheritable.py | avim2809/CameraSiteBlocker | bfc0434e75e8f3f95c459a4adc86b7673200816e | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import logging_helper
from future.utils import with_metaclass
from abc import abstractmethod, ABCMeta
from configurationutil import DefaultInheritableConstant, Configuration
from uiutil import BaseFrame, Button, Position, Separator, Label, Combobox, TextEntry, Switch
from uiutil.tk_names import E, W,... | 29.94 | 114 | 0.533734 |
94ad5e48276b65da2640ba50a128fe9313377a41 | 1,723 | py | Python | tests/test_errors.py | xenadevel/PyXenaValkyrie | 9bb1d0b058c45dc94a778fd674a679b53f03a34c | [
"Apache-2.0"
] | 4 | 2018-07-13T08:09:38.000Z | 2022-02-09T01:36:13.000Z | tests/test_errors.py | xenadevel/PyXenaValkyrie | 9bb1d0b058c45dc94a778fd674a679b53f03a34c | [
"Apache-2.0"
] | 1 | 2019-07-31T04:56:43.000Z | 2019-08-01T07:11:21.000Z | tests/test_errors.py | xenadevel/PyXenaValkyrie | 9bb1d0b058c45dc94a778fd674a679b53f03a34c | [
"Apache-2.0"
] | 3 | 2019-05-30T23:47:02.000Z | 2022-02-04T12:32:14.000Z | """
Test all kinds of errors.
@author yoram@ignissoft.com
"""
import pytest
from trafficgenerator.tgn_utils import ApiType
from xenavalkyrie.xena_app import init_xena
from xenavalkyrie.xena_object import XenaAttributeError
from .test_base import TestXenaBase
| 31.907407 | 88 | 0.66628 |
94afc682e851049b992c2a039657699ea8d2577c | 5,984 | py | Python | main.py | ArkAngeL43/block-fer | 429e447eafc78594b5dba7e905ea28bfd6fe995d | [
"MIT"
] | null | null | null | main.py | ArkAngeL43/block-fer | 429e447eafc78594b5dba7e905ea28bfd6fe995d | [
"MIT"
] | null | null | null | main.py | ArkAngeL43/block-fer | 429e447eafc78594b5dba7e905ea28bfd6fe995d | [
"MIT"
] | 1 | 2021-12-25T18:08:23.000Z | 2021-12-25T18:08:23.000Z | import time
from datetime import datetime as dt
import colorama
from colorama import Fore, Back, Style
import socket
import os
import sys
if __name__ == "__main__":
try:
CS(1)
menu()
except KeyboardInterrupt:
print("\n")
hosts_path = "/etc/hosts"
print("""\033[31... | 38.857143 | 125 | 0.439004 |
94b0ebd8e9b2e487fcbf80ad3e4edba6b1164b05 | 3,452 | py | Python | DataGeneration/1_ChemicalDiagramSearch/4_bucurate.py | qai222/ATMOxide | 42702c1ce299233569c8a3c0a9712b0e62ef6b16 | [
"MIT"
] | null | null | null | DataGeneration/1_ChemicalDiagramSearch/4_bucurate.py | qai222/ATMOxide | 42702c1ce299233569c8a3c0a9712b0e62ef6b16 | [
"MIT"
] | null | null | null | DataGeneration/1_ChemicalDiagramSearch/4_bucurate.py | qai222/ATMOxide | 42702c1ce299233569c8a3c0a9712b0e62ef6b16 | [
"MIT"
] | null | null | null | import json
import pandas as pd
from AnalysisModule.prepare.diagram import BuildingUnit
from AnalysisModule.routines.util import read_jsonfile
"""
4 ways to deal with strange bus
A - exclude bu, keep crystals
A' - merge bu, keep crystals
B - exclude crystals
C - keep all
note 2020/11/24:
- all A are modified to... | 32.261682 | 123 | 0.628621 |
94b185ec7b26237c15a8147e0cf8e33a0273856f | 2,080 | py | Python | roadmap/migrations/0001_initial.py | bitmazk/django-roadmap | 72cdc20bcd129ffb00395d5b1215fedbf59218b2 | [
"MIT"
] | 2 | 2019-11-29T01:06:08.000Z | 2020-09-15T23:02:18.000Z | roadmap/migrations/0001_initial.py | bitmazk/django-roadmap | 72cdc20bcd129ffb00395d5b1215fedbf59218b2 | [
"MIT"
] | 3 | 2020-02-11T22:26:54.000Z | 2021-06-10T17:43:27.000Z | roadmap/migrations/0001_initial.py | bitlabstudio/django-roadmap | 72cdc20bcd129ffb00395d5b1215fedbf59218b2 | [
"MIT"
] | 1 | 2016-04-13T21:16:25.000Z | 2016-04-13T21:16:25.000Z | # flake8: noqa
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
| 39.245283 | 112 | 0.605769 |
94b251ffd115691f93c441b8b14587d3d7b66b77 | 20,915 | py | Python | api/migrations/versions/3ab678fc66cd_populate_reg_form.py | cclauss/Baobab | e7aad3a63237be5f16e6441b89b3cc708ec19acd | [
"Apache-2.0"
] | 52 | 2019-01-10T16:04:26.000Z | 2022-02-10T00:55:59.000Z | api/migrations/versions/3ab678fc66cd_populate_reg_form.py | cclauss/Baobab | e7aad3a63237be5f16e6441b89b3cc708ec19acd | [
"Apache-2.0"
] | 535 | 2019-01-08T21:24:01.000Z | 2022-02-27T15:24:06.000Z | api/migrations/versions/3ab678fc66cd_populate_reg_form.py | cclauss/Baobab | e7aad3a63237be5f16e6441b89b3cc708ec19acd | [
"Apache-2.0"
] | 36 | 2019-01-10T16:09:15.000Z | 2021-06-28T21:02:47.000Z | """Populate registration form.
Revision ID: 3ab678fc66cd
Revises: a5480ca6646b
Create Date: 2019-06-20 21:34:45.822651
"""
# revision identifiers, used by Alembic.
revision = '3ab678fc66cd'
down_revision = 'a5480ca6646b'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table, column
| 46.789709 | 533 | 0.533588 |
94b4086538bb9962754c3bd9f36ec1aa28af101a | 1,665 | py | Python | gallery/models.py | vsidera/PhotoAlbum | 1a6dbf7129e22e18be5de5648e488c4e9ccecbee | [
"MIT"
] | null | null | null | gallery/models.py | vsidera/PhotoAlbum | 1a6dbf7129e22e18be5de5648e488c4e9ccecbee | [
"MIT"
] | null | null | null | gallery/models.py | vsidera/PhotoAlbum | 1a6dbf7129e22e18be5de5648e488c4e9ccecbee | [
"MIT"
] | null | null | null | from django.db import models
from cloudinary.models import CloudinaryField
# Create your models here.
| 25.615385 | 94 | 0.657057 |
94b5e68f3e111b96fca699f4d5fd4ef4b76998fd | 6,284 | py | Python | cappylib/general.py | ChrisPappalardo/cappylib | e7f469e51bac5d35444514f5504728cc81c1d678 | [
"MIT"
] | 1 | 2016-05-29T17:22:30.000Z | 2016-05-29T17:22:30.000Z | cappylib/general.py | ChrisPappalardo/cappylib | e7f469e51bac5d35444514f5504728cc81c1d678 | [
"MIT"
] | null | null | null | cappylib/general.py | ChrisPappalardo/cappylib | e7f469e51bac5d35444514f5504728cc81c1d678 | [
"MIT"
] | null | null | null | ##############################################################################################
# HEADER
#
# cappylib/general.py - defines useful functions for python scripts
#
# Copyright (C) 2008-2013 Chris Pappalardo <cpappala@yahoo.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a cop... | 37.404762 | 94 | 0.539624 |
94b6def0024048ec28cda94240b72c1735d79551 | 1,537 | py | Python | tests/t_cqparts_fasteners/test_fasteners_fasteners_nutbolt.py | luzpaz/cqparts | 6bcc153c33ea1ac929102fe2e1a5418131af0c4e | [
"Apache-2.0"
] | 69 | 2018-10-29T06:42:14.000Z | 2022-03-18T09:20:11.000Z | tests/t_cqparts_fasteners/test_fasteners_fasteners_nutbolt.py | luzpaz/cqparts | 6bcc153c33ea1ac929102fe2e1a5418131af0c4e | [
"Apache-2.0"
] | 112 | 2017-10-05T12:32:54.000Z | 2018-10-27T06:45:18.000Z | tests/t_cqparts_fasteners/test_fasteners_fasteners_nutbolt.py | luzpaz/cqparts | 6bcc153c33ea1ac929102fe2e1a5418131af0c4e | [
"Apache-2.0"
] | 14 | 2018-11-16T12:13:02.000Z | 2022-03-15T22:32:34.000Z | from base import CQPartsTest
from base import testlabel
# units under test
from cqparts_fasteners.fasteners.nutbolt import NutAndBoltFastener
# ---------- Test Assembly ----------
import cadquery
import cqparts
from partslib.basic import Box
from cqparts import constraint
from cqparts.utils import CoordSystem
# --... | 30.74 | 95 | 0.630449 |
94b8b664d0dd876b7f4a4856901673566775c638 | 4,598 | py | Python | core/views.py | UmerSE/django-login | ee980962a2d68f77d2e56df96dd1ed6e4e70d9ce | [
"Apache-2.0"
] | null | null | null | core/views.py | UmerSE/django-login | ee980962a2d68f77d2e56df96dd1ed6e4e70d9ce | [
"Apache-2.0"
] | null | null | null | core/views.py | UmerSE/django-login | ee980962a2d68f77d2e56df96dd1ed6e4e70d9ce | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render, redirect
from core import models
from django.contrib import messages
from django.core.mail import send_mail
from app import settings
# from django.contrib.sites.shortcuts import get_current_site
# from django.template.loader import render_to_string
# from django.utils.http import ur... | 38.316667 | 174 | 0.64876 |
94bbd930eae95498ca6ae42c0c9ecc9be26d6453 | 1,553 | py | Python | events/eventsapi/migrations/0002_eventdetails_eventgallery_userdetails.py | Akshat1903/Events-Portal-Backend | b67dbc3b91d830fdcea17ab652b4e9ee13d4006f | [
"MIT"
] | 1 | 2021-02-22T17:05:47.000Z | 2021-02-22T17:05:47.000Z | events/eventsapi/migrations/0002_eventdetails_eventgallery_userdetails.py | Akshat1903/Events-Portal-Backend | b67dbc3b91d830fdcea17ab652b4e9ee13d4006f | [
"MIT"
] | null | null | null | events/eventsapi/migrations/0002_eventdetails_eventgallery_userdetails.py | Akshat1903/Events-Portal-Backend | b67dbc3b91d830fdcea17ab652b4e9ee13d4006f | [
"MIT"
] | 2 | 2021-02-08T08:13:03.000Z | 2021-02-09T13:10:30.000Z | # Generated by Django 3.0.8 on 2021-02-20 13:51
import ckeditor.fields
from django.db import migrations, models
import django.db.models.deletion
| 37.878049 | 149 | 0.589182 |
94bbefd52a6dda636007ab79cf315b588e86be19 | 510 | py | Python | mongomail/main.py | terrabitz/MongoMail | 8c7321540fde534e29451c603d22dcad4d2b77c5 | [
"MIT"
] | null | null | null | mongomail/main.py | terrabitz/MongoMail | 8c7321540fde534e29451c603d22dcad4d2b77c5 | [
"MIT"
] | 7 | 2017-07-03T15:31:10.000Z | 2017-07-03T19:07:18.000Z | mongomail/main.py | terrabitz/MongoMail | 8c7321540fde534e29451c603d22dcad4d2b77c5 | [
"MIT"
] | null | null | null | """
This file is for initializing the uWSGI application. It defines a post-fork command in
order to avoid an issue in uWSGI that prevents MongoEngine from lazily creating
mongo connections
"""
from uwsgidecorators import postfork
from mongomail.rest_app import app, db, connection
| 26.842105 | 86 | 0.72549 |
94bcb149b2cf9cc99d00ec9d26c5fde8664209ea | 653 | py | Python | books/crafting_interpreters/pylox/lox/chunk.py | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | 1 | 2022-01-06T04:50:09.000Z | 2022-01-06T04:50:09.000Z | books/crafting_interpreters/pylox/lox/chunk.py | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | 1 | 2022-01-23T06:09:21.000Z | 2022-01-23T06:14:17.000Z | books/crafting_interpreters/pylox/lox/chunk.py | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | null | null | null | import dataclasses
import enum
import value
def init_chunk() -> Chunk:
return Chunk(
code=bytearray(),
constants=[],
)
def write_chunk(chunk: Chunk, byte_: int) -> None:
if 0 > byte_ > 255:
raise ValueError(f"{byte_=} must be in the range [0-255].")
chunk.code.append(byte_... | 18.657143 | 67 | 0.658499 |
94be39cd2f4725e2a81e037d6077ceb851ae28ce | 1,729 | py | Python | scrounger/modules/analysis/ios/app_transport_security.py | noraj/scrounger | f2351f52681f73cec0ac6cf4bb8959fe67d73fab | [
"BSD-3-Clause"
] | 217 | 2018-08-23T12:00:45.000Z | 2022-01-20T12:09:09.000Z | scrounger/modules/analysis/ios/app_transport_security.py | Warlockk/scrounger | dd393666aa1ba1117d1c472cfdef4d0b18216904 | [
"BSD-3-Clause"
] | 18 | 2018-08-24T09:28:54.000Z | 2020-05-19T04:49:54.000Z | scrounger/modules/analysis/ios/app_transport_security.py | Warlockk/scrounger | dd393666aa1ba1117d1c472cfdef4d0b18216904 | [
"BSD-3-Clause"
] | 48 | 2018-08-23T12:51:45.000Z | 2022-01-20T12:09:02.000Z | from scrounger.core.module import BaseModule
#helper functions
from scrounger.utils.ios import plist_dict_to_xml, plist
from scrounger.utils.config import Log
| 27.887097 | 80 | 0.579526 |
94bed4fb817ca27da33f66052b8ca131b1268fef | 1,140 | py | Python | tests/ea/mutation/mutator/test_mutate.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 21 | 2018-04-12T16:25:24.000Z | 2022-02-14T23:05:43.000Z | tests/ea/mutation/mutator/test_mutate.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 8 | 2019-03-19T12:36:36.000Z | 2020-11-11T12:46:00.000Z | tests/ea/mutation/mutator/test_mutate.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 5 | 2018-08-07T13:00:16.000Z | 2021-11-01T00:55:10.000Z | from tests.utilities import is_equivalent
def test_mutate(case_data):
"""
Test :meth:`mutate`.
Parameters
----------
case_data : :class:`.CaseData`
A test case. Holds the mutator to test and the correct mutation
record.
Returns
-------
None : :class:`NoneType`
""... | 20.357143 | 71 | 0.612281 |
94bf12345d6a36d0b6418e469a214947d5aeb512 | 1,028 | py | Python | utils/MiniBatch.py | eLeVeNnN/shinnosuke-gpu | e222da99e8a5e6c56ea7a4c094d91fe8ff9d0069 | [
"MIT"
] | 8 | 2019-08-21T02:34:39.000Z | 2020-08-15T14:46:58.000Z | utils/MiniBatch.py | eLeVeNnN/shinnosuke-gpu | e222da99e8a5e6c56ea7a4c094d91fe8ff9d0069 | [
"MIT"
] | 1 | 2019-12-24T08:14:01.000Z | 2019-12-24T08:14:01.000Z | utils/MiniBatch.py | eLeVeNnN/shinnosuke-gpu | e222da99e8a5e6c56ea7a4c094d91fe8ff9d0069 | [
"MIT"
] | 3 | 2019-08-09T01:32:11.000Z | 2020-05-04T09:36:14.000Z | import cupy as cp
| 30.235294 | 74 | 0.63716 |
94bf7364242aa7179884cda744d0f5e278c8841a | 10,547 | py | Python | plotting/plot_state_data.py | jdschoneman/c19_plotting | a7b4583f4937e1ad5a4b327db58a4091cd8bfe5b | [
"MIT"
] | null | null | null | plotting/plot_state_data.py | jdschoneman/c19_plotting | a7b4583f4937e1ad5a4b327db58a4091cd8bfe5b | [
"MIT"
] | null | null | null | plotting/plot_state_data.py | jdschoneman/c19_plotting | a7b4583f4937e1ad5a4b327db58a4091cd8bfe5b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Plot comparisons of IHME projections to actual data for US states.
IHME data per IHME:
https://covid19.healthdata.org/united-states-of-america
IHME data stored here in the "..\data\ihme" directory for each release
that was obtained.
State-level data per Covid trackin... | 33.48254 | 101 | 0.629847 |
94c18faf59f372b02b2051395080e1cd4a900bc9 | 135 | py | Python | ivy_tests/test_ivy/test_functional/test_core/test_creation.py | SayanJerr/ivy | 7b6ca2b45bae38d260accb6f82c69179519d65eb | [
"Apache-2.0"
] | null | null | null | ivy_tests/test_ivy/test_functional/test_core/test_creation.py | SayanJerr/ivy | 7b6ca2b45bae38d260accb6f82c69179519d65eb | [
"Apache-2.0"
] | null | null | null | ivy_tests/test_ivy/test_functional/test_core/test_creation.py | SayanJerr/ivy | 7b6ca2b45bae38d260accb6f82c69179519d65eb | [
"Apache-2.0"
] | null | null | null | from ... import helpers
import ivy
| 13.5 | 58 | 0.703704 |
94c2f25568f08b53a893c433a7bd12a3592cf5f4 | 59 | py | Python | utils/__init__.py | SiriusKY/pytorch-ocr | c739a13116c6833e8dca3be4bc7b66fc757328b4 | [
"MIT"
] | 2 | 2021-07-05T15:57:54.000Z | 2021-07-05T15:58:51.000Z | utils/__init__.py | SiriusKY/pytorch-ocr | c739a13116c6833e8dca3be4bc7b66fc757328b4 | [
"MIT"
] | null | null | null | utils/__init__.py | SiriusKY/pytorch-ocr | c739a13116c6833e8dca3be4bc7b66fc757328b4 | [
"MIT"
] | null | null | null | from .util import *
from .prefix_beam_search import decode
| 19.666667 | 38 | 0.813559 |
94c37c71835a120478c3cd7c37b0842dadadbf9b | 5,833 | py | Python | server/dvalib/analyzer.py | ysglh/DeepVideoAnalytics | ce807cc1595c813250bb4bc7dfc6fb76cd644335 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2019-03-05T00:46:56.000Z | 2021-11-26T10:20:40.000Z | server/dvalib/analyzer.py | ysglh/DeepVideoAnalytics | ce807cc1595c813250bb4bc7dfc6fb76cd644335 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | server/dvalib/analyzer.py | ysglh/DeepVideoAnalytics | ce807cc1595c813250bb4bc7dfc6fb76cd644335 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2021-09-22T07:47:27.000Z | 2022-01-23T14:16:08.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import sys
import os.path
from PIL import Image
import logging
import numpy as np
from .base_analyzer import BaseAnnotator
if os.environ.get('PYTORCH_MODE',False):
import dvalib.crnn.utils as ut... | 41.368794 | 129 | 0.651637 |
94c4333c72cf483d23f61a6e823095a7d2fa0783 | 20,040 | py | Python | test/test_parsetron.py | clinc/parsetron | 77563587aa4f9b3dccdb150e680fa7ac4d3f809a | [
"Apache-2.0"
] | 123 | 2015-07-22T04:39:03.000Z | 2021-09-19T03:45:24.000Z | test/test_parsetron.py | clinc/parsetron | 77563587aa4f9b3dccdb150e680fa7ac4d3f809a | [
"Apache-2.0"
] | null | null | null | test/test_parsetron.py | clinc/parsetron | 77563587aa4f9b3dccdb150e680fa7ac4d3f809a | [
"Apache-2.0"
] | 40 | 2016-01-08T18:05:47.000Z | 2022-01-11T15:02:05.000Z | from parsetron import * # NOQA
import re
import pytest
__author__ = 'Xuchen Yao'
def test_topdown_init_rule():
p = RobustParser(CornerGrammar(), TopDownStrategy)
assert (None, None) == p.parse("b")
t, _ = p.parse("a b")
assert t is not None
assert (None, None) == p.parse("b a")
d... | 35.034965 | 86 | 0.562026 |
94c45a2bfafb15399fad02cc3b4cd9d86f79d7e8 | 1,297 | py | Python | 06_advanced_python_topics/decorator.py | iwanbolzern/python-course | a4e9088adab09b4e92710eb350392578c0977a71 | [
"MIT"
] | null | null | null | 06_advanced_python_topics/decorator.py | iwanbolzern/python-course | a4e9088adab09b4e92710eb350392578c0977a71 | [
"MIT"
] | null | null | null | 06_advanced_python_topics/decorator.py | iwanbolzern/python-course | a4e9088adab09b4e92710eb350392578c0977a71 | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Callable
def calculate(operation: Callable[[int, int], int],
a: int, b: int) -> int:
"""Demonstration of first class citizen"""
return operation(a, b)
if __name__ == '__main__':
# first class citizen
print(f'1 + 1 = {calculate(add, ... | 23.581818 | 76 | 0.613724 |
94c812ed8eea3a891394ca2d2863a8988d1aa7e0 | 3,770 | py | Python | spec/puzzle/steps/generate_solutions_spec.py | PhilHarnish/forge | 663f19d759b94d84935c14915922070635a4af65 | [
"MIT"
] | 2 | 2020-08-18T18:43:09.000Z | 2020-08-18T20:05:59.000Z | spec/puzzle/steps/generate_solutions_spec.py | PhilHarnish/forge | 663f19d759b94d84935c14915922070635a4af65 | [
"MIT"
] | null | null | null | spec/puzzle/steps/generate_solutions_spec.py | PhilHarnish/forge | 663f19d759b94d84935c14915922070635a4af65 | [
"MIT"
] | null | null | null | import collections
from puzzle.constraints import solution_constraints
from puzzle.steps import generate_solutions
from spec.mamba import *
_SOLUTIONS = collections.OrderedDict((
('early_low', 0.1),
('early_high', 1.0),
('after_early_high', 0.9),
('mid_low', 0.2),
('late_mid', 0.5),
('late_low', 0.3),
(... | 34.907407 | 83 | 0.682228 |
94c81c79dea3fcbf8153eec5ab27fae5f44b059d | 1,215 | py | Python | dataLoader.py | TianZerL/SWJTU_DIP_COURSE | a5548e46e026231c314ff42105d515eae8e1ded6 | [
"MIT"
] | null | null | null | dataLoader.py | TianZerL/SWJTU_DIP_COURSE | a5548e46e026231c314ff42105d515eae8e1ded6 | [
"MIT"
] | null | null | null | dataLoader.py | TianZerL/SWJTU_DIP_COURSE | a5548e46e026231c314ff42105d515eae8e1ded6 | [
"MIT"
] | null | null | null | from torch.utils.data import Dataset
from torchvision.transforms.functional import to_tensor
from utils.image.processor import ImagePreprocessor, colorFormats
from PIL import Image
import glob, random
| 31.153846 | 84 | 0.619753 |
94c81d3796ea34c15bff9bda94e9bb0363a32705 | 1,060 | py | Python | opendc/api/v1/sections/sectionId/endpoint.py | kl1de/kl1de | 5dc37467b48b4f7dc74292b79fc93a41a93112d0 | [
"MIT"
] | 2 | 2017-01-24T12:28:51.000Z | 2017-01-25T15:12:26.000Z | opendc/api/v1/sections/sectionId/endpoint.py | kl1de/kl1de | 5dc37467b48b4f7dc74292b79fc93a41a93112d0 | [
"MIT"
] | 7 | 2017-03-15T08:47:21.000Z | 2018-11-28T10:36:41.000Z | opendc/api/v1/sections/sectionId/endpoint.py | atlarge-research/opendc-web-server | 71aa937a9b7db7289d69ac85587387070d2af851 | [
"MIT"
] | 1 | 2017-01-25T15:12:44.000Z | 2017-01-25T15:12:44.000Z | from opendc.models.section import Section
from opendc.util import exceptions
from opendc.util.rest import Response
def GET(request):
"""Get this Path's Sections."""
# Make sure required parameters are there
try:
request.check_required_parameters(
path={
'sectionId': '... | 24.651163 | 75 | 0.648113 |
94c9b5188d932c4b2ed200b6b817f43f0d634bb4 | 907 | py | Python | iqoptionapi/http/changebalance.py | mustx1/MYIQ | 3afb597aa8a8abc278b7d70dad46af81789eae3e | [
"MIT"
] | 3 | 2021-02-24T00:29:55.000Z | 2021-08-13T12:21:13.000Z | iqoptionapi/http/changebalance.py | mustx1/MYIQ | 3afb597aa8a8abc278b7d70dad46af81789eae3e | [
"MIT"
] | 5 | 2022-01-20T00:32:49.000Z | 2022-02-16T23:12:10.000Z | iqoptionapi/http/changebalance.py | mustx1/MYIQ | 3afb597aa8a8abc278b7d70dad46af81789eae3e | [
"MIT"
] | 2 | 2020-11-10T19:03:38.000Z | 2020-12-07T10:42:36.000Z | """Module for IQ option changebalance resource."""
from iqoptionapi.http.resource import Resource
from iqoptionapi.http.profile import Profile
| 31.275862 | 74 | 0.676957 |
94ca44d085dea212b80e513682f98233e00848b8 | 800 | py | Python | iniciante/python/1973-jornada-nas-estrelas.py | tfn10/beecrowd | 1ebf19ca9a253eb326160f03145d20be33064969 | [
"MIT"
] | null | null | null | iniciante/python/1973-jornada-nas-estrelas.py | tfn10/beecrowd | 1ebf19ca9a253eb326160f03145d20be33064969 | [
"MIT"
] | null | null | null | iniciante/python/1973-jornada-nas-estrelas.py | tfn10/beecrowd | 1ebf19ca9a253eb326160f03145d20be33064969 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 28.571429 | 68 | 0.54625 |
94cadb8791a998ef7da6d42c5a2ca3f619f71bd6 | 26,492 | py | Python | microscopemetrics/devices/devices.py | julien-cau/microscope-metrics | b459367e7231599c6d2b6fb6bf20680722997f25 | [
"MIT"
] | null | null | null | microscopemetrics/devices/devices.py | julien-cau/microscope-metrics | b459367e7231599c6d2b6fb6bf20680722997f25 | [
"MIT"
] | 4 | 2020-11-10T15:32:16.000Z | 2020-11-30T22:53:16.000Z | microscopemetrics/devices/devices.py | julien-cau/microscope-metrics | b459367e7231599c6d2b6fb6bf20680722997f25 | [
"MIT"
] | 4 | 2020-10-21T14:10:58.000Z | 2020-11-13T13:51:58.000Z | from enum import Enum, EnumMeta
from configparser import NoOptionError
from math import sin, asin, cos
# from microscopemetrics.interface import omero as interface
# Creating logging services
import logging
module_logger = logging.getLogger('metrics.devices.devices')
DTYPES = {
'int': (tuple,),
'float': (t... | 47.561939 | 147 | 0.621433 |
94cc9616c0ef938ae80a72ecf0086c7fb614f196 | 3,892 | py | Python | src/nypower/calc.py | hongjsk/ny-power | d892f194f621555d65df4ba3dcd3ccaabb64b72d | [
"Apache-2.0"
] | 46 | 2018-04-10T15:57:51.000Z | 2021-11-16T12:14:47.000Z | src/nypower/calc.py | hongjsk/ny-power | d892f194f621555d65df4ba3dcd3ccaabb64b72d | [
"Apache-2.0"
] | 5 | 2018-05-07T18:53:18.000Z | 2018-11-30T13:17:00.000Z | src/nypower/calc.py | hongjsk/ny-power | d892f194f621555d65df4ba3dcd3ccaabb64b72d | [
"Apache-2.0"
] | 28 | 2018-04-10T15:48:09.000Z | 2022-02-02T22:16:52.000Z | """Calculators for different values.
In order to approximate the emissions for a single kWh of produced
energy, per power source we look at the following 2016 data sets.
* Detailed EIA-923 emissions survey data
(https://www.eia.gov/electricity/data/state/emission_annual.xls)
* Net Generation by State by Type of Pr... | 33.843478 | 79 | 0.720709 |
94cea2d73001732a3242da3a84937c36c6799f51 | 6,031 | py | Python | lcquad_v2/lcquad_v2.py | semantic-systems/kgqa_datasets | 721aadee75c27e4c89e002f94befc00875a5bb1c | [
"MIT"
] | 4 | 2021-12-14T14:15:19.000Z | 2021-12-16T08:54:14.000Z | lcquad_v2/lcquad_v2.py | semantic-systems/KGQA-datasets | 665d6fb32d4b60ee22de8164d403af2bf4cdffdc | [
"Apache-2.0"
] | null | null | null | lcquad_v2/lcquad_v2.py | semantic-systems/KGQA-datasets | 665d6fb32d4b60ee22de8164d403af2bf4cdffdc | [
"Apache-2.0"
] | 2 | 2021-12-14T20:00:17.000Z | 2022-01-03T00:56:26.000Z | """LC-QuAD 2.0: A Large Scale Complex Question Answering Dataset."""
import json
import os
import datasets
logger = datasets.logging.get_logger(__name__)
_CITATION = """\
@inproceedings{dubey2017lc2,
title={LC-QuAD 2.0: A Large Dataset for Complex Question Answering over Wikidata and DBpedia},
a... | 37.930818 | 284 | 0.520975 |
94d15fd96c06a60978eb9873d80feabdc79ed4a5 | 304 | py | Python | Part2/comment_test.py | BaiMoHan/LearningPython_ING_202002 | 90d1152b66e8efa284b75b4b76fbf29d7d61e900 | [
"MIT"
] | null | null | null | Part2/comment_test.py | BaiMoHan/LearningPython_ING_202002 | 90d1152b66e8efa284b75b4b76fbf29d7d61e900 | [
"MIT"
] | null | null | null | Part2/comment_test.py | BaiMoHan/LearningPython_ING_202002 | 90d1152b66e8efa284b75b4b76fbf29d7d61e900 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/2/11 14:23
# @Author : Baimohan/PH
# @Site : https://github.com/BaiMoHan
# @File : comment_test.py
# @Software: PyCharm
print("hello world")
#
'''
'''
"""
"""
print("")
a = 5
print(a)
a += 3
print(a)
| 13.818182 | 40 | 0.588816 |
94d1a07b0bc6557f1d370c1e33f2b03ffdf82612 | 28 | py | Python | combo/blm/basis/__init__.py | zhangkunliang/BayesOptimization | 6d78c9e9f96239b0dbb85650a0d878e9410158ec | [
"MIT"
] | 139 | 2016-02-18T02:31:04.000Z | 2022-02-18T10:38:06.000Z | combo/blm/basis/__init__.py | zhangkunliang/BayesOptimization | 6d78c9e9f96239b0dbb85650a0d878e9410158ec | [
"MIT"
] | 8 | 2016-04-18T08:10:44.000Z | 2020-12-30T08:49:33.000Z | combo/blm/basis/__init__.py | zhangkunliang/BayesOptimization | 6d78c9e9f96239b0dbb85650a0d878e9410158ec | [
"MIT"
] | 50 | 2016-05-21T01:17:23.000Z | 2022-02-18T01:27:41.000Z | from fourier import fourier
| 14 | 27 | 0.857143 |
94d2696ad9df2e5785739b4eee1945ae0d50068e | 1,674 | py | Python | python/fate_arch/tests/storage/metastore_test.py | QuantumA/FATE | 89a3dd593252128c1bf86fb1014b25a629bdb31a | [
"Apache-2.0"
] | 1 | 2022-02-07T06:23:15.000Z | 2022-02-07T06:23:15.000Z | python/fate_arch/tests/storage/metastore_test.py | JavaGreenHands/FATE | ea1e94b6be50c70c354d1861093187e523af32f2 | [
"Apache-2.0"
] | 11 | 2020-10-09T09:53:50.000Z | 2021-12-06T16:14:51.000Z | python/fate_arch/tests/storage/metastore_test.py | JavaGreenHands/FATE | ea1e94b6be50c70c354d1861093187e523af32f2 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2019 The FATE 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... | 44.052632 | 163 | 0.741935 |
94d2fa8ed41b130939e6d5ba9082e67b5cb90786 | 885 | py | Python | Python/Itertools/Maximize it/maximize_it.py | brianchiang-tw/HackerRank | 02a30a0033b881206fa15b8d6b4ef99b2dc420c8 | [
"MIT"
] | 2 | 2020-05-28T07:15:00.000Z | 2020-07-21T08:34:06.000Z | Python/Itertools/Maximize it/maximize_it.py | brianchiang-tw/HackerRank | 02a30a0033b881206fa15b8d6b4ef99b2dc420c8 | [
"MIT"
] | null | null | null | Python/Itertools/Maximize it/maximize_it.py | brianchiang-tw/HackerRank | 02a30a0033b881206fa15b8d6b4ef99b2dc420c8 | [
"MIT"
] | null | null | null | # Enter your code here. Read input from STDIN. Print output to STDOUT
from typing import List
from itertools import product
if __name__ == '__main__':
buf = list( map( int, input().split() ) )
k, m = buf[0], buf[1]
list_of_list = []
for _ in range(k):
list_of_list.append( list( map( int, ... | 22.692308 | 81 | 0.664407 |
94d3824cef112ae014728365f714b52a366eeb0d | 16,691 | py | Python | bomberman/bomberman.py | timothytrippel/bomberman | 517114a062e3b3160858af86b06334891a7e4554 | [
"BSD-2-Clause"
] | 1 | 2022-01-18T06:50:54.000Z | 2022-01-18T06:50:54.000Z | bomberman/bomberman.py | timothytrippel/bomberman | 517114a062e3b3160858af86b06334891a7e4554 | [
"BSD-2-Clause"
] | 3 | 2021-03-26T20:45:07.000Z | 2022-01-13T03:30:40.000Z | bomberman/bomberman.py | timothytrippel/bomberman | 517114a062e3b3160858af86b06334891a7e4554 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright 2019, Massachusetts Institute of Technology
#
# 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 copyri... | 36.683516 | 80 | 0.667366 |
94d39cd4072656e867cc4d3e797b78b1448a426b | 563 | py | Python | scripts/camera/camera_capture.py | AnonymerNiklasistanonym/RaspiForBeginners | 3ae6836ee0bef02648625ef97068a93126a0d0d7 | [
"MIT"
] | 4 | 2017-08-15T12:25:07.000Z | 2019-03-08T18:41:00.000Z | scripts/camera/camera_capture.py | AnonymerNiklasistanonym/RaspiForBeginners | 3ae6836ee0bef02648625ef97068a93126a0d0d7 | [
"MIT"
] | 2 | 2017-11-30T22:53:27.000Z | 2017-12-02T18:08:13.000Z | scripts/camera/camera_capture.py | AnonymerNiklasistanonym/RaspiForBeginners | 3ae6836ee0bef02648625ef97068a93126a0d0d7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""camera_capture.py: Take a picture."""
from picamera import PiCamera
from time import sleep
camera = PiCamera()
# set the camera resolution
camera.resolution = (2560, 1920)
camera.start_preview()
sleep(10)
# --- Important ---------------------------------------------------
# Its important ... | 22.52 | 67 | 0.579041 |
94d3fece27f326587064410869c31cb46bef8d4c | 3,497 | py | Python | tests/test_errors.py | zzacharo/flask-resources | a99e27ea299b9a47237c3c19b87c8600fcc9bcab | [
"MIT"
] | null | null | null | tests/test_errors.py | zzacharo/flask-resources | a99e27ea299b9a47237c3c19b87c8600fcc9bcab | [
"MIT"
] | null | null | null | tests/test_errors.py | zzacharo/flask-resources | a99e27ea299b9a47237c3c19b87c8600fcc9bcab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
#
# Flask--Resources is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Errors test module."""
import pytest
from flask import Flask
from flask_resources.resources import Collectio... | 30.146552 | 88 | 0.698885 |
94d462b9ce5ad890fb9e25a44023b4f8fed158c8 | 567 | py | Python | tests/operations/ooZWSJqGRqi4hirFmqvFinKp9JGU3vqR23Q15tMvDXMnWtX1jne/test_forge_ooZWSJ.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2021-05-20T16:52:08.000Z | 2021-05-20T16:52:08.000Z | tests/operations/ooZWSJqGRqi4hirFmqvFinKp9JGU3vqR23Q15tMvDXMnWtX1jne/test_forge_ooZWSJ.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-12-30T16:44:56.000Z | 2020-12-30T16:44:56.000Z | tests/operations/ooZWSJqGRqi4hirFmqvFinKp9JGU3vqR23Q15tMvDXMnWtX1jne/test_forge_ooZWSJ.py | tqtezos/pytezos | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | [
"MIT"
] | 1 | 2022-03-20T19:01:00.000Z | 2022-03-20T19:01:00.000Z | from unittest import TestCase
from tests import get_data
from pytezos.operation.forge import forge_operation_group
| 31.5 | 97 | 0.744268 |
94d77961730decfece53b354fa52683dcd104c21 | 32,338 | py | Python | bundle_cache/app_store/tk-multi-workfiles2/v0.11.6/python/tk_multi_workfiles/entity_models/deferred_model.py | ColinKennedy/tk-config-default2-respawn | 855fb8033daa549b92615792442f19a7f9c4f55c | [
"Linux-OpenIB"
] | 4 | 2019-01-11T03:41:28.000Z | 2019-09-12T06:57:17.000Z | bundle_cache/app_store/tk-multi-workfiles2/v0.11.6/python/tk_multi_workfiles/entity_models/deferred_model.py | ColinKennedy/tk-config-default2-respawn | 855fb8033daa549b92615792442f19a7f9c4f55c | [
"Linux-OpenIB"
] | null | null | null | bundle_cache/app_store/tk-multi-workfiles2/v0.11.6/python/tk_multi_workfiles/entity_models/deferred_model.py | ColinKennedy/tk-config-default2-respawn | 855fb8033daa549b92615792442f19a7f9c4f55c | [
"Linux-OpenIB"
] | 2 | 2019-01-10T05:00:18.000Z | 2020-02-15T16:32:56.000Z | # Copyright (c) 2017 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the S... | 43.117333 | 106 | 0.617509 |
94d7e7537190b59682f2beda221bebc1a5c11576 | 34,850 | py | Python | safenet/mutableData.py | DuncanKushnir/pySafe | b47c234f5333566027c8981054747d2587a673fe | [
"MIT"
] | null | null | null | safenet/mutableData.py | DuncanKushnir/pySafe | b47c234f5333566027c8981054747d2587a673fe | [
"MIT"
] | null | null | null | safenet/mutableData.py | DuncanKushnir/pySafe | b47c234f5333566027c8981054747d2587a673fe | [
"MIT"
] | null | null | null | import safenet.safeUtils as safeUtils
import queue
appQueue = queue.Queue()
# first attempt to define mutable Data for us | 41.242604 | 166 | 0.6301 |
94daf70dc78420175c67ed1c177d8421a0ceca82 | 2,385 | py | Python | tinypico/main.py | wmhilton/camera-in-use-led | a77637ef94815521df67acba39b352fd09665fc6 | [
"MIT"
] | null | null | null | tinypico/main.py | wmhilton/camera-in-use-led | a77637ef94815521df67acba39b352fd09665fc6 | [
"MIT"
] | null | null | null | tinypico/main.py | wmhilton/camera-in-use-led | a77637ef94815521df67acba39b352fd09665fc6 | [
"MIT"
] | null | null | null | from machine import SPI, Pin
import tinypico as TinyPICO
import machine
from dotstar import DotStar
import time, random, micropython, gc
import bluetooth
from ble_simple_peripheral import BLESimplePeripheral
# Configure SPI for controlling the DotStar
# Internally we are using software SPI for this as the... | 28.058824 | 97 | 0.607128 |
94db4aaf0d10939a0b4bffc9f88f258f5a0eedda | 3,410 | py | Python | multi_agent_rmp.py | gtrll/multi-robot-rmpflow | 815511214d2decd6262d8f1507ed87c0a5f116f5 | [
"BSD-3-Clause"
] | 45 | 2019-04-09T22:56:21.000Z | 2022-02-23T03:53:28.000Z | multi_agent_rmp.py | gtrll/multi-robot-rmpflow | 815511214d2decd6262d8f1507ed87c0a5f116f5 | [
"BSD-3-Clause"
] | 1 | 2020-07-23T14:42:48.000Z | 2020-07-23T14:42:48.000Z | multi_agent_rmp.py | gtrll/multi-robot-rmpflow | 815511214d2decd6262d8f1507ed87c0a5f116f5 | [
"BSD-3-Clause"
] | 8 | 2019-10-25T18:10:40.000Z | 2022-03-14T08:45:28.000Z | # RMPflow basic classes
# @author Anqi Li
# @date April 8, 2019
from rmp import RMPRoot, RMPNode
from rmp_leaf import CollisionAvoidance, CollisionAvoidanceDecentralized, GoalAttractorUni
import numpy as np
from numpy.linalg import norm
from scipy.integrate import solve_ivp
import matplotlib.pyplot as plt
import mat... | 23.040541 | 90 | 0.514076 |
94db51e738e77fbec3acfad1aa1dc75152c10b22 | 2,467 | py | Python | 1l/node.py | AIandSocialGoodLab/FeatureDeceptionGame | 0225291dec268f15c94a366228c6741da03b00ab | [
"MIT"
] | null | null | null | 1l/node.py | AIandSocialGoodLab/FeatureDeceptionGame | 0225291dec268f15c94a366228c6741da03b00ab | [
"MIT"
] | null | null | null | 1l/node.py | AIandSocialGoodLab/FeatureDeceptionGame | 0225291dec268f15c94a366228c6741da03b00ab | [
"MIT"
] | null | null | null | from feature import Feature
from itertools import product
import numpy as np
import random
| 36.279412 | 98 | 0.550872 |
94de163fdf11ce6b6216b1ef8b570c0e3ff8f850 | 3,972 | py | Python | word_lm.py | hossam-mossalam/neural-language-models | c4dcbfc40fcfd9ba00fe3215e607b9b3bd2bad97 | [
"MIT"
] | null | null | null | word_lm.py | hossam-mossalam/neural-language-models | c4dcbfc40fcfd9ba00fe3215e607b9b3bd2bad97 | [
"MIT"
] | null | null | null | word_lm.py | hossam-mossalam/neural-language-models | c4dcbfc40fcfd9ba00fe3215e607b9b3bd2bad97 | [
"MIT"
] | null | null | null | import math
from abc import ABCMeta, abstractmethod
import numpy as np
import tensorflow as tf
from rnn_lm import *
from utils import *
if __name__ == '__main__':
vocab_sz = 50000
bs = 64
_dir = './data/'
download_text8(url, filename, _dir)
data = read_data(_dir + filename)
data, counts, word2id, id2w... | 33.378151 | 79 | 0.557654 |
94de4848bf82da339fb5d648899d321cd7d71842 | 2,415 | py | Python | sql.py | saidul-islam-tuhin/Computer-Assistant-With-Bilingual-Voice-Commands | 408ca3bbce4cd9f5c0414d190d7563872d2294ca | [
"MIT"
] | null | null | null | sql.py | saidul-islam-tuhin/Computer-Assistant-With-Bilingual-Voice-Commands | 408ca3bbce4cd9f5c0414d190d7563872d2294ca | [
"MIT"
] | 2 | 2021-02-08T20:52:31.000Z | 2021-04-30T20:49:22.000Z | sql.py | saidul-islam-tuhin/Computer-Assistant-With-Bilingual-Voice-Commands | 408ca3bbce4cd9f5c0414d190d7563872d2294ca | [
"MIT"
] | null | null | null | ##coding : utf8
import sqlite3 as lite
import logging
import sys
from collections import OrderedDict
import conf
LOG_FORMAT = "%(levelname)s > Line:%(lineno)s - %(message)s"
logging.basicConfig(filename="debug.log",
level=logging.DEBUG,
format=LOG_FORMAT,
... | 24.642857 | 94 | 0.541201 |
94e186a9c5bfbd79ccecb4c64ebd2737551fefc1 | 6,891 | py | Python | plot_Xvars_Yyears.py | emiliecive/PGWanalysis | 9a28e4cd5070a72f35383eac7574573b1e5f4607 | [
"MIT"
] | null | null | null | plot_Xvars_Yyears.py | emiliecive/PGWanalysis | 9a28e4cd5070a72f35383eac7574573b1e5f4607 | [
"MIT"
] | null | null | null | plot_Xvars_Yyears.py | emiliecive/PGWanalysis | 9a28e4cd5070a72f35383eac7574573b1e5f4607 | [
"MIT"
] | null | null | null | # FIGURE 2 IN PAPER
# Subplot figure where vars on x axis, years on y axis, inkl windrose and NAO index
import sys
import numpy as np
import pandas as pd
import xarray as xr
import os, fnmatch
from resource import *
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from cartopy import crs
im... | 39.153409 | 137 | 0.58366 |
94e3747bade02f542649433d315425e5214cbff5 | 1,028 | py | Python | tests/transformers/test_date_parser.py | GoC-Spending/fuzzy-tribble | c6c7b82faad577025a799af84c64686e903499e6 | [
"MIT"
] | 6 | 2017-09-20T16:28:27.000Z | 2018-10-08T18:41:05.000Z | tests/transformers/test_date_parser.py | GoC-Spending/fuzzy-tribble | c6c7b82faad577025a799af84c64686e903499e6 | [
"MIT"
] | 13 | 2017-12-02T01:35:10.000Z | 2018-02-28T14:06:31.000Z | tests/transformers/test_date_parser.py | GoC-Spending/fuzzy-tribble | c6c7b82faad577025a799af84c64686e903499e6 | [
"MIT"
] | 2 | 2017-12-19T03:50:46.000Z | 2018-02-20T04:47:14.000Z | import datetime
import pandas as pd
from tribble.transformers import date_parser
| 28.555556 | 58 | 0.592412 |
94e42b4135234d35a8e567716c651297190bf7cc | 558 | py | Python | tests/test_metadata.py | tmechsner/mt940 | 55b11f6b632fc4d888df7044e02824c9a1dfbc1e | [
"BSD-3-Clause"
] | 58 | 2015-04-21T20:14:27.000Z | 2022-03-23T11:28:12.000Z | tests/test_metadata.py | tmechsner/mt940 | 55b11f6b632fc4d888df7044e02824c9a1dfbc1e | [
"BSD-3-Clause"
] | 91 | 2015-02-22T19:59:41.000Z | 2022-03-16T16:03:16.000Z | tests/test_metadata.py | tmechsner/mt940 | 55b11f6b632fc4d888df7044e02824c9a1dfbc1e | [
"BSD-3-Clause"
] | 51 | 2015-03-28T09:13:51.000Z | 2021-12-28T15:24:05.000Z | import pytest
| 26.571429 | 56 | 0.625448 |
94e815de52b0c80818511ee7e582fc5b96f3f18e | 686 | py | Python | Chapter 06/code/prime.py | shivampotdar/Artificial-Intelligence-with-Python | 00221c3b1a6d8003765d1ca48b5c95f86da375d9 | [
"MIT"
] | 387 | 2017-02-11T18:28:50.000Z | 2022-03-27T01:16:05.000Z | Chapter 06/code/prime.py | shivampotdar/Artificial-Intelligence-with-Python | 00221c3b1a6d8003765d1ca48b5c95f86da375d9 | [
"MIT"
] | 18 | 2017-12-15T03:10:25.000Z | 2021-04-20T14:32:43.000Z | Chapter 06/code/prime.py | shivampotdar/Artificial-Intelligence-with-Python | 00221c3b1a6d8003765d1ca48b5c95f86da375d9 | [
"MIT"
] | 407 | 2017-01-23T15:18:33.000Z | 2022-03-16T05:39:02.000Z | import itertools as it
import logpy.core as lc
from sympy.ntheory.generate import prime, isprime
# Check if the elements of x are prime
# Declate the variable
x = lc.var()
# Check if an element in the list is a prime number
list_nums = (23, 4, 27, 17, 13, 10, 21, 29, 3, 32, 11, 19)
print('\nList of primes in the li... | 29.826087 | 76 | 0.672012 |
94e8f60f50c58e23f136b937277c55b1b0aa4b3d | 510 | py | Python | vigobusapi/exceptions.py | Lodeiro0001/Python_VigoBusAPI | 29b5231a2e76513bf92cc1455d021b0080ea6156 | [
"Apache-2.0"
] | 4 | 2019-07-18T22:25:31.000Z | 2021-03-09T19:01:14.000Z | vigobusapi/exceptions.py | Lodeiro0001/Python_VigoBusAPI | 29b5231a2e76513bf92cc1455d021b0080ea6156 | [
"Apache-2.0"
] | 3 | 2021-09-12T20:15:38.000Z | 2021-09-18T16:35:27.000Z | vigobusapi/exceptions.py | David-Lor/VigoBusAPI | 40db5a644f43a8f98cb40a9e5519a028fe18db14 | [
"Apache-2.0"
] | 3 | 2020-10-03T21:45:39.000Z | 2021-05-06T21:27:03.000Z | """EXCEPTIONS
Exceptions used on the project
"""
__all__ = ("VigoBusAPIException", "StopNotExist", "StopNotFound")
| 24.285714 | 97 | 0.735294 |
94e9aaba46ac805c2503dc94b24b195f44996f98 | 768 | py | Python | pmfp/utils/python_package_find_utils.py | Python-Tools/pmfp | 832273890eec08e84f9c68d03f3316b2c8139133 | [
"MIT"
] | 4 | 2017-09-15T03:38:56.000Z | 2019-12-16T02:03:14.000Z | pmfp/utils/python_package_find_utils.py | Python-Tools/pmfp | 832273890eec08e84f9c68d03f3316b2c8139133 | [
"MIT"
] | 1 | 2021-04-27T10:51:42.000Z | 2021-04-27T10:51:42.000Z | pmfp/utils/python_package_find_utils.py | Python-Tools/pmfp | 832273890eec08e84f9c68d03f3316b2c8139133 | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import List
from pmfp.utils.fs_utils import get_abs_path
def find_pypackage_string(to_path: str) -> str:
"""find_pypackage_string.
Args:
to_path (str):
Returns:
str: package
"""
packs: List[str] = []
final_path = get_abs_path(to_path)
... | 23.272727 | 64 | 0.643229 |
94e9bd57fb88963fb602f07741a2e2fafa9948ec | 83 | py | Python | tests/pyflakes_bears/pep8_naming_test_files/E04/invalid.py | MacBox7/coala-pyflakes | 637f8a2e77973384be79d30b0dae1f43072e60c8 | [
"MIT"
] | null | null | null | tests/pyflakes_bears/pep8_naming_test_files/E04/invalid.py | MacBox7/coala-pyflakes | 637f8a2e77973384be79d30b0dae1f43072e60c8 | [
"MIT"
] | 12 | 2018-05-21T06:12:59.000Z | 2018-07-30T10:37:16.000Z | tests/pyflakes_bears/pep8_naming_test_files/E04/invalid.py | MacBox7/coala-pyflakes | 637f8a2e77973384be79d30b0dae1f43072e60c8 | [
"MIT"
] | 1 | 2018-06-10T16:16:47.000Z | 2018-06-10T16:16:47.000Z | def foo():
'''
>>> from mod import CamelCase as CONST
'''
pass
| 13.833333 | 46 | 0.46988 |
94ea419da3bf6d14bfc7165e6862c18660706ce9 | 2,626 | py | Python | build/scripts/PRBS.py | PulseRain/PMSIS | 2412fce3473ad5add2442148d9052518910be252 | [
"MIT"
] | null | null | null | build/scripts/PRBS.py | PulseRain/PMSIS | 2412fce3473ad5add2442148d9052518910be252 | [
"MIT"
] | null | null | null | build/scripts/PRBS.py | PulseRain/PMSIS | 2412fce3473ad5add2442148d9052518910be252 | [
"MIT"
] | null | null | null | #! python3
###############################################################################
# Copyright (c) 2021, PulseRain Technology LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (LGPL) as
# published by the Free Softw... | 32.825 | 88 | 0.476009 |
94ec70758c4eb3a460d3205093a384c85fc59aea | 2,269 | py | Python | samples/list_unresolved_alerts/list_unresolved_alerts.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | 18 | 2019-09-24T17:35:53.000Z | 2022-03-25T08:08:47.000Z | samples/list_unresolved_alerts/list_unresolved_alerts.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | 18 | 2019-03-29T19:32:29.000Z | 2022-01-03T23:16:45.000Z | samples/list_unresolved_alerts/list_unresolved_alerts.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | 16 | 2019-02-27T06:54:12.000Z | 2021-11-16T18:10:24.000Z | # Copyright 2019 Cohesity Inc.
#
# Python example to list recent user_configurable unresolved alert unresolved Alerts.
#
# Usage: python list_unresolved_alerts.py --max_alerts 10
import argparse
import datetime
from cohesity_management_sdk.cohesity_client import CohesityClient
from cohesity_management_sdk.models.aler... | 36.596774 | 103 | 0.639929 |
94ecc73cac5b66ce4b742769bd680770791cde0a | 1,130 | py | Python | grit/decisiontree/plot_trees.py | cbrewitt/GRIT-OpenDrive | d8f8898e8fc360f4247aebcc91a855cd2659325f | [
"MIT"
] | null | null | null | grit/decisiontree/plot_trees.py | cbrewitt/GRIT-OpenDrive | d8f8898e8fc360f4247aebcc91a855cd2659325f | [
"MIT"
] | null | null | null | grit/decisiontree/plot_trees.py | cbrewitt/GRIT-OpenDrive | d8f8898e8fc360f4247aebcc91a855cd2659325f | [
"MIT"
] | null | null | null | import pydot
from grit.decisiontree.handcrafted_trees import scenario_trees
from grit.core.base import get_img_dir
scenario_name = 'heckstrasse'
for goal_idx, goal_types in scenario_trees[scenario_name].items():
for goal_type, root in goal_types.items():
graph = pydot.Dot(graph_type='digraph')
... | 40.357143 | 93 | 0.706195 |
94eeaba3b5678828b9dd8fa5a33bbc95979f0216 | 2,057 | py | Python | deep/tutorial.py | uredkar/mymlstat | b36a2097d76ca9c8071e60d57331945b978ca6bc | [
"Unlicense",
"MIT"
] | null | null | null | deep/tutorial.py | uredkar/mymlstat | b36a2097d76ca9c8071e60d57331945b978ca6bc | [
"Unlicense",
"MIT"
] | null | null | null | deep/tutorial.py | uredkar/mymlstat | b36a2097d76ca9c8071e60d57331945b978ca6bc | [
"Unlicense",
"MIT"
] | null | null | null | #https://github.com/Newmu/Theano-Tutorials/blob/master/1_linear_regression.py
import theano
from theano import tensor as T
import numpy as np
trX = np.linspace(-1, 1, 101)
trY = 2 * trX + np.random.randn(*trX.shape) * 0.33
X = T.scalar()
Y = T.scalar()
w = theano.shared(np.asarray(0., dtype=theano.config.floatX))
y... | 26.714286 | 96 | 0.690812 |
94eec894af0b3d5c84e7d7a3601f782b23665aad | 367 | py | Python | random_geometry_points_service/app.py | brauls/random-geometry-points-service | f935bce1e584eb9a53a0c7b90f43fe305716cd83 | [
"MIT"
] | null | null | null | random_geometry_points_service/app.py | brauls/random-geometry-points-service | f935bce1e584eb9a53a0c7b90f43fe305716cd83 | [
"MIT"
] | 1 | 2021-06-01T22:13:25.000Z | 2021-06-01T22:13:25.000Z | random_geometry_points_service/app.py | brauls/random-geometry-points-service | f935bce1e584eb9a53a0c7b90f43fe305716cd83 | [
"MIT"
] | null | null | null | """Entry module that inits the flask app.
"""
from flask import Flask
from .endpoints.api import init_api
def create_app():
"""Create the flask app and initialize the random geometry points api.
Returns:
Flask: The initialized flask app
"""
flask_app = Flask(__name__)
api = init_api()
... | 20.388889 | 74 | 0.686649 |
94ef6f2b3fe097ad320c2501b5b5898c245c7d7c | 2,408 | py | Python | transpyle/general/misc.py | EraYaN/transpyle | e7f5a021e7e6ab13fc21906b5a785dd24606cccc | [
"Apache-2.0"
] | 107 | 2018-01-12T05:19:39.000Z | 2022-03-16T20:56:52.000Z | transpyle/general/misc.py | EraYaN/transpyle | e7f5a021e7e6ab13fc21906b5a785dd24606cccc | [
"Apache-2.0"
] | 17 | 2018-01-24T08:08:12.000Z | 2021-11-29T23:36:11.000Z | transpyle/general/misc.py | EraYaN/transpyle | e7f5a021e7e6ab13fc21906b5a785dd24606cccc | [
"Apache-2.0"
] | 20 | 2018-12-05T13:21:37.000Z | 2022-02-11T11:48:33.000Z | """Various utility functions."""
import ast
import collections.abc
import typing as t
import typed_ast.ast3 as typed_ast3
def flatten_sequence(sequence: t.MutableSequence[t.Any]) -> None:
"""Transform a given list of lists of lists (...) of lists into a flat list in-place."""
assert isinstance(sequence, co... | 38.83871 | 98 | 0.627492 |
94f21e95ced1386a941e623940a6426863cc4545 | 1,113 | py | Python | battleships/migrations/0002_auto_20181202_1829.py | ArturAdamczyk/Battleships | 748e4fa87ed0c17c57abbdf5a0a2bca3c91dff24 | [
"MIT"
] | null | null | null | battleships/migrations/0002_auto_20181202_1829.py | ArturAdamczyk/Battleships | 748e4fa87ed0c17c57abbdf5a0a2bca3c91dff24 | [
"MIT"
] | null | null | null | battleships/migrations/0002_auto_20181202_1829.py | ArturAdamczyk/Battleships | 748e4fa87ed0c17c57abbdf5a0a2bca3c91dff24 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.3 on 2018-12-02 17:29
import battleships.models.ship
from django.db import migrations, models
| 31.8 | 105 | 0.619048 |
94f24028b80ee889c98d4aa4ab66969abf6cf212 | 398 | py | Python | tests/test_config.py | steel-a/util-py | 0ba010039f3aaf5abf2d3e09d8205da63fc340a8 | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | steel-a/util-py | 0ba010039f3aaf5abf2d3e09d8205da63fc340a8 | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | steel-a/util-py | 0ba010039f3aaf5abf2d3e09d8205da63fc340a8 | [
"Apache-2.0"
] | null | null | null | from utilpy.config import Config
from utilpy.file import File
if __name__ == '__main__':
test_config() | 23.411765 | 68 | 0.660804 |
94f381ee7899df401bf008d6c12993e0fbdb88a4 | 19,608 | py | Python | mapgwm/obs.py | aleaf/usgs-map-gwmodels | 284a79484a4531ce725bf07371c3c342ad1791c0 | [
"CC0-1.0"
] | 1 | 2021-05-27T14:31:54.000Z | 2021-05-27T14:31:54.000Z | mapgwm/obs.py | aleaf/usgs-map-gwmodels | 284a79484a4531ce725bf07371c3c342ad1791c0 | [
"CC0-1.0"
] | 12 | 2020-08-27T16:24:50.000Z | 2020-10-01T20:32:07.000Z | mapgwm/obs.py | aleaf/usgs-map-gwmodels | 284a79484a4531ce725bf07371c3c342ad1791c0 | [
"CC0-1.0"
] | 4 | 2020-08-20T19:00:37.000Z | 2021-01-06T19:45:08.000Z | """General functions for working with observations.
"""
import collections
import os
from shapely.geometry import Point
import pandas as pd
from gisutils import df2shp, project
from mfsetup.obs import make_obsname
from mfsetup.units import convert_length_units, convert_volume_units, convert_time_units
from mapgwm.utils... | 44.361991 | 117 | 0.613117 |
94f64dcb7aa539a6fdad0452d376747f0e492320 | 2,125 | py | Python | apps/users/urls.py | CosmosTUe/Cosmos | cec2541d3f8ea1944edfaab2090916ba66f9d2f3 | [
"MIT"
] | 1 | 2021-02-01T19:27:07.000Z | 2021-02-01T19:27:07.000Z | apps/users/urls.py | CosmosTUe/Cosmos | cec2541d3f8ea1944edfaab2090916ba66f9d2f3 | [
"MIT"
] | 79 | 2020-08-05T09:01:00.000Z | 2022-03-24T11:27:21.000Z | apps/users/urls.py | CosmosTUe/Cosmos | cec2541d3f8ea1944edfaab2090916ba66f9d2f3 | [
"MIT"
] | 3 | 2021-02-22T18:36:52.000Z | 2021-10-13T17:05:44.000Z | from django.contrib.auth import views as auth_views
from django.urls import path
from django.urls.base import reverse_lazy
from django.views.decorators.csrf import csrf_exempt
from . import views, webhooks
from .forms.authorization import CosmosPasswordChangeForm, CosmosPasswordResetForm, CosmosSetPasswordForm
app_na... | 41.666667 | 110 | 0.712471 |
94f880b81a51a704542cf0cb896b5076398d2c45 | 9,603 | py | Python | alipay/aop/api/domain/EntityBasicInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/EntityBasicInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/EntityBasicInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
| 33.228374 | 89 | 0.595231 |
94f9d8d1c2e9508aae762896fde1e8775c1f514c | 8,912 | py | Python | programming_hw_4s/tasks_with_eolymp_tags/t_17_3_(eolimp_4147).py | andriidem308/python_practice | 85a0ebd6ecbecf63eaba170c8279f0a88600237a | [
"MIT"
] | 2 | 2020-01-27T11:58:54.000Z | 2020-03-30T10:54:08.000Z | programming_hw_4s/tasks_with_eolymp_tags/t_17_3_(eolimp_4147).py | andriidem308/python_practice | 85a0ebd6ecbecf63eaba170c8279f0a88600237a | [
"MIT"
] | null | null | null | programming_hw_4s/tasks_with_eolymp_tags/t_17_3_(eolimp_4147).py | andriidem308/python_practice | 85a0ebd6ecbecf63eaba170c8279f0a88600237a | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
root = AVLTree()
while True:
try: cmd, arg = input().split()
except: break
if cmd == 'insert': root.insert(int(arg))
elif cmd == 'delete': root.delete(int(arg))
elif cmd == 'exists': print(root.exists(int(arg)))
elif cmd == 'next': ... | 31.160839 | 86 | 0.539385 |
94fb0fe077d6b59a58c02576467e7b6263b1935f | 641 | py | Python | tests/cases.py | bio2bel/antibodyregistry | a3ad09544d652b85c55ad0ca8341b85b14b3c6c7 | [
"MIT"
] | null | null | null | tests/cases.py | bio2bel/antibodyregistry | a3ad09544d652b85c55ad0ca8341b85b14b3c6c7 | [
"MIT"
] | null | null | null | tests/cases.py | bio2bel/antibodyregistry | a3ad09544d652b85c55ad0ca8341b85b14b3c6c7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test cases for Bio2BEL Antibody Registry."""
from bio2bel.testing import AbstractTemporaryCacheClassMixin
from bio2bel_antibodyregistry import Manager
from tests.constants import TEST_RESULTS_PATH
__all__ = [
'TemporaryCacheClass',
]
| 26.708333 | 94 | 0.75039 |
94fb32363dda4fc8952de010ed6b4b37b4694b9e | 8,675 | py | Python | httpfs/common.py | jonejkim/httpfs | ef0245c27cd4e0297a4e88138938325ef3e11afc | [
"MIT"
] | null | null | null | httpfs/common.py | jonejkim/httpfs | ef0245c27cd4e0297a4e88138938325ef3e11afc | [
"MIT"
] | null | null | null | httpfs/common.py | jonejkim/httpfs | ef0245c27cd4e0297a4e88138938325ef3e11afc | [
"MIT"
] | null | null | null | #!/usr/bin/python
from typing import *
import json
from pathlib import PosixPath
from urllib.parse import urlparse
from html.parser import HTMLParser
import requests
import markdown
from .constants import *
# Central class for accessing httpfs configurations
# - each FsConf contains all properties and methods needed ... | 41.507177 | 193 | 0.634697 |
94fda66cb364350eacf45ac5caa5a795552682eb | 2,570 | py | Python | src/graphwerk.py | LivingInABubble/inpredo | 1757384311da913c962a4c0f749e8aad83cbf75d | [
"MIT"
] | 1 | 2022-01-06T04:44:31.000Z | 2022-01-06T04:44:31.000Z | src/graphwerk.py | LivingInABubble/inpredo | 1757384311da913c962a4c0f749e8aad83cbf75d | [
"MIT"
] | null | null | null | src/graphwerk.py | LivingInABubble/inpredo | 1757384311da913c962a4c0f749e8aad83cbf75d | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
import numpy as np
from mplfinance.original_flavor import candlestick2_ochl
from tqdm import tqdm
if __name__ == '__main__':
buy_dir = '../data/buy/'
if not os.path.exists(buy_dir):
os.makedirs(buy_dir)
sell_dir = '../data/sell/'
if not os.path.exi... | 32.948718 | 108 | 0.607393 |
a200a03da7cffbfa15378b4be0b937b4f8008b3d | 676 | py | Python | tests/utils/app_1/cms_config.py | adam-murray/djangocms-moderation | 1fd928e806a3dd0bef62c0652408e8526838db9e | [
"BSD-3-Clause"
] | 2 | 2019-12-17T16:20:58.000Z | 2020-05-12T02:34:55.000Z | tests/utils/app_1/cms_config.py | adam-murray/djangocms-moderation | 1fd928e806a3dd0bef62c0652408e8526838db9e | [
"BSD-3-Clause"
] | 15 | 2019-05-10T15:34:04.000Z | 2020-04-06T06:44:42.000Z | tests/utils/app_1/cms_config.py | adam-murray/djangocms-moderation | 1fd928e806a3dd0bef62c0652408e8526838db9e | [
"BSD-3-Clause"
] | 5 | 2019-06-26T19:22:50.000Z | 2020-10-09T16:18:36.000Z | from cms.app_base import CMSAppConfig
from djangocms_versioning.datastructures import VersionableItem
from .models import App1PostContent, App1TitleContent
| 27.04 | 63 | 0.686391 |
a200fdf114a5da38cb361b40178f925432327991 | 21,674 | py | Python | custom_model/CPXLNetModel.py | eyal-orbach/Details2Story-XLNetPlanCloze | 47fd98ca2d59f3d4113d2de510fe955fff49efb9 | [
"MIT"
] | 4 | 2020-12-14T03:25:03.000Z | 2022-03-19T20:30:25.000Z | custom_model/CPXLNetModel.py | eyal-orbach/Details2Story-XLNetPlanCloze | 47fd98ca2d59f3d4113d2de510fe955fff49efb9 | [
"MIT"
] | 1 | 2021-12-04T00:42:49.000Z | 2021-12-04T00:42:49.000Z | custom_model/CPXLNetModel.py | eyal-orbach/Details2Story-XLNetPlanCloze | 47fd98ca2d59f3d4113d2de510fe955fff49efb9 | [
"MIT"
] | 1 | 2021-04-08T21:30:56.000Z | 2021-04-08T21:30:56.000Z | import math
import torch
from torch import nn
from torch.nn import CrossEntropyLoss
from custom_model.CXLNetModel import PosNetModel
from transformers import XLNetLMHeadModel, XLNetPreTrainedModel, XLNetModel, Conv1D
from transformers.modeling_utils import prune_conv1d_layer
from transformers.modeling_xlnet import XL... | 39.264493 | 119 | 0.593799 |
a20126a0da268e4da39fa84e425abbdf2c60a69a | 5,369 | py | Python | model_utils.py | riven314/capstone_dash_interface | 5eab25f4c15ad09aa889554820231175b0a3ed28 | [
"CC0-1.0"
] | 1 | 2019-12-10T14:59:12.000Z | 2019-12-10T14:59:12.000Z | model_utils.py | riven314/capstone_dash_interface | 5eab25f4c15ad09aa889554820231175b0a3ed28 | [
"CC0-1.0"
] | null | null | null | model_utils.py | riven314/capstone_dash_interface | 5eab25f4c15ad09aa889554820231175b0a3ed28 | [
"CC0-1.0"
] | 1 | 2020-01-01T12:24:51.000Z | 2020-01-01T12:24:51.000Z | """
do heavy lifting job for setting up mobilenet from mobilenet_segment
PERFORMANCE COMPARISON:
1. PIL + rescaling 5: ~0.2s per interface frame
2. CV2 + adaptive rescaling: ~0.15s per interface frame
ISSUE:
1. same config, same image input, different result to Maggie's result
"""
import os
import sys
imp... | 38.078014 | 115 | 0.629167 |
a203a7f292c0dce3d1fe23b14cbe29f8eaebc9ab | 7,134 | py | Python | selfchecking1.py | JJP-SWFC/Self-Checking-Binary-Code | 701aa91c39c8673c52991af828ce907beb77c9ac | [
"MIT"
] | null | null | null | selfchecking1.py | JJP-SWFC/Self-Checking-Binary-Code | 701aa91c39c8673c52991af828ce907beb77c9ac | [
"MIT"
] | null | null | null | selfchecking1.py | JJP-SWFC/Self-Checking-Binary-Code | 701aa91c39c8673c52991af828ce907beb77c9ac | [
"MIT"
] | null | null | null | from tkinter import *
import numpy as np
import random
#generates a random 16 digits
digtexts = np.random.randint(2, size=16)
q1check = 0
q2check = 0
q3check = 0
q4check = 0
q5check = 0
#The function to swap 1s to 0s, it is used as the button command
if __name__ == "__main__":
#The name of the main th... | 36.963731 | 111 | 0.585366 |
a2078933746071dc5c03bb87d8700bfe15adf4b8 | 1,746 | py | Python | tests/integrated/double_shear_2/generate_ic.py | smillerc/fvleg_2d | b79d59807b8b005a25d7cc25a9fe3d192ecd15a0 | [
"MIT"
] | 4 | 2020-03-31T18:33:51.000Z | 2022-02-14T03:23:30.000Z | tests/integrated/double_shear_2/generate_ic.py | smillerc/cato | b79d59807b8b005a25d7cc25a9fe3d192ecd15a0 | [
"MIT"
] | null | null | null | tests/integrated/double_shear_2/generate_ic.py | smillerc/cato | b79d59807b8b005a25d7cc25a9fe3d192ecd15a0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Make the double periodic shear test grid"""
import matplotlib.pyplot as plt
from configparser import ConfigParser
import numpy as np
import sys
import os
sys.path.append(os.path.abspath("../../.."))
from pycato import *
# Make the empty grid
domain = make_uniform_grid(
n_cells=(256, 25... | 22.384615 | 74 | 0.607102 |
a207ed19f70c2abb92a14c67d1bb7ebb192f8c4b | 3,796 | py | Python | lhzexploit_send.py | LiHongzhuo/wxBot | 98c7acee5a076332c8de2bac091e04d7f661edb6 | [
"Apache-2.0"
] | null | null | null | lhzexploit_send.py | LiHongzhuo/wxBot | 98c7acee5a076332c8de2bac091e04d7f661edb6 | [
"Apache-2.0"
] | null | null | null | lhzexploit_send.py | LiHongzhuo/wxBot | 98c7acee5a076332c8de2bac091e04d7f661edb6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from wxbot import *
import os
import ConfigParser
import lhz_mysql
import MySQLdb
import sys
import lhzoss
import lhzhttp
import lhzasr
import thread
import lhzconf
import lhzutil
import requests
import lhzimg
if __name__ == '__main__':
main()
| 39.541667 | 166 | 0.513172 |
a20882b19e76633a9de6527854d316da9b23d890 | 28,958 | py | Python | data_split/prepareSingleTests.py | UKPLab/linspector | 46a7cca6ad34dc673feb47c4d452f1248d5e635b | [
"Apache-2.0"
] | 21 | 2019-03-21T12:10:09.000Z | 2022-03-01T04:42:34.000Z | data_split/prepareSingleTests.py | UKPLab/linspector | 46a7cca6ad34dc673feb47c4d452f1248d5e635b | [
"Apache-2.0"
] | 1 | 2019-03-25T17:27:40.000Z | 2019-04-04T07:01:08.000Z | data_split/prepareSingleTests.py | UKPLab/linspector | 46a7cca6ad34dc673feb47c4d452f1248d5e635b | [
"Apache-2.0"
] | 2 | 2019-04-17T07:36:12.000Z | 2019-10-10T09:15:29.000Z | # -*- coding: utf-8 -*-
import sys
sys.path.append('../')
import argparse
import pickle
import random
from data_split.util import *
from data_util.reader import *
from data_util.schema import *
def get_mixed_surface(feat, lang, vocab, threshold):
"""
Get cnt number of frequent surface and lemma which DOE... | 37.705729 | 122 | 0.579184 |
a209e5259ffad158ccb72320dbb51d9dff2f45ff | 1,657 | py | Python | model.py | Kira8045/Car_Autopilot | c0874336cbde5c3dff8fc8f22c85c935e982aff7 | [
"MIT"
] | null | null | null | model.py | Kira8045/Car_Autopilot | c0874336cbde5c3dff8fc8f22c85c935e982aff7 | [
"MIT"
] | null | null | null | model.py | Kira8045/Car_Autopilot | c0874336cbde5c3dff8fc8f22c85c935e982aff7 | [
"MIT"
] | null | null | null | import numpy as np
from keras.layers import *
from keras.models import *
from keras.activations import *
from keras.callbacks import ModelCheckpoint,ReduceLROnPlateau
features=np.load("features_40x40.npy")
labels=np.load("labels_40x40.npy")
#augment data
features=np.append(features,features[:,:,::-1],ax... | 31.264151 | 107 | 0.702474 |
a20a1e9e17a56bb684bf711a8c6a65ad90fa8c15 | 41,471 | py | Python | containerProfiler.py | nam-jaehyun/confine | ba0cb57a4768901d9d4bb854aba38c61b72aa756 | [
"MIT"
] | null | null | null | containerProfiler.py | nam-jaehyun/confine | ba0cb57a4768901d9d4bb854aba38c61b72aa756 | [
"MIT"
] | null | null | null | containerProfiler.py | nam-jaehyun/confine | ba0cb57a4768901d9d4bb854aba38c61b72aa756 | [
"MIT"
] | null | null | null | import os, sys, subprocess, signal
import re
sys.path.insert(0, './python-utils/')
import container
import graph
import util
import syscall
import seccomp
import bisect
import time
from datetime import datetime
import forkstat
import sysdig
import constants as C
import binaryAnalysis
| 53.37323 | 587 | 0.569458 |
a20a2ecf98a6c94f7ad72920d7772e724c37bb89 | 922 | py | Python | wavewire_to_netcdf.py | sustain-lab/sustain-drag-2020 | b4e3f15ae9e48d08294ab45e50ddb79011c7cd75 | [
"MIT"
] | 1 | 2020-03-02T14:37:44.000Z | 2020-03-02T14:37:44.000Z | wavewire_to_netcdf.py | sustain-lab/sustain-drag-2020 | b4e3f15ae9e48d08294ab45e50ddb79011c7cd75 | [
"MIT"
] | null | null | null | wavewire_to_netcdf.py | sustain-lab/sustain-drag-2020 | b4e3f15ae9e48d08294ab45e50ddb79011c7cd75 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
import glob
import numpy as np
from sustain_drag_2020.wavewire import read_wavewire_from_toa5
import xarray as xr
DATAPATH = '/home/milan/Work/sustain/data/sustain-drag-2020/20191121'
RUN_SECONDS = 600
start_time = datetime(2019, 11, 21, 16, 10)
end_time = start_time + 13 * t... | 28.8125 | 69 | 0.649675 |
a20b32a32779b619128125fdd2f53f82082522f0 | 2,742 | py | Python | app.py | krishna8421/telegram-udemy-bot | 930331c0002ff95da63f5f44867901d739ef568d | [
"MIT"
] | null | null | null | app.py | krishna8421/telegram-udemy-bot | 930331c0002ff95da63f5f44867901d739ef568d | [
"MIT"
] | null | null | null | app.py | krishna8421/telegram-udemy-bot | 930331c0002ff95da63f5f44867901d739ef568d | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
import logging
import os
TOKEN = os.getenv('TOKEN')
###___Telegram___###
# Logs
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.IN... | 36.078947 | 104 | 0.600292 |
a20de4d46299ef0961b4698f12c6ce4ceb197edc | 162 | py | Python | tests/conftest.py | andredias/rst2html5 | 1f2938c843b4912a2c05df5d3a6708fb4e67eb16 | [
"MIT"
] | 1 | 2021-04-27T20:25:44.000Z | 2021-04-27T20:25:44.000Z | tests/conftest.py | andredias/rst2html5 | 1f2938c843b4912a2c05df5d3a6708fb4e67eb16 | [
"MIT"
] | 8 | 2020-03-14T23:34:23.000Z | 2021-04-20T14:06:07.000Z | tests/conftest.py | andredias/rst2html5 | 1f2938c843b4912a2c05df5d3a6708fb4e67eb16 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
from pytest import fixture
| 16.2 | 39 | 0.734568 |
a20ef7bd523dfc97ee13f00186f08ed806533c69 | 27,440 | py | Python | symba/core/form.py | lycantropos/symba | 279bf86311d50fde55d17c843391f9f83ea31ddf | [
"MIT"
] | 2 | 2021-03-15T12:23:15.000Z | 2022-03-26T21:20:54.000Z | symba/core/form.py | lycantropos/symba | 279bf86311d50fde55d17c843391f9f83ea31ddf | [
"MIT"
] | null | null | null | symba/core/form.py | lycantropos/symba | 279bf86311d50fde55d17c843391f9f83ea31ddf | [
"MIT"
] | null | null | null | import math
from collections import defaultdict
from functools import reduce
from numbers import Real
from typing import (Any,
DefaultDict,
Dict,
Iterable,
List,
Optional,
Sequence,
... | 42.542636 | 79 | 0.541108 |
a214be6bc1ac24a0f3fe1311e3ac3be5a80d534c | 6,276 | py | Python | train.py | UcasLzz/ChineseWordSeg-POS | 8f6a6611ba9213bbc76ac02201e17d4b5e3d05ee | [
"Apache-2.0"
] | null | null | null | train.py | UcasLzz/ChineseWordSeg-POS | 8f6a6611ba9213bbc76ac02201e17d4b5e3d05ee | [
"Apache-2.0"
] | null | null | null | train.py | UcasLzz/ChineseWordSeg-POS | 8f6a6611ba9213bbc76ac02201e17d4b5e3d05ee | [
"Apache-2.0"
] | null | null | null | #encoding=utf8
import time
import numpy as np
import tensorflow as tf
from tensorflow.contrib import crf
import cws.BiLSTM as modelDef
from cws.data import Data
tf.app.flags.DEFINE_string('dict_path', 'data/your_dict.pkl', 'dict path')
tf.app.flags.DEFINE_string('train_data', 'data/your_train_data.pkl', 'tr... | 45.478261 | 109 | 0.575844 |
a2159e0d2f2bbbd237f8b401053064de6db7a50c | 2,501 | py | Python | old/eval_scripts/evaluate_model.py | konatasick/face-of-art | e796747d0ef2df2df863adf53e217ff5c86c816b | [
"MIT"
] | 220 | 2019-09-01T01:52:04.000Z | 2022-03-28T12:52:07.000Z | old/eval_scripts/evaluate_model.py | TrueMatthewKirkham/face-of-art | ffa62a579cc8bc389e2088923736c4947a1fad70 | [
"MIT"
] | 16 | 2019-10-24T07:55:11.000Z | 2022-02-10T01:28:13.000Z | old/eval_scripts/evaluate_model.py | TrueMatthewKirkham/face-of-art | ffa62a579cc8bc389e2088923736c4947a1fad70 | [
"MIT"
] | 33 | 2019-09-23T15:08:50.000Z | 2022-02-08T07:54:52.000Z | from evaluation_functions import *
flags = tf.app.flags
data_dir = '/Users/arik/Dropbox/a_mac_thesis/face_heatmap_networks/conventional_landmark_detection_dataset/'
model_path = '/Users/arik/Dropbox/a_mac_thesis/face_heatmap_networks/tests/primary/old/no_flip/basic/' \
'tests_lr_primary_basic_no_flip/0.01... | 45.472727 | 113 | 0.761295 |
a21976d4c366b8d3e4681b17887169406c4f5ee2 | 2,455 | py | Python | 6_Lion/parser.py | inventshah/mini-projects | fbe26fc37f945cad481e4c30615a9ac91971cd32 | [
"MIT"
] | 1 | 2019-12-05T00:46:00.000Z | 2019-12-05T00:46:00.000Z | 6_Lion/parser.py | inventshah/mini-projects | fbe26fc37f945cad481e4c30615a9ac91971cd32 | [
"MIT"
] | null | null | null | 6_Lion/parser.py | inventshah/mini-projects | fbe26fc37f945cad481e4c30615a9ac91971cd32 | [
"MIT"
] | null | null | null | from stream import Stream
from error_handler import none, eof, expected
EOL = ';' | 24.79798 | 69 | 0.654175 |
a21a1ecb8e7e2ab542df12beaa64136f445f9b4c | 5,879 | py | Python | combine/core.py | rohan-pednekar/combine | 23206e1a7a34800acd34beedeea018fb48591633 | [
"MIT"
] | 5 | 2021-01-25T19:40:04.000Z | 2022-01-02T13:45:45.000Z | combine/core.py | rohan-pednekar/combine | 23206e1a7a34800acd34beedeea018fb48591633 | [
"MIT"
] | 14 | 2018-07-06T17:19:33.000Z | 2021-12-22T18:05:57.000Z | combine/core.py | rohan-pednekar/combine | 23206e1a7a34800acd34beedeea018fb48591633 | [
"MIT"
] | 3 | 2019-02-12T10:05:45.000Z | 2021-11-16T04:32:43.000Z | import os
import shutil
import subprocess
import shlex
import logging
import jinja2
from .config import Config
from .files import file_class_for_path, ErrorFile
from .jinja import default_extensions, default_filters
from .jinja.exceptions import ReservedVariableError
from .exceptions import BuildError
from .checks.fa... | 31.951087 | 93 | 0.604525 |
a21b7080c8e29d3e3e6dd7a5075b542d813276a0 | 5,146 | py | Python | gtorch_utils/datasets/segmentation/datasets/brain_tumour.py | giussepi/gtorch_utils | 8dfe502b2ef2d7c082354b9f546db5248815af09 | [
"MIT"
] | null | null | null | gtorch_utils/datasets/segmentation/datasets/brain_tumour.py | giussepi/gtorch_utils | 8dfe502b2ef2d7c082354b9f546db5248815af09 | [
"MIT"
] | null | null | null | gtorch_utils/datasets/segmentation/datasets/brain_tumour.py | giussepi/gtorch_utils | 8dfe502b2ef2d7c082354b9f546db5248815af09 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" gtorch_utils/datasets/segmentation/datasets/brain_tumour """
import os
import albumentations as A
import numpy as np
from torch.utils.data import random_split
from gtorch_utils.datasets.segmentation.base import DatasetTemplate
| 32.36478 | 93 | 0.609988 |
a21e245ccc33997eba46c95ad8d5d93ff760b35c | 1,871 | py | Python | DateTime/python/proto_datetime.py | w13b3/my_protobufs | 5e46b248fb033e618b01cefaeb4ff48006773d1d | [
"MIT"
] | null | null | null | DateTime/python/proto_datetime.py | w13b3/my_protobufs | 5e46b248fb033e618b01cefaeb4ff48006773d1d | [
"MIT"
] | null | null | null | DateTime/python/proto_datetime.py | w13b3/my_protobufs | 5e46b248fb033e618b01cefaeb4ff48006773d1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# proto_datetime.py
import logging
import datetime
from DateTime.python.DateTime_pb2 import DateTime
def create_proto_datetime(datetime_value: datetime.datetime = None):
"""
Create a protobuf message filled with the current or given timedate
:param datetime_... | 33.410714 | 74 | 0.665954 |
a21e87768e0fd9abba97d6a315731980814f630d | 5,876 | py | Python | bot.py | Cronuh/highlights-bot | 0442cdf927cbebae6395f536b5529fe4c1948b99 | [
"Apache-2.0"
] | null | null | null | bot.py | Cronuh/highlights-bot | 0442cdf927cbebae6395f536b5529fe4c1948b99 | [
"Apache-2.0"
] | null | null | null | bot.py | Cronuh/highlights-bot | 0442cdf927cbebae6395f536b5529fe4c1948b99 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
from auth import *
from edit import video_length_seconds, get_total_length, change_fps, is_copyright, merge_videos
from upload_video import *
from random import randrange
import os
# if __name__ == '__main__'
auth = createAuthObject()
categories = {
"League of Legends"... | 34.769231 | 190 | 0.672907 |
a21ea8de48f52df3cccaf53e91ea45a8b832e738 | 5,353 | py | Python | dev/buildtool/prometheus_metrics.py | premm1983/Spinnaker | 535f78b8f5402eea942c260cb9ca26682772a3e6 | [
"Apache-2.0"
] | null | null | null | dev/buildtool/prometheus_metrics.py | premm1983/Spinnaker | 535f78b8f5402eea942c260cb9ca26682772a3e6 | [
"Apache-2.0"
] | null | null | null | dev/buildtool/prometheus_metrics.py | premm1983/Spinnaker | 535f78b8f5402eea942c260cb9ca26682772a3e6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 35.926174 | 80 | 0.738278 |
a21ebade91f0dcbac64751a6089787664ec1aeea | 847 | py | Python | src/radical/pilot/agent/resource_manager/debug.py | radical-cybertools/radical.pilot | 4ce3efbf3e2f045b5c48fb848e9f65f9f5ea17e9 | [
"MIT"
] | 47 | 2015-03-16T01:08:11.000Z | 2022-02-02T10:36:39.000Z | src/radical/pilot/agent/resource_manager/debug.py | radical-cybertools/radical.pilot | 4ce3efbf3e2f045b5c48fb848e9f65f9f5ea17e9 | [
"MIT"
] | 1,856 | 2015-01-02T09:32:20.000Z | 2022-03-31T21:45:06.000Z | src/radical/pilot/agent/resource_manager/debug.py | radical-cybertools/radical.pilot | 4ce3efbf3e2f045b5c48fb848e9f65f9f5ea17e9 | [
"MIT"
] | 28 | 2015-06-10T18:15:14.000Z | 2021-11-07T04:36:45.000Z |
__copyright__ = 'Copyright 2018-2021, The RADICAL-Cybertools Team'
__license__ = 'MIT'
from .base import RMInfo, ResourceManager
# ------------------------------------------------------------------------------
#
# ------------------------------------------------------------------------------
| 28.233333 | 80 | 0.46281 |
a21f9a820705cf45767af252671e577c191153f7 | 2,141 | py | Python | vocabularize.py | raul1991/vocabularize | 70462ac74e60ad9e8c78a2de8d0d3dc3e4008099 | [
"MIT"
] | null | null | null | vocabularize.py | raul1991/vocabularize | 70462ac74e60ad9e8c78a2de8d0d3dc3e4008099 | [
"MIT"
] | 5 | 2018-10-09T04:52:39.000Z | 2018-10-15T05:46:37.000Z | vocabularize.py | raul1991/vocabularize | 70462ac74e60ad9e8c78a2de8d0d3dc3e4008099 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import subprocess # to help us execute os commands
import time # to help us sleep between consecutive words
import random
import sys # parsing args
list_of_words = [] # list of dict of words - name, synonyms and sentence
load_words()
should_add_word = (len(sys.argv) > 1 and sys.argv[1] =... | 26.7625 | 111 | 0.593648 |
a21fc7c205150998371a4d620812a958d885dc65 | 336 | py | Python | locale/pot/api/core/_autosummary/pyvista-UniformGrid-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 4 | 2020-08-07T08:19:19.000Z | 2020-12-04T09:51:11.000Z | locale/pot/api/core/_autosummary/pyvista-UniformGrid-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 19 | 2020-08-06T00:24:30.000Z | 2022-03-30T19:22:24.000Z | locale/pot/api/core/_autosummary/pyvista-UniformGrid-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 1 | 2021-03-09T07:50:40.000Z | 2021-03-09T07:50:40.000Z | import pyvista
import vtk
import numpy as np
#
grid = pyvista.UniformGrid()
#
vtkgrid = vtk.vtkImageData()
grid = pyvista.UniformGrid(vtkgrid)
#
dims = (10, 10, 10)
grid = pyvista.UniformGrid(dims)
#
spacing = (2, 1, 5)
grid = pyvista.UniformGrid(dims, spacing)
#
origin = (10, 35, 50)
grid = pyvista.UniformGrid(dims, s... | 18.666667 | 49 | 0.714286 |
a221340c80a02985f46c6098e7ad2f3576b63a48 | 10,854 | py | Python | clean_cmake_project/ProjectSkeleton.py | FrenchCommando/clean_cmake_project | b34b9854958d9f470d7f7ead96d37e571296e5cd | [
"MIT"
] | null | null | null | clean_cmake_project/ProjectSkeleton.py | FrenchCommando/clean_cmake_project | b34b9854958d9f470d7f7ead96d37e571296e5cd | [
"MIT"
] | null | null | null | clean_cmake_project/ProjectSkeleton.py | FrenchCommando/clean_cmake_project | b34b9854958d9f470d7f7ead96d37e571296e5cd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from datetime import datetime
import stringcase
src = "src"
tests = "tests"
libs = "libs"
cmake = "CMakeLists.txt"
git_folder = ".git"
host = os.getlogin()
now = datetime.today().strftime('%Y-%m-%d')
if __name__ == "__main__":
main()
| 41.269962 | 115 | 0.444813 |