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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
972265b6659ddfb725f1785ebeaecf84eb10e0d9 | 539 | py | Python | src/infra/factories/rest_repository_factory.py | marcelinoavelar/github-monitor | e0f850d05d1eaa7561eb3c838ae3cc35047ab033 | [
"MIT"
] | null | null | null | src/infra/factories/rest_repository_factory.py | marcelinoavelar/github-monitor | e0f850d05d1eaa7561eb3c838ae3cc35047ab033 | [
"MIT"
] | 1 | 2022-03-30T20:31:18.000Z | 2022-03-30T20:31:18.000Z | src/infra/factories/rest_repository_factory.py | marcelinoavelar/github-monitor | e0f850d05d1eaa7561eb3c838ae3cc35047ab033 | [
"MIT"
] | null | null | null | from abc import ABC
from src.domanin.factories.repository_factory import RepositoryFactory
from src.infra.repositories.rest.github_data_rest_repository import GithubDataRestRepository
from src.infra.repositories.rest.schedule_rest_repository import ScheduleJsonRepository
| 31.705882 | 92 | 0.820037 |
9722ecfb3b56f8dacae652814c3513aa26b24f83 | 4,479 | py | Python | mon_school/mon_school/page_renderers.py | nikochiko/mon_school | 6aed2150e3c55f9f4f00927178bd9031dd821a1f | [
"MIT"
] | 25 | 2021-05-21T05:49:21.000Z | 2022-01-27T20:23:30.000Z | mon_school/mon_school/page_renderers.py | nikochiko/mon_school | 6aed2150e3c55f9f4f00927178bd9031dd821a1f | [
"MIT"
] | 76 | 2021-06-02T12:28:49.000Z | 2022-01-25T06:10:53.000Z | mon_school/mon_school/page_renderers.py | nikochiko/mon_school | 6aed2150e3c55f9f4f00927178bd9031dd821a1f | [
"MIT"
] | 9 | 2021-05-21T05:52:45.000Z | 2022-02-14T17:22:02.000Z | """Custom page renderers for Mon School.
The URLs that are handled here are:
/s/<sketch_id>.svg
/s/<sketch_id>-<hash>-s.png
/s/<sketch_id>-<hash>-w.png
"""
import frappe
import hashlib
import re
from pathlib import Path
import cairosvg
from frappe.website.page_renderers.base_renderer import BaseRenderer
from werkzeu... | 31.765957 | 108 | 0.628265 |
9724ae6b28a5d596edfa75e865755bf18cd23176 | 2,197 | py | Python | python/jimmy_plot/sweep_threshold.py | JimmyZhang12/predict-T | 8ae818b0791104de20633ce91e6d633cda7445b3 | [
"MIT"
] | null | null | null | python/jimmy_plot/sweep_threshold.py | JimmyZhang12/predict-T | 8ae818b0791104de20633ce91e6d633cda7445b3 | [
"MIT"
] | null | null | null | python/jimmy_plot/sweep_threshold.py | JimmyZhang12/predict-T | 8ae818b0791104de20633ce91e6d633cda7445b3 | [
"MIT"
] | null | null | null | import os
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
TEST_LIST_spec=[
# "429.mcf",
# "433.milc",
# "435.gromacs",
"436.cactusADM",
# "437.leslie3d",
"444.namd",
# "445.gobmk",
"453.povray",
# "454.calculix",
# "456.hmmer",... | 25.847059 | 70 | 0.585799 |
9725283314d96ba6b64036c233b726233e815626 | 14,595 | py | Python | wagtail/wagtailsearch/tests.py | cybernetics/wagtail | d8c0a0ef9b7c33fa23d0653e892ee3813df5f8ec | [
"BSD-3-Clause"
] | 1 | 2019-04-22T08:49:30.000Z | 2019-04-22T08:49:30.000Z | wagtail/wagtailsearch/tests.py | cybernetics/wagtail | d8c0a0ef9b7c33fa23d0653e892ee3813df5f8ec | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailsearch/tests.py | cybernetics/wagtail | d8c0a0ef9b7c33fa23d0653e892ee3813df5f8ec | [
"BSD-3-Clause"
] | null | null | null | from django.test import TestCase
from django.test.client import Client
from django.utils import timezone
from django.core import management
from django.conf import settings
import datetime
import unittest
from StringIO import StringIO
from wagtail.wagtailcore import models as core_models
from wagtail.wagtailsearch im... | 36.949367 | 138 | 0.64988 |
97259a9d60629bce1e1f73ec097e449859182a4a | 2,276 | py | Python | utils/cpu_affinity.py | jie311/RangeDet | 5078ce339c6d27a009aed1ca2790911ce4d10bc7 | [
"Apache-2.0"
] | 125 | 2021-08-09T02:14:04.000Z | 2022-03-30T03:41:56.000Z | utils/cpu_affinity.py | jie311/RangeDet | 5078ce339c6d27a009aed1ca2790911ce4d10bc7 | [
"Apache-2.0"
] | 15 | 2021-08-31T06:12:31.000Z | 2022-03-17T00:21:35.000Z | utils/cpu_affinity.py | jie311/RangeDet | 5078ce339c6d27a009aed1ca2790911ce4d10bc7 | [
"Apache-2.0"
] | 8 | 2021-08-10T03:08:10.000Z | 2022-03-09T06:21:11.000Z | import psutil
import os
import subprocess
import logging
| 37.933333 | 114 | 0.678822 |
972701eb65980439fca6d09d7892fab1fed10448 | 1,813 | py | Python | weather.py | shuiyouren/weather-python | c50920e13c55cde1f61a5c03e7e99c1e7f65206b | [
"MIT"
] | 1 | 2022-03-28T05:48:06.000Z | 2022-03-28T05:48:06.000Z | weather.py | shuiyouren/weather-python | c50920e13c55cde1f61a5c03e7e99c1e7f65206b | [
"MIT"
] | null | null | null | weather.py | shuiyouren/weather-python | c50920e13c55cde1f61a5c03e7e99c1e7f65206b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import requests
import sys
import os
# curent_dir = os.path.dirname(__file__)
# print(curent_dir)
# sys.path.append(curent_dir)
from bs4 import BeautifulSoup
from .weather_id import mylist
if __name__ == '__main__':
get_weather_info('')
print(get_weather_list_str())
| 25.535211 | 90 | 0.614451 |
9727aea51951825f95cd32a12a90d32926789c59 | 658 | py | Python | ec2/types.py | dcramer/ec2 | 071eeedf08a745c7c23f3005cae548d10cd70cca | [
"BSD-2-Clause"
] | 2 | 2015-11-06T10:45:56.000Z | 2016-03-28T00:25:07.000Z | ec2/types.py | dcramer/ec2 | 071eeedf08a745c7c23f3005cae548d10cd70cca | [
"BSD-2-Clause"
] | null | null | null | ec2/types.py | dcramer/ec2 | 071eeedf08a745c7c23f3005cae548d10cd70cca | [
"BSD-2-Clause"
] | null | null | null | """
ec2.types
~~~~~~~~~
:copyright: (c) 2012 by Matt Robenolt.
:license: BSD, see LICENSE for more details.
"""
from ec2.connection import get_connection
from ec2.base import objects_base
| 22.689655 | 85 | 0.700608 |
9727e5083b9c6fda2a8ba98b81b03990d001d425 | 987 | py | Python | code/permuted_matrices/sol_559.py | bhavinjawade/project-euler-solutions | 56bf6a282730ed4b9b875fa081cf4509d9939d98 | [
"Apache-2.0"
] | 2 | 2020-07-16T08:16:32.000Z | 2020-10-01T07:16:48.000Z | code/permuted_matrices/sol_559.py | Psingh12354/project-euler-solutions | 56bf6a282730ed4b9b875fa081cf4509d9939d98 | [
"Apache-2.0"
] | null | null | null | code/permuted_matrices/sol_559.py | Psingh12354/project-euler-solutions | 56bf6a282730ed4b9b875fa081cf4509d9939d98 | [
"Apache-2.0"
] | 1 | 2021-05-07T18:06:08.000Z | 2021-05-07T18:06:08.000Z |
# -*- coding: utf-8 -*-
'''
File name: code\permuted_matrices\sol_559.py
Author: Vaidic Joshi
Date created: Oct 20, 2018
Python Version: 3.x
'''
# Solution to Project Euler Problem #559 :: Permuted Matrices
#
# For more information see:
# https://projecteuler.net/problem=559
# Problem Statement
'''... | 26.675676 | 120 | 0.668693 |
972814d7efd10a88359d92bf39156c062b569b1e | 124 | py | Python | src/tissue_purifier/data/__init__.py | broadinstitute/tissue_purifier | 989ce9d58bba99a3f1c49743eed22dcc64e5f159 | [
"Apache-2.0"
] | null | null | null | src/tissue_purifier/data/__init__.py | broadinstitute/tissue_purifier | 989ce9d58bba99a3f1c49743eed22dcc64e5f159 | [
"Apache-2.0"
] | null | null | null | src/tissue_purifier/data/__init__.py | broadinstitute/tissue_purifier | 989ce9d58bba99a3f1c49743eed22dcc64e5f159 | [
"Apache-2.0"
] | null | null | null | from .datamodule import AnndataFolderDM
from .sparse_image import SparseImage
__all__ = ["AnndataFolderDM", "SparseImage"]
| 24.8 | 44 | 0.814516 |
9728a7f60627eb144fdd226ccd9b8be7db14bd8e | 207 | py | Python | 02 - Curso Em Video/Aula 14/E - 064.py | GabrielTrentino/Python_Basico | f13f6448c275c14896337d2018b04cbf5a54efd3 | [
"MIT"
] | null | null | null | 02 - Curso Em Video/Aula 14/E - 064.py | GabrielTrentino/Python_Basico | f13f6448c275c14896337d2018b04cbf5a54efd3 | [
"MIT"
] | null | null | null | 02 - Curso Em Video/Aula 14/E - 064.py | GabrielTrentino/Python_Basico | f13f6448c275c14896337d2018b04cbf5a54efd3 | [
"MIT"
] | null | null | null | soma = 0
valor = 0
cont = -1
while valor != 999:
soma += valor
cont += 1
valor = int(input('Digite o valor: [999 para parar] '))
print('A soma de {} termos igual a {}'.format(cont,soma)) | 25.875 | 60 | 0.574879 |
97295e18ef9dd81248d718e213f59c7d86bec58a | 6,964 | py | Python | nussl/evaluation/bss_eval_base.py | KingStorm/nussl | 78edfdaad16845fc705cefb336a7e6e5923fbcd4 | [
"MIT"
] | null | null | null | nussl/evaluation/bss_eval_base.py | KingStorm/nussl | 78edfdaad16845fc705cefb336a7e6e5923fbcd4 | [
"MIT"
] | null | null | null | nussl/evaluation/bss_eval_base.py | KingStorm/nussl | 78edfdaad16845fc705cefb336a7e6e5923fbcd4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Base class for both BSS Eval algorithms (:ref:`BSSEvalSources` and :ref:`BSSEvalImages`). Contains
most of the logic for these base classes.
"""
import numpy as np
from nussl.evaluation import evaluation_base
def _preprocess_sources(self):
"""
... | 42.206061 | 100 | 0.657955 |
972a091cb136b36f319d84e21f988854a8d3b4d5 | 17,691 | py | Python | utils/dataset.py | sherwinbahmani/ynet_adaptive | 1b70dae27ae88418088aeb7b786b55ab22d36bcb | [
"MIT"
] | 4 | 2022-02-01T13:57:46.000Z | 2022-02-01T14:19:54.000Z | utils/dataset.py | sherwinbahmani/ynet_adaptive | 1b70dae27ae88418088aeb7b786b55ab22d36bcb | [
"MIT"
] | null | null | null | utils/dataset.py | sherwinbahmani/ynet_adaptive | 1b70dae27ae88418088aeb7b786b55ab22d36bcb | [
"MIT"
] | 1 | 2022-03-19T08:36:29.000Z | 2022-03-19T08:36:29.000Z | import numpy as np
import torch
import random
import pandas as pd
import os
import cv2
import argparse
import math
import matplotlib.pyplot as plt
import pathlib
def mask_step(x, step):
"""
Create a mask to only contain the step-th element starting from the first element. Used to downsample
"""
mask = np.zeros_lik... | 37.963519 | 140 | 0.703748 |
972ab274be212a9eb774533eb844790b600b9051 | 9,677 | py | Python | tests/unit/test_template_helpers_swift.py | RerrerBuub/asciidoxy | 3402f37d59e30975e9919653465839e396f05513 | [
"Apache-2.0"
] | 14 | 2020-04-28T08:51:43.000Z | 2022-02-12T13:40:34.000Z | tests/unit/test_template_helpers_swift.py | RerrerBuub/asciidoxy | 3402f37d59e30975e9919653465839e396f05513 | [
"Apache-2.0"
] | 47 | 2020-05-18T14:19:31.000Z | 2022-03-04T13:46:46.000Z | tests/unit/test_template_helpers_swift.py | RerrerBuub/asciidoxy | 3402f37d59e30975e9919653465839e396f05513 | [
"Apache-2.0"
] | 8 | 2020-05-17T20:52:42.000Z | 2022-02-25T16:16:01.000Z | # Copyright (C) 2019-2021, TomTom (http://tomtom.com).
#
# 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 o... | 35.317518 | 100 | 0.682133 |
972cb511c9c5f56f2bd7197d4176ab7ff15fc5f5 | 1,012 | py | Python | lib/oci_utils/migrate/exception.py | totalamateurhour/oci-utils | b3e8348f66f8a26453fab0f3b616b3c1585468a7 | [
"UPL-1.0"
] | 35 | 2019-04-21T00:58:30.000Z | 2022-01-28T15:22:41.000Z | lib/oci_utils/migrate/exception.py | totalamateurhour/oci-utils | b3e8348f66f8a26453fab0f3b616b3c1585468a7 | [
"UPL-1.0"
] | 43 | 2019-05-19T20:13:41.000Z | 2022-03-31T17:39:25.000Z | lib/oci_utils/migrate/exception.py | totalamateurhour/oci-utils | b3e8348f66f8a26453fab0f3b616b3c1585468a7 | [
"UPL-1.0"
] | 23 | 2019-04-10T12:48:00.000Z | 2022-03-25T16:57:47.000Z | # oci-utils
#
# Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown
# at http://oss.oracle.com/licenses/upl.
""" Module with oci migrate related exceptions.
"""
| 24.682927 | 77 | 0.603755 |
972cc3da44f5ed2e6e2c8871a62b889010d3b6ae | 4,335 | py | Python | tests/scale_test.py | StackStorm/search | 2b4bc04bea4f0aecc79abaad917d14a938c613b6 | [
"Apache-2.0"
] | null | null | null | tests/scale_test.py | StackStorm/search | 2b4bc04bea4f0aecc79abaad917d14a938c613b6 | [
"Apache-2.0"
] | null | null | null | tests/scale_test.py | StackStorm/search | 2b4bc04bea4f0aecc79abaad917d14a938c613b6 | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentParser
from mock import MagicMock
from multiprocessing import Process
from search.datasource.session import DBInfo
from search.worker.computenode import ComputeNodeHandler
from search.worker.instance import InstanceHandler
from tests import scale_gen
from tests import faker
import subproces... | 40.138889 | 148 | 0.70842 |
972cf11e62c52b95bfc7358bbbf204c60564240c | 7,719 | py | Python | model/monte_carlo_evaluation.py | LIAMF-USP/deep_active_learning | 97fa1af0c8ccb05d1b9568fa0d7698b931396cdd | [
"MIT"
] | 1 | 2018-07-10T09:07:59.000Z | 2018-07-10T09:07:59.000Z | model/monte_carlo_evaluation.py | LIAMF-USP/deep_active_learning | 97fa1af0c8ccb05d1b9568fa0d7698b931396cdd | [
"MIT"
] | null | null | null | model/monte_carlo_evaluation.py | LIAMF-USP/deep_active_learning | 97fa1af0c8ccb05d1b9568fa0d7698b931396cdd | [
"MIT"
] | null | null | null | import numpy as np
from utils.metrics import variation_ratio, entropy, bald
from utils.progress_bar import Progbar
| 31.251012 | 89 | 0.663557 |
9730afa3f9d2ae6bd7a756766d74350562eae562 | 1,649 | py | Python | app/Tools/auth.py | andrerclaudio/agnes | 7335ff23c09e8e442fa596bad0033e660eec976f | [
"MIT"
] | null | null | null | app/Tools/auth.py | andrerclaudio/agnes | 7335ff23c09e8e442fa596bad0033e660eec976f | [
"MIT"
] | null | null | null | app/Tools/auth.py | andrerclaudio/agnes | 7335ff23c09e8e442fa596bad0033e660eec976f | [
"MIT"
] | null | null | null | # Build-in modules
import configparser
import logging
import os
from functools import wraps
# from cryptography.fernet import Fernet
# from werkzeug.security import generate_password_hash, check_password_hash
from flask import jsonify, request
| 29.981818 | 75 | 0.550637 |
97318d8f2a2f397ee04987ffaea28052e048249c | 7,410 | py | Python | python/create_MD_watchlists.py | mikehankey/mikehankey | 87cae99a4390f635c17ba1ccc8e393153803dca7 | [
"MIT"
] | null | null | null | python/create_MD_watchlists.py | mikehankey/mikehankey | 87cae99a4390f635c17ba1ccc8e393153803dca7 | [
"MIT"
] | 5 | 2020-07-17T10:25:58.000Z | 2020-07-17T10:26:10.000Z | python/create_MD_watchlists.py | mikehankey/mikehankey | 87cae99a4390f635c17ba1ccc8e393153803dca7 | [
"MIT"
] | null | null | null | import glob
import os, sys
import numpy as np
import random
from create_json_data_files import *
from update_data_src import *
from create_main_gbu_page import *
from create_state_gbu_pages import *
from create_MD_zip_graphs import rank_zips
from operator import itemgetter
# Return the 7day avg cases for the give... | 33.080357 | 351 | 0.651417 |
9732596ad8a04e96d24e94312e89bd97e55b9cd1 | 329 | py | Python | precompute/pfam_splitter.py | MetAnnotate/MetAnnotate | d8a68b3a135d7186f1f98fda43fcb8fac929c8a3 | [
"Apache-2.0"
] | 2 | 2021-03-26T11:31:12.000Z | 2021-05-21T01:57:07.000Z | precompute/pfam_splitter.py | Metannotate/Metannotate | d8a68b3a135d7186f1f98fda43fcb8fac929c8a3 | [
"Apache-2.0"
] | 34 | 2017-08-14T17:48:43.000Z | 2018-04-07T02:38:38.000Z | precompute/pfam_splitter.py | MetAnnotate/MetAnnotate | d8a68b3a135d7186f1f98fda43fcb8fac929c8a3 | [
"Apache-2.0"
] | 2 | 2017-08-14T19:10:08.000Z | 2017-08-14T19:23:05.000Z | import os
for hmm in hmms():
name = hmm[2].split()[1].split('.')[0]
with open(os.path.join('../data/hmms', '%s.HMM' % name), 'w') as f:
f.writelines(hmm)
| 20.5625 | 69 | 0.516717 |
97332bf11aefd1986b61c2ed82f450e939999660 | 6,214 | py | Python | day_07/main.py | L0ntra/Advent_of_code_2015 | 2cb1003fd07ba5443cd1ff1325c93d9bf427d2ba | [
"MIT"
] | null | null | null | day_07/main.py | L0ntra/Advent_of_code_2015 | 2cb1003fd07ba5443cd1ff1325c93d9bf427d2ba | [
"MIT"
] | null | null | null | day_07/main.py | L0ntra/Advent_of_code_2015 | 2cb1003fd07ba5443cd1ff1325c93d9bf427d2ba | [
"MIT"
] | null | null | null | import random, time, __main__, sys
#sys.stdout = open('file.txt', 'w')
#OPERATION TYPES
#OPERATIONS
def piece(line):
func = name = a = b = None
space = length = len(line)
for i in range(length):
if line[i] == ' ' or line[i] == '\n':
space = i
break
a = line[0:space]
return a, line[sp... | 21.651568 | 88 | 0.568555 |
97341470dd3d8cd33543d65c2612a77c4cfeb6dc | 1,363 | py | Python | scorers.py | victor7246/gated-Transformer | d2b9f4a96129ebc13f681aef97a574fbe669d0f9 | [
"MIT"
] | 2 | 2021-11-09T13:04:12.000Z | 2022-01-09T11:19:54.000Z | scorers.py | victor7246/gated-Transformer | d2b9f4a96129ebc13f681aef97a574fbe669d0f9 | [
"MIT"
] | null | null | null | scorers.py | victor7246/gated-Transformer | d2b9f4a96129ebc13f681aef97a574fbe669d0f9 | [
"MIT"
] | 2 | 2021-09-29T04:54:06.000Z | 2021-11-12T17:19:59.000Z | import numpy as np
import nltk.translate.bleu_score as bleu | 27.26 | 77 | 0.480558 |
973521c401b34701c453dfa3d0095c15f87e5d02 | 32 | py | Python | rust/origen/cli/src/commands/new/templates/py_app/targets/tester/smt7.py | Origen-SDK/o2 | 5b0f9a6d113ddebc73c7ee224931e8b2d0301794 | [
"MIT"
] | null | null | null | rust/origen/cli/src/commands/new/templates/py_app/targets/tester/smt7.py | Origen-SDK/o2 | 5b0f9a6d113ddebc73c7ee224931e8b2d0301794 | [
"MIT"
] | 127 | 2019-11-23T17:09:35.000Z | 2021-09-02T11:06:20.000Z | rust/origen/cli/src/commands/new/templates/py_app/targets/tester/smt7.py | Origen-SDK/o2 | 5b0f9a6d113ddebc73c7ee224931e8b2d0301794 | [
"MIT"
] | null | null | null | origen.tester.target("V93KSMT7") | 32 | 32 | 0.8125 |
9735554e4c7ab506fa493c02058b45cfc01e4f6a | 1,322 | py | Python | Apps/serializers.py | gordiig/Un_RSOI_Curs_Auth | 743a423131730b0e7a025fcae5564a1d932fa92d | [
"MIT"
] | null | null | null | Apps/serializers.py | gordiig/Un_RSOI_Curs_Auth | 743a423131730b0e7a025fcae5564a1d932fa92d | [
"MIT"
] | 2 | 2021-03-19T00:42:05.000Z | 2021-03-30T12:57:46.000Z | Apps/serializers.py | gordiig/Un_RSOI_Curs_Auth | 743a423131730b0e7a025fcae5564a1d932fa92d | [
"MIT"
] | null | null | null | from rest_framework import serializers
from rest_framework.validators import UniqueValidator
from Apps.models import App
| 30.744186 | 103 | 0.655825 |
973666badc8dea50ee1c0e345fe8783eacf8c47e | 2,035 | py | Python | pca.py | xuhuasheng/pca | e6cbe7104bdfda266b365f4f215e81a00427e7ac | [
"Apache-2.0"
] | null | null | null | pca.py | xuhuasheng/pca | e6cbe7104bdfda266b365f4f215e81a00427e7ac | [
"Apache-2.0"
] | 1 | 2019-12-26T08:43:57.000Z | 2019-12-27T06:35:22.000Z | pca.py | xuhuasheng/pca | e6cbe7104bdfda266b365f4f215e81a00427e7ac | [
"Apache-2.0"
] | null | null | null | # =========================================================
# @purpose: principal components analysis
# @date 2019/12
# @version: v1.0
# @author Xu Huasheng
# @github https://github.com/xuhuasheng/pca
# =========================================================
from sklearn.externals import joblib
import numpy as n... | 37 | 100 | 0.627027 |
973951147c0e23fe3d93feba882d652bfe464e61 | 1,606 | py | Python | {{cookiecutter.repo_name}}/dags/initialize_airflow.py | condemane/cookiecutter-airflow-ha | b03f9b6995578f57bcfcb5697ad959a9b465e16a | [
"BSD-3-Clause"
] | 3 | 2020-03-07T14:18:03.000Z | 2021-09-18T00:00:36.000Z | {{cookiecutter.repo_name}}/dags/initialize_airflow.py | condemane/cookiecutter-airflow-ha | b03f9b6995578f57bcfcb5697ad959a9b465e16a | [
"BSD-3-Clause"
] | 1 | 2021-06-02T01:12:43.000Z | 2021-06-02T01:12:43.000Z | {{cookiecutter.repo_name}}/dags/initialize_airflow.py | condemane/cookiecutter-airflow-ha | b03f9b6995578f57bcfcb5697ad959a9b465e16a | [
"BSD-3-Clause"
] | 1 | 2021-09-18T00:01:22.000Z | 2021-09-18T00:01:22.000Z | import os
import logging
from airflow import DAG
from datetime import datetime, timedelta
from airflow.operators.python_operator import PythonOperator
from airflow import settings
from airflow.models import Connection
from airflow.api.common.experimental.pool import create_pool
log = logging.getLogger(__name__)
defau... | 26.766667 | 88 | 0.725405 |
973c4af4e88a9e12ad6cd5b192cb4c4c43aa2151 | 1,075 | py | Python | main.py | mugeshk97/pong-dcqn | 034e23c36ab36cad34247ebb598897f42f8e34dd | [
"MIT"
] | null | null | null | main.py | mugeshk97/pong-dcqn | 034e23c36ab36cad34247ebb598897f42f8e34dd | [
"MIT"
] | null | null | null | main.py | mugeshk97/pong-dcqn | 034e23c36ab36cad34247ebb598897f42f8e34dd | [
"MIT"
] | null | null | null | from agent import Agent
from wrappers import make_env
import numpy as np
from tqdm import tqdm
env = make_env('PongNoFrameskip-v4')
num_games = 100
best_score = -21
load_checkpoint = True
agent = agent = Agent(n_actions = env.action_space.n, input_shape= env.observation_space.shape , gamma= 0.99)
if load_checkpoint:
... | 25 | 122 | 0.722791 |
973ca0077e8ad661eceffc90e66a7acccb9231a2 | 1,587 | py | Python | examples/glyphs/dateaxis.py | minrk/bokeh | ae4366e508355afc06b5fc62f1ee399635ab909d | [
"BSD-3-Clause"
] | null | null | null | examples/glyphs/dateaxis.py | minrk/bokeh | ae4366e508355afc06b5fc62f1ee399635ab909d | [
"BSD-3-Clause"
] | null | null | null | examples/glyphs/dateaxis.py | minrk/bokeh | ae4366e508355afc06b5fc62f1ee399635ab909d | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
from numpy import pi, arange, sin, cos
import numpy as np
import os.path
import time
from bokeh.objects import (Plot, DataRange1d, LinearAxis, DatetimeAxis,
ColumnDataSource, Glyph, PanTool, WheelZoomTool)
from bokeh.glyphs import Circle
from bokeh import session
x = ara... | 28.339286 | 84 | 0.720857 |
973cc92d02ecaec218f328cfa03f67962ce46109 | 857 | py | Python | smart_match/monge_elkan.py | wujinglin226/smart-match | aa84f9e4dda89aadc23f439f33d20269e2674b0a | [
"MIT"
] | 1 | 2020-09-28T13:14:31.000Z | 2020-09-28T13:14:31.000Z | smart_match/monge_elkan.py | yuqiangfeng96/smart-match | 86a485b569c31d081b3f165aac9532f595d3deec | [
"MIT"
] | null | null | null | smart_match/monge_elkan.py | yuqiangfeng96/smart-match | 86a485b569c31d081b3f165aac9532f595d3deec | [
"MIT"
] | null | null | null | import smart_match
from math import sqrt | 24.485714 | 72 | 0.514586 |
973cdba957510167f925e1039faa6a64210d0ffa | 1,212 | py | Python | fluent_contents/plugins/gist/migrations/0001_initial.py | vinnyrose/django-fluent-contents | 7fa1a58a97099d8e2898a2016bf8abe2ea651b02 | [
"Apache-2.0"
] | null | null | null | fluent_contents/plugins/gist/migrations/0001_initial.py | vinnyrose/django-fluent-contents | 7fa1a58a97099d8e2898a2016bf8abe2ea651b02 | [
"Apache-2.0"
] | null | null | null | fluent_contents/plugins/gist/migrations/0001_initial.py | vinnyrose/django-fluent-contents | 7fa1a58a97099d8e2898a2016bf8abe2ea651b02 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
| 41.793103 | 250 | 0.624587 |
973e101fcd8e3ba58780e952e0f8780c190977f7 | 775 | py | Python | tests/test_mask_rect_in_mask.py | octaviomtz/Growing-Neural-Cellular-Automata | a6f91661e35f7bd0d7b90ac4347f4d56c9351d0b | [
"MIT"
] | null | null | null | tests/test_mask_rect_in_mask.py | octaviomtz/Growing-Neural-Cellular-Automata | a6f91661e35f7bd0d7b90ac4347f4d56c9351d0b | [
"MIT"
] | null | null | null | tests/test_mask_rect_in_mask.py | octaviomtz/Growing-Neural-Cellular-Automata | a6f91661e35f7bd0d7b90ac4347f4d56c9351d0b | [
"MIT"
] | null | null | null | import numpy as np
from skimage.measure import label
from lib.utils_lung_segmentation import get_max_rect_in_mask
def getLargestCC(segmentation):
'''find largest connected component
return: binary mask of the largest connected component'''
labels = label(segmentation)
assert(labels.max() != 0 ) # a... | 38.75 | 77 | 0.748387 |
973f92f26102c597df6a741cf04806779ca26948 | 956 | py | Python | scripts/scrape.py | sobostion/IG-reverse | acb914253e35bb5588b15d9ac169dcbd13833971 | [
"MIT"
] | null | null | null | scripts/scrape.py | sobostion/IG-reverse | acb914253e35bb5588b15d9ac169dcbd13833971 | [
"MIT"
] | null | null | null | scripts/scrape.py | sobostion/IG-reverse | acb914253e35bb5588b15d9ac169dcbd13833971 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# usage: python search.py <IG username>
import sys
import requests
from bs4 import BeautifulSoup
import urllib2
import re
import json
test_link = "https://www.google.com/searchbyimage?&image_url=https://scontent-iad3-1.cdninstagram.com/vp/63d07260370df51f9160551f3e800185/5AF88680/t51.2885-15/e35/2... | 43.454545 | 453 | 0.873431 |
9740ef02be0590c885c3db6611817beb7ad0a2c0 | 3,906 | py | Python | src/features/build_features.py | Rosevear/MLTemplate | e0526d9acb5d5c5ba6ed67bf5a3cf2c1c06023d3 | [
"FTL"
] | null | null | null | src/features/build_features.py | Rosevear/MLTemplate | e0526d9acb5d5c5ba6ed67bf5a3cf2c1c06023d3 | [
"FTL"
] | null | null | null | src/features/build_features.py | Rosevear/MLTemplate | e0526d9acb5d5c5ba6ed67bf5a3cf2c1c06023d3 | [
"FTL"
] | null | null | null | import config
import utils
import logging
import pandas as pd
def construct_features_BTU(data):
"""
Processes the provided pandas dataframe object by:
Parsing the dates into separate columns (month and day) and deleting the original READ_DTM and METER_ID columns
"""
try:
data['DAY'] =... | 35.189189 | 140 | 0.683308 |
97414208a7ec6b35dd2e684d791f313c61131e74 | 3,240 | py | Python | planbee/tracking/planbee_models/bee_tracking_object.py | Plan-Bee/planbee_yolov5 | 9f77823284a8df3f3bc975552c00593b7079e7ef | [
"MIT"
] | null | null | null | planbee/tracking/planbee_models/bee_tracking_object.py | Plan-Bee/planbee_yolov5 | 9f77823284a8df3f3bc975552c00593b7079e7ef | [
"MIT"
] | null | null | null | planbee/tracking/planbee_models/bee_tracking_object.py | Plan-Bee/planbee_yolov5 | 9f77823284a8df3f3bc975552c00593b7079e7ef | [
"MIT"
] | null | null | null | import math
from .hive_position import HivePosition
from .bee_movement import BeeMovement
| 33.402062 | 94 | 0.756481 |
9742325fc6596f6a1c089f4cbeb1c756bd91db93 | 232 | py | Python | utils/common.py | OptimusPrimus/dcase2019_task1b | 321e10affd47ccecc9dd4d2d327e466481f457c9 | [
"MIT"
] | 8 | 2019-06-30T10:05:33.000Z | 2022-01-09T20:40:05.000Z | utils/common.py | OptimusPrimus/dcase2019_task1b | 321e10affd47ccecc9dd4d2d327e466481f457c9 | [
"MIT"
] | null | null | null | utils/common.py | OptimusPrimus/dcase2019_task1b | 321e10affd47ccecc9dd4d2d327e466481f457c9 | [
"MIT"
] | 3 | 2019-11-06T19:06:53.000Z | 2020-06-09T16:01:50.000Z | import importlib
| 25.777778 | 85 | 0.685345 |
9742e9d63f5329ee657a039a5fd1bd1e6a2f3b7f | 27,643 | py | Python | tf3d/losses/box_prediction_losses.py | muell-monster/google-research | 04d2024f4723bc4be3d639a668c19fb1f6a31478 | [
"Apache-2.0"
] | 2 | 2021-01-06T04:28:23.000Z | 2021-02-24T13:46:04.000Z | tf3d/losses/box_prediction_losses.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 7 | 2021-11-10T19:44:38.000Z | 2022-02-10T06:48:39.000Z | tf3d/losses/box_prediction_losses.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 4 | 2021-02-08T10:25:45.000Z | 2021-04-17T14:46:26.000Z | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# 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 applicab... | 42.658951 | 80 | 0.709908 |
97463ce31028569c4e360e76832abc2a9f99d118 | 3,957 | py | Python | tests/test_parser.py | MacarielAerial/networkx-query | 07d9d4a5ff1f2db55a62a490458c5461dad057bb | [
"MIT"
] | 8 | 2020-05-02T00:14:19.000Z | 2021-11-16T19:27:37.000Z | tests/test_parser.py | MacarielAerial/networkx-query | 07d9d4a5ff1f2db55a62a490458c5461dad057bb | [
"MIT"
] | null | null | null | tests/test_parser.py | MacarielAerial/networkx-query | 07d9d4a5ff1f2db55a62a490458c5461dad057bb | [
"MIT"
] | 1 | 2021-03-31T08:30:13.000Z | 2021-03-31T08:30:13.000Z | import pytest
from networkx_query import ParserException
from networkx_query.parser import compile_ast, explain, parse
node_0 = {'application': 'test'}
node_1 = {'application': 'test', 'weight': 3, 'group': 'my-group'}
node_2 = {'_link': {'provider': "aws", 'resource_type': "test", 'other': {'weight': 2}}}
... | 30.674419 | 119 | 0.62699 |
9748343c503064d72e90da2b87d1b59c31fe37c2 | 31 | py | Python | rosetta/__init__.py | UnitedLexCorp/rosetta | 7acde4547b8a3b88c8f1e62bfcbb2aed870b104c | [
"BSD-3-Clause"
] | 132 | 2015-01-15T22:06:19.000Z | 2021-11-25T08:31:46.000Z | rosetta/__init__.py | UnitedLexCorp/rosetta | 7acde4547b8a3b88c8f1e62bfcbb2aed870b104c | [
"BSD-3-Clause"
] | 16 | 2015-01-02T21:51:02.000Z | 2017-11-15T21:28:51.000Z | rosetta/__init__.py | UnitedLexCorp/rosetta | 7acde4547b8a3b88c8f1e62bfcbb2aed870b104c | [
"BSD-3-Clause"
] | 36 | 2015-01-01T17:54:21.000Z | 2021-02-23T12:11:48.000Z | from rosetta.text.api import *
| 15.5 | 30 | 0.774194 |
9748ebd3c81e9508be7de2eff6f2fc9edd532fd6 | 462 | py | Python | src/apps/spam/views/__init__.py | SlonSky/django-grasped | 97ea2f6d2e10232fc084a6407fa089df2cdf086e | [
"MIT"
] | null | null | null | src/apps/spam/views/__init__.py | SlonSky/django-grasped | 97ea2f6d2e10232fc084a6407fa089df2cdf086e | [
"MIT"
] | null | null | null | src/apps/spam/views/__init__.py | SlonSky/django-grasped | 97ea2f6d2e10232fc084a6407fa089df2cdf086e | [
"MIT"
] | null | null | null | """
This package represents Presentation layer.
Put your views for different API.
Your views should use services from Application layer,
without implementing logic and only preparing given
data from request for services and formatting it for
response.
All of sub-packages should use the same services
interfaces, diffe... | 28.875 | 54 | 0.816017 |
9749832101e4d816c3eeffcb7de0aedde32638fd | 1,166 | py | Python | _MOM/_Meta/__init__.py | Tapyr/tapyr | 4235fba6dce169fe747cce4d17d88dcf4a3f9f1d | [
"BSD-3-Clause"
] | 6 | 2016-12-10T17:51:10.000Z | 2021-10-11T07:51:48.000Z | _MOM/_Meta/__init__.py | Tapyr/tapyr | 4235fba6dce169fe747cce4d17d88dcf4a3f9f1d | [
"BSD-3-Clause"
] | null | null | null | _MOM/_Meta/__init__.py | Tapyr/tapyr | 4235fba6dce169fe747cce4d17d88dcf4a3f9f1d | [
"BSD-3-Clause"
] | 3 | 2020-03-29T07:37:03.000Z | 2021-01-21T16:08:40.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2009-2010 Mag. Christian Tanzer. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# ****************************************************************************
# This package is part of the package _MOM.
#
# This module is licensed under the term... | 27.116279 | 78 | 0.598628 |
974acb5d575446af22d63e1e958e244ebb126a98 | 1,245 | py | Python | setup.py | danielisbad2/chickennuggets | 5100be12ac9e12869460a3b0834e6fabb4b4b5ce | [
"MIT"
] | null | null | null | setup.py | danielisbad2/chickennuggets | 5100be12ac9e12869460a3b0834e6fabb4b4b5ce | [
"MIT"
] | 2 | 2020-01-02T12:30:46.000Z | 2020-01-06T16:07:11.000Z | setup.py | danielisbad2/chickennuggets | 5100be12ac9e12869460a3b0834e6fabb4b4b5ce | [
"MIT"
] | 1 | 2022-03-01T12:08:50.000Z | 2022-03-01T12:08:50.000Z | from os import path
from setuptools import find_packages, setup
# Read long description from README.md
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as readme:
long_description = readme.read()
setup(
name="chickennuggets",
use_scm_version=True,
... | 32.763158 | 72 | 0.66506 |
974aec52de225b83c87cd67a3a19cce83f8d0d3b | 4,244 | py | Python | Knots/KnotCalc.py | nborggren/Aleph | 251dad70ddda9192630d8226c1316de3c3bc0b1b | [
"CC0-1.0"
] | null | null | null | Knots/KnotCalc.py | nborggren/Aleph | 251dad70ddda9192630d8226c1316de3c3bc0b1b | [
"CC0-1.0"
] | null | null | null | Knots/KnotCalc.py | nborggren/Aleph | 251dad70ddda9192630d8226c1316de3c3bc0b1b | [
"CC0-1.0"
] | null | null | null | from knots import *
from knot_analysis import Draw_Knot
from ROOT import TLine, TCanvas
globalvars = {} # We will store the calculator's variables here
from string import *
import re
from yappsrt import *
def parse(rule, text):
P = Calculator(CalculatorScanner(text))
return wrap_error_reporter(P, ru... | 30.314286 | 102 | 0.441093 |
974b58ff171a825a86795f5a9ea3c8758e88ed26 | 2,222 | py | Python | tableio/resources/examples/I3FlasherInfoVectConverter.py | hschwane/offline_production | e14a6493782f613b8bbe64217559765d5213dc1e | [
"MIT"
] | 1 | 2020-12-24T22:00:01.000Z | 2020-12-24T22:00:01.000Z | tableio/resources/examples/I3FlasherInfoVectConverter.py | hschwane/offline_production | e14a6493782f613b8bbe64217559765d5213dc1e | [
"MIT"
] | null | null | null | tableio/resources/examples/I3FlasherInfoVectConverter.py | hschwane/offline_production | e14a6493782f613b8bbe64217559765d5213dc1e | [
"MIT"
] | 3 | 2020-07-17T09:20:29.000Z | 2021-03-30T16:44:18.000Z | """A demonstration of a converter for a complex object written in pure Python"""
from icecube.dataclasses import I3FlasherInfo, I3FlasherInfoVect
from icecube import tableio
import numpy as n
#tableio.I3ConverterRegistry.register(I3FlasherInfoVectConverter)
| 46.291667 | 122 | 0.661566 |
974c12b8d7ffd0afde538c655865e7ffd7f1037d | 644 | py | Python | python_derived/ext/example.py | simleo/pybind11_examples | 57143961235f54a8082bc2ff150edba345e12955 | [
"MIT"
] | null | null | null | python_derived/ext/example.py | simleo/pybind11_examples | 57143961235f54a8082bc2ff150edba345e12955 | [
"MIT"
] | null | null | null | python_derived/ext/example.py | simleo/pybind11_examples | 57143961235f54a8082bc2ff150edba345e12955 | [
"MIT"
] | null | null | null | import sys
sys.path.insert(0, "build/lib.linux-x86_64-3.6")
sys.path.insert(0, "build/lib.linux-x86_64-3.8")
import pypet._ext1
daisy = pypet._ext1.Pet("Daisy")
print(daisy.getName())
print()
pu1 = pypet._ext1.PetUser()
pu1.pets = [daisy]
print(pu1.pets[0])
print()
molly = Derived("Molly")
pu2 = pypet._ext1.PetUs... | 19.515152 | 48 | 0.666149 |
974c13a3ebcb86826ca3216faddaae29b8d46993 | 245 | py | Python | archived/archive-WSPS/modify_global_att.py | XiaoxiongXie/WRF-SUEWS | 51f8d2359b394016e65121f3baab908b1ad4d89c | [
"MIT"
] | 2 | 2020-09-24T09:15:31.000Z | 2020-09-28T16:16:30.000Z | archived/archive-WSPS/modify_global_att.py | XiaoxiongXie/WRF-SUEWS | 51f8d2359b394016e65121f3baab908b1ad4d89c | [
"MIT"
] | 3 | 2020-09-24T13:46:24.000Z | 2020-10-01T09:54:17.000Z | archived/archive-WSPS/modify_global_att.py | XiaoxiongXie/WRF-SUEWS | 51f8d2359b394016e65121f3baab908b1ad4d89c | [
"MIT"
] | 2 | 2020-10-01T09:46:58.000Z | 2022-01-09T10:38:21.000Z | #!/usr/bin/env python
import netCDF4 as nc4
import os
filename = os.path.join('/Users/zhenkunli/work/2018/WRFV3/run', 'wrfinput_d01')
print 'Processing file %s...' % filename
nc = nc4.Dataset(filename, 'a')
nc.SF_SURFACE_PHYSICS = 9
nc.close()
| 24.5 | 79 | 0.726531 |
974d340c449639f9c1c602c56cd2ae84ad8b9ae8 | 17,583 | py | Python | dwave/system/composites/tiling.py | m3ller/dwave-system | 6f108de2a46259de92888027e16a6d4b64957af0 | [
"Apache-2.0"
] | null | null | null | dwave/system/composites/tiling.py | m3ller/dwave-system | 6f108de2a46259de92888027e16a6d4b64957af0 | [
"Apache-2.0"
] | null | null | null | dwave/system/composites/tiling.py | m3ller/dwave-system | 6f108de2a46259de92888027e16a6d4b64957af0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 41.764846 | 120 | 0.625092 |
975212db73ca892e962e10887a01f3b585b2c6d0 | 296 | py | Python | hw3/test.py | ZhenghaoFei/DEEPRLHW | 35d3709f657eba84b2cae31e04d97105b30089aa | [
"MIT"
] | null | null | null | hw3/test.py | ZhenghaoFei/DEEPRLHW | 35d3709f657eba84b2cae31e04d97105b30089aa | [
"MIT"
] | null | null | null | hw3/test.py | ZhenghaoFei/DEEPRLHW | 35d3709f657eba84b2cae31e04d97105b30089aa | [
"MIT"
] | null | null | null | import tensorflow as tf
m = tf.Variable([[2, 3], [1, 2], [2, 2], [4, 3]])
# m = [['a', 'b'], ['c', 'd']]
idx = tf.range(0, 32)
a = tf.range(0, 32)
act_idx = tf.stack([idx, a], axis=1)
k = act_idx
sess = tf.Session()
init = tf.global_variables_initializer()
sess.run(init)
print sess.run(k) | 17.411765 | 49 | 0.574324 |
975213243c497a9861c18a475df49413be74d053 | 3,541 | py | Python | core/management/commands/sync_events_dashboard.py | vanessa/djangogirls | e56423ceda172858147dfa7006353f23264d4c67 | [
"BSD-3-Clause"
] | 446 | 2015-01-04T20:58:26.000Z | 2022-03-30T23:08:26.000Z | core/management/commands/sync_events_dashboard.py | vanessa/djangogirls | e56423ceda172858147dfa7006353f23264d4c67 | [
"BSD-3-Clause"
] | 649 | 2015-01-09T23:42:14.000Z | 2022-03-31T17:27:19.000Z | core/management/commands/sync_events_dashboard.py | vanessa/djangogirls | e56423ceda172858147dfa7006353f23264d4c67 | [
"BSD-3-Clause"
] | 319 | 2015-01-06T20:58:42.000Z | 2022-03-30T06:29:04.000Z | import datetime
import re
import time
from collections import namedtuple
from django.conf import settings
from django.core.management.base import BaseCommand
from trello import ResourceUnavailable, TrelloClient
from core.models import Event
# Create new command
# Get data
EventTuple = namedtuple('EventTuple', 'n... | 27.449612 | 116 | 0.621011 |
9753cd55d2e43f14920b4b7a12b66dc1ad99d2c9 | 2,543 | py | Python | tools/create_glfw_wrapper.py | orlp/pyflat | 06f3afa1e905aded583910197448c28894e7a1f2 | [
"Zlib"
] | null | null | null | tools/create_glfw_wrapper.py | orlp/pyflat | 06f3afa1e905aded583910197448c28894e7a1f2 | [
"Zlib"
] | null | null | null | tools/create_glfw_wrapper.py | orlp/pyflat | 06f3afa1e905aded583910197448c28894e7a1f2 | [
"Zlib"
] | null | null | null | # this creates a wrapper using ctypes for glfw from the header
# it's not fully automatic, but it does a good deal of work
import re
with open("../glfw/include/GL/glfw3.h") as header_file:
data = header_file.read()
# normalize whitespace
data = re.sub(r"[ \t]+", " ", data)
# delete beginning
data = data[data.in... | 31.012195 | 127 | 0.594967 |
9755a5f7361488f36c4ef9b8e36d49d3c5360a26 | 3,031 | py | Python | lstm/embed_regularize.py | SimlaBurcu/newhbfp | cbafee4e68f42556b0eef098f6b5d657f73b3a8c | [
"BSD-3-Clause"
] | 12 | 2021-04-20T09:04:09.000Z | 2021-12-27T15:11:01.000Z | lstm/embed_regularize.py | SimlaBurcu/newhbfp | cbafee4e68f42556b0eef098f6b5d657f73b3a8c | [
"BSD-3-Clause"
] | null | null | null | lstm/embed_regularize.py | SimlaBurcu/newhbfp | cbafee4e68f42556b0eef098f6b5d657f73b3a8c | [
"BSD-3-Clause"
] | 5 | 2021-04-24T18:36:17.000Z | 2021-12-27T15:11:04.000Z | # Copyright (c) 2021, Parallel Systems Architecture Laboratory (PARSA), EPFL &
# Machine Learning and Optimization Laboratory (MLO), EPFL. 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. Red... | 37.8875 | 133 | 0.724513 |
9756d430d46f4b11b3f714da40aa51c06152557c | 1,256 | py | Python | new_software/setup.py | Daniangio/paper_boltzmann_generators | 5583e7c55450d7189320a0ce92f6e5df59b24ea3 | [
"CC-BY-4.0"
] | null | null | null | new_software/setup.py | Daniangio/paper_boltzmann_generators | 5583e7c55450d7189320a0ce92f6e5df59b24ea3 | [
"CC-BY-4.0"
] | null | null | null | new_software/setup.py | Daniangio/paper_boltzmann_generators | 5583e7c55450d7189320a0ce92f6e5df59b24ea3 | [
"CC-BY-4.0"
] | null | null | null | from setuptools import setup, find_packages
from pathlib import Path
# see https://packaging.python.org/guides/single-sourcing-package-version/
version_dict = {}
with open(Path(__file__).parents[0] / "boltzmanngen/_version.py") as fp:
exec(fp.read(), version_dict)
version = version_dict["__version__"]
del version_... | 35.885714 | 117 | 0.678344 |
975a70cf14d371cc569479e59bdef3f0f2142943 | 2,816 | py | Python | src/jk_mediawiki/lsfile/MediaWikiLocalSettingsArrayAppend.py | jkpubsrc/python-module-jk-mediawiki | 5d76a060f0ed46c072d44e8084f6fa40d16e6069 | [
"Apache-1.1"
] | null | null | null | src/jk_mediawiki/lsfile/MediaWikiLocalSettingsArrayAppend.py | jkpubsrc/python-module-jk-mediawiki | 5d76a060f0ed46c072d44e8084f6fa40d16e6069 | [
"Apache-1.1"
] | null | null | null | src/jk_mediawiki/lsfile/MediaWikiLocalSettingsArrayAppend.py | jkpubsrc/python-module-jk-mediawiki | 5d76a060f0ed46c072d44e8084f6fa40d16e6069 | [
"Apache-1.1"
] | null | null | null |
import os
from jk_utils import *
from jk_utils.tokenizer import *
from ..impl.lang_support_php import *
#
def toPHP(self):
ret = "" if self.__bIsActive else "#=# "
ret += "$" + self.__varName
ret += "[] = "
ret += self.__value.toPHP()
ret += ";"
return ret
#
#
#
#
#
# ==================... | 20.554745 | 131 | 0.570668 |
975deaee839277e8f53a7a7e3bc55d65ca55be9c | 1,449 | py | Python | src/reference_book/migrations/0001_initial.py | zmiterpimenau/PiLib | 301b51c5402f86da801d437ea943d10ea01c8fc1 | [
"Apache-2.0"
] | null | null | null | src/reference_book/migrations/0001_initial.py | zmiterpimenau/PiLib | 301b51c5402f86da801d437ea943d10ea01c8fc1 | [
"Apache-2.0"
] | null | null | null | src/reference_book/migrations/0001_initial.py | zmiterpimenau/PiLib | 301b51c5402f86da801d437ea943d10ea01c8fc1 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-20 22:00
from django.db import migrations, models
| 33.697674 | 114 | 0.559006 |
975efdfaab5c5e48a5f4e89aadc64f61880753bd | 6,521 | py | Python | modeling/offsets_civ.py | aibhleog/simply-spectra | 36534061dfba2bf9214c5334dc94e6b2998c7bcc | [
"MIT"
] | null | null | null | modeling/offsets_civ.py | aibhleog/simply-spectra | 36534061dfba2bf9214c5334dc94e6b2998c7bcc | [
"MIT"
] | null | null | null | modeling/offsets_civ.py | aibhleog/simply-spectra | 36534061dfba2bf9214c5334dc94e6b2998c7bcc | [
"MIT"
] | null | null | null | '''
Investigating the offset of CIV emission in the Cloudy models
as a function of ionization, nebular metallicity, stellar metallicity,
stellar population type, age, etc.
'''
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from scipy.optimize import curve_... | 39.283133 | 110 | 0.545315 |
975f0cc1f8bcd0da4c95c9e2a2b4e1bce0d5467d | 8,696 | py | Python | scripts/libopen3d.py | mepix/GPUaccelOpen3D | 3731f81e4b25adab77d580b9404501e27af304bb | [
"MIT"
] | null | null | null | scripts/libopen3d.py | mepix/GPUaccelOpen3D | 3731f81e4b25adab77d580b9404501e27af304bb | [
"MIT"
] | null | null | null | scripts/libopen3d.py | mepix/GPUaccelOpen3D | 3731f81e4b25adab77d580b9404501e27af304bb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import numpy as np
import open3d as o3d
import copy
import matplotlib.pyplot as plt
if __name__ == '__main__':
try:
print("Testing Open3D")
# Intialize the Class
myOpen3d = WrapperOpen3d("../data/LeafPointCloud.ply")
# Open the Point Cloud
myOpen3d... | 36.233333 | 109 | 0.606946 |
975f4f2e2aa5d628f4a0e786b38370ba42280be8 | 1,368 | py | Python | src/calculator_app.py | Aurangazeeb/tax_simulator_app | ecf2a55afab70edd6b32ad92576ebbdb9bc97133 | [
"MIT"
] | null | null | null | src/calculator_app.py | Aurangazeeb/tax_simulator_app | ecf2a55afab70edd6b32ad92576ebbdb9bc97133 | [
"MIT"
] | null | null | null | src/calculator_app.py | Aurangazeeb/tax_simulator_app | ecf2a55afab70edd6b32ad92576ebbdb9bc97133 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, url_for
from calculator_logic import find_take_home_OR
api = Flask(__name__)
tax_inputs = {}
if __name__ == '__main__':
api.run(debug=True, host='0.0.0.0') | 36.972973 | 133 | 0.699561 |
97606bfba680da74ee543b3ac40d4aeb418faf69 | 21,045 | py | Python | rtk/hardware/component/resistor/fixed/Wirewound.py | rakhimov/rtk | adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63 | [
"BSD-3-Clause"
] | null | null | null | rtk/hardware/component/resistor/fixed/Wirewound.py | rakhimov/rtk | adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63 | [
"BSD-3-Clause"
] | null | null | null | rtk/hardware/component/resistor/fixed/Wirewound.py | rakhimov/rtk | adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63 | [
"BSD-3-Clause"
] | 2 | 2020-04-03T04:14:42.000Z | 2021-02-22T05:30:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# rtk.hardware.component.resistor.fixed.Wirewound.py is part of the RTK
# Project
#
# All rights reserved.
# Copyright 2007 - 2017 Andrew Rowland andrew.rowland <AT> reliaqual <DOT> com
#
# Redistribution and use in source and binary forms, with or without
# ... | 41.922311 | 87 | 0.53186 |
97614563914fd56ff120db87dc313ddf01a6c37e | 1,547 | py | Python | jobs/migrations/0002_auto_20201219_0911.py | Platz-Work/platzi-work-backend | 367bb3b150ac22f673c4a2e01babecb19f1ee9ec | [
"MIT"
] | null | null | null | jobs/migrations/0002_auto_20201219_0911.py | Platz-Work/platzi-work-backend | 367bb3b150ac22f673c4a2e01babecb19f1ee9ec | [
"MIT"
] | 13 | 2020-12-18T01:32:03.000Z | 2020-12-19T22:57:35.000Z | jobs/migrations/0002_auto_20201219_0911.py | Platz-Work/platzi-work-backend | 367bb3b150ac22f673c4a2e01babecb19f1ee9ec | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-19 14:11
from django.db import migrations, models
import django.db.models.deletion
| 45.5 | 287 | 0.641241 |
97619ae6ad1c59de7d088f0cb50b547fc31f71c9 | 2,171 | py | Python | src/zojax/security/utils.py | Zojax/zojax.security | a447e6a527174a8ad4dbae7550146927d5b53bc4 | [
"ZPL-2.1"
] | null | null | null | src/zojax/security/utils.py | Zojax/zojax.security | a447e6a527174a8ad4dbae7550146927d5b53bc4 | [
"ZPL-2.1"
] | null | null | null | src/zojax/security/utils.py | Zojax/zojax.security | a447e6a527174a8ad4dbae7550146927d5b53bc4 | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2007 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SO... | 31.926471 | 89 | 0.664671 |
97619fd21b5e3d7d7279bbd158c6c94fd2c35595 | 760 | py | Python | Versiones viejas/Control evaporadores v1 - Brix y nivel/control.py | juanmaro97/PID_evaporators | a9f4547604c0466fa8d9c6370f8a5f007a3dc9ab | [
"MIT"
] | null | null | null | Versiones viejas/Control evaporadores v1 - Brix y nivel/control.py | juanmaro97/PID_evaporators | a9f4547604c0466fa8d9c6370f8a5f007a3dc9ab | [
"MIT"
] | null | null | null | Versiones viejas/Control evaporadores v1 - Brix y nivel/control.py | juanmaro97/PID_evaporators | a9f4547604c0466fa8d9c6370f8a5f007a3dc9ab | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
#! python
# Installed Libs
import math
import numpy as np
| 17.272727 | 55 | 0.614474 |
9761d796fb4d2c82194b964be5bd5771faef5ee4 | 703 | py | Python | vedastr/datasets/concat_dataset.py | YacobBY/vedastr | 2353780489b58d2398b9af49d238ef0df3f45f2a | [
"Apache-2.0"
] | null | null | null | vedastr/datasets/concat_dataset.py | YacobBY/vedastr | 2353780489b58d2398b9af49d238ef0df3f45f2a | [
"Apache-2.0"
] | null | null | null | vedastr/datasets/concat_dataset.py | YacobBY/vedastr | 2353780489b58d2398b9af49d238ef0df3f45f2a | [
"Apache-2.0"
] | null | null | null | from torch.utils.data import ConcatDataset
from .registry import DATASETS
from .builder import build_datasets
| 31.954545 | 98 | 0.71266 |
97620d3ed32b4f0188c5034151c6595da75dc718 | 8,080 | py | Python | pal5_constrain_mwhalo_shape/mw_pot/likelihood.py | nstarman/pal5-constrain-mwhalo-shape | 57e1523675332121cc538d1fa6e0ac6edecaeefe | [
"BSD-3-Clause"
] | 1 | 2020-11-20T18:27:21.000Z | 2020-11-20T18:27:21.000Z | pal5_constrain_mwhalo_shape/mw_pot/likelihood.py | nstarman/pal5-constrain-mwhalo-shape | 57e1523675332121cc538d1fa6e0ac6edecaeefe | [
"BSD-3-Clause"
] | null | null | null | pal5_constrain_mwhalo_shape/mw_pot/likelihood.py | nstarman/pal5-constrain-mwhalo-shape | 57e1523675332121cc538d1fa6e0ac6edecaeefe | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
#
# TITLE : MWPotential2014Likelihood
# PROJECT : Pal 5 update MW pot constraints
#
# ----------------------------------------------------------------------------
# Docstring
"""Milky Way Potential (2014 version) ... | 23.976261 | 87 | 0.511015 |
97642f21d4dcb2cc049efde35e1b7cc86810455d | 7,937 | py | Python | tests/experiment_client_test.py | mljar/mljar-api-python | 78afae67e9f8a26a457f7bae29367f9b3d7f85b4 | [
"Apache-2.0"
] | 42 | 2016-12-01T11:07:16.000Z | 2022-01-20T05:01:56.000Z | tests/experiment_client_test.py | kamrankausar/mljar-api-python | 78afae67e9f8a26a457f7bae29367f9b3d7f85b4 | [
"Apache-2.0"
] | 10 | 2017-06-28T08:02:44.000Z | 2018-04-10T07:10:04.000Z | tests/experiment_client_test.py | kamrankausar/mljar-api-python | 78afae67e9f8a26a457f7bae29367f9b3d7f85b4 | [
"Apache-2.0"
] | 11 | 2017-03-27T13:29:02.000Z | 2021-04-04T19:16:51.000Z | '''
ExperimentClient tests.
'''
import os
import unittest
import pandas as pd
import time
from mljar.client.project import ProjectClient
from mljar.client.dataset import DatasetClient
from mljar.client.experiment import ExperimentClient
from .project_based_test import ProjectBasedTest, get_postfix
if __name__ == "_... | 46.415205 | 116 | 0.630969 |
976d30103ee0ad1012aff242e5d67605f2fb00a2 | 1,597 | py | Python | midiio/containers.py | blowfeld/python-midi-io | 8dd5c7fabc29bc407a6fb8987538c7a9dce68d94 | [
"MIT"
] | 1 | 2020-10-19T08:12:35.000Z | 2020-10-19T08:12:35.000Z | midiio/containers.py | blowfeld/python-midi-io | 8dd5c7fabc29bc407a6fb8987538c7a9dce68d94 | [
"MIT"
] | 3 | 2017-11-18T16:46:01.000Z | 2021-11-20T22:55:38.000Z | midiio/containers.py | blowfeld/python-midi-io | 8dd5c7fabc29bc407a6fb8987538c7a9dce68d94 | [
"MIT"
] | null | null | null | from pprint import pformat
class Track(object):
| 24.953125 | 95 | 0.619912 |
976d3ad94f1048dc94c36968033932ee0b34a306 | 553 | py | Python | examples/simpletest.py | bbaumg/Python_TSL2561 | 0bf09cbe319d51673331ee02d852bd0ba5d0ab3e | [
"MIT"
] | null | null | null | examples/simpletest.py | bbaumg/Python_TSL2561 | 0bf09cbe319d51673331ee02d852bd0ba5d0ab3e | [
"MIT"
] | null | null | null | examples/simpletest.py | bbaumg/Python_TSL2561 | 0bf09cbe319d51673331ee02d852bd0ba5d0ab3e | [
"MIT"
] | null | null | null | import time
import TSL2561
chip = TSL2561.TSL2561()
while True:
chip.power_on()
print("Raw Channel 0 = " + str(chip.read_channel0()))
print("Raw Channel 1 = " + str(chip.read_channel1()))
print("Lux Channel 0 = " + str(chip.calculate_lux(chip.read_channel0())))
print("Lux Channel 1 = " + str(chip.calculate_lux(ch... | 32.529412 | 74 | 0.685353 |
976e586bc70b63b0dcccc88523f976d485038fda | 243 | py | Python | play.py | kabewall/pythonAudio | 2d16227b05c03a7deb3f51cfaaae012b31621098 | [
"MIT"
] | 1 | 2020-08-09T14:31:50.000Z | 2020-08-09T14:31:50.000Z | play.py | kabewall/pythonAudio | 2d16227b05c03a7deb3f51cfaaae012b31621098 | [
"MIT"
] | null | null | null | play.py | kabewall/pythonAudio | 2d16227b05c03a7deb3f51cfaaae012b31621098 | [
"MIT"
] | null | null | null | # import modules
import subprocess
import io
| 15.1875 | 37 | 0.646091 |
977025b97f2d59f29c0ca1d1d80021339db8b170 | 24,754 | py | Python | session/vad/finetune-inception-v4.py | ishine/malaya-speech | fd34afc7107af1656dff4b3201fa51dda54fde18 | [
"MIT"
] | 111 | 2020-08-31T04:58:54.000Z | 2022-03-29T15:44:18.000Z | session/vad/finetune-inception-v4.py | ishine/malaya-speech | fd34afc7107af1656dff4b3201fa51dda54fde18 | [
"MIT"
] | 14 | 2020-12-16T07:27:22.000Z | 2022-03-15T17:39:01.000Z | session/vad/finetune-inception-v4.py | ishine/malaya-speech | fd34afc7107af1656dff4b3201fa51dda54fde18 | [
"MIT"
] | 29 | 2021-02-09T08:57:15.000Z | 2022-03-12T14:09:19.000Z | import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
import tensorflow as tf
import collections
import re
import random
def get_assignment_map_from_checkpoint(tvars, init_checkpoint):
"""Compute the union of the current variables and checkpoint variables."""
assignment_map = {}
initialized_variable_names... | 33.678912 | 84 | 0.492486 |
97716a65b95b5338d1e2f569f906c358d50cb358 | 1,359 | py | Python | contentcuration/contentcuration/ricecooker_versions.py | d0sadata/studio | ec3b805c0b546fe8884d446152eead90bea4174d | [
"MIT"
] | 60 | 2018-03-29T23:33:29.000Z | 2022-03-19T12:10:56.000Z | contentcuration/contentcuration/ricecooker_versions.py | d0sadata/studio | ec3b805c0b546fe8884d446152eead90bea4174d | [
"MIT"
] | 2,260 | 2018-03-02T23:14:49.000Z | 2022-03-29T20:57:21.000Z | contentcuration/contentcuration/ricecooker_versions.py | d0sadata/studio | ec3b805c0b546fe8884d446152eead90bea4174d | [
"MIT"
] | 86 | 2018-03-19T21:26:35.000Z | 2022-03-28T10:09:17.000Z | from future import standard_library
standard_library.install_aliases()
"""
Latest ricecooker version
Any version >= VERSION_OK will get a message that
the version is "up to date" (log level = info)
"""
VERSION_OK = "0.6.32" # this gets overwritten to current v. after XML RPC call
VERSION_OK_MESSAGE = "Ricecooker v{... | 30.886364 | 96 | 0.754231 |
977258c0034beba563dc5e0a6c129c209d3a7adb | 1,171 | py | Python | main_direct_child.py | Volkova-Natalia/python_abstract_class_variables_example | 66ac2f7646f6150e4f41b62d161fb379744e4f39 | [
"MIT"
] | null | null | null | main_direct_child.py | Volkova-Natalia/python_abstract_class_variables_example | 66ac2f7646f6150e4f41b62d161fb379744e4f39 | [
"MIT"
] | null | null | null | main_direct_child.py | Volkova-Natalia/python_abstract_class_variables_example | 66ac2f7646f6150e4f41b62d161fb379744e4f39 | [
"MIT"
] | null | null | null | """
A direct child HAS TO define required class variables (pseudo "abstract").
"""
if __name__ == '__main__':
pass
| 29.275 | 103 | 0.69257 |
97727c15c04ff095355a50f389bcf007a10a7f30 | 107 | py | Python | medium_multiply/__init__.py | yahyatamim/pyidw | 014344518f40b13b622b780af55975da8bb755ae | [
"MIT"
] | 2 | 2022-02-28T17:30:57.000Z | 2022-03-22T17:29:27.000Z | medium_multiply/__init__.py | yahyatamim/pyidw | 014344518f40b13b622b780af55975da8bb755ae | [
"MIT"
] | 1 | 2021-08-19T15:33:44.000Z | 2021-08-22T08:18:39.000Z | medium_multiply/__init__.py | yahyatamim/pyidw | 014344518f40b13b622b780af55975da8bb755ae | [
"MIT"
] | null | null | null | # This line of code will allow shorter imports
from medium_multiply.multiplication import Multiplication
| 35.666667 | 58 | 0.841121 |
977302d84dae98f3adb37ef775398b2efc6b745e | 741 | py | Python | setup.py | scandio/s3stat | 7669be3a4d56bb92333a38cd87850f5c59085330 | [
"MIT"
] | 27 | 2015-01-30T17:16:01.000Z | 2021-03-02T17:34:21.000Z | setup.py | scandio/s3stat | 7669be3a4d56bb92333a38cd87850f5c59085330 | [
"MIT"
] | 4 | 2015-02-20T19:14:49.000Z | 2016-08-23T09:34:46.000Z | setup.py | scandio/s3stat | 7669be3a4d56bb92333a38cd87850f5c59085330 | [
"MIT"
] | 7 | 2015-01-30T17:16:54.000Z | 2016-08-31T18:13:44.000Z | from setuptools import setup, find_packages
try:
import s3stat
doc = s3stat.__doc__
except ImportError:
doc = "The docs are only available when the package is already installed. Sorry for this."
setup(
name="s3stat",
version="2.3.1",
description='An extensible Amazon S3 and Cloudfront log ... | 28.5 | 94 | 0.661269 |
977344779ccbb12941da597f2ab0232bcb6083d8 | 8,155 | py | Python | tests/pipeline/test_technical.py | NunoEdgarGFlowHub/zipline | 459366c17ac918576daf21ba9cf5706399eea988 | [
"Apache-2.0"
] | null | null | null | tests/pipeline/test_technical.py | NunoEdgarGFlowHub/zipline | 459366c17ac918576daf21ba9cf5706399eea988 | [
"Apache-2.0"
] | null | null | null | tests/pipeline/test_technical.py | NunoEdgarGFlowHub/zipline | 459366c17ac918576daf21ba9cf5706399eea988 | [
"Apache-2.0"
] | null | null | null | from __future__ import division
from nose_parameterized import parameterized
import numpy as np
import pandas as pd
import talib
from zipline.lib.adjusted_array import AdjustedArray
from zipline.pipeline import TermGraph
from zipline.pipeline.data import USEquityPricing
from zipline.pipeline.engine import SimplePipel... | 33.979167 | 79 | 0.58786 |
97746f649bdb42571ee71d940cfa1db94455b1b3 | 5,723 | py | Python | testsuite/array-reg/run.py | LongerVision/OpenShadingLanguage | 30d2a4a089c5c9d521b27519329c205763dfe483 | [
"BSD-3-Clause"
] | 1,105 | 2015-01-02T20:47:19.000Z | 2021-01-25T13:20:56.000Z | testsuite/array-reg/run.py | LongerVision/OpenShadingLanguage | 30d2a4a089c5c9d521b27519329c205763dfe483 | [
"BSD-3-Clause"
] | 696 | 2015-01-07T23:42:08.000Z | 2021-01-25T03:55:08.000Z | testsuite/array-reg/run.py | LongerVision/OpenShadingLanguage | 30d2a4a089c5c9d521b27519329c205763dfe483 | [
"BSD-3-Clause"
] | 248 | 2015-01-05T13:41:28.000Z | 2021-01-24T23:29:55.000Z | #!/usr/bin/env python
# Copyright Contributors to the Open Shading Language project.
# SPDX-License-Identifier: BSD-3-Clause
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
command += testshade("-t 1 -g 256 256 -od uint8 -o Cout out_varying_index_float.tif test_varying_index_float")
command += tes... | 65.034091 | 140 | 0.814433 |
977557b8bbec7c7e119a349c5b76aea2b828bc2a | 492 | py | Python | editdns/urls.py | jrlevine/editdns | 58a66b8e90b1365593e3a91e59e5a556bff55288 | [
"Unlicense"
] | null | null | null | editdns/urls.py | jrlevine/editdns | 58a66b8e90b1365593e3a91e59e5a556bff55288 | [
"Unlicense"
] | null | null | null | editdns/urls.py | jrlevine/editdns | 58a66b8e90b1365593e3a91e59e5a556bff55288 | [
"Unlicense"
] | null | null | null | """editdns URL Configuration
"""
from django.conf.urls import url, include
from django.contrib import admin
from editapp.views import indexview
urlpatterns = [
url(r'^admin/', admin.site.urls),
url('^', include('django.contrib.auth.urls')), # various login and logout URLs
url(r'^edit/', include('editapp.u... | 32.8 | 83 | 0.648374 |
9775d41220899d0f9cd27d53de281b291876fb79 | 732 | py | Python | 机器学习/多项式回归/简单实现.py | shao1chuan/pythonbook | cd9877d04e1e11422d38cc051e368d3d9ce2ab45 | [
"MulanPSL-1.0"
] | 95 | 2020-10-11T04:45:46.000Z | 2022-02-25T01:50:40.000Z | 机器学习/多项式回归/简单实现.py | shao1chuan/pythonbook | cd9877d04e1e11422d38cc051e368d3d9ce2ab45 | [
"MulanPSL-1.0"
] | null | null | null | 机器学习/多项式回归/简单实现.py | shao1chuan/pythonbook | cd9877d04e1e11422d38cc051e368d3d9ce2ab45 | [
"MulanPSL-1.0"
] | 30 | 2020-11-05T09:01:00.000Z | 2022-03-08T05:58:55.000Z | import numpy as np
import matplotlib.pyplot as plt
x = np.random.uniform(-3, 3, size=100)
X = x.reshape(-1, 1)
#
y = 0.5 * x**2 + x + 2 + np.random.normal(0, 1, 100)
plt.scatter(x, y)
plt.show()
#
from sklearn.linear_model import LinearRegression
lin_reg = LinearRegression()
lin_reg.fit(X, y)
y_predict = lin_reg.pred... | 25.241379 | 58 | 0.72541 |
9777b5584e5ebf5afc151b93cdef657da9953164 | 1,345 | py | Python | alphatwirl_interface/selection.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | null | null | null | alphatwirl_interface/selection.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | 4 | 2018-03-05T13:48:26.000Z | 2018-03-19T12:28:56.000Z | alphatwirl_interface/selection.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | 1 | 2018-02-15T17:10:23.000Z | 2018-02-15T17:10:23.000Z | from collections import Sequence
from alphatwirl_interface.cut_flows import cut_flow, cut_flow_with_counter, cut_flow_with_weighted_counter
import six
def Selection(steps={}, cutflow_file=None, weight_attr=None):
'''
This class ties together several modules from alphatwirl to
bring a simplified Se... | 30.568182 | 106 | 0.553903 |
97780631233b74e2a06fd8fb9db648172ac9bf07 | 11,469 | py | Python | model_zoo/D3NetBenchmark/my_custom_transforms.py | ArtamonovDen/rgbd-research | 33da50010ad55c2659f94a863df832598051f31a | [
"MIT"
] | null | null | null | model_zoo/D3NetBenchmark/my_custom_transforms.py | ArtamonovDen/rgbd-research | 33da50010ad55c2659f94a863df832598051f31a | [
"MIT"
] | null | null | null | model_zoo/D3NetBenchmark/my_custom_transforms.py | ArtamonovDen/rgbd-research | 33da50010ad55c2659f94a863df832598051f31a | [
"MIT"
] | null | null | null | import cv2
import math
import torch
import random
import numbers
import numpy as np
from PIL import Image
########################################[ function ]########################################
########################################[ General ]########################################
#Template for all same op... | 39.822917 | 148 | 0.609207 |
9778b4bead9c1134d9780826fb3e9a07933d70ff | 3,899 | py | Python | searchInOrder.py | gclxli/AlgorithmBeginner | eb7e02d52c2d287063ca5355da25df76f1709be4 | [
"MIT"
] | null | null | null | searchInOrder.py | gclxli/AlgorithmBeginner | eb7e02d52c2d287063ca5355da25df76f1709be4 | [
"MIT"
] | null | null | null | searchInOrder.py | gclxli/AlgorithmBeginner | eb7e02d52c2d287063ca5355da25df76f1709be4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Author:Sara Li
This file integrated a series of searching algorithm
with different interpolation rule
"""
import math
#find d in lst if d exists, return index; else: return len(lst)+1
#sequently searching
#binary search
#interpolation search
#fit f... | 24.99359 | 88 | 0.485509 |
9778d9c56c27cd2622b67774d10f6f052d7ecded | 6,387 | py | Python | scripts/fake/make_fake_SB2.py | megbedell/PSOAP | b1cf6d14383495a5751c64a63caddbe83b511796 | [
"MIT"
] | 25 | 2017-02-21T21:42:03.000Z | 2022-03-02T20:33:48.000Z | scripts/fake/make_fake_SB2.py | megbedell/PSOAP | b1cf6d14383495a5751c64a63caddbe83b511796 | [
"MIT"
] | 3 | 2018-02-11T22:03:22.000Z | 2022-02-03T21:12:01.000Z | scripts/fake/make_fake_SB2.py | megbedell/PSOAP | b1cf6d14383495a5751c64a63caddbe83b511796 | [
"MIT"
] | 1 | 2022-02-02T15:46:04.000Z | 2022-02-02T15:46:04.000Z | import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
import psoap
from psoap.data import lkca14, redshift, Chunk
from psoap import matrix_functions
from psoap import covariance
from psoap import orbit
# from matplotlib.ticker import FormatStrFormatter as FSF
# from matplotlib.tick... | 30.706731 | 102 | 0.664318 |
9779b37cb45e658b5f8f165b6deb80c5f4476a43 | 1,329 | py | Python | widgets/CustomCoinsNumberLabel/CustomCoinsNumberLabel.py | JaviCDiaz/Crypto-Info | 72b9343946efe6df135abf48e5a43b2a440b8d59 | [
"MIT"
] | null | null | null | widgets/CustomCoinsNumberLabel/CustomCoinsNumberLabel.py | JaviCDiaz/Crypto-Info | 72b9343946efe6df135abf48e5a43b2a440b8d59 | [
"MIT"
] | null | null | null | widgets/CustomCoinsNumberLabel/CustomCoinsNumberLabel.py | JaviCDiaz/Crypto-Info | 72b9343946efe6df135abf48e5a43b2a440b8d59 | [
"MIT"
] | null | null | null | from utils.QtCore import *
from utils.functions import get_exchange_icon
| 26.058824 | 66 | 0.570354 |
977b2cbde96345665e2e317103396ec621e0ad00 | 11,648 | py | Python | dxleposervice/app.py | opendxl/opendxl-epo-service-python | b08db129c76fd28a2042d9f6aaf9921bd43dd347 | [
"Apache-2.0"
] | 5 | 2017-02-15T23:09:46.000Z | 2017-03-01T18:30:32.000Z | dxleposervice/app.py | opendxl/opendxl-epo-service-python | b08db129c76fd28a2042d9f6aaf9921bd43dd347 | [
"Apache-2.0"
] | 4 | 2017-06-23T23:21:05.000Z | 2018-07-30T22:03:41.000Z | dxleposervice/app.py | opendxl/opendxl-epo-service-python | b08db129c76fd28a2042d9f6aaf9921bd43dd347 | [
"Apache-2.0"
] | 8 | 2017-02-16T20:31:41.000Z | 2018-07-26T22:33:02.000Z | from __future__ import absolute_import
import logging
import os
import json
from dxlbootstrap.app import Application
from dxlclient.service import ServiceRegistrationInfo
from dxlclient.callbacks import RequestCallback
from dxlclient.message import ErrorResponse, Response
from ._epo import _Epo
# Configure local log... | 39.218855 | 96 | 0.631954 |
977d36268a9ceff7ebe588ff8cff736917e568cc | 2,981 | py | Python | validator/base_validator.py | yanzhicong/VAE-GAN | 37fe060cd993d89c983bc8cfcc59c6edc3c5920f | [
"MIT"
] | 33 | 2018-08-17T13:06:29.000Z | 2021-04-29T11:34:00.000Z | validator/base_validator.py | yanzhicong/VAE-GAN | 37fe060cd993d89c983bc8cfcc59c6edc3c5920f | [
"MIT"
] | 1 | 2018-12-04T07:33:40.000Z | 2018-12-04T07:33:40.000Z | validator/base_validator.py | yanzhicong/CVAEGAN | 37fe060cd993d89c983bc8cfcc59c6edc3c5920f | [
"MIT"
] | 9 | 2019-01-28T21:35:16.000Z | 2021-09-07T10:18:01.000Z | # -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2018 ZhicongYan
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to us... | 33.122222 | 94 | 0.716874 |
977d40e965e557c6c575b7753ac3c5b7977bd109 | 3,302 | py | Python | tools/migration/db/migration_harbor/versions/1_5_0.py | eirinikos/harbor | efb3759d147ad225e00f161a49ab1e9ed4542b1f | [
"Apache-2.0"
] | 1 | 2020-09-20T08:51:25.000Z | 2020-09-20T08:51:25.000Z | tools/migration/db/migration_harbor/versions/1_5_0.py | hjimmy/harbor | b308c6e4fc3540d03eae7d7c3146f63dab8e52c5 | [
"Apache-2.0"
] | 2 | 2018-03-28T14:58:09.000Z | 2020-02-19T00:47:42.000Z | tools/migration/db/migration_harbor/versions/1_5_0.py | hjimmy/harbor | b308c6e4fc3540d03eae7d7c3146f63dab8e52c5 | [
"Apache-2.0"
] | 4 | 2017-10-16T17:34:28.000Z | 2018-03-27T15:08:09.000Z | # Copyright (c) 2008-2018 VMware, 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 applicabl... | 36.285714 | 167 | 0.729255 |
977d42e7ca844d53c6a215204b7d8a5ff0d065e2 | 346 | py | Python | dynamic programing/change_dp.py | younes-assou/some-data-structures-and-algos | 0ac46380d703d9bb58a4dcf5b03558973ff2ad99 | [
"MIT"
] | null | null | null | dynamic programing/change_dp.py | younes-assou/some-data-structures-and-algos | 0ac46380d703d9bb58a4dcf5b03558973ff2ad99 | [
"MIT"
] | null | null | null | dynamic programing/change_dp.py | younes-assou/some-data-structures-and-algos | 0ac46380d703d9bb58a4dcf5b03558973ff2ad99 | [
"MIT"
] | null | null | null | import math
m = int(input())
print(get_change(m)) | 34.6 | 117 | 0.66763 |
977df01758d4e86cbad5917373e6d895265bd0e1 | 5,415 | py | Python | evaluation/comp_rec.py | OmranKaddah/Multi-Object-Tracking-in-The-Driving-Scene | 0a2e8092b7e8f4d6317b201be5442e62c4efd240 | [
"Unlicense"
] | 2 | 2021-08-15T08:31:36.000Z | 2021-08-19T08:17:02.000Z | evaluation/comp_rec.py | OmranKaddah/Multi-Object-Tracking-in-The-Driving-Scene | 0a2e8092b7e8f4d6317b201be5442e62c4efd240 | [
"Unlicense"
] | null | null | null | evaluation/comp_rec.py | OmranKaddah/Multi-Object-Tracking-in-The-Driving-Scene | 0a2e8092b7e8f4d6317b201be5442e62c4efd240 | [
"Unlicense"
] | null | null | null |
from __future__ import print_function
import pandas
import matplotlib; matplotlib.use('Agg')
import sys, os, copy, math, numpy as np, matplotlib.pyplot as plt
from tabulate import tabulate
from munkres import Munkres
from collections import defaultdict
try:
from ordereddict import OrderedDict # can be installed u... | 41.653846 | 170 | 0.63638 |
977e5dcc4d214a594aaf7f1f56a24722e9990efe | 1,440 | py | Python | location_register/serializers/ratu_serializers.py | Anntroy/Data_converter | 82e8fcb6a2b4611ad39e122e2730d6656b43b062 | [
"MIT"
] | null | null | null | location_register/serializers/ratu_serializers.py | Anntroy/Data_converter | 82e8fcb6a2b4611ad39e122e2730d6656b43b062 | [
"MIT"
] | null | null | null | location_register/serializers/ratu_serializers.py | Anntroy/Data_converter | 82e8fcb6a2b4611ad39e122e2730d6656b43b062 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from location_register.models.ratu_models import Region, District, City, CityDistrict, Street
| 31.304348 | 93 | 0.7 |
977f80a499286eb92a212aa5734765d373e55d3a | 28,587 | py | Python | obqa/models/qa/multi_choice/qa_multi_choice_know_reader_v1.py | dirkgr/OpenBookQA | dece3a0ac90d515eac4c8c046b3695b9b9f30124 | [
"Apache-2.0"
] | 66 | 2018-10-23T03:55:03.000Z | 2021-07-29T07:38:17.000Z | obqa/models/qa/multi_choice/qa_multi_choice_know_reader_v1.py | dirkgr/OpenBookQA | dece3a0ac90d515eac4c8c046b3695b9b9f30124 | [
"Apache-2.0"
] | 4 | 2019-02-19T05:46:16.000Z | 2021-06-04T01:17:38.000Z | obqa/models/qa/multi_choice/qa_multi_choice_know_reader_v1.py | dirkgr/OpenBookQA | dece3a0ac90d515eac4c8c046b3695b9b9f30124 | [
"Apache-2.0"
] | 23 | 2018-10-23T22:30:11.000Z | 2022-03-11T00:35:48.000Z | import numpy
from allennlp.data.dataset import Batch
from allennlp.modules.matrix_attention import LegacyMatrixAttention
from typing import Dict, Optional, List, Any
import torch
from allennlp.common import Params
from allennlp.common.checks import ConfigurationError
from allennlp.data import Vocabulary, Instance
fro... | 51.32316 | 328 | 0.66929 |
977fdeb278aee5c2843254083b77ca89cc2ce6fe | 19 | py | Python | dogebuild_fpc/__init__.py | dogebuild/dogebuild-fpc | 8b061cfe25d22ecb49d792a4e4b1bd5f773a7e51 | [
"MIT"
] | null | null | null | dogebuild_fpc/__init__.py | dogebuild/dogebuild-fpc | 8b061cfe25d22ecb49d792a4e4b1bd5f773a7e51 | [
"MIT"
] | null | null | null | dogebuild_fpc/__init__.py | dogebuild/dogebuild-fpc | 8b061cfe25d22ecb49d792a4e4b1bd5f773a7e51 | [
"MIT"
] | null | null | null | __author__ = 'kir'
| 9.5 | 18 | 0.684211 |
9780232eb78163ce3b186bf006fd791438117a70 | 1,077 | py | Python | examples/read_input.py | MartinKondor/ArduinoControl | ad0edbf903629f19cee5032a5a32a98c07877743 | [
"MIT"
] | 2 | 2020-01-24T21:17:49.000Z | 2021-09-05T01:45:45.000Z | examples/read_input.py | MartinKondor/ArduinoControl | ad0edbf903629f19cee5032a5a32a98c07877743 | [
"MIT"
] | null | null | null | examples/read_input.py | MartinKondor/ArduinoControl | ad0edbf903629f19cee5032a5a32a98c07877743 | [
"MIT"
] | null | null | null | import time
from datetime import datetime
from serial import Serial # Library needed to open serial connection
PIN = 'a5'
PORT = 'COM11'
PORT = Serial(port=PORT, baudrate=9600, timeout=0) # Open the Serial port
print('-' * 50)
print('AC:', 'Connecting to:', PORT)
print('AC:', 'Press Ctrl+C to close the program.... | 24.477273 | 91 | 0.583101 |
9783c88b1649ed2d55880497abf78f9f40066f44 | 8,491 | py | Python | evaluation/code/data/transform.py | JiwanChung/acav100m | 51cb948d5682da69334a8d05d2df631971b60215 | [
"MIT"
] | 27 | 2021-10-13T07:49:14.000Z | 2022-03-15T06:58:00.000Z | evaluation/code/data/transform.py | JiwanChung/acav100m | 51cb948d5682da69334a8d05d2df631971b60215 | [
"MIT"
] | 3 | 2021-08-30T21:29:45.000Z | 2021-11-18T08:02:32.000Z | evaluation/code/data/transform.py | JiwanChung/acav100m | 51cb948d5682da69334a8d05d2df631971b60215 | [
"MIT"
] | 6 | 2021-08-30T18:48:32.000Z | 2021-12-16T22:11:37.000Z | import math
import numpy as np
import torch
import torchaudio
def random_short_side_scale_jitter(
images, min_size, max_size,
):
"""
Perform a spatial short scale jittering on the given images.
Args:
images (tensor): images to perform scale jitter. Dimension is
`num frames` x `chan... | 32.910853 | 107 | 0.616771 |
9783fca2dbabb59f33769ff174e176227eafec8c | 220 | py | Python | src/deploy/builder/stacks/admin.py | werelaxe/drapo | 5f78da735819200f0e7efa6a5e6b3b45ba6e0d4b | [
"MIT"
] | null | null | null | src/deploy/builder/stacks/admin.py | werelaxe/drapo | 5f78da735819200f0e7efa6a5e6b3b45ba6e0d4b | [
"MIT"
] | null | null | null | src/deploy/builder/stacks/admin.py | werelaxe/drapo | 5f78da735819200f0e7efa6a5e6b3b45ba6e0d4b | [
"MIT"
] | null | null | null | from django.contrib import admin
from . import models
admin.site.register(models.Stack, StackAdmin)
| 20 | 78 | 0.740909 |
97845e9f5ec20c58d15dc8ad705fb6587bb76fff | 9,771 | py | Python | bigflow_python/python/bigflow/util/log.py | advancedxy/bigflow_python | 8a244b483404fde7afc42eee98bc964da8ae03e2 | [
"Apache-2.0"
] | 1,236 | 2017-11-14T11:10:10.000Z | 2022-03-08T11:54:41.000Z | bigflow_python/python/bigflow/util/log.py | advancedxy/bigflow_python | 8a244b483404fde7afc42eee98bc964da8ae03e2 | [
"Apache-2.0"
] | 38 | 2017-11-14T16:29:12.000Z | 2020-01-23T08:32:04.000Z | bigflow_python/python/bigflow/util/log.py | advancedxy/bigflow_python | 8a244b483404fde7afc42eee98bc964da8ae03e2 | [
"Apache-2.0"
] | 184 | 2017-11-27T07:23:36.000Z | 2022-03-14T02:54:16.000Z | #!/usr/bin/env python
#encoding=utf-8
# Copyright (c) 2012 Baidu, 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
#... | 35.147482 | 109 | 0.623785 |
9784a2e9f67753d80a70900ec0acbf4e1f37060d | 57,325 | py | Python | opus/application/apps/cart/views.py | juzen2003/pds-opus | 38587ef256199425c145394fc8e1f47594764628 | [
"AFL-3.0"
] | null | null | null | opus/application/apps/cart/views.py | juzen2003/pds-opus | 38587ef256199425c145394fc8e1f47594764628 | [
"AFL-3.0"
] | null | null | null | opus/application/apps/cart/views.py | juzen2003/pds-opus | 38587ef256199425c145394fc8e1f47594764628 | [
"AFL-3.0"
] | null | null | null | ################################################################################
#
# cart/views.py
#
# The (private) API interface for adding and removing items from the cart
# and creating download .zip and .csv files.
#
# Format: __cart/view.json
# Format: __cart/status.json
# Format: __cart/data.csv
# Fo... | 40.627215 | 104 | 0.581369 |
9784af589cdf2dd28607e6c72a6a99e719fdf94a | 2,639 | py | Python | microcosm_daemon/tests/test_state_machine.py | globality-corp/microcosm-daemon | 86c384462c00d98431d61ed4890b980b0424cb36 | [
"Apache-2.0"
] | null | null | null | microcosm_daemon/tests/test_state_machine.py | globality-corp/microcosm-daemon | 86c384462c00d98431d61ed4890b980b0424cb36 | [
"Apache-2.0"
] | 10 | 2016-03-25T00:37:22.000Z | 2022-02-09T21:16:16.000Z | microcosm_daemon/tests/test_state_machine.py | globality-corp/microcosm-daemon | 86c384462c00d98431d61ed4890b980b0424cb36 | [
"Apache-2.0"
] | 2 | 2016-12-19T22:41:21.000Z | 2019-03-17T03:46:31.000Z | """
State machine tests.
"""
from unittest.mock import patch
from hamcrest import (
assert_that,
calling,
equal_to,
is_,
raises,
)
from microcosm.api import create_object_graph
from microcosm_daemon.error_policy import FatalError
from microcosm_daemon.sleep_policy import SleepNow
from microcosm_d... | 22.555556 | 67 | 0.696476 |
978572f48bd336559ae88346cdd47db910ca76ad | 3,886 | py | Python | src/evaluate.py | chloechsu/combining-evolutionary-and-assay-labelled-data | fdaa5bba8ffbb8ab25de57736fed8f9126838ae3 | [
"MIT"
] | 14 | 2022-01-19T02:39:11.000Z | 2022-03-08T21:55:29.000Z | src/evaluate.py | chloechsu/combining-evolutionary-and-assay-labelled-data | fdaa5bba8ffbb8ab25de57736fed8f9126838ae3 | [
"MIT"
] | 2 | 2022-03-09T06:18:23.000Z | 2022-03-20T14:55:59.000Z | src/evaluate.py | chloechsu/combining-evolutionary-and-assay-labelled-data | fdaa5bba8ffbb8ab25de57736fed8f9126838ae3 | [
"MIT"
] | 3 | 2022-01-22T07:27:22.000Z | 2022-03-04T23:23:17.000Z | '''
Evaluate predictive performance of predictors in parallel with multiprocessing.
'''
import argparse
from multiprocessing import Process, JoinableQueue
from multiprocessing import set_start_method
import os
import pandas as pd
from utils import parse_vars, merge_dfs
from evaluate_multiprocessing import run_from_qu... | 44.159091 | 89 | 0.651827 |
9785858e55c6a980d917be99f19b1b5ecc4b62cf | 5,040 | py | Python | Advanced Network Management/Assignment 1/A1.py | Sahandfer/Tsinghua | 0c1944aee8395e57429f27d9b0dd478460dcc8b3 | [
"CC-BY-4.0"
] | 1 | 2021-07-14T15:37:18.000Z | 2021-07-14T15:37:18.000Z | Advanced Network Management/Assignment 1/A1.py | Sahandfer/Tsinghua | 0c1944aee8395e57429f27d9b0dd478460dcc8b3 | [
"CC-BY-4.0"
] | null | null | null | Advanced Network Management/Assignment 1/A1.py | Sahandfer/Tsinghua | 0c1944aee8395e57429f27d9b0dd478460dcc8b3 | [
"CC-BY-4.0"
] | null | null | null | import glob, os
import matplotlib
import numpy as np
import pandas as pd
import datetime as dt
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
%matplotlib inline
# Reading the files
csv_files = glob.glob("dataset/*.csv")
dataset = []
csv_files.sort(key=sort_file_name)
# Creating the dataframe
for... | 32.727273 | 174 | 0.689087 |
9785e3e4309e037f8a8967cbff7462fb5c73c62a | 3,852 | py | Python | awx/main/utils/generate_yml.py | kanayabuno/awx | 069555421111e00ead3dd0e6449d783342cb769a | [
"Apache-2.0"
] | null | null | null | awx/main/utils/generate_yml.py | kanayabuno/awx | 069555421111e00ead3dd0e6449d783342cb769a | [
"Apache-2.0"
] | null | null | null | awx/main/utils/generate_yml.py | kanayabuno/awx | 069555421111e00ead3dd0e6449d783342cb769a | [
"Apache-2.0"
] | null | null | null | import json
import yaml
import os
import requests
from git import Repo
### convert device config in json to ansible playbook and run the playbook
PATH_TO_REPO = os.path.expanduser('~') + "/awx-playbooks/"
URL = 'http://10.4.19.251:32121/api/v2/'
USER = 'admin'
PWD = 'temple123'
### Set proper headers
headers = {"Cont... | 29.860465 | 137 | 0.678609 |
9786c44d84f3e0421ce3ad748f9979de5fdfd0f8 | 1,345 | py | Python | pyleecan/Methods/Simulation/VarSimu/gen_datakeeper_list.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | 95 | 2019-01-23T04:19:45.000Z | 2022-03-17T18:22:10.000Z | pyleecan/Methods/Simulation/VarSimu/gen_datakeeper_list.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | 366 | 2019-02-20T07:15:08.000Z | 2022-03-31T13:37:23.000Z | pyleecan/Methods/Simulation/VarSimu/gen_datakeeper_list.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | 74 | 2019-01-24T01:47:31.000Z | 2022-02-25T05:44:42.000Z | from ....Classes.DataKeeper import DataKeeper
from ....Functions.Load.import_class import import_class
def gen_datakeeper_list(self, ref_simu):
"""Generate default DataKeepers according the reference simulation type"""
datakeeper_list = []
# To avoid adding twice a DataKeeper
symbol_list = [dk.symbol... | 35.394737 | 88 | 0.67658 |
9787018d8c5a95a6ac60640d19a76e0081b78412 | 493 | py | Python | src/models/snyk_api_response.py | Andrii-Grytsenko-OWASP/SnykVulnCheck | 105bd8423f1d7c67aa71727465f93e000ab674ca | [
"MIT"
] | null | null | null | src/models/snyk_api_response.py | Andrii-Grytsenko-OWASP/SnykVulnCheck | 105bd8423f1d7c67aa71727465f93e000ab674ca | [
"MIT"
] | null | null | null | src/models/snyk_api_response.py | Andrii-Grytsenko-OWASP/SnykVulnCheck | 105bd8423f1d7c67aa71727465f93e000ab674ca | [
"MIT"
] | null | null | null | from alchemize import Attr, JsonMappedModel
from src.models.snyk_api_classes import SnykVulnerability
| 35.214286 | 91 | 0.718053 |
9789ba34f9e256a042b146971b6268647203357d | 1,285 | py | Python | MachineLearning/facial_detection/n_faces.py | jagath-jaikumar/AI-Server-Docker | 5a5c2cc224ffd4377a73a314ddb8f0ffdea557b6 | [
"MIT"
] | 1 | 2020-09-04T17:38:04.000Z | 2020-09-04T17:38:04.000Z | MachineLearning/facial_detection/n_faces.py | jagath-jaikumar/AI-Server-Docker | 5a5c2cc224ffd4377a73a314ddb8f0ffdea557b6 | [
"MIT"
] | 4 | 2020-05-29T03:46:51.000Z | 2022-02-10T01:36:12.000Z | MachineLearning/facial_detection/n_faces.py | jagath-jaikumar/AI-Server-Docker | 5a5c2cc224ffd4377a73a314ddb8f0ffdea557b6 | [
"MIT"
] | null | null | null | import cv2
import sys
import json
from image_encoder.image_encoder import decode
import numpy
import requests
# Get user supplied values
if __name__ == "__main__":
from pika_listener import QueueListener
Q = QueueListener(n_faces, 'imageq_n_faces')
Q.run()
# powered by bee
| 21.416667 | 62 | 0.638911 |
978bfe42e8d6a958ae7986892f2aed316492590b | 11,500 | py | Python | render_chat.py | fdalvi/groupme-archiver | 532a71daef69a61074a473a2deeeab2cc1873253 | [
"MIT"
] | 7 | 2019-12-25T17:27:11.000Z | 2021-03-04T02:21:55.000Z | render_chat.py | fdalvi/groupme-archiver | 532a71daef69a61074a473a2deeeab2cc1873253 | [
"MIT"
] | 1 | 2020-05-26T08:29:52.000Z | 2020-09-06T20:39:57.000Z | render_chat.py | fdalvi/groupme-archiver | 532a71daef69a61074a473a2deeeab2cc1873253 | [
"MIT"
] | null | null | null | import argparse
from datetime import datetime
import glob
import html
import json
import os
import pytz
import shutil
import sys
import time
from yattag import Doc
# Constants
__SYSTEM__ = "GroupMe"
FONT_URL = "https://fonts.googleapis.com/css?family=Open+Sans"
if __name__ == '__main__':
main()
| 30.997305 | 79 | 0.518174 |