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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22ad0b38c724e88cb9ecf306aa56fd0fb313ec45 | 3,325 | py | Python | features/hdf_features.py | DerekYJC/bmi_python | 7b9cf3f294a33688db24b0863c1035e9cc6999ea | [
"Apache-2.0"
] | null | null | null | features/hdf_features.py | DerekYJC/bmi_python | 7b9cf3f294a33688db24b0863c1035e9cc6999ea | [
"Apache-2.0"
] | null | null | null | features/hdf_features.py | DerekYJC/bmi_python | 7b9cf3f294a33688db24b0863c1035e9cc6999ea | [
"Apache-2.0"
] | null | null | null | '''
HDF-saving features
'''
import time
import tempfile
import random
import traceback
import numpy as np
import fnmatch
import os, sys
import subprocess
from riglib import calibrations, bmi
from riglib.bmi import extractor
from riglib.experiment import traits
import hdfwriter
| 31.367925 | 127 | 0.61203 |
22ad976fe4002a0a8ca1f3ab36292229eb143691 | 2,040 | py | Python | common/irma/common/exceptions.py | vaginessa/irma | 02285080b67b25ef983a99a765044683bd43296c | [
"Apache-2.0"
] | null | null | null | common/irma/common/exceptions.py | vaginessa/irma | 02285080b67b25ef983a99a765044683bd43296c | [
"Apache-2.0"
] | null | null | null | common/irma/common/exceptions.py | vaginessa/irma | 02285080b67b25ef983a99a765044683bd43296c | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013-2018 Quarkslab.
# This file is part of IRMA project.
#
# 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 in the top-level directory
# of this distribution and at:
#
# http:... | 21.473684 | 78 | 0.701471 |
22ad9d02328e75faf184ffbf1cc357191c9ff796 | 7,979 | py | Python | tf_crnn/libs/infer.py | sunmengnan/city_brain | 478f0b974f4491b4201956f37b83ce6860712bc8 | [
"MIT"
] | null | null | null | tf_crnn/libs/infer.py | sunmengnan/city_brain | 478f0b974f4491b4201956f37b83ce6860712bc8 | [
"MIT"
] | null | null | null | tf_crnn/libs/infer.py | sunmengnan/city_brain | 478f0b974f4491b4201956f37b83ce6860712bc8 | [
"MIT"
] | null | null | null | import time
import os
import math
import numpy as np
from libs import utils
from libs.img_dataset import ImgDataset
from nets.crnn import CRNN
from nets.cnn.paper_cnn import PaperCNN
import shutil
def calculate_accuracy(predicts, labels):
"""
:param predicts: encoded predict result
:param labels: ground... | 36.104072 | 105 | 0.628525 |
22ae53d11248d624a0ee5f564b8dd2e374ddaa54 | 606 | py | Python | Day 2/Day_2_Python.py | giTan7/30-Days-Of-Code | f023a2bf1b5e58e1eb5180162443b9cd4b6b2ff8 | [
"MIT"
] | 1 | 2020-10-15T14:44:08.000Z | 2020-10-15T14:44:08.000Z | Day 2/Day_2_Python.py | giTan7/30-Days-Of-Code | f023a2bf1b5e58e1eb5180162443b9cd4b6b2ff8 | [
"MIT"
] | null | null | null | Day 2/Day_2_Python.py | giTan7/30-Days-Of-Code | f023a2bf1b5e58e1eb5180162443b9cd4b6b2ff8 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the solve function below.
if __name__ == '__main__':
meal_cost = float(input())
tip_percent = int(input())
tax_percent = int(input())
solve(meal_cost, tip_percent, tax_percent)
# Time complexity:... | 22.444444 | 76 | 0.663366 |
22ae7c79d1d1030557cb109b5f2d23a5d5fb88a4 | 5,706 | py | Python | modules/templates/RLPPTM/tools/mis.py | nursix/rlpptm | e7b50b2fdf6277aed5f198ca10ad773c5ca0b947 | [
"MIT"
] | 1 | 2022-03-21T21:58:30.000Z | 2022-03-21T21:58:30.000Z | modules/templates/RLPPTM/tools/mis.py | nursix/rlpptm | e7b50b2fdf6277aed5f198ca10ad773c5ca0b947 | [
"MIT"
] | null | null | null | modules/templates/RLPPTM/tools/mis.py | nursix/rlpptm | e7b50b2fdf6277aed5f198ca10ad773c5ca0b947 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Helper Script for Mass-Invitation of Participant Organisations
#
# RLPPTM Template Version 1.0
#
# Execute in web2py folder after code upgrade like:
# python web2py.py -S eden -M -R applications/eden/modules/templates/RLPPTM/tools/mis.py
#
import os
import sys
from core import s3_format_dat... | 35.222222 | 88 | 0.45496 |
22aec8fbe47f7975a1e7f4a0caa5c88c56e4a03e | 1,133 | py | Python | data/train/python/22aec8fbe47f7975a1e7f4a0caa5c88c56e4a03e__init__.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/22aec8fbe47f7975a1e7f4a0caa5c88c56e4a03e__init__.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/22aec8fbe47f7975a1e7f4a0caa5c88c56e4a03e__init__.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | def save_form(form, actor=None):
"""Allows storing a form with a passed actor. Normally, Form.save() does not accept an actor, but if you require
this to be passed (is not handled by middleware), you can use this to replace form.save().
Requires you to use the audit.Model model as the actor is passed to th... | 32.371429 | 118 | 0.634598 |
22aeec83fb0e871521d1f1a2e9afa8b18858d4b4 | 728 | py | Python | engine/test_sysctl.py | kingsd041/os-tests | 2ea57cb6f1da534633a4670ccb83d40300989886 | [
"Apache-2.0"
] | null | null | null | engine/test_sysctl.py | kingsd041/os-tests | 2ea57cb6f1da534633a4670ccb83d40300989886 | [
"Apache-2.0"
] | null | null | null | engine/test_sysctl.py | kingsd041/os-tests | 2ea57cb6f1da534633a4670ccb83d40300989886 | [
"Apache-2.0"
] | null | null | null | # coding = utf-8
# Create date: 2018-11-05
# Author :Hailong
| 36.4 | 101 | 0.68956 |
22aeecf51ba4f5585bf276df470496e100ee4eac | 3,310 | py | Python | paprika_sync/core/management/commands/import_recipes_from_file.py | grschafer/paprika-sync | 8b6fcd6246557bb79009fa9355fd4d588fb8ed90 | [
"MIT"
] | null | null | null | paprika_sync/core/management/commands/import_recipes_from_file.py | grschafer/paprika-sync | 8b6fcd6246557bb79009fa9355fd4d588fb8ed90 | [
"MIT"
] | null | null | null | paprika_sync/core/management/commands/import_recipes_from_file.py | grschafer/paprika-sync | 8b6fcd6246557bb79009fa9355fd4d588fb8ed90 | [
"MIT"
] | null | null | null | import json
import logging
from django.core.management.base import BaseCommand
from django.db import transaction
from paprika_sync.core.models import PaprikaAccount
from paprika_sync.core.serializers import RecipeSerializer, CategorySerializer
from paprika_sync.core.utils import log_start_end
logger = logging.getLo... | 35.978261 | 135 | 0.578248 |
22b050a05912835a15d1f775a59389484ca92826 | 142 | py | Python | scripts/update_asp_l1.py | sot/mica | 136a9b0d9521efda5208067b51cf0c8700b4def3 | [
"BSD-3-Clause"
] | null | null | null | scripts/update_asp_l1.py | sot/mica | 136a9b0d9521efda5208067b51cf0c8700b4def3 | [
"BSD-3-Clause"
] | 150 | 2015-01-23T17:09:53.000Z | 2022-01-10T00:50:54.000Z | scripts/update_asp_l1.py | sot/mica | 136a9b0d9521efda5208067b51cf0c8700b4def3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import mica.archive.asp_l1
mica.archive.asp_l1.main()
| 20.285714 | 63 | 0.760563 |
22b2735d6e9bb2b53a0a0541af9ec0a4bc2db7e4 | 738 | py | Python | pair.py | hhgarnes/python-validity | 82b42e4fd152f10f75584de56502fd9ada299bb5 | [
"MIT"
] | null | null | null | pair.py | hhgarnes/python-validity | 82b42e4fd152f10f75584de56502fd9ada299bb5 | [
"MIT"
] | null | null | null | pair.py | hhgarnes/python-validity | 82b42e4fd152f10f75584de56502fd9ada299bb5 | [
"MIT"
] | null | null | null |
from time import sleep
from proto9x.usb import usb
from proto9x.tls import tls
from proto9x.flash import read_flash
from proto9x.init_flash import init_flash
from proto9x.upload_fwext import upload_fwext
from proto9x.calibrate import calibrate
from proto9x.init_db import init_db
#usb.trace_enabled=True
#tls.trace_en... | 18.45 | 47 | 0.734417 |
22b29bb3979813975d0a62cdf7e26438790eeb19 | 448 | py | Python | output/models/ms_data/element/elem_q017_xsd/elem_q017.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/element/elem_q017_xsd/elem_q017.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/element/elem_q017_xsd/elem_q017.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
| 15.448276 | 40 | 0.5 |
22b2c7ab0a465a4d5e5a4f3cd082436d406520c8 | 43,545 | py | Python | contrib_src/predict.py | modelhub-ai/mic-dkfz-brats | 4522a26442f1e323f97aa45fbd5047bfe9029b2b | [
"MIT"
] | 1 | 2020-01-09T11:45:26.000Z | 2020-01-09T11:45:26.000Z | contrib_src/predict.py | modelhub-ai/mic-dkfz-brats | 4522a26442f1e323f97aa45fbd5047bfe9029b2b | [
"MIT"
] | null | null | null | contrib_src/predict.py | modelhub-ai/mic-dkfz-brats | 4522a26442f1e323f97aa45fbd5047bfe9029b2b | [
"MIT"
] | null | null | null | import json
import os
from collections import OrderedDict
from copy import deepcopy
import SimpleITK as sitk
from batchgenerators.augmentations.utils import resize_segmentation # resize_softmax_output
from skimage.transform import resize
from torch.optim import lr_scheduler
from torch import nn
import numpy as np
impor... | 43.807847 | 206 | 0.610288 |
22b364d4334f94cc1d058ea248dee07fc3c34b86 | 982 | py | Python | plot/finderror.py | architsakhadeo/Offline-Hyperparameter-Tuning-for-RL | 94b8f205b12f0cc59ae8e19b2e6099f34be929d6 | [
"MIT"
] | null | null | null | plot/finderror.py | architsakhadeo/Offline-Hyperparameter-Tuning-for-RL | 94b8f205b12f0cc59ae8e19b2e6099f34be929d6 | [
"MIT"
] | null | null | null | plot/finderror.py | architsakhadeo/Offline-Hyperparameter-Tuning-for-RL | 94b8f205b12f0cc59ae8e19b2e6099f34be929d6 | [
"MIT"
] | null | null | null | import os
basepath = '/home/archit/scratch/cartpoles/data/hyperparam/cartpole/offline_learning/esarsa-adam/'
dirs = os.listdir(basepath)
string = ''''''
for dir in dirs:
print(dir)
subbasepath = basepath + dir + '/'
subdirs = os.listdir(subbasepath)
for subdir in subdirs:
print(subdir)
subsubbasepath = subbasep... | 33.862069 | 129 | 0.669043 |
22b4a1c6f88314760073b0d207d79b3e4653b1cf | 4,848 | py | Python | src/pybacked/zip_handler.py | bluePlatinum/pyback | 1c12a52974232b0482981c12a9af27e52dd2190e | [
"MIT"
] | null | null | null | src/pybacked/zip_handler.py | bluePlatinum/pyback | 1c12a52974232b0482981c12a9af27e52dd2190e | [
"MIT"
] | null | null | null | src/pybacked/zip_handler.py | bluePlatinum/pyback | 1c12a52974232b0482981c12a9af27e52dd2190e | [
"MIT"
] | null | null | null | import os
import shutil
import tempfile
import zipfile
def archive_write(archivepath, data, filename, compression, compressionlevel):
"""
Create a file named filename in the archive and write data to it
:param archivepath: The path to the zip-archive
:type archivepath: str
:param data: The data t... | 33.902098 | 79 | 0.679868 |
22b5613b1a36e6519fc3f676eadefe6b4b566ae1 | 968 | py | Python | src/query_planner/abstract_scan_plan.py | imvinod/Eva | 0ed9814ae89db7dce1fb734dc99d5dac69cb3c82 | [
"Apache-2.0"
] | 1 | 2019-11-06T03:30:08.000Z | 2019-11-06T03:30:08.000Z | src/query_planner/abstract_scan_plan.py | imvinod/Eva | 0ed9814ae89db7dce1fb734dc99d5dac69cb3c82 | [
"Apache-2.0"
] | 1 | 2019-11-18T03:09:56.000Z | 2019-11-18T03:09:56.000Z | src/query_planner/abstract_scan_plan.py | asrayousuf/Eva | f652e5d398556055490c146f37e7a2d7a9d091f3 | [
"Apache-2.0"
] | null | null | null | """Abstract class for all the scan planners
https://www.postgresql.org/docs/9.1/using-explain.html
https://www.postgresql.org/docs/9.5/runtime-config-query.html
"""
from src.query_planner.abstract_plan import AbstractPlan
from typing import List
| 26.162162 | 61 | 0.664256 |
22b61a63d3fab6ac5a4af3febf6a8b869aa2fb13 | 926 | py | Python | tests/tools/test-tcp4-client.py | jimmy-huang/zephyr.js | cef5c0dffaacf7d5aa3f8265626f68a1e2b32eb5 | [
"Apache-2.0"
] | null | null | null | tests/tools/test-tcp4-client.py | jimmy-huang/zephyr.js | cef5c0dffaacf7d5aa3f8265626f68a1e2b32eb5 | [
"Apache-2.0"
] | null | null | null | tests/tools/test-tcp4-client.py | jimmy-huang/zephyr.js | cef5c0dffaacf7d5aa3f8265626f68a1e2b32eb5 | [
"Apache-2.0"
] | null | null | null | # !usr/bin/python
# coding:utf-8
import time
import socket
if __name__ == "__main__" :
main()
| 20.577778 | 64 | 0.512959 |
22b65cc97460c0c9287ab847203def7abf74c5bd | 1,642 | py | Python | kinto/__main__.py | s-utsch/kinto | 5e368849a8ab652a6e1923f44febcf89afd2c78b | [
"Apache-2.0"
] | null | null | null | kinto/__main__.py | s-utsch/kinto | 5e368849a8ab652a6e1923f44febcf89afd2c78b | [
"Apache-2.0"
] | null | null | null | kinto/__main__.py | s-utsch/kinto | 5e368849a8ab652a6e1923f44febcf89afd2c78b | [
"Apache-2.0"
] | null | null | null | import argparse
import sys
from cliquet.scripts import cliquet
from pyramid.scripts import pserve
from pyramid.paster import bootstrap
def main(args=None):
"""The main routine."""
if args is None:
args = sys.argv[1:]
parser = argparse.ArgumentParser(description="Kinto commands... | 34.93617 | 78 | 0.563337 |
22b79c3feb3f8475ac595810daa8294a07d6c2b9 | 625 | py | Python | apis/admin.py | JumboCode/GroundWorkSomerville | 280f9cd8ea38f065c9fb113e563a4be362a7e265 | [
"MIT"
] | null | null | null | apis/admin.py | JumboCode/GroundWorkSomerville | 280f9cd8ea38f065c9fb113e563a4be362a7e265 | [
"MIT"
] | null | null | null | apis/admin.py | JumboCode/GroundWorkSomerville | 280f9cd8ea38f065c9fb113e563a4be362a7e265 | [
"MIT"
] | 1 | 2021-06-28T22:56:22.000Z | 2021-06-28T22:56:22.000Z | from django.contrib import admin
from django.contrib.auth.models import User
from .models import Vegetable, Harvest, Transaction, Merchandise, MerchandisePrice
from .models import PurchasedItem, UserProfile, VegetablePrice, StockedVegetable
from .models import MerchandisePhotos
admin.site.register(Vegetable)
admin.sit... | 36.764706 | 82 | 0.8528 |
22b7e88858264b834f72f09e2cb52dba1a8d0aee | 3,423 | py | Python | tests/unit/media/test_synthesis.py | AnantTiwari-Naman/pyglet | 4774f2889057da95a78785a69372112931e6a620 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/media/test_synthesis.py | AnantTiwari-Naman/pyglet | 4774f2889057da95a78785a69372112931e6a620 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/media/test_synthesis.py | AnantTiwari-Naman/pyglet | 4774f2889057da95a78785a69372112931e6a620 | [
"BSD-3-Clause"
] | 1 | 2021-09-16T20:47:07.000Z | 2021-09-16T20:47:07.000Z | from ctypes import sizeof
from io import BytesIO
import unittest
from pyglet.media.synthesis import *
local_dir = os.path.dirname(__file__)
test_data_path = os.path.abspath(os.path.join(local_dir, '..', '..', 'data'))
del local_dir
def get_test_data_file(*file_parts):
"""Get a file from the test data directory... | 32.6 | 96 | 0.706106 |
22b80f5d2e66e370817465d9b5b278c1f1dcbe4e | 282 | py | Python | Ejercicio/Ejercicio7.py | tavo1599/F.P2021 | a592804fb5ae30da55551d9e29819887919db041 | [
"Apache-2.0"
] | 1 | 2021-05-05T19:39:37.000Z | 2021-05-05T19:39:37.000Z | Ejercicio/Ejercicio7.py | tavo1599/F.P2021 | a592804fb5ae30da55551d9e29819887919db041 | [
"Apache-2.0"
] | null | null | null | Ejercicio/Ejercicio7.py | tavo1599/F.P2021 | a592804fb5ae30da55551d9e29819887919db041 | [
"Apache-2.0"
] | null | null | null | #Datos de entrada
num=int(input("Ingrese un numero: "))
# Proceso
if num==10:
print("Calificacion: A")
elif num==9:
print("Calificacion: B")
elif num==8:
print("Calificacion: C")
elif num==7 and num==6:
print("Calificacion: D")
elif num<=5 and num>=0:
print("Calificacion: F")
| 20.142857 | 37 | 0.673759 |
22b828cde8bc59acbcf210743592fd1c629c4095 | 417 | py | Python | 2015/day-2/part2.py | nairraghav/advent-of-code-2019 | 274a2a4a59a8be39afb323356c592af5e1921e54 | [
"MIT"
] | null | null | null | 2015/day-2/part2.py | nairraghav/advent-of-code-2019 | 274a2a4a59a8be39afb323356c592af5e1921e54 | [
"MIT"
] | null | null | null | 2015/day-2/part2.py | nairraghav/advent-of-code-2019 | 274a2a4a59a8be39afb323356c592af5e1921e54 | [
"MIT"
] | null | null | null | ribbon_needed = 0
with open("input.txt", "r") as puzzle_input:
for line in puzzle_input:
length, width, height = [int(item) for item in line.split("x")]
dimensions = [length, width, height]
smallest_side = min(dimensions)
dimensions.remove(smallest_side)
second_smallest_side = min(dimensions)
ribbon_n... | 26.0625 | 81 | 0.736211 |
22b916a799056741ecb2a3c045e0fdb664033699 | 11,424 | py | Python | Algorithm.Python/Alphas/GreenblattMagicFormulaAlgorithm.py | aaronwJordan/Lean | 3486a6de56a739e44af274f421ac302cbbc98f8d | [
"Apache-2.0"
] | null | null | null | Algorithm.Python/Alphas/GreenblattMagicFormulaAlgorithm.py | aaronwJordan/Lean | 3486a6de56a739e44af274f421ac302cbbc98f8d | [
"Apache-2.0"
] | null | null | null | Algorithm.Python/Alphas/GreenblattMagicFormulaAlgorithm.py | aaronwJordan/Lean | 3486a6de56a739e44af274f421ac302cbbc98f8d | [
"Apache-2.0"
] | null | null | null | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Licen... | 44.8 | 167 | 0.68785 |
22b976d4af390f9c20bc3dedbfcb6376fdbf0308 | 5,277 | py | Python | hw2/deeplearning/style_transfer.py | axelbr/berkeley-cs182-deep-neural-networks | 2bde27d9d5361d48dce7539d00b136209c1cfaa1 | [
"MIT"
] | null | null | null | hw2/deeplearning/style_transfer.py | axelbr/berkeley-cs182-deep-neural-networks | 2bde27d9d5361d48dce7539d00b136209c1cfaa1 | [
"MIT"
] | null | null | null | hw2/deeplearning/style_transfer.py | axelbr/berkeley-cs182-deep-neural-networks | 2bde27d9d5361d48dce7539d00b136209c1cfaa1 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn.functional as F
def content_loss(content_weight, content_current, content_target):
"""
Compute the content loss for style transfer.
Inputs:
- content_weight: Scalar giving the weighting for the content loss.
- content_current: features of the curre... | 45.886957 | 116 | 0.437938 |
22b997fa793710eae107fad9390bbdd1f1c77572 | 495 | py | Python | submissions/available/Johnson-CausalTesting/Holmes/fuzzers/Peach/Transformers/Encode/HTMLDecode.py | brittjay0104/rose6icse | 7b24743b7a805b9ed094b67e4a08bad7894f0e84 | [
"Unlicense"
] | null | null | null | submissions/available/Johnson-CausalTesting/Holmes/fuzzers/Peach/Transformers/Encode/HTMLDecode.py | brittjay0104/rose6icse | 7b24743b7a805b9ed094b67e4a08bad7894f0e84 | [
"Unlicense"
] | null | null | null | submissions/available/Johnson-CausalTesting/Holmes/fuzzers/Peach/Transformers/Encode/HTMLDecode.py | brittjay0104/rose6icse | 7b24743b7a805b9ed094b67e4a08bad7894f0e84 | [
"Unlicense"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import xml.sax.saxutils
from Peach.transformer import Transformer
| 29.117647 | 69 | 0.717172 |
22be5667afd253d36e99d23282612d6ddbb78c15 | 2,132 | py | Python | src/archive/greatcircle.py | AuraUAS/aura-core | 4711521074db72ba9089213e14455d89dc5306c0 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 8 | 2016-08-03T19:35:03.000Z | 2019-12-15T06:25:05.000Z | src/archive/greatcircle.py | jarilq/aura-core | 7880ed265396bf8c89b783835853328e6d7d1589 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 4 | 2018-09-27T15:48:56.000Z | 2018-11-05T12:38:10.000Z | src/archive/greatcircle.py | jarilq/aura-core | 7880ed265396bf8c89b783835853328e6d7d1589 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 5 | 2017-06-28T19:15:36.000Z | 2020-02-19T19:31:24.000Z | # From: http://williams.best.vwh.net/avform.htm#GCF
import math
EPS = 0.0001
d2r = math.pi / 180.0
r2d = 180.0 / math.pi
rad2nm = (180.0 * 60.0) / math.pi
nm2rad = 1.0 / rad2nm
nm2meter = 1852
meter2nm = 1.0 / nm2meter
# p1 = (lat1(deg), lon1(deg))
# p2 = (lat2(deg), lon2(deg))
| 29.611111 | 138 | 0.560976 |
22be826c96db32727162b13681b36634865339c6 | 1,195 | py | Python | app/__init__.py | JoeCare/flask_geolocation_api | ad9ea0d22b738a7af8421cc57c972bd0e0fa80da | [
"Apache-2.0"
] | null | null | null | app/__init__.py | JoeCare/flask_geolocation_api | ad9ea0d22b738a7af8421cc57c972bd0e0fa80da | [
"Apache-2.0"
] | 2 | 2021-03-14T03:55:49.000Z | 2021-03-14T04:01:32.000Z | app/__init__.py | JoeCare/flask_geolocation_api | ad9ea0d22b738a7af8421cc57c972bd0e0fa80da | [
"Apache-2.0"
] | null | null | null | import connexion, os
from connexion.resolver import RestyResolver
from flask import json
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
# Globally accessible libraries
db = SQLAlchemy()
mm = Marshmallow()
def init_app():
"""Initialize the Connexion application."""
BASE_DIR... | 26.555556 | 67 | 0.672803 |
22c02d3ee15e860f429769f7b7700c393718fcdc | 29,893 | py | Python | RIPv2-Simulation/Router.py | vkmanojk/Networks-VirtualLAN | 52c6546da611a7a7b9fdea65c567b284664a99b4 | [
"MIT"
] | null | null | null | RIPv2-Simulation/Router.py | vkmanojk/Networks-VirtualLAN | 52c6546da611a7a7b9fdea65c567b284664a99b4 | [
"MIT"
] | null | null | null | RIPv2-Simulation/Router.py | vkmanojk/Networks-VirtualLAN | 52c6546da611a7a7b9fdea65c567b284664a99b4 | [
"MIT"
] | null | null | null | '''
Summary: Program that implements a routing deamon based on the
RIP version 2 protocol from RFC2453.
Usage: python3 Router.py <router_config_file>
Configuration File:
The user supplies a router configuration file of the format:
[Setting... | 35.12691 | 95 | 0.544174 |
22c090ce75cc118c533814274bbfc243abbfc79a | 5,669 | py | Python | atlaselectrophysiology/extract_files.py | alowet/iblapps | 9be936cd6806153dde0cbff1b6f2180191de3aeb | [
"MIT"
] | null | null | null | atlaselectrophysiology/extract_files.py | alowet/iblapps | 9be936cd6806153dde0cbff1b6f2180191de3aeb | [
"MIT"
] | null | null | null | atlaselectrophysiology/extract_files.py | alowet/iblapps | 9be936cd6806153dde0cbff1b6f2180191de3aeb | [
"MIT"
] | null | null | null | from ibllib.io import spikeglx
import numpy as np
import ibllib.dsp as dsp
from scipy import signal
from ibllib.misc import print_progress
from pathlib import Path
import alf.io as aio
import logging
import ibllib.ephys.ephysqc as ephysqc
from phylib.io import alf
_logger = logging.getLogger('ibllib')
... | 40.492857 | 99 | 0.657259 |
22c0a198d3ffbdb90c8a504d310e057f35103de5 | 2,740 | py | Python | site_settings/models.py | shervinbdndev/Django-Shop | baa4e7b91fbdd01ee591049c12cd9fbfaa434379 | [
"MIT"
] | 13 | 2022-02-25T05:04:58.000Z | 2022-03-15T10:55:24.000Z | site_settings/models.py | iTsSobhan/Django-Shop | 9eb6a08c6e93e5401d6bc2eeb30f2ef35adec730 | [
"MIT"
] | null | null | null | site_settings/models.py | iTsSobhan/Django-Shop | 9eb6a08c6e93e5401d6bc2eeb30f2ef35adec730 | [
"MIT"
] | 1 | 2022-03-03T09:21:49.000Z | 2022-03-03T09:21:49.000Z | from django.db import models
| 36.052632 | 110 | 0.670073 |
22c0aad467733eae25b9c32e9a7eb9d1b86f8921 | 9,955 | py | Python | examples/basics/visuals/line_prototype.py | 3DAlgoLab/vispy | 91972307cf336674aad58198fb26b9e46f8f9ca1 | [
"BSD-3-Clause"
] | 2,617 | 2015-01-02T07:52:18.000Z | 2022-03-29T19:31:15.000Z | examples/basics/visuals/line_prototype.py | 3DAlgoLab/vispy | 91972307cf336674aad58198fb26b9e46f8f9ca1 | [
"BSD-3-Clause"
] | 1,674 | 2015-01-01T00:36:08.000Z | 2022-03-31T19:35:56.000Z | examples/basics/visuals/line_prototype.py | 3DAlgoLab/vispy | 91972307cf336674aad58198fb26b9e46f8f9ca1 | [
"BSD-3-Clause"
] | 719 | 2015-01-10T14:25:00.000Z | 2022-03-02T13:24:56.000Z | # -*- coding: utf-8 -*-
# vispy: gallery 10
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
import sys
import numpy as np
from vispy import app, gloo, visuals
from vispy.visuals.filters import Clipper, ColorFilter
from vispy.visual... | 34.209622 | 79 | 0.668609 |
22c0b1d42f5e6f6bbd43886632ceb253dedae7b6 | 4,243 | py | Python | h1st/tests/core/test_schemas_inferrer.py | Mou-Ikkai/h1st | da47a8f1ad6af532c549e075fba19e3b3692de89 | [
"Apache-2.0"
] | 2 | 2020-08-21T07:49:08.000Z | 2020-08-21T07:49:13.000Z | h1st/tests/core/test_schemas_inferrer.py | Mou-Ikkai/h1st | da47a8f1ad6af532c549e075fba19e3b3692de89 | [
"Apache-2.0"
] | 3 | 2020-11-13T19:06:07.000Z | 2022-02-10T02:06:03.000Z | h1st/tests/core/test_schemas_inferrer.py | Mou-Ikkai/h1st | da47a8f1ad6af532c549e075fba19e3b3692de89 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from datetime import datetime
import pyarrow as pa
import numpy as np
import pandas as pd
from h1st.schema import SchemaInferrer
| 27.732026 | 82 | 0.418572 |
22c0ccfce68cfbaf9d19c13daf2d7c341cf47746 | 373 | py | Python | c_core_librairies/exercise_a.py | nicolasessisbreton/pyzehe | 7497a0095d974ac912ce9826a27e21fd9d513942 | [
"Apache-2.0"
] | 1 | 2018-05-31T19:36:36.000Z | 2018-05-31T19:36:36.000Z | c_core_librairies/exercise_a.py | nicolasessisbreton/pyzehe | 7497a0095d974ac912ce9826a27e21fd9d513942 | [
"Apache-2.0"
] | 1 | 2018-05-31T01:10:51.000Z | 2018-05-31T01:10:51.000Z | c_core_librairies/exercise_a.py | nicolasessisbreton/pyzehe | 7497a0095d974ac912ce9826a27e21fd9d513942 | [
"Apache-2.0"
] | null | null | null | """
# refactoring
Refactoring is the key to successfull projects.
Refactor:
1) annuity_factor such that:
conversion to integer is handled,
no extra printing
2) policy_book into a class such that:
a function generates the book and the premium
stats and visualizations functions are avalaible
3) book_report su... | 21.941176 | 50 | 0.772118 |
22c0e10976672b4523dad7b6dd7cde8c3d5b7c7b | 6,272 | py | Python | util/util.py | harshitAgr/vess2ret | 5702175bcd9ecde34d4fedab45a7cd2878a0184c | [
"MIT"
] | 111 | 2017-01-30T17:49:15.000Z | 2022-03-28T05:53:51.000Z | util/util.py | engineerlion/vess2ret | 5702175bcd9ecde34d4fedab45a7cd2878a0184c | [
"MIT"
] | 19 | 2017-03-06T10:28:16.000Z | 2020-12-09T12:25:22.000Z | util/util.py | engineerlion/vess2ret | 5702175bcd9ecde34d4fedab45a7cd2878a0184c | [
"MIT"
] | 46 | 2017-02-10T18:39:25.000Z | 2022-03-05T21:39:46.000Z | """Auxiliary methods."""
import os
import json
from errno import EEXIST
import numpy as np
import seaborn as sns
import cPickle as pickle
import matplotlib.pyplot as plt
sns.set()
DEFAULT_LOG_DIR = 'log'
ATOB_WEIGHTS_FILE = 'atob_weights.h5'
D_WEIGHTS_FILE = 'd_weights.h5'
def convert_to_rgb(img, is_binary=False)... | 30.745098 | 89 | 0.603795 |
22c1ccef20d9d7a1d41049e783b9575459b18d70 | 834 | py | Python | services/apiRequests.py | CakeCrusher/voon-video_processing | 6ecaacf4e36baa72d713a92101b445885b3d95ef | [
"MIT"
] | null | null | null | services/apiRequests.py | CakeCrusher/voon-video_processing | 6ecaacf4e36baa72d713a92101b445885b3d95ef | [
"MIT"
] | null | null | null | services/apiRequests.py | CakeCrusher/voon-video_processing | 6ecaacf4e36baa72d713a92101b445885b3d95ef | [
"MIT"
] | null | null | null | from github import Github
# parsedUrl = parseGithubURL('https://github.com/CakeCrusher/restock_emailer')
# filePaths = fetchRepoFiles(parsedUrl['owner'], parsedUrl['repo'])
# files = [path.split('/')[-1] for path in filePaths]
# print(files)
| 29.785714 | 78 | 0.642686 |
22c3df00575427d7293f54af4b1eb86f32f1ea11 | 995 | py | Python | utils/tricks.py | HouchangX-AI/Dialog-Solution | 1f68f847d9c9c4a46ef0b5fc6a78014402a4dd7a | [
"MIT"
] | 3 | 2020-03-12T06:28:01.000Z | 2020-03-27T20:15:53.000Z | utils/tricks.py | HouchangX-AI/Dialog-Solution | 1f68f847d9c9c4a46ef0b5fc6a78014402a4dd7a | [
"MIT"
] | null | null | null | utils/tricks.py | HouchangX-AI/Dialog-Solution | 1f68f847d9c9c4a46ef0b5fc6a78014402a4dd7a | [
"MIT"
] | 2 | 2020-03-19T02:47:37.000Z | 2021-12-14T02:26:40.000Z | #-*- coding: utf-8 -*-
import codecs
import random
from utils.global_names import GlobalNames, get_file_path
| 26.184211 | 57 | 0.501508 |
22c52f6029df65fcd8fa5837d73e5ae4e6fb61e1 | 1,087 | py | Python | test/functional/test_device.py | Jagadambass/Graph-Neural-Networks | c8f1d87f8cd67d645c2f05f370be039acf05ca52 | [
"MIT"
] | null | null | null | test/functional/test_device.py | Jagadambass/Graph-Neural-Networks | c8f1d87f8cd67d645c2f05f370be039acf05ca52 | [
"MIT"
] | null | null | null | test/functional/test_device.py | Jagadambass/Graph-Neural-Networks | c8f1d87f8cd67d645c2f05f370be039acf05ca52 | [
"MIT"
] | null | null | null | from graphgallery.functional import device
import tensorflow as tf
import torch
if __name__ == "__main__":
test_device()
| 26.512195 | 68 | 0.596136 |
22c745e9fe90945bd78c2b0b4951b89a65ce5057 | 3,482 | py | Python | py_hanabi/card.py | krinj/hanabi-simulator | b77b04aa09bab8bd8d7b784e04bf8b9d5d76d1a6 | [
"MIT"
] | 1 | 2018-09-28T00:47:52.000Z | 2018-09-28T00:47:52.000Z | py_hanabi/card.py | krinj/hanabi-simulator | b77b04aa09bab8bd8d7b784e04bf8b9d5d76d1a6 | [
"MIT"
] | null | null | null | py_hanabi/card.py | krinj/hanabi-simulator | b77b04aa09bab8bd8d7b784e04bf8b9d5d76d1a6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
A card (duh).
"""
import random
import uuid
from enum import Enum
from typing import List
from py_hanabi.settings import CARD_DECK_DISTRIBUTION
__author__ = "Jakrin Juangbhanich"
__email__ = "juangbhanich.k@gmail.com"
| 24.871429 | 72 | 0.587881 |
22c76b57ffb3eeb2695ac101001d7de50b9a816d | 4,344 | py | Python | facetools/test/testcases.py | bigsassy/django-facetools | aeedaea81ab0007ee8e96b2f81f1404dc8bddb3c | [
"MIT"
] | 2 | 2018-01-24T20:41:27.000Z | 2019-06-27T13:24:18.000Z | facetools/test/testcases.py | bigsassy/django-facetools | aeedaea81ab0007ee8e96b2f81f1404dc8bddb3c | [
"MIT"
] | null | null | null | facetools/test/testcases.py | bigsassy/django-facetools | aeedaea81ab0007ee8e96b2f81f1404dc8bddb3c | [
"MIT"
] | null | null | null | import types
import django.test.testcases
from django.conf import settings
from facetools.models import TestUser
from facetools.common import _create_signed_request
from facetools.test import TestUserNotLoaded
from facetools.signals import sync_facebook_test_user, setup_facebook_test_client
from facetools.common impor... | 51.714286 | 162 | 0.69268 |
22c78686c8b8a763f3206d86fcbc87e20d6ea1aa | 1,186 | py | Python | setup.py | d2gex/distpickymodel | 7acd4ffafbe592d6336d91d6e7411cd45357e41c | [
"MIT"
] | null | null | null | setup.py | d2gex/distpickymodel | 7acd4ffafbe592d6336d91d6e7411cd45357e41c | [
"MIT"
] | null | null | null | setup.py | d2gex/distpickymodel | 7acd4ffafbe592d6336d91d6e7411cd45357e41c | [
"MIT"
] | null | null | null | import setuptools
import distpickymodel
setuptools.setup(
name="distpickymodel",
version=distpickymodel.__version__,
author="Dan G",
author_email="daniel.garcia@d2garcia.com",
description="A shared Mongoengine-based model library",
long_description=get_long_desc(),
url="https://github.com... | 32.944444 | 71 | 0.636594 |
22c7a70f2a69982c24184228f6ed64f2bdc7679e | 1,948 | py | Python | credentials_test.py | tinatasha/passwordgenerator | ad161e14779e975e98ad989c5df976ac3662f8d8 | [
"MIT"
] | null | null | null | credentials_test.py | tinatasha/passwordgenerator | ad161e14779e975e98ad989c5df976ac3662f8d8 | [
"MIT"
] | null | null | null | credentials_test.py | tinatasha/passwordgenerator | ad161e14779e975e98ad989c5df976ac3662f8d8 | [
"MIT"
] | null | null | null | import unittest
from password import Credentials
def test_init(self):
"""
Test for correct initialization
"""
self.assertEqual(self.new_credentials.account_name,"Github")
self.assertEqual(self.new_credentials.username,"tinatasga")
self.assertEqual(self.new_credentials.pa... | 31.419355 | 88 | 0.658624 |
22c82577ce9bb70304bc0ff3dee27fa81b62e25c | 564 | py | Python | homework_08/calc_fitness.py | ufpa-organization-repositories/evolutionary-computing | e16786f9619e2b357b94ab91ff3a7b352e6a0d92 | [
"MIT"
] | null | null | null | homework_08/calc_fitness.py | ufpa-organization-repositories/evolutionary-computing | e16786f9619e2b357b94ab91ff3a7b352e6a0d92 | [
"MIT"
] | null | null | null | homework_08/calc_fitness.py | ufpa-organization-repositories/evolutionary-computing | e16786f9619e2b357b94ab91ff3a7b352e6a0d92 | [
"MIT"
] | null | null | null |
# populacao = [[0,0],[-3,1]]
# calc_fitness(pop=populacao)
# print(populacao)
| 25.636364 | 87 | 0.546099 |
22c8357e530d1406b6c30aa5078c53db167737b2 | 128 | py | Python | pichetprofile/__init__.py | jamenor/pichetprofile | 6633ea6eaa7473af9e10f34f6a19428c2db92465 | [
"MIT"
] | 2 | 2021-04-20T01:54:40.000Z | 2022-01-31T10:00:04.000Z | pichetprofile/__init__.py | jamenor/pichetprofile | 6633ea6eaa7473af9e10f34f6a19428c2db92465 | [
"MIT"
] | null | null | null | pichetprofile/__init__.py | jamenor/pichetprofile | 6633ea6eaa7473af9e10f34f6a19428c2db92465 | [
"MIT"
] | 2 | 2021-12-12T08:17:42.000Z | 2022-02-13T21:04:44.000Z | # -*- coding: utf-8 -*-
from oopschool.school import Student,Tesla,SpecialStudent,Teacher
from oopschool.newschool import Test | 42.666667 | 66 | 0.78125 |
22cc300c5aa21f713c2ef3f3b60722cc7d238f97 | 1,163 | py | Python | rdl/data_sources/DataSourceFactory.py | pageuppeople-opensource/relational-data-loader | 0bac7036d65636d06eacca4e68e09d6e1c506ea4 | [
"MIT"
] | 2 | 2019-03-11T12:45:23.000Z | 2019-04-05T05:22:43.000Z | rdl/data_sources/DataSourceFactory.py | pageuppeople-opensource/relational-data-loader | 0bac7036d65636d06eacca4e68e09d6e1c506ea4 | [
"MIT"
] | 5 | 2019-02-08T03:23:25.000Z | 2019-04-11T01:29:45.000Z | rdl/data_sources/DataSourceFactory.py | PageUpPeopleOrg/relational-data-loader | 0bac7036d65636d06eacca4e68e09d6e1c506ea4 | [
"MIT"
] | 1 | 2019-03-04T04:08:49.000Z | 2019-03-04T04:08:49.000Z | import logging
from rdl.data_sources.MsSqlDataSource import MsSqlDataSource
from rdl.data_sources.AWSLambdaDataSource import AWSLambdaDataSource
| 35.242424 | 83 | 0.674979 |
22cc9cf5c82866cdbb6751a30f5964a624debd38 | 2,753 | py | Python | ch05/ch05-02-timeseries.py | alexmalins/kagglebook | 260f6634b6bbaa94c2e989770e75dc7101f5c614 | [
"BSD-3-Clause"
] | 13 | 2021-02-20T08:57:28.000Z | 2022-03-31T12:47:08.000Z | ch05/ch05-02-timeseries.py | Tharunkumar01/kagglebook | 260f6634b6bbaa94c2e989770e75dc7101f5c614 | [
"BSD-3-Clause"
] | null | null | null | ch05/ch05-02-timeseries.py | Tharunkumar01/kagglebook | 260f6634b6bbaa94c2e989770e75dc7101f5c614 | [
"BSD-3-Clause"
] | 2 | 2021-07-15T03:56:39.000Z | 2021-07-29T00:53:54.000Z | # ---------------------------------
# Prepare the data etc.
# ----------------------------------
import numpy as np
import pandas as pd
# train_x is the training data, train_y is the target values, and test_x is the test data
# stored in pandas DataFrames and Series (numpy arrays also used)
train = pd.read_csv('../in... | 43.698413 | 108 | 0.653106 |
22cd87f92115b6affd305877641e7e519dbd0eb4 | 476 | py | Python | server/WitClient.py | owo/jitalk | 2db2782282a2302b4cf6049030822734a6856982 | [
"MIT"
] | 1 | 2020-06-22T14:28:41.000Z | 2020-06-22T14:28:41.000Z | server/WitClient.py | owo/jitalk | 2db2782282a2302b4cf6049030822734a6856982 | [
"MIT"
] | null | null | null | server/WitClient.py | owo/jitalk | 2db2782282a2302b4cf6049030822734a6856982 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import wit
import json
if __name__ == "__main__":
print "You ran the Wit client, nothing will happen. Exiting..." | 20.695652 | 65 | 0.707983 |
22ce1c9c1c8f77ccd4520e195e541c2a19150619 | 268 | py | Python | HackerRank/Python/Easy/E0036.py | Mohammed-Shoaib/HackerRank-Problems | ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b | [
"MIT"
] | 54 | 2019-05-13T12:13:09.000Z | 2022-02-27T02:59:00.000Z | HackerRank/Python/Easy/E0036.py | Mohammed-Shoaib/HackerRank-Problems | ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b | [
"MIT"
] | 2 | 2020-10-02T07:16:43.000Z | 2020-10-19T04:36:19.000Z | HackerRank/Python/Easy/E0036.py | Mohammed-Shoaib/HackerRank-Problems | ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b | [
"MIT"
] | 20 | 2020-05-26T09:48:13.000Z | 2022-03-18T15:18:27.000Z | # Problem Statement: https://www.hackerrank.com/challenges/itertools-combinations-with-replacement/problem
from itertools import combinations_with_replacement
S, k = input().split()
for comb in combinations_with_replacement(sorted(S), int(k)):
print(''.join(comb)) | 33.5 | 106 | 0.791045 |
22cecf207eb3150281c5d9ddc72a0ab1531e7bdb | 5,341 | py | Python | visual_genome/models.py | hayyubi/visual-genome-driver | 412223bf1552b1927fb1219cfcf90dcd2599bf34 | [
"MIT"
] | null | null | null | visual_genome/models.py | hayyubi/visual-genome-driver | 412223bf1552b1927fb1219cfcf90dcd2599bf34 | [
"MIT"
] | null | null | null | visual_genome/models.py | hayyubi/visual-genome-driver | 412223bf1552b1927fb1219cfcf90dcd2599bf34 | [
"MIT"
] | null | null | null | """
Visual Genome Python API wrapper, models
"""
| 24.058559 | 74 | 0.52874 |
22cf451d04e0bf782f9148035e8ed296f046dac4 | 2,152 | py | Python | python-scripts/plot_delay.py | GayashanNA/my-scripts | d865e828c833d6b54c787ce9475da512f8488278 | [
"Apache-2.0"
] | null | null | null | python-scripts/plot_delay.py | GayashanNA/my-scripts | d865e828c833d6b54c787ce9475da512f8488278 | [
"Apache-2.0"
] | null | null | null | python-scripts/plot_delay.py | GayashanNA/my-scripts | d865e828c833d6b54c787ce9475da512f8488278 | [
"Apache-2.0"
] | null | null | null | import csv
import matplotlib.pyplot as plt
import time
PLOT_PER_WINDOW = False
WINDOW_LENGTH = 60000
BINS = 1000
delay_store = {}
perwindow_delay_store = {}
plotting_delay_store = {}
filename = "output-large.csv"
# filename = "output.csv"
# filename = "output-medium.csv"
# filename = "output-small.csv"
# filename = "... | 33.107692 | 98 | 0.703067 |
22cf943746c3603f630cb274d2c1d26e36acc1fd | 3,472 | py | Python | python_scripts/BUSCO_phylogenetics/rename_all_fa_seq.py | peterthorpe5/Methods_M.cerasi_R.padi_genome_assembly | c6cb771afaf40f5def47e33ff11cd8867ec528e0 | [
"MIT"
] | 4 | 2019-04-01T02:08:21.000Z | 2022-02-04T08:37:47.000Z | python_scripts/BUSCO_phylogenetics/rename_all_fa_seq.py | peterthorpe5/Methods_M.cerasi_R.padi_genome_assembly | c6cb771afaf40f5def47e33ff11cd8867ec528e0 | [
"MIT"
] | 1 | 2018-09-30T00:29:43.000Z | 2018-10-01T07:51:16.000Z | python_scripts/BUSCO_phylogenetics/rename_all_fa_seq.py | peterthorpe5/Methods_M.cerasi_R.padi_genome_assembly | c6cb771afaf40f5def47e33ff11cd8867ec528e0 | [
"MIT"
] | 1 | 2019-12-05T09:04:38.000Z | 2019-12-05T09:04:38.000Z | #!/usr/bin/env python
# author: Peter Thorpe September 2015. The James Hutton Insitute, Dundee, UK.
# title rename single copy busco genes
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio import SeqIO
import os
from sys import stdin,argv
import sys
from optparse import OptionParser
###############... | 26.707692 | 84 | 0.579781 |
22cfe37b118c380f98097dbe5e6dfaa75be99d71 | 427 | py | Python | video/rest/compositionhooks/delete-hook/delete-hook.6.x.py | afeld/api-snippets | d77456c387c9471d36aa949e2cf785d8a534a370 | [
"MIT"
] | 3 | 2020-05-05T10:01:02.000Z | 2021-02-06T14:23:13.000Z | video/rest/compositionhooks/delete-hook/delete-hook.6.x.py | afeld/api-snippets | d77456c387c9471d36aa949e2cf785d8a534a370 | [
"MIT"
] | null | null | null | video/rest/compositionhooks/delete-hook/delete-hook.6.x.py | afeld/api-snippets | d77456c387c9471d36aa949e2cf785d8a534a370 | [
"MIT"
] | null | null | null | # Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = 'SKXXXX'
api_key_secret = 'your_api_key_secret'
client = Client(api_key_sid, api_key_secret)
did_delete = client.video\
.c... | 28.466667 | 72 | 0.709602 |
22d061bf4dd94ca94a7f507ce7fe9f9a517f47a3 | 274 | py | Python | global_info.py | AkagiYui/AzurLaneTool | f00fa6e5c6371db72ee399d7bd178a81f39afd8b | [
"Apache-2.0"
] | null | null | null | global_info.py | AkagiYui/AzurLaneTool | f00fa6e5c6371db72ee399d7bd178a81f39afd8b | [
"Apache-2.0"
] | null | null | null | global_info.py | AkagiYui/AzurLaneTool | f00fa6e5c6371db72ee399d7bd178a81f39afd8b | [
"Apache-2.0"
] | null | null | null | from time import sleep
debug_mode = False
time_to_exit = False
exiting = False
exit_code = 0
| 14.421053 | 34 | 0.729927 |
22d06d326dbc942db8f36ca27ac8dc094685d70b | 6,924 | py | Python | advesarial_text/data/data_utils_test.py | slowy07/tensorflow-model-research | 48ba4ba6240452eb3e3350fe7099f2b045acc530 | [
"MIT"
] | null | null | null | advesarial_text/data/data_utils_test.py | slowy07/tensorflow-model-research | 48ba4ba6240452eb3e3350fe7099f2b045acc530 | [
"MIT"
] | null | null | null | advesarial_text/data/data_utils_test.py | slowy07/tensorflow-model-research | 48ba4ba6240452eb3e3350fe7099f2b045acc530 | [
"MIT"
] | null | null | null | from __future__ import absoulte_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from data import data_utils
data = data_utils
if __name__ == "__main__":
tf.test.main()
| 36.0625 | 88 | 0.608897 |
22d0777e1db496026b52bc09fc63aa81f467b3e2 | 105 | py | Python | headlesspreview/apps.py | arush15june/wagtail-torchbox | c4d06e096c72bd8007975dc016133024f9d27fab | [
"MIT"
] | null | null | null | headlesspreview/apps.py | arush15june/wagtail-torchbox | c4d06e096c72bd8007975dc016133024f9d27fab | [
"MIT"
] | null | null | null | headlesspreview/apps.py | arush15june/wagtail-torchbox | c4d06e096c72bd8007975dc016133024f9d27fab | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 17.5 | 39 | 0.790476 |
22d0f53b1d93eab616a976b47567e50595d96288 | 3,546 | py | Python | LipSDP/solve_sdp.py | revbucket/LipSDP | 39f2ffe65cb656440e055e4e86a750bc7e77e357 | [
"MIT"
] | 1 | 2021-07-21T12:19:01.000Z | 2021-07-21T12:19:01.000Z | LipSDP/solve_sdp.py | revbucket/LipSDP | 39f2ffe65cb656440e055e4e86a750bc7e77e357 | [
"MIT"
] | null | null | null | LipSDP/solve_sdp.py | revbucket/LipSDP | 39f2ffe65cb656440e055e4e86a750bc7e77e357 | [
"MIT"
] | null | null | null | import argparse
import numpy as np
import matlab.engine
from scipy.io import savemat
import os
from time import time
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--form',
default='neuron',
const='neuron',
nargs='?',
choices=('neuron', 'net... | 30.834783 | 91 | 0.631416 |
22d1e9715d6acd537e633072609ca037ec95ec12 | 805 | py | Python | stockprophet/__init__.py | chihyi-liao/stockprophet | 891c91b2a446e3bd30bb56b88be3874d7dda1b8d | [
"BSD-3-Clause"
] | 1 | 2021-11-15T13:07:19.000Z | 2021-11-15T13:07:19.000Z | stockprophet/__init__.py | chihyi-liao/stockprophet | 891c91b2a446e3bd30bb56b88be3874d7dda1b8d | [
"BSD-3-Clause"
] | null | null | null | stockprophet/__init__.py | chihyi-liao/stockprophet | 891c91b2a446e3bd30bb56b88be3874d7dda1b8d | [
"BSD-3-Clause"
] | 1 | 2021-09-15T09:25:39.000Z | 2021-09-15T09:25:39.000Z | from stockprophet.cli import entry_point
from stockprophet.crawler import (
init_stock_type, init_stock_category
)
from stockprophet.db import init_db
from .utils import read_db_settings
| 22.361111 | 49 | 0.645963 |
22d210de31752ef0c139ecd0a2fcb3a182d83a41 | 216 | py | Python | 2021/day_25.py | mpcjanssen/Advent-of-Code | 06c5257d038bfcd3d4790f3213afecb5c36d5c61 | [
"Unlicense"
] | 1 | 2022-02-06T08:33:08.000Z | 2022-02-06T08:33:08.000Z | 2021/day_25.py | mpcjanssen/Advent-of-Code | 06c5257d038bfcd3d4790f3213afecb5c36d5c61 | [
"Unlicense"
] | null | null | null | 2021/day_25.py | mpcjanssen/Advent-of-Code | 06c5257d038bfcd3d4790f3213afecb5c36d5c61 | [
"Unlicense"
] | null | null | null | import aoc_helper
RAW = aoc_helper.day(25)
print(RAW)
DATA = parse_raw()
aoc_helper.submit(25, part_one)
aoc_helper.submit(25, part_two)
| 11.368421 | 31 | 0.652778 |
22d23a29cb139320e7b38591cd284a89f2406142 | 475 | py | Python | 6/6.2.py | Hunter1753/adventofcode | 962df52af01f6ab575e8f00eb2d1c1335dba5430 | [
"CC0-1.0"
] | 1 | 2020-12-08T21:53:19.000Z | 2020-12-08T21:53:19.000Z | 6/6.2.py | Hunter1753/adventofcode | 962df52af01f6ab575e8f00eb2d1c1335dba5430 | [
"CC0-1.0"
] | null | null | null | 6/6.2.py | Hunter1753/adventofcode | 962df52af01f6ab575e8f00eb2d1c1335dba5430 | [
"CC0-1.0"
] | null | null | null |
groupList = []
tempGroup = []
with open("./6/input.txt") as inputFile:
for line in inputFile:
line = line.replace("\n","")
if len(line) > 0:
tempGroup.append(set(line))
else:
groupList.append(tempGroup)
tempGroup = []
if len(tempGroup) > 0:
groupList.append(tempGroup)
groupList = list(map(setInters... | 25 | 59 | 0.703158 |
22d2adc9a61d389ca50d1c98a9058e597ec58a82 | 2,964 | py | Python | demo/gpnas/CVPR2021_NAS_competition_gpnas_demo.py | ZichaoGuo/PaddleSlim | 2550fb4ec86aee6155c1c8a2c9ab174e239918a3 | [
"Apache-2.0"
] | 926 | 2019-12-16T05:06:56.000Z | 2022-03-31T07:22:10.000Z | demo/gpnas/CVPR2021_NAS_competition_gpnas_demo.py | ZichaoGuo/PaddleSlim | 2550fb4ec86aee6155c1c8a2c9ab174e239918a3 | [
"Apache-2.0"
] | 327 | 2019-12-16T06:04:31.000Z | 2022-03-30T11:08:18.000Z | demo/gpnas/CVPR2021_NAS_competition_gpnas_demo.py | ZichaoGuo/PaddleSlim | 2550fb4ec86aee6155c1c8a2c9ab174e239918a3 | [
"Apache-2.0"
] | 234 | 2019-12-16T03:12:08.000Z | 2022-03-27T12:59:39.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 44.909091 | 103 | 0.721323 |
22d2e5e3c594615ca7c099c59610e2d90de239db | 403 | py | Python | pages/migrations/0004_auto_20181102_0944.py | yogeshprasad/spa-development | 1bee9ca64da5815e1c9a2f7af43b44b59ee2ca7b | [
"Apache-2.0"
] | null | null | null | pages/migrations/0004_auto_20181102_0944.py | yogeshprasad/spa-development | 1bee9ca64da5815e1c9a2f7af43b44b59ee2ca7b | [
"Apache-2.0"
] | 7 | 2020-06-05T19:11:22.000Z | 2022-03-11T23:30:57.000Z | pages/migrations/0004_auto_20181102_0944.py | yogeshprasad/spa-development | 1bee9ca64da5815e1c9a2f7af43b44b59ee2ca7b | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.6 on 2018-11-02 09:44
from django.db import migrations, models
| 21.210526 | 63 | 0.602978 |
22d31dc3511cd477901e03ecc8f042e8c0f688bf | 1,119 | py | Python | imageclassification/src/sample/splitters/_StratifiedSplitter.py | waikato-datamining/keras-imaging | f044f883242895c18cfdb31a827bc32bdb0405ed | [
"MIT"
] | null | null | null | imageclassification/src/sample/splitters/_StratifiedSplitter.py | waikato-datamining/keras-imaging | f044f883242895c18cfdb31a827bc32bdb0405ed | [
"MIT"
] | null | null | null | imageclassification/src/sample/splitters/_StratifiedSplitter.py | waikato-datamining/keras-imaging | f044f883242895c18cfdb31a827bc32bdb0405ed | [
"MIT"
] | 1 | 2020-04-16T15:29:28.000Z | 2020-04-16T15:29:28.000Z | from collections import OrderedDict
from random import Random
from typing import Set
from .._types import Dataset, Split, LabelIndices
from .._util import per_label
from ._RandomSplitter import RandomSplitter
from ._Splitter import Splitter
| 28.692308 | 128 | 0.671135 |
22d37205c7c002b3538af8a7bcaeddcf556d57d9 | 315 | py | Python | revenuecat_python/enums.py | YuraHavrylko/revenuecat_python | a25b234933b6e80e1ff09b6a82d73a0e3df91caa | [
"MIT"
] | 1 | 2020-12-11T09:31:02.000Z | 2020-12-11T09:31:02.000Z | revenuecat_python/enums.py | YuraHavrylko/revenuecat_python | a25b234933b6e80e1ff09b6a82d73a0e3df91caa | [
"MIT"
] | null | null | null | revenuecat_python/enums.py | YuraHavrylko/revenuecat_python | a25b234933b6e80e1ff09b6a82d73a0e3df91caa | [
"MIT"
] | null | null | null | from enum import Enum
| 17.5 | 35 | 0.634921 |
22d53110de1903196c37bd847b098f2456b54f16 | 1,441 | py | Python | windows_packages_gpu/torch/nn/intrinsic/qat/modules/linear_relu.py | codeproject/DeepStack | d96368a3db1bc0266cb500ba3701d130834da0e6 | [
"Apache-2.0"
] | 353 | 2020-12-10T10:47:17.000Z | 2022-03-31T23:08:29.000Z | windows_packages_gpu/torch/nn/intrinsic/qat/modules/linear_relu.py | codeproject/DeepStack | d96368a3db1bc0266cb500ba3701d130834da0e6 | [
"Apache-2.0"
] | 80 | 2020-12-10T09:54:22.000Z | 2022-03-30T22:08:45.000Z | windows_packages_gpu/torch/nn/intrinsic/qat/modules/linear_relu.py | codeproject/DeepStack | d96368a3db1bc0266cb500ba3701d130834da0e6 | [
"Apache-2.0"
] | 63 | 2020-12-10T17:10:34.000Z | 2022-03-28T16:27:07.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
import torch.nn.qat as nnqat
import torch.nn.intrinsic
import torch.nn.functional as F
| 34.309524 | 89 | 0.66898 |
22d6fda860ed01e0cc3ade5c2a2e95bc621ae7ac | 992 | py | Python | venv/Lib/site-packages/PyOpenGL-3.0.1/OpenGL/GL/EXT/draw_buffers2.py | temelkirci/Motion_Editor | a8b8d4c4d2dcc9be28385600f56066cef92a38ad | [
"MIT"
] | 1 | 2022-03-02T17:07:20.000Z | 2022-03-02T17:07:20.000Z | venv/Lib/site-packages/PyOpenGL-3.0.1/OpenGL/GL/EXT/draw_buffers2.py | temelkirci/RealTime_6DOF_Motion_Editor | a8b8d4c4d2dcc9be28385600f56066cef92a38ad | [
"MIT"
] | null | null | null | venv/Lib/site-packages/PyOpenGL-3.0.1/OpenGL/GL/EXT/draw_buffers2.py | temelkirci/RealTime_6DOF_Motion_Editor | a8b8d4c4d2dcc9be28385600f56066cef92a38ad | [
"MIT"
] | null | null | null | '''OpenGL extension EXT.draw_buffers2
This module customises the behaviour of the
OpenGL.raw.GL.EXT.draw_buffers2 to provide a more
Python-friendly API
Overview (from the spec)
This extension builds upon the ARB_draw_buffers extension and provides
separate blend enables and color write masks for each color outp... | 36.740741 | 73 | 0.803427 |
22d789885783516e44018b1a27dcbc9e0ec012e0 | 6,443 | py | Python | pymemcache/client/retrying.py | liquidpele/pymemcache | 0001f94a06b91078ed7b7708729ef0d1aaa73a68 | [
"Apache-2.0"
] | null | null | null | pymemcache/client/retrying.py | liquidpele/pymemcache | 0001f94a06b91078ed7b7708729ef0d1aaa73a68 | [
"Apache-2.0"
] | null | null | null | pymemcache/client/retrying.py | liquidpele/pymemcache | 0001f94a06b91078ed7b7708729ef0d1aaa73a68 | [
"Apache-2.0"
] | null | null | null | """ Module containing the RetryingClient wrapper class. """
from time import sleep
def _ensure_tuple_argument(argument_name, argument_value):
"""
Helper function to ensure the given arguments are tuples of Exceptions (or
subclasses), or can at least be converted to such.
Args:
argument_name: s... | 35.994413 | 87 | 0.60298 |
22d92edfa8963f3c42a5dc829d7d8e2eae0773ab | 461 | py | Python | 8.1.py | HuaichenOvO/EIE3280HW | e1424abb8baf715a4e9372e2ca6b0bed1e62f3d6 | [
"MIT"
] | null | null | null | 8.1.py | HuaichenOvO/EIE3280HW | e1424abb8baf715a4e9372e2ca6b0bed1e62f3d6 | [
"MIT"
] | null | null | null | 8.1.py | HuaichenOvO/EIE3280HW | e1424abb8baf715a4e9372e2ca6b0bed1e62f3d6 | [
"MIT"
] | null | null | null | import numpy as np
import numpy.linalg as lg
A_mat = np.matrix([
[0, 1, 1, 1, 0],
[1, 0, 0, 0, 1],
[1, 0, 0, 1, 1],
[1, 0, 1, 0, 1],
[0, 1, 1, 1, 0]
])
eigen = lg.eig(A_mat) # return Arr[5] with 5 different linear independent eigen values
vec = eigen[1][:, 0] # the column (eigen vect... | 20.043478 | 87 | 0.566161 |
22d9ab4bf21ea11b6c751dd2350676d79a0f46d5 | 397 | py | Python | classroom/migrations/0025_myfile_file.py | Abulhusain/E-learing | 65cfe3125f1b6794572ef2daf89917976f0eac09 | [
"MIT"
] | 5 | 2019-06-19T03:47:17.000Z | 2020-06-11T17:46:50.000Z | classroom/migrations/0025_myfile_file.py | Abulhusain/E-learing | 65cfe3125f1b6794572ef2daf89917976f0eac09 | [
"MIT"
] | 3 | 2021-03-19T01:23:12.000Z | 2021-09-08T01:05:25.000Z | classroom/migrations/0025_myfile_file.py | seeej/digiwiz | 96ddfc22fe4c815feec3d75c30576fec5f344154 | [
"MIT"
] | 1 | 2021-06-04T05:58:15.000Z | 2021-06-04T05:58:15.000Z | # Generated by Django 2.2.2 on 2019-08-25 09:29
from django.db import migrations, models
| 20.894737 | 63 | 0.602015 |
22da304d7553bb5adf64e1d52f39170a3b5aca59 | 249 | py | Python | jumbo_api/objects/profile.py | rolfberkenbosch/python-jumbo-api | 9ca35cbea6225dcc6108093539e76f110b1840b0 | [
"MIT"
] | 3 | 2020-07-24T08:44:13.000Z | 2021-09-05T06:24:01.000Z | jumbo_api/objects/profile.py | rolfberkenbosch/python-jumbo-api | 9ca35cbea6225dcc6108093539e76f110b1840b0 | [
"MIT"
] | 6 | 2020-04-30T19:12:24.000Z | 2021-03-23T19:21:19.000Z | jumbo_api/objects/profile.py | rolfberkenbosch/python-jumbo-api | 9ca35cbea6225dcc6108093539e76f110b1840b0 | [
"MIT"
] | 2 | 2020-04-30T14:59:12.000Z | 2020-08-30T19:15:57.000Z | from jumbo_api.objects.store import Store
| 22.636364 | 45 | 0.634538 |
22da72ceaa2598d408165e577728716dec2eb71a | 11,928 | py | Python | tmp/real_time_log_analy/logWatcher.py | hankai17/test | 8f38d999a7c6a92eac94b4d9dc8e444619d2144f | [
"MIT"
] | 7 | 2017-07-16T15:09:26.000Z | 2021-09-01T02:13:15.000Z | tmp/real_time_log_analy/logWatcher.py | hankai17/test | 8f38d999a7c6a92eac94b4d9dc8e444619d2144f | [
"MIT"
] | null | null | null | tmp/real_time_log_analy/logWatcher.py | hankai17/test | 8f38d999a7c6a92eac94b4d9dc8e444619d2144f | [
"MIT"
] | 3 | 2017-09-13T09:54:49.000Z | 2019-03-18T01:29:15.000Z | #!/usr/bin/env python
import os
import sys
import time
import errno
import stat
import datetime
import socket
import struct
import atexit
import logging
#from lru import LRUCacheDict
from logging import handlers
from task_manager import Job, taskManage
from ctypes import *
from urlparse import *
from multiprocessing ... | 29.021898 | 132 | 0.550889 |
22db31f9f12a464c13a70cead5b1a18013bd0add | 365 | py | Python | lazyblacksmith/views/ajax/__init__.py | jonathonfletcher/LazyBlacksmith | f244f0a15c795707b64e7cc53f82c6d6270691b5 | [
"BSD-3-Clause"
] | 49 | 2016-10-24T13:51:56.000Z | 2022-02-18T06:07:47.000Z | lazyblacksmith/views/ajax/__init__.py | jonathonfletcher/LazyBlacksmith | f244f0a15c795707b64e7cc53f82c6d6270691b5 | [
"BSD-3-Clause"
] | 84 | 2015-04-29T10:24:51.000Z | 2022-02-17T19:18:01.000Z | lazyblacksmith/views/ajax/__init__.py | jonathonfletcher/LazyBlacksmith | f244f0a15c795707b64e7cc53f82c6d6270691b5 | [
"BSD-3-Clause"
] | 34 | 2017-01-23T13:19:17.000Z | 2022-02-02T17:32:08.000Z | # -*- encoding: utf-8 -*-
from flask import request
from lazyblacksmith.utils.request import is_xhr
import logging
logger = logging.getLogger('lb.ajax')
def is_not_ajax():
"""
Return True if request is not ajax
This function is used in @cache annotation
to not cache direct call (http 40... | 21.470588 | 48 | 0.665753 |
22dbcb72dc9b6914e75bad92c8d92d61083088a7 | 6,145 | py | Python | src/automata_learning_with_policybank/Traces.py | logic-and-learning/AdvisoRL | 3bbd741e681e6ea72562fec142d54e9d781d097d | [
"MIT"
] | 4 | 2021-02-04T17:33:07.000Z | 2022-01-24T10:29:39.000Z | src/automata_learning_with_policybank/Traces.py | logic-and-learning/AdvisoRL | 3bbd741e681e6ea72562fec142d54e9d781d097d | [
"MIT"
] | null | null | null | src/automata_learning_with_policybank/Traces.py | logic-and-learning/AdvisoRL | 3bbd741e681e6ea72562fec142d54e9d781d097d | [
"MIT"
] | null | null | null | import os
| 36.577381 | 127 | 0.479414 |
22dbf84787aba6cdbf21c855e5dcbb4cff617bd6 | 1,758 | py | Python | example/comp/urls.py | edwilding/django-comments-xtd | c3a335b6345b52c75cce69c66b7cf0ef72439d35 | [
"BSD-2-Clause"
] | null | null | null | example/comp/urls.py | edwilding/django-comments-xtd | c3a335b6345b52c75cce69c66b7cf0ef72439d35 | [
"BSD-2-Clause"
] | null | null | null | example/comp/urls.py | edwilding/django-comments-xtd | c3a335b6345b52c75cce69c66b7cf0ef72439d35 | [
"BSD-2-Clause"
] | 1 | 2021-06-01T20:35:25.000Z | 2021-06-01T20:35:25.000Z | import django
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
if django.VERSION[:2] > (1, 9):
from django.views.i18n import JavaScriptCatalog
else:
from django.views.i18n import javas... | 31.392857 | 77 | 0.67463 |
22de394896bd7be748b49ef5d7072349cfcc8ff2 | 1,770 | py | Python | 09_multiprocessing/prime_validation/primes_factor_test.py | jumploop/high_performance_python | da5b11735601b51f141975f9d59f14293cab16bb | [
"MIT"
] | null | null | null | 09_multiprocessing/prime_validation/primes_factor_test.py | jumploop/high_performance_python | da5b11735601b51f141975f9d59f14293cab16bb | [
"MIT"
] | null | null | null | 09_multiprocessing/prime_validation/primes_factor_test.py | jumploop/high_performance_python | da5b11735601b51f141975f9d59f14293cab16bb | [
"MIT"
] | null | null | null | import math
import time
if __name__ == "__main__":
primes = []
t1 = time.time()
# 100109100129100151 big prime
# http://primes.utm.edu/curios/page.php/100109100129100151.html
# number_range = xrange(100109100129100153, 100109100129101238, 2)
number_range = range(100109100129101237, 10010910... | 36.122449 | 170 | 0.654802 |
22df608412513a1bf5e311a4eae60aa3f6a7a737 | 1,609 | py | Python | python/test/test_dynamic_bitset.py | hagabb/katana | a52a688b90315a79aa95cf8d279fd7f949a3b94b | [
"BSD-3-Clause"
] | null | null | null | python/test/test_dynamic_bitset.py | hagabb/katana | a52a688b90315a79aa95cf8d279fd7f949a3b94b | [
"BSD-3-Clause"
] | null | null | null | python/test/test_dynamic_bitset.py | hagabb/katana | a52a688b90315a79aa95cf8d279fd7f949a3b94b | [
"BSD-3-Clause"
] | null | null | null | import pytest
from katana.dynamic_bitset import DynamicBitset
__all__ = []
SIZE = 50
| 14.898148 | 47 | 0.580485 |
22df9e5579ccb8577b1f37196d5e862a47aa496e | 1,026 | py | Python | tests/basic/test_basic.py | kopp/python-astar | 642dd4bcef9829776614dc0f12681ac94634a3bc | [
"BSD-3-Clause"
] | 133 | 2017-05-05T03:40:13.000Z | 2022-03-30T06:37:23.000Z | src/test/basic/basic.py | ReznicencuBogdan/python-astar | 48d1caedd6e839c51315555f85ced567f7f166a7 | [
"BSD-3-Clause"
] | 6 | 2019-01-17T20:46:34.000Z | 2021-12-23T22:59:57.000Z | src/test/basic/basic.py | ReznicencuBogdan/python-astar | 48d1caedd6e839c51315555f85ced567f7f166a7 | [
"BSD-3-Clause"
] | 61 | 2017-03-17T14:05:34.000Z | 2022-02-18T21:27:40.000Z | import unittest
import astar
if __name__ == '__main__':
unittest.main()
| 30.176471 | 87 | 0.522417 |
22e090fdaf1d3e3871f2d87d1370e0c27a711e78 | 2,623 | py | Python | potions.py | abdza/skyrim_formulas | bf6be3c82715cfde89810d6e6183c95a55a4414c | [
"MIT"
] | null | null | null | potions.py | abdza/skyrim_formulas | bf6be3c82715cfde89810d6e6183c95a55a4414c | [
"MIT"
] | null | null | null | potions.py | abdza/skyrim_formulas | bf6be3c82715cfde89810d6e6183c95a55a4414c | [
"MIT"
] | null | null | null | #!/bin/env python3
import csv
effects = {}
ingredients = {}
print("Formulating formulas")
with open('ingredients.csv') as csvfile:
aff = csv.reader(csvfile, delimiter=',')
for row in aff:
if row[0] not in effects.keys():
effects[row[0]] = row[1]
with open('skyrim-ingredients.csv', newlin... | 31.60241 | 141 | 0.569577 |
22e1bc52c4e28d18d68ad09f117367db41946c7e | 5,679 | py | Python | src/clients/ctm_api_client/models/user_additional_properties.py | IceT-M/ctm-python-client | 0ef1d8a3c9a27a01c088be1cdf5d177d25912bac | [
"BSD-3-Clause"
] | 5 | 2021-12-01T18:40:00.000Z | 2022-03-04T10:51:44.000Z | src/clients/ctm_api_client/models/user_additional_properties.py | IceT-M/ctm-python-client | 0ef1d8a3c9a27a01c088be1cdf5d177d25912bac | [
"BSD-3-Clause"
] | 3 | 2022-02-21T20:08:32.000Z | 2022-03-16T17:41:03.000Z | src/clients/ctm_api_client/models/user_additional_properties.py | IceT-M/ctm-python-client | 0ef1d8a3c9a27a01c088be1cdf5d177d25912bac | [
"BSD-3-Clause"
] | 7 | 2021-12-01T11:59:16.000Z | 2022-03-01T18:16:40.000Z | # coding: utf-8
"""
Control-M Services
Provides access to BMC Control-M Services # noqa: E501
OpenAPI spec version: 9.20.215
Contact: customer_support@bmc.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from clients.ct... | 30.207447 | 101 | 0.611727 |
22e2114d0da96fc447264d248b0ab2d8a5d86656 | 3,469 | py | Python | Tests/Methods/Mesh/Interpolation/test_interpolation.py | harshasunder-1/pyleecan | 32ae60f98b314848eb9b385e3652d7fc50a77420 | [
"Apache-2.0"
] | 2 | 2020-08-28T14:54:55.000Z | 2021-03-13T19:34:45.000Z | Tests/Methods/Mesh/Interpolation/test_interpolation.py | harshasunder-1/pyleecan | 32ae60f98b314848eb9b385e3652d7fc50a77420 | [
"Apache-2.0"
] | null | null | null | Tests/Methods/Mesh/Interpolation/test_interpolation.py | harshasunder-1/pyleecan | 32ae60f98b314848eb9b385e3652d7fc50a77420 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
import numpy as np
from unittest import TestCase
from pyleecan.Classes.CellMat import CellMat
from pyleecan.Classes.MeshSolution import MeshSolution
from pyleecan.Classes.PointMat import PointMat
from pyleecan.Classes.MeshMat import MeshMat
from pyleecan.Classes.ScalarProductL2 i... | 38.544444 | 86 | 0.618622 |
22e2925cc3811ca52e0058f9e3c1868295f2875f | 13,863 | py | Python | lib/models.py | ecarg/grace | 8c1540116c07648f7d8852ee5e9edff33b6ae2f6 | [
"BSD-2-Clause"
] | 7 | 2017-11-20T03:30:46.000Z | 2021-06-10T15:33:07.000Z | lib/models.py | ecarg/grace | 8c1540116c07648f7d8852ee5e9edff33b6ae2f6 | [
"BSD-2-Clause"
] | 47 | 2017-09-08T07:02:42.000Z | 2017-11-04T13:50:50.000Z | lib/models.py | ecarg/grace | 8c1540116c07648f7d8852ee5e9edff33b6ae2f6 | [
"BSD-2-Clause"
] | 2 | 2018-10-19T05:05:23.000Z | 2019-10-31T06:27:24.000Z | # -*- coding: utf-8 -*-
"""
Pytorch models
__author__ = 'Jamie (krikit@naver.com)'
__copyright__ = 'No copyright. Just copyleft!'
"""
# pylint: disable=no-member
# pylint: disable=invalid-name
###########
# imports #
###########
import torch
import torch.nn as nn
from embedder import Embedder
from pos_models impo... | 31.506818 | 89 | 0.549592 |
22e519a060ec94aa77f57c2992012dba58e6efff | 221 | py | Python | pyseqlogo/__init__.py | BioGeek/pyseqlogo | e41d9645c7a9fa5baf3deab281acf40ea5357f64 | [
"MIT"
] | 24 | 2017-10-23T16:06:18.000Z | 2022-03-04T14:09:25.000Z | pyseqlogo/__init__.py | BioGeek/pyseqlogo | e41d9645c7a9fa5baf3deab281acf40ea5357f64 | [
"MIT"
] | 7 | 2020-11-19T13:55:54.000Z | 2021-11-30T03:16:33.000Z | pyseqlogo/__init__.py | BioGeek/pyseqlogo | e41d9645c7a9fa5baf3deab281acf40ea5357f64 | [
"MIT"
] | 16 | 2018-02-01T16:12:07.000Z | 2021-09-28T03:53:11.000Z | # -*- coding: utf-8 -*-
"""Top-level package for pyseqlogo."""
__author__ = """Saket Choudhary"""
__email__ = 'saketkc@gmail.com'
__version__ = '0.1.0'
from .pyseqlogo import draw_logo
from .pyseqlogo import setup_axis
| 22.1 | 38 | 0.705882 |
22e5c3b42de15feed5e29aa272f135d23d064ab1 | 1,274 | py | Python | setup.py | edulix/apscheduler | 8030e0fc7e1845a15861e649988cc73a1aa624ec | [
"MIT"
] | null | null | null | setup.py | edulix/apscheduler | 8030e0fc7e1845a15861e649988cc73a1aa624ec | [
"MIT"
] | null | null | null | setup.py | edulix/apscheduler | 8030e0fc7e1845a15861e649988cc73a1aa624ec | [
"MIT"
] | null | null | null | # coding: utf-8
import os.path
try:
from setuptools import setup
extras = dict(zip_safe=False, test_suite='nose.collector', tests_require=['nose'])
except ImportError:
from distutils.core import setup
extras = {}
import apscheduler
here = os.path.dirname(__file__)
readme_path = os.path.join(here, 'R... | 31.073171 | 107 | 0.663265 |
22e6c10685bc8e3a610b18ebd720a7487a124de6 | 9,576 | py | Python | object_detection/exporter_test.py | travisyates81/object-detection | 931bebfa54798c08d2c401e9c1bad39015d8c832 | [
"MIT"
] | 1 | 2019-09-19T18:24:55.000Z | 2019-09-19T18:24:55.000Z | object_detection/exporter_test.py | travisyates81/object-detection | 931bebfa54798c08d2c401e9c1bad39015d8c832 | [
"MIT"
] | null | null | null | object_detection/exporter_test.py | travisyates81/object-detection | 931bebfa54798c08d2c401e9c1bad39015d8c832 | [
"MIT"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Travis Yates
"""Tests for object_detection.export_inference_graph."""
import os
import mock
import numpy as np
import tensorflow as tf
from object_detection import exporter
from object_detection.builders import model_builder
from object_detection.core i... | 44.539535 | 77 | 0.680138 |
22e9a24e177b5cc9ead771b6359f5209ebe42377 | 543 | py | Python | run.py | matthewyoung28/macmentum | af1a26903e25b4a4f278388d7be1e638e071c0a8 | [
"MIT"
] | null | null | null | run.py | matthewyoung28/macmentum | af1a26903e25b4a4f278388d7be1e638e071c0a8 | [
"MIT"
] | null | null | null | run.py | matthewyoung28/macmentum | af1a26903e25b4a4f278388d7be1e638e071c0a8 | [
"MIT"
] | null | null | null | import os
import sys
import random
main()
| 18.724138 | 93 | 0.662983 |
22eae5e579a412e845c5851038ebc3ce5e3c9735 | 2,099 | py | Python | noxfile.py | dolfno/mlops_demo | 52a04525f1655a32d45002384a972a1920fd517a | [
"MIT"
] | null | null | null | noxfile.py | dolfno/mlops_demo | 52a04525f1655a32d45002384a972a1920fd517a | [
"MIT"
] | null | null | null | noxfile.py | dolfno/mlops_demo | 52a04525f1655a32d45002384a972a1920fd517a | [
"MIT"
] | null | null | null | """Automated CI tools to run with Nox"""
import nox
from nox import Session
locations = "src", "noxfile.py", "docs/conf.py"
nox.options.sessions = "lint", "tests"
package = "hypermodern_python"
| 28.364865 | 68 | 0.636494 |
22ecf4bdf03fca4f671513bb4a4ebe6ea6f1152b | 225 | py | Python | cocotb_test/run.py | canerbulduk/cocotb-test | ece092446a1e5de932db12dfb60441d6f322d5f1 | [
"BSD-2-Clause"
] | null | null | null | cocotb_test/run.py | canerbulduk/cocotb-test | ece092446a1e5de932db12dfb60441d6f322d5f1 | [
"BSD-2-Clause"
] | null | null | null | cocotb_test/run.py | canerbulduk/cocotb-test | ece092446a1e5de932db12dfb60441d6f322d5f1 | [
"BSD-2-Clause"
] | null | null | null |
import cocotb_test.simulator
# For partial back compatibility
| 17.307692 | 43 | 0.648889 |
22ed999c1f1e8e891adad2dd4f4e9520b2e7dd4f | 267 | py | Python | kanban_backend/project_management/apps.py | hamzabouissi/kanban_backend | 549d8c2711313011f3186b5b3a3ac969481df3f7 | [
"MIT"
] | null | null | null | kanban_backend/project_management/apps.py | hamzabouissi/kanban_backend | 549d8c2711313011f3186b5b3a3ac969481df3f7 | [
"MIT"
] | null | null | null | kanban_backend/project_management/apps.py | hamzabouissi/kanban_backend | 549d8c2711313011f3186b5b3a3ac969481df3f7 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 20.538462 | 60 | 0.666667 |
22eecf1d05ffdd487202a1266800927ab92af76d | 1,098 | py | Python | src/framework/tracing.py | davidhozic/Discord-Shiller | ff22bb1ceb7b4128ee0d27f3c9c9dd0a5279feb9 | [
"MIT"
] | 12 | 2022-02-20T20:50:24.000Z | 2022-03-24T17:15:15.000Z | src/framework/tracing.py | davidhozic/Discord-Shiller | ff22bb1ceb7b4128ee0d27f3c9c9dd0a5279feb9 | [
"MIT"
] | 3 | 2022-02-21T15:17:43.000Z | 2022-03-17T22:36:23.000Z | src/framework/tracing.py | davidhozic/discord-advertisement-framework | ff22bb1ceb7b4128ee0d27f3c9c9dd0a5279feb9 | [
"MIT"
] | 1 | 2022-03-31T01:04:01.000Z | 2022-03-31T01:04:01.000Z | """
~ Tracing ~
This modules containes functions and classes
related to the console debug long or trace.
"""
from enum import Enum, auto
import time
__all__ = (
"TraceLEVELS",
"trace"
)
m_use_debug = None
def trace(message: str,
level: TraceLEVELS = TraceLEVELS.NORMAL):
""""... | 25.534884 | 81 | 0.528233 |
22f2bda6c50ac4fe1d32522345090972ebb7ad66 | 728 | py | Python | sunkit_image/__init__.py | jeffreypaul15/sunkit-image | 0987db8fcd38c79a83d7d890e407204e63a05c4f | [
"BSD-2-Clause-NetBSD",
"BSD-2-Clause"
] | null | null | null | sunkit_image/__init__.py | jeffreypaul15/sunkit-image | 0987db8fcd38c79a83d7d890e407204e63a05c4f | [
"BSD-2-Clause-NetBSD",
"BSD-2-Clause"
] | null | null | null | sunkit_image/__init__.py | jeffreypaul15/sunkit-image | 0987db8fcd38c79a83d7d890e407204e63a05c4f | [
"BSD-2-Clause-NetBSD",
"BSD-2-Clause"
] | null | null | null | """
sunkit-image
============
A image processing toolbox for Solar Physics.
* Homepage: https://sunpy.org
* Documentation: https://sunkit-image.readthedocs.io/en/latest/
"""
import sys
from .version import version as __version__ # NOQA
# Enforce Python version check during package import.
__minimum_python_version_... | 23.483871 | 87 | 0.717033 |
22f32d963c063df45b4e85b0c4f01e4ea1ea6369 | 26,004 | py | Python | app/view.py | lucasblazzi/stocker | 52cdec481ed84a09d97369ee4da229e169f99f51 | [
"MIT"
] | null | null | null | app/view.py | lucasblazzi/stocker | 52cdec481ed84a09d97369ee4da229e169f99f51 | [
"MIT"
] | null | null | null | app/view.py | lucasblazzi/stocker | 52cdec481ed84a09d97369ee4da229e169f99f51 | [
"MIT"
] | null | null | null | import plotly.graph_objects as go
import plotly.express as px
import pandas as pd | 46.352941 | 153 | 0.543916 |
22f3312bdb283b4ef7d6f8aa9f88ddb5c8c89e30 | 662 | py | Python | ch_4/stopping_length.py | ProhardONE/python_primer | 211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0 | [
"MIT"
] | 51 | 2016-04-05T16:56:11.000Z | 2022-02-08T00:08:47.000Z | ch_4/stopping_length.py | zhangxiao921207/python_primer | 211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0 | [
"MIT"
] | null | null | null | ch_4/stopping_length.py | zhangxiao921207/python_primer | 211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0 | [
"MIT"
] | 47 | 2016-05-02T07:51:37.000Z | 2022-02-08T01:28:15.000Z | # Exercise 4.11
# Author: Noah Waterfield Price
import sys
g = 9.81 # acceleration due to gravity
try:
# initial velocity (convert to m/s)
v0 = (1000. / 3600) * float(sys.argv[1])
mu = float(sys.argv[2]) # coefficient of friction
except IndexError:
print 'Both v0 (in km/s) and mu must be supplied on... | 22.827586 | 73 | 0.649547 |
22f35b16a60f939a7ee519533639ecb4ccd48d47 | 866 | py | Python | TestFiles/volumioTest.py | GeorgeIoak/Oden | 9bb6a5811e2ea40ceef67e46bc56eab1be9ce06c | [
"MIT"
] | null | null | null | TestFiles/volumioTest.py | GeorgeIoak/Oden | 9bb6a5811e2ea40ceef67e46bc56eab1be9ce06c | [
"MIT"
] | null | null | null | TestFiles/volumioTest.py | GeorgeIoak/Oden | 9bb6a5811e2ea40ceef67e46bc56eab1be9ce06c | [
"MIT"
] | null | null | null | # Testing code to check update status on demand
from socketIO_client import SocketIO, LoggingNamespace
from threading import Thread
socketIO = SocketIO('localhost', 3000)
status = 'pause'
receive_thread = Thread(target=_receive_thread, daemon=True)
receive_thread.start()
socketIO.on('pushState', on_push_state)
# is... | 29.862069 | 72 | 0.674365 |
22f3a0221d0e140933a57d7b71e0a66cb6793a2d | 5,761 | py | Python | examples/DeepWisdom/Auto_NLP/deepWisdom/transformers_/__init__.py | zichuan-scott-xu/automl-workflow | d108e55da943775953b9f1801311a86ac07e58a0 | [
"Apache-2.0"
] | 3 | 2020-12-15T02:40:43.000Z | 2021-01-14T02:32:13.000Z | examples/DeepWisdom/Auto_NLP/deepWisdom/transformers_/__init__.py | zichuan-scott-xu/automl-workflow | d108e55da943775953b9f1801311a86ac07e58a0 | [
"Apache-2.0"
] | null | null | null | examples/DeepWisdom/Auto_NLP/deepWisdom/transformers_/__init__.py | zichuan-scott-xu/automl-workflow | d108e55da943775953b9f1801311a86ac07e58a0 | [
"Apache-2.0"
] | 4 | 2021-01-07T05:41:38.000Z | 2021-04-07T08:02:22.000Z | __version__ = "2.1.1"
# Work around to update TensorFlow's absl.logging threshold which alters the
# default Python logging output behavior when present.
# see: https://github.com/abseil/abseil-py/issues/99
# and: https://github.com/tensorflow/tensorflow/issues/26691#issuecomment-500369493
try:
import absl.logging... | 59.391753 | 109 | 0.740844 |
22f3df9c130fc202edc44714de04e929f4e7eab3 | 91,430 | py | Python | test/model/data/all_foreground_valid_data.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 2 | 2021-03-17T11:25:46.000Z | 2021-11-18T04:20:54.000Z | test/model/data/all_foreground_valid_data.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 2 | 2020-07-31T22:37:30.000Z | 2020-07-31T23:08:55.000Z | test/model/data/all_foreground_valid_data.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 1 | 2020-02-04T15:39:06.000Z | 2020-02-04T15:39:06.000Z | from __future__ import absolute_import, division, print_function
data = r"""cdials_array_family_flex_ext
shoebox
p1
(tRp2
(cscitbx_array_family_flex_ext
grid
p3
((I0
t(I8
tI01
tRp4
(I8
tbS'\x02\x01\x02\x08\x00\x03\\\x01\x03m\x01\x03\x04\x06\x03\x15\x06\x00\x02\x01\x02\x03\x02\x01\x02\x11\x02\x11\x02\x9c\x02\x06\x02\x8... | 5,378.235294 | 91,236 | 0.747971 |
22f43bae0fb833bc9d376660819fab38bbd38d60 | 11,830 | py | Python | src/use-model.py | sofieditmer/self-assigned | 3033b64d2848fcf73c44dd79ad4e7f07f8387c65 | [
"MIT"
] | null | null | null | src/use-model.py | sofieditmer/self-assigned | 3033b64d2848fcf73c44dd79ad4e7f07f8387c65 | [
"MIT"
] | null | null | null | src/use-model.py | sofieditmer/self-assigned | 3033b64d2848fcf73c44dd79ad4e7f07f8387c65 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Info: This script loads the model trained in the cnn-asl.py script and enables the user to use it for classifying unseen ASL letters. It also visualizes the feature map of the last convolutional layer of the network to enable the user to get an insight into exactly which parts of the original ... | 42.707581 | 421 | 0.623331 |
22f45d29bee95fa69837bee8b207676703b1cb59 | 844 | py | Python | examples/hello_world/src/Algorithm.py | algorithmiaio/algorithmia-adk-python | 1e5c6b9de08fe34260f3b4c03eb4596cccb4d070 | [
"MIT"
] | 4 | 2021-03-15T16:51:27.000Z | 2021-07-25T16:47:00.000Z | examples/hello_world/src/Algorithm.py | algorithmiaio/algorithmia-adk-python | 1e5c6b9de08fe34260f3b4c03eb4596cccb4d070 | [
"MIT"
] | 2 | 2021-02-25T21:13:30.000Z | 2021-05-03T14:49:41.000Z | examples/hello_world/src/Algorithm.py | algorithmiaio/algorithmia-adk-python | 1e5c6b9de08fe34260f3b4c03eb4596cccb4d070 | [
"MIT"
] | 1 | 2021-03-02T00:06:55.000Z | 2021-03-02T00:06:55.000Z | from Algorithmia import ADK
# API calls will begin at the apply() method, with the request body passed as 'input'
# For more details, see algorithmia.com/developers/algorithm-development/languages
# This turns your library code into an algorithm that can run on the platform.
# If you intend to use loading operation... | 44.421053 | 120 | 0.761848 |
22f53ccd69bc56b9aef660e968f36d2013f14d05 | 7,899 | py | Python | src/gluonts/nursery/autogluon_tabular/estimator.py | Xiaoxiong-Liu/gluon-ts | 097c492769258dd70b7f223f826b17b0051ceee9 | [
"Apache-2.0"
] | 2,648 | 2019-06-03T17:18:27.000Z | 2022-03-31T08:29:22.000Z | src/gluonts/nursery/autogluon_tabular/estimator.py | Xiaoxiong-Liu/gluon-ts | 097c492769258dd70b7f223f826b17b0051ceee9 | [
"Apache-2.0"
] | 1,220 | 2019-06-04T09:00:14.000Z | 2022-03-31T10:45:43.000Z | src/gluonts/nursery/autogluon_tabular/estimator.py | Xiaoxiong-Liu/gluon-ts | 097c492769258dd70b7f223f826b17b0051ceee9 | [
"Apache-2.0"
] | 595 | 2019-06-04T01:04:31.000Z | 2022-03-30T10:40:26.000Z | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 36.233945 | 122 | 0.613622 |
22f548488d990977359fc60d27c5b1e982176596 | 1,032 | py | Python | src/dcar/errors.py | andreas19/dcar | 31118ac5924b7cb01f8b7da5a84480824c046df2 | [
"BSD-3-Clause"
] | 1 | 2020-11-25T15:04:39.000Z | 2020-11-25T15:04:39.000Z | src/dcar/errors.py | andreas19/dcar | 31118ac5924b7cb01f8b7da5a84480824c046df2 | [
"BSD-3-Clause"
] | null | null | null | src/dcar/errors.py | andreas19/dcar | 31118ac5924b7cb01f8b7da5a84480824c046df2 | [
"BSD-3-Clause"
] | null | null | null | """Errors module."""
__all__ = [
'Error',
'AddressError',
'AuthenticationError',
'TransportError',
'ValidationError',
'RegisterError',
'MessageError',
'DBusError',
'SignatureError',
'TooLongError',
]
| 18.763636 | 67 | 0.671512 |
22f66223b5c0420ba407f0ba73a5510c6ae72923 | 31,006 | py | Python | Packs/CortexXDR/Integrations/XDR_iocs/XDR_iocs_test.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 1 | 2022-03-05T02:23:32.000Z | 2022-03-05T02:23:32.000Z | Packs/CortexXDR/Integrations/XDR_iocs/XDR_iocs_test.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 42 | 2022-03-11T10:52:26.000Z | 2022-03-31T01:50:42.000Z | Packs/CortexXDR/Integrations/XDR_iocs/XDR_iocs_test.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 2 | 2021-12-13T13:07:21.000Z | 2022-03-05T02:23:34.000Z | from XDR_iocs import *
import pytest
from freezegun import freeze_time
Client.severity = 'INFO'
client = Client({'url': 'test'})
def test_create_file_sync_all_types(self, mocker):
"""
Given:
- Sync command
When:
- iocs as all types
... | 44.042614 | 224 | 0.591111 |
22f68910ff9dfaa421812c8e74e6090e44df810d | 1,797 | py | Python | project/users/models.py | rchdlps/django-docker | 2c12732264c1f17cd62e20927b5956db498c30b7 | [
"MIT"
] | null | null | null | project/users/models.py | rchdlps/django-docker | 2c12732264c1f17cd62e20927b5956db498c30b7 | [
"MIT"
] | null | null | null | project/users/models.py | rchdlps/django-docker | 2c12732264c1f17cd62e20927b5956db498c30b7 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db.models import CharField
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.db import models
from PIL import Image
| 41.790698 | 82 | 0.673901 |
22f898eb9c872bebbb74a0dcd35cbd3eb8f475a0 | 4,444 | py | Python | cloudify_terminal_sdk/netconf_connection.py | cloudify-incubator/cloudify-plugins-sdk | 9805008e739d31e5f9fe3184411648f9be5e6214 | [
"Apache-2.0"
] | 1 | 2019-04-23T03:06:52.000Z | 2019-04-23T03:06:52.000Z | cloudify_terminal_sdk/netconf_connection.py | cloudify-incubator/cloudify-plugins-sdk | 9805008e739d31e5f9fe3184411648f9be5e6214 | [
"Apache-2.0"
] | 9 | 2018-12-17T14:08:29.000Z | 2022-01-16T17:52:54.000Z | cloudify_terminal_sdk/netconf_connection.py | cloudify-incubator/cloudify-plugins-sdk | 9805008e739d31e5f9fe3184411648f9be5e6214 | [
"Apache-2.0"
] | 3 | 2021-12-13T20:53:37.000Z | 2022-01-20T09:01:47.000Z | # Copyright (c) 2015-2020 Cloudify Platform Ltd. 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 b... | 35.552 | 74 | 0.605761 |
22f9659775a0befbb80b23123b166ed4d7384748 | 15,411 | py | Python | Seismic_Conv1D_dec.py | dyt1990/Seis_DCEC | 6cc56a7db10dd87b0ef39ece73578fca8b23c55f | [
"MIT"
] | 1 | 2021-04-05T06:03:16.000Z | 2021-04-05T06:03:16.000Z | Seismic_Conv1D_dec.py | dyt1990/Seis_DCEC | 6cc56a7db10dd87b0ef39ece73578fca8b23c55f | [
"MIT"
] | null | null | null | Seismic_Conv1D_dec.py | dyt1990/Seis_DCEC | 6cc56a7db10dd87b0ef39ece73578fca8b23c55f | [
"MIT"
] | 2 | 2019-06-13T03:34:20.000Z | 2019-12-16T05:57:30.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 19 17:48:13 2018
@author: Sediment
"""
# -*- coding: utf-8 -*-
'''
Keras implementation of deep embedder to improve clustering, inspired by:
"Unsupervised Deep Embedding for Clustering Analysis" (Xie et al, ICML 2016)
Definition can accept somewhat custom ne... | 43.78125 | 138 | 0.594251 |