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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fcc90fbf90bac1e397385a8f65b45b15dbebac60 | 21,444 | py | Python | projection_cam_calibration/projection_cam_calibration.py | p-dimi/Projector_Camera_Calibrator | 5148c8704b754ebdad49ab93ff909446901a69af | [
"MIT"
] | 2 | 2021-01-13T17:55:53.000Z | 2021-07-02T17:04:13.000Z | projection_cam_calibration/projection_cam_calibration.py | p-dimi/Facial-tracking-and-Projecting | 5148c8704b754ebdad49ab93ff909446901a69af | [
"MIT"
] | null | null | null | projection_cam_calibration/projection_cam_calibration.py | p-dimi/Facial-tracking-and-Projecting | 5148c8704b754ebdad49ab93ff909446901a69af | [
"MIT"
] | 1 | 2020-10-02T06:29:21.000Z | 2020-10-02T06:29:21.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 14 13:47:12 2017
@author: Dima
"""
import time
import numpy as np
import math
import cv2
import sys
''' Currently works with webcams only '''
cam_index = int(input('What index is your webcam? If it is the built in webcam of the laptop, it is index 0.\nIf i... | 47.23348 | 403 | 0.66676 |
fcc9a18b1053b307181376309f390c8f485eb322 | 603 | py | Python | DEFCON_Debugging.py | tlear/DEFCON | 6f24c1585a877e8668157a93a8153502b3ddc246 | [
"MIT"
] | null | null | null | DEFCON_Debugging.py | tlear/DEFCON | 6f24c1585a877e8668157a93a8153502b3ddc246 | [
"MIT"
] | null | null | null | DEFCON_Debugging.py | tlear/DEFCON | 6f24c1585a877e8668157a93a8153502b3ddc246 | [
"MIT"
] | null | null | null | ################################################################
# DEFCON_Debugging
# (C) Tom Moore 2017
################################################################
################################################################
# IMPORTS
################################################################
import DE... | 28.714286 | 64 | 0.227197 |
fcca29694045f1664919f0c36b7d63092ad42d25 | 601 | py | Python | c2cgeoportal/scaffolds/update/+package+/CONST_migration/versions/015_Add_timeMode_column.py | pgiraud/c2cgeoportal | 3ec955c5c67d16256af726a62d586b3f4ec3b500 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cgeoportal/scaffolds/update/+package+/CONST_migration/versions/015_Add_timeMode_column.py | pgiraud/c2cgeoportal | 3ec955c5c67d16256af726a62d586b3f4ec3b500 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cgeoportal/scaffolds/update/+package+/CONST_migration/versions/015_Add_timeMode_column.py | pgiraud/c2cgeoportal | 3ec955c5c67d16256af726a62d586b3f4ec3b500 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from sqlalchemy import MetaData, Table, Column, types
from c2cgeoportal import schema
| 26.130435 | 62 | 0.68386 |
fccac2b7a8d8276b14eec636ba1a58da8ff1f999 | 721 | py | Python | open_humans/management/commands/remove_expired_keys.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 57 | 2016-09-01T21:55:52.000Z | 2022-03-27T22:15:32.000Z | open_humans/management/commands/remove_expired_keys.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 464 | 2015-03-23T18:08:28.000Z | 2016-08-25T04:57:36.000Z | open_humans/management/commands/remove_expired_keys.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 25 | 2017-01-24T16:23:27.000Z | 2021-11-07T01:51:42.000Z | import datetime
from django.core.management.base import BaseCommand
from data_import.models import DataFileKey
| 30.041667 | 73 | 0.686546 |
fcccddf6b0bdd238df5af63dd2a19fc5d8160f16 | 3,615 | py | Python | histolab/data/_registry.py | nipeone/histolab | 78854423df04c95c7168d03a95ae8665e3e957d8 | [
"Apache-2.0"
] | null | null | null | histolab/data/_registry.py | nipeone/histolab | 78854423df04c95c7168d03a95ae8665e3e957d8 | [
"Apache-2.0"
] | null | null | null | histolab/data/_registry.py | nipeone/histolab | 78854423df04c95c7168d03a95ae8665e3e957d8 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# in legacy datasets we need to put our sample data within the data dir
legacy_datasets = ["cmu_small_region.svs"]
# Registry of datafiles that can be downloaded along with their SHA256 hashes
# To generate the SHA256 hash, use the command
# openssl sha256 filename
registry = {
"histolab/broken.svs... | 76.914894 | 153 | 0.794467 |
fccd2a530ead0326ad7dd4cc03386520a9df637f | 505 | py | Python | differential/plugins/pterclub.py | funqc/Differential | 738ebf9a2a54ea04498b3394f80d980aad083ea7 | [
"MIT"
] | 52 | 2021-10-12T11:23:45.000Z | 2022-03-18T04:15:03.000Z | differential/plugins/pterclub.py | funqc/Differential | 738ebf9a2a54ea04498b3394f80d980aad083ea7 | [
"MIT"
] | 4 | 2021-10-15T13:58:42.000Z | 2022-03-15T12:42:35.000Z | differential/plugins/pterclub.py | funqc/Differential | 738ebf9a2a54ea04498b3394f80d980aad083ea7 | [
"MIT"
] | 5 | 2021-11-18T05:41:23.000Z | 2022-03-09T03:13:15.000Z | import argparse
from differential.plugins.nexusphp import NexusPHP
| 22.954545 | 84 | 0.691089 |
fccd89561bcf68c7f9ec8902df57d34730dab901 | 1,021 | py | Python | Python_Network_Automation/input_num_ports/input_port_num.py | yasser296/Python-Projects | eae3598e2d4faf08d9def92c8b417c2e7946c5f4 | [
"MIT"
] | null | null | null | Python_Network_Automation/input_num_ports/input_port_num.py | yasser296/Python-Projects | eae3598e2d4faf08d9def92c8b417c2e7946c5f4 | [
"MIT"
] | null | null | null | Python_Network_Automation/input_num_ports/input_port_num.py | yasser296/Python-Projects | eae3598e2d4faf08d9def92c8b417c2e7946c5f4 | [
"MIT"
] | null | null | null | import getpass
import telnetlib
port_num = str(input("Enter the Number of Port and type: "))
HOST = "10.1.1.1"
user = input("\nEnter The Username: ")
password = getpass.getpass()
tn = telnetlib.Telnet(HOST)
tn.read_until(b"Username: ")
tn.write(user.encode('ascii') + b"\n")
if password:
tn... | 26.179487 | 79 | 0.641528 |
fccdef4342d503873073f877b14acb5b5a816b11 | 1,523 | py | Python | odinw/download.py | microsoft/GLIP | fd52c6361f013e70ae7682d90b3ab3ca2bd5e6bc | [
"MIT"
] | 295 | 2021-12-08T02:22:27.000Z | 2022-03-31T22:27:10.000Z | odinw/download.py | microsoft/GLIP | fd52c6361f013e70ae7682d90b3ab3ca2bd5e6bc | [
"MIT"
] | 1 | 2021-12-14T08:09:13.000Z | 2022-03-17T03:53:19.000Z | odinw/download.py | microsoft/GLIP | fd52c6361f013e70ae7682d90b3ab3ca2bd5e6bc | [
"MIT"
] | 9 | 2021-12-09T00:33:25.000Z | 2022-03-17T11:57:42.000Z | import argparse
import os
argparser = argparse.ArgumentParser()
argparser.add_argument("--dataset_names", default="all", type=str) # "all" or names joined by comma
argparser.add_argument("--dataset_path", default="DATASET/odinw", type=str)
args = argparser.parse_args()
root = "https://vlpdatasets.blob.core.windows.ne... | 56.407407 | 561 | 0.703874 |
fccf60112f63422ba7b8dfc98d7afd7bb15d9658 | 22,013 | py | Python | Analysis/check_for_bias/data_analysis_tool.py | cgeorgitsis/ai4netmon | 36c4c1695fd980705d3e3f76385cda14baf7f397 | [
"MIT"
] | null | null | null | Analysis/check_for_bias/data_analysis_tool.py | cgeorgitsis/ai4netmon | 36c4c1695fd980705d3e3f76385cda14baf7f397 | [
"MIT"
] | null | null | null | Analysis/check_for_bias/data_analysis_tool.py | cgeorgitsis/ai4netmon | 36c4c1695fd980705d3e3f76385cda14baf7f397 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from iso3166 import countries
import pycountry_convert as pc
import pycountry
import re
from datetime import datetime
from statsmodels.distributions.empirical_distribution import ECDF
FINAL_DATAFRAME = '../aggregate_data/final_dataframe.csv'
PATH_R... | 42.826848 | 122 | 0.630627 |
fcd03cda24a62b52462ec71d4e75a58d63dacc27 | 22,521 | py | Python | transformers/script_tune_multi_pos.py | rizwan09/NLPDV | 2fa05421319db106e7a2befe6c3720a9c136c292 | [
"MIT"
] | 2 | 2021-04-27T19:56:28.000Z | 2021-08-19T05:34:37.000Z | transformers/script_tune_multi_pos.py | rizwan09/NLPDV | 2fa05421319db106e7a2befe6c3720a9c136c292 | [
"MIT"
] | 5 | 2021-05-03T14:40:33.000Z | 2021-05-03T14:40:34.000Z | transformers/script_tune_multi_pos.py | rizwan09/NLPDV | 2fa05421319db106e7a2befe6c3720a9c136c292 | [
"MIT"
] | null | null | null | import os, pdb
# ______________________________________NLPDV____________________________________
# _______________________________________________________________________
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from transformers import *
import _pickle as pkl
import shutil
import numpy... | 45.49697 | 178 | 0.519471 |
fcd03d8b6056bce23b5cd7fc66bae1e46820e9b4 | 645 | py | Python | gather/upload_poster_rooms.py | stephenfreund/PLDI-2021-Mini-Conf | 3d529d32a8563682ea69eb1e3b1742b447b71f42 | [
"MIT"
] | null | null | null | gather/upload_poster_rooms.py | stephenfreund/PLDI-2021-Mini-Conf | 3d529d32a8563682ea69eb1e3b1742b447b71f42 | [
"MIT"
] | null | null | null | gather/upload_poster_rooms.py | stephenfreund/PLDI-2021-Mini-Conf | 3d529d32a8563682ea69eb1e3b1742b447b71f42 | [
"MIT"
] | null | null | null | import csv
import io
import json
import time
import zlib
import sys
import os
import requests
import yaml
from libgather import Gather
if __name__ == "__main__":
config = yaml.load(open("../admin/config.yml").read(), Loader=yaml.SafeLoader) | yaml.load(open("config.yml").read(), Loader=yaml.SafeLoader)
rooms... | 29.318182 | 145 | 0.697674 |
fcd127df2257bc5264c56c5910c76287e8e09b8a | 588 | py | Python | Aulas Python/m03/aula18a.py | joaquimjfernandes/Curso-de-Python | 3356211248d355eaa67098cebe5cdb8cf6badc75 | [
"MIT"
] | null | null | null | Aulas Python/m03/aula18a.py | joaquimjfernandes/Curso-de-Python | 3356211248d355eaa67098cebe5cdb8cf6badc75 | [
"MIT"
] | null | null | null | Aulas Python/m03/aula18a.py | joaquimjfernandes/Curso-de-Python | 3356211248d355eaa67098cebe5cdb8cf6badc75 | [
"MIT"
] | null | null | null | print('=' * 15, '\033[1;35mAULA 18 - Listas[Part #2]\033[m', '=' * 15)
# --------------------------------------------------------------------
dados = []
pessoas = []
galera = [['Miguel', 25], ['Berta', 59], ['Joaquim', 20]]
# --------------------------------------------------------------------
dados.append('Joaquim')
d... | 30.947368 | 70 | 0.477891 |
fcd266ce40d677f1f9a87708fb585f70ce124a6c | 1,462 | py | Python | src/azure/azure_test_run_experiment.py | ThordurPall/MLOpsExercises- | 8714d83477f6132893b74675e529bfeef13ece85 | [
"MIT"
] | null | null | null | src/azure/azure_test_run_experiment.py | ThordurPall/MLOpsExercises- | 8714d83477f6132893b74675e529bfeef13ece85 | [
"MIT"
] | null | null | null | src/azure/azure_test_run_experiment.py | ThordurPall/MLOpsExercises- | 8714d83477f6132893b74675e529bfeef13ece85 | [
"MIT"
] | 1 | 2021-06-11T12:38:38.000Z | 2021-06-11T12:38:38.000Z | # -*- coding: utf-8 -*-
from azureml.core import Environment, Experiment, ScriptRunConfig, Workspace
from azureml.core.conda_dependencies import CondaDependencies
if __name__ == '__main__':
main()
| 39.513514 | 98 | 0.640903 |
fcd5f55bb1f89d31cd3d25738bba5c23139e9aa7 | 1,978 | py | Python | Logger/Logger.py | ArthMx/Logger | 0fab4009abec00f33d9b93d0c6093e544e5168b8 | [
"MIT"
] | null | null | null | Logger/Logger.py | ArthMx/Logger | 0fab4009abec00f33d9b93d0c6093e544e5168b8 | [
"MIT"
] | null | null | null | Logger/Logger.py | ArthMx/Logger | 0fab4009abec00f33d9b93d0c6093e544e5168b8 | [
"MIT"
] | null | null | null | import pandas as pd
import time
import sys
| 29.969697 | 88 | 0.557634 |
fcd712ebf1be2ba90b02edd6014c977973d0aec4 | 1,653 | py | Python | optimization/prac1/tests/test_logistic.py | shaandesai1/AIMS | fee0be214b393af2184d565eb1e9aebb4eb6eeec | [
"MIT"
] | null | null | null | optimization/prac1/tests/test_logistic.py | shaandesai1/AIMS | fee0be214b393af2184d565eb1e9aebb4eb6eeec | [
"MIT"
] | null | null | null | optimization/prac1/tests/test_logistic.py | shaandesai1/AIMS | fee0be214b393af2184d565eb1e9aebb4eb6eeec | [
"MIT"
] | null | null | null | import unittest
from sys import argv
import numpy as np
import torch
from objective.logistic import Logistic_Gradient
from .utils import Container, assert_all_close, assert_all_close_dict
if __name__ == '__main__':
unittest.main(argv=argv)
| 35.170213 | 98 | 0.595281 |
fcd9e9ab0176465cc57d67c6fdd44f612db63916 | 426 | py | Python | mitmproxy/proxy/modes/tunnel_proxy.py | intfrr/mitmproxy | 3304ea91809ac942083b769b1d1761ee42025a13 | [
"MIT"
] | 6 | 2020-11-25T07:33:05.000Z | 2022-01-25T07:25:54.000Z | mitmproxy/proxy/modes/tunnel_proxy.py | intfrr/mitmproxy | 3304ea91809ac942083b769b1d1761ee42025a13 | [
"MIT"
] | null | null | null | mitmproxy/proxy/modes/tunnel_proxy.py | intfrr/mitmproxy | 3304ea91809ac942083b769b1d1761ee42025a13 | [
"MIT"
] | 4 | 2021-03-14T16:14:27.000Z | 2021-09-25T03:01:15.000Z | from mitmproxy import exceptions
from mitmproxy import platform
from mitmproxy.proxy import protocol
| 23.666667 | 66 | 0.647887 |
fcdad0563564da691ff6918e2c18e8483c8a38b4 | 69,814 | py | Python | tests/test_nafigator.py | DeNederlandscheBank/nafigator | 02f8bf4e0962430429cc2c4fdfc79d2d90a16363 | [
"MIT"
] | 1 | 2022-01-17T14:41:25.000Z | 2022-01-17T14:41:25.000Z | tests/test_nafigator.py | DeNederlandscheBank/nafigator | 02f8bf4e0962430429cc2c4fdfc79d2d90a16363 | [
"MIT"
] | 3 | 2021-11-03T14:53:25.000Z | 2022-02-22T13:21:13.000Z | tests/test_nafigator.py | DeNederlandscheBank/nafigator | 02f8bf4e0962430429cc2c4fdfc79d2d90a16363 | [
"MIT"
] | 1 | 2021-11-17T10:48:19.000Z | 2021-11-17T10:48:19.000Z | #!/usr/bin/env python
"""Tests for `nafigator` package."""
import unittest
unittest.TestLoader.sortTestMethodsUsing = None
from deepdiff import DeepDiff
from click.testing import CliRunner
from nafigator import NafDocument, parse2naf
from os.path import join
| 32.157531 | 286 | 0.283854 |
fcdc072e1fbfda78b87aa6ba6f67523a4ef0eadf | 617 | py | Python | src/openpersonen/setup.py | maykinmedia/open-personen | ddcf083ccd4eb864c5305bcd8bc75c6c64108272 | [
"RSA-MD"
] | 2 | 2020-08-26T11:24:43.000Z | 2021-07-28T09:46:40.000Z | src/openpersonen/setup.py | maykinmedia/open-personen | ddcf083ccd4eb864c5305bcd8bc75c6c64108272 | [
"RSA-MD"
] | 153 | 2020-08-26T10:45:35.000Z | 2021-12-10T17:33:16.000Z | src/openpersonen/setup.py | maykinmedia/open-personen | ddcf083ccd4eb864c5305bcd8bc75c6c64108272 | [
"RSA-MD"
] | null | null | null | """
Bootstrap the environment.
Load the secrets from the .env file and store them in the environment, so
they are available for Django settings initialization.
.. warning::
do NOT import anything Django related here, as this file needs to be loaded
before Django is initialized.
"""
import os
from dotenv imp... | 26.826087 | 87 | 0.752026 |
fcdd550e33ec3168390a3e5561a28942444966d7 | 1,065 | py | Python | unisan/lemlit/migrations/0013_auto_20170901_0649.py | kurniantoska/ichsan_proj | f79cbcb896df902e129dcdb2affc89dc4f3844ef | [
"Apache-2.0"
] | null | null | null | unisan/lemlit/migrations/0013_auto_20170901_0649.py | kurniantoska/ichsan_proj | f79cbcb896df902e129dcdb2affc89dc4f3844ef | [
"Apache-2.0"
] | 2 | 2022-02-12T05:49:41.000Z | 2022-02-12T17:40:30.000Z | unisan/lemlit/migrations/0013_auto_20170901_0649.py | kurniantoska/ichsan_proj | f79cbcb896df902e129dcdb2affc89dc4f3844ef | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-31 22:49
from __future__ import unicode_literals
from django.db import migrations, models
| 31.323529 | 106 | 0.631925 |
fcdfa782e7c758bf0c346c1a8ea1a4823578f103 | 3,441 | py | Python | PyAlgo4/src/UnionFind.py | QuDong/Algorithm4 | c15c27653d860a1cd90a42cf97f7586ced12b48f | [
"MIT"
] | 6 | 2017-07-07T08:10:42.000Z | 2019-12-25T21:42:40.000Z | PyAlgo4/src/UnionFind.py | QuDong/Algorithm4 | c15c27653d860a1cd90a42cf97f7586ced12b48f | [
"MIT"
] | null | null | null | PyAlgo4/src/UnionFind.py | QuDong/Algorithm4 | c15c27653d860a1cd90a42cf97f7586ced12b48f | [
"MIT"
] | 1 | 2021-08-22T06:43:47.000Z | 2021-08-22T06:43:47.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 22/4/2016 10:57 AM
Author: Qu Dong
"""
if __name__ == "__main__":
# uf = WeightedQuickUnionUF(10)
# uf = QuickUnionUF(10)
uf = QuikFindUF(10)
uf.union(6, 9)
print(' '.join([str(i) for i in uf.parent]))
uf.union(8, 2)
print(' ... | 25.87218 | 81 | 0.527172 |
fce02534213cd7fe47e35d715ef3b5d748426853 | 11,902 | py | Python | components/testers.py | Debutante/Graduation_Project | 8b3d082c0f3c67a34913bc485d8f8bc6c314d0fc | [
"MIT"
] | null | null | null | components/testers.py | Debutante/Graduation_Project | 8b3d082c0f3c67a34913bc485d8f8bc6c314d0fc | [
"MIT"
] | null | null | null | components/testers.py | Debutante/Graduation_Project | 8b3d082c0f3c67a34913bc485d8f8bc6c314d0fc | [
"MIT"
] | null | null | null | from datasets.dataset_processors import ExtendedDataset
from models.model import IdentificationModel, ResNet50
from models.siamese import SiameseNet, MssNet
from base import BaseExecutor
from utils.utilities import type_error_msg, value_error_msg, timer, load_model
import torch
from torch.utils.data import DataLoader
f... | 42.205674 | 115 | 0.574777 |
fce044e7cd064c225b4007680264122a0fce789c | 1,867 | py | Python | src/google_api/calendar.py | KaiWalter/family-board-py | 353f8431e12a3d10fea4f085760e2a36879011e8 | [
"Apache-2.0"
] | null | null | null | src/google_api/calendar.py | KaiWalter/family-board-py | 353f8431e12a3d10fea4f085760e2a36879011e8 | [
"Apache-2.0"
] | null | null | null | src/google_api/calendar.py | KaiWalter/family-board-py | 353f8431e12a3d10fea4f085760e2a36879011e8 | [
"Apache-2.0"
] | null | null | null | from datetime import timedelta
import app_config
import dateutil.parser
from googleapiclient.discovery import build
from injector import inject
from models import AllDayCalendarEntry, CalendarEntry
from google_api import GoogleAuthenication
| 35.903846 | 123 | 0.577933 |
fce090df1058b3b2784748764525e72f51d13b3c | 4,507 | py | Python | Utils.py | colinchen6512/share-analysis | 118dac94a5c99bb89342a48fb29bf7af7aab60c7 | [
"BSD-3-Clause"
] | 1 | 2018-06-19T06:20:02.000Z | 2018-06-19T06:20:02.000Z | Utils.py | colinchen6512/share-analysis | 118dac94a5c99bb89342a48fb29bf7af7aab60c7 | [
"BSD-3-Clause"
] | null | null | null | Utils.py | colinchen6512/share-analysis | 118dac94a5c99bb89342a48fb29bf7af7aab60c7 | [
"BSD-3-Clause"
] | null | null | null | """
Created on 2017129
@author: Colin
"""
import datetime
import math
import logging
import logging.config
import re
# china stock shanghai
startSH = 600001
MAXSH = 603999
startSZ = 1
MAXSZ = 2909
startCY = 300001
MAXCY = 300710
STEP = 1
LASTDAYS = 10
INCR_VOL = 5
PERCENTBOUND = 9.97
VOLATIL... | 20.674312 | 102 | 0.60284 |
fce0974e2666f1498272046ca013c87624cf1eb2 | 652 | py | Python | Estrutura de dados/ArvoreBinaria/TreeUni.py | Kaioguilherme1/PythonCodigos | 76d078c09f825d5fc81d21ba9cc14793a546847c | [
"MIT"
] | null | null | null | Estrutura de dados/ArvoreBinaria/TreeUni.py | Kaioguilherme1/PythonCodigos | 76d078c09f825d5fc81d21ba9cc14793a546847c | [
"MIT"
] | null | null | null | Estrutura de dados/ArvoreBinaria/TreeUni.py | Kaioguilherme1/PythonCodigos | 76d078c09f825d5fc81d21ba9cc14793a546847c | [
"MIT"
] | null | null | null | #AUTH Kaio Guilherme
root = Node(0)
root.left = Node(1)
root.right = Node(0)
root.right.left = Node(1)
root.right.right = Node(0)
root.right.left.right = Node(1)
root.right.left.left = Node(1)
print("Esta rvore possui {} subrvores Univais ".format(sum_uni(root)))
| 22.482759 | 90 | 0.625767 |
fce1741f6a442ef1c28f6a2f95dedae668e0f5ef | 559 | py | Python | gerrymandering/gerrymandering.py | omarchehab98/open.kattis.com-problems | 0523e2e641151dad719ef05cc9811a8ef5c6a278 | [
"MIT"
] | 1 | 2020-10-04T22:41:04.000Z | 2020-10-04T22:41:04.000Z | gerrymandering/gerrymandering.py | omarchehab98/open.kattis.com-problems | 0523e2e641151dad719ef05cc9811a8ef5c6a278 | [
"MIT"
] | null | null | null | gerrymandering/gerrymandering.py | omarchehab98/open.kattis.com-problems | 0523e2e641151dad719ef05cc9811a8ef5c6a278 | [
"MIT"
] | null | null | null | P, D = list(map(int, input().split(' ')))
totA, totB = 0, 0
dis = [[0,0,0,0] for i in range(D)]
for i in range(P):
a, b, c = map(int, input().split(' '))
k = (b+c)//2 + 1
dis[a-1][0] += b
dis[a-1][1] += c
for i, (ta, tb, _, _) in enumerate(dis):
k = (ta + tb)//2 + 1
if ta > tb:
wA = ta-k
wB ... | 19.964286 | 46 | 0.468694 |
fce34b6c81c35a8f9834ee5de2cc8e7f75af13c9 | 1,711 | py | Python | jobs/models.py | shifat151/portfolio | de025dd345232385e31f1e9741ddcbfe1ca33f93 | [
"MIT"
] | null | null | null | jobs/models.py | shifat151/portfolio | de025dd345232385e31f1e9741ddcbfe1ca33f93 | [
"MIT"
] | 6 | 2021-06-09T17:58:42.000Z | 2021-09-25T14:39:22.000Z | jobs/models.py | shifat151/portfolio | de025dd345232385e31f1e9741ddcbfe1ca33f93 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
# class Objective(models.Model):
# obj=models.TextField(blank=True)
# list_obj=[]
# def __str__(self):
# self.list_obj=self.obj.split()
# return " ".join(self.list_obj[:5])+'...'
| 29.5 | 68 | 0.700175 |
fce5dd57f0709ecf7ee6d52ec4b6dcaee41aee57 | 1,127 | py | Python | snapshotgetter.py | membermatters/UniFiVideoSnapshotGetter | 30808608aeac1b802ac3ef1e10ff7b6e0ced40c4 | [
"MIT"
] | 3 | 2020-01-26T00:59:49.000Z | 2020-01-28T12:23:48.000Z | snapshotgetter.py | HSBNE/UniFiVideoSnapshotGetter | 30808608aeac1b802ac3ef1e10ff7b6e0ced40c4 | [
"MIT"
] | 1 | 2020-04-25T00:17:50.000Z | 2020-04-25T00:22:08.000Z | snapshotgetter.py | membermatters/UniFiVideoSnapshotGetter | 30808608aeac1b802ac3ef1e10ff7b6e0ced40c4 | [
"MIT"
] | null | null | null | import requests
import json
import time
import os
default_output = "/usr/app/output/"
while True:
with open('/usr/app/config/config.json') as json_file:
config = json.load(json_file)
validate_config()
for camera in config["cameras"]:
url = get_camera_url(camera["id"])
r = req... | 28.175 | 144 | 0.631766 |
fce7502127494939d64a37528171ff04a8c441db | 7,419 | py | Python | app.py | ahensley3/yulesim | 9c681bc89ad9f2594c8dcea832ab10b9c0d06c8b | [
"MIT"
] | null | null | null | app.py | ahensley3/yulesim | 9c681bc89ad9f2594c8dcea832ab10b9c0d06c8b | [
"MIT"
] | null | null | null | app.py | ahensley3/yulesim | 9c681bc89ad9f2594c8dcea832ab10b9c0d06c8b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 29 20:53:21 2020
@author: asherhensley
"""
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
import pandas as pd
import yulesimon as ys
from plotly.subplots import make_subplots
import plo... | 33.876712 | 108 | 0.587411 |
fce82f3e40f49996cececad59c6952decb597ac4 | 838 | py | Python | app/thumbnail.py | Kbman99/NetSecShare | 9bf4247d1c64c92dd8719747bc2e5b6147e34dc0 | [
"MIT"
] | null | null | null | app/thumbnail.py | Kbman99/NetSecShare | 9bf4247d1c64c92dd8719747bc2e5b6147e34dc0 | [
"MIT"
] | null | null | null | app/thumbnail.py | Kbman99/NetSecShare | 9bf4247d1c64c92dd8719747bc2e5b6147e34dc0 | [
"MIT"
] | null | null | null | from PIL import Image
import os
import sys
from app import app
| 32.230769 | 99 | 0.616945 |
fcece923f5b34448d4cd57acfb2d51b4e8d2e637 | 735 | py | Python | resemblance/main/similarity/api/search/loadModel.py | Sorarinu/ProjectP2016_F | 388afadea7e6efa2a43404c66d545482d75b2944 | [
"MIT"
] | null | null | null | resemblance/main/similarity/api/search/loadModel.py | Sorarinu/ProjectP2016_F | 388afadea7e6efa2a43404c66d545482d75b2944 | [
"MIT"
] | null | null | null | resemblance/main/similarity/api/search/loadModel.py | Sorarinu/ProjectP2016_F | 388afadea7e6efa2a43404c66d545482d75b2944 | [
"MIT"
] | null | null | null | # coding:utf-8
from gensim.models import word2vec
| 25.344828 | 77 | 0.557823 |
fcecf5c8e7ad497a7330cca8da50417450759a1a | 2,344 | py | Python | noodles/prov/workflow.py | BvB93/noodles | 7547471baa18a11b8020c017388a7e208d194ef4 | [
"Apache-2.0"
] | 22 | 2016-07-26T20:42:08.000Z | 2022-02-08T16:04:25.000Z | noodles/prov/workflow.py | BvB93/noodles | 7547471baa18a11b8020c017388a7e208d194ef4 | [
"Apache-2.0"
] | 71 | 2015-12-24T18:44:32.000Z | 2022-02-11T11:31:08.000Z | noodles/prov/workflow.py | BvB93/noodles | 7547471baa18a11b8020c017388a7e208d194ef4 | [
"Apache-2.0"
] | 8 | 2016-12-22T10:14:28.000Z | 2020-06-05T21:01:51.000Z | from ..workflow import (Workflow, is_node_ready, Empty)
from ..workflow.arguments import (serialize_arguments, ref_argument)
from ..serial import (Registry)
from .key import (prov_key)
def set_global_provenance(wf: Workflow, registry: Registry):
"""Compute a global provenance key for the entire workflow
bef... | 33.971014 | 75 | 0.651024 |
fceeaffd432194705798c14e2664784639667ce8 | 20,518 | py | Python | tests/test_experiment.py | movermeyer/pyexperiment | c426565d870d944bd5b9712629d8f1ba2527c67f | [
"MIT"
] | 220 | 2015-08-09T05:47:35.000Z | 2020-03-05T09:39:19.000Z | tests/test_experiment.py | movermeyer/pyexperiment | c426565d870d944bd5b9712629d8f1ba2527c67f | [
"MIT"
] | null | null | null | tests/test_experiment.py | movermeyer/pyexperiment | c426565d870d944bd5b9712629d8f1ba2527c67f | [
"MIT"
] | 12 | 2015-08-09T05:50:01.000Z | 2021-07-19T21:11:35.000Z | """Tests the experiment module of pyexperiment
Written by Peter Duerr
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
import unittest
import argparse
import io
import mock
import tempfile
import logging
import mu... | 29.997076 | 78 | 0.566673 |
fcf0a5fa975174fdd3edea90ab017905330b7e25 | 987 | py | Python | businessplots/_data.py | fvinas/businessplots | 96987967c2d80f260d99799b95cbe5cabc2e2959 | [
"MIT"
] | 2 | 2018-07-04T05:18:58.000Z | 2020-06-04T09:40:06.000Z | businessplots/_data.py | fvinas/businessplots | 96987967c2d80f260d99799b95cbe5cabc2e2959 | [
"MIT"
] | null | null | null | businessplots/_data.py | fvinas/businessplots | 96987967c2d80f260d99799b95cbe5cabc2e2959 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def _data_from_bar(ax, bar_label):
"""Given a matplotlib Axes object and a bar label,
returns (x,y,w,h) data underlying the bar plot.
Args:
ax: The Axes object the data will be extracted from.
bar_label: The bar label from which you want to extract the data.
R... | 27.416667 | 73 | 0.621074 |
fcf0bc17ba52b8f6e630305087d83fb47cef7c90 | 457 | py | Python | Programming basics/Exam Exercises/Test Exam/xmas_sweets.py | antonarnaudov/SoftUniProjects | 01cbdce2b350b57240045d1bc3e21d34f9d0351d | [
"MIT"
] | null | null | null | Programming basics/Exam Exercises/Test Exam/xmas_sweets.py | antonarnaudov/SoftUniProjects | 01cbdce2b350b57240045d1bc3e21d34f9d0351d | [
"MIT"
] | null | null | null | Programming basics/Exam Exercises/Test Exam/xmas_sweets.py | antonarnaudov/SoftUniProjects | 01cbdce2b350b57240045d1bc3e21d34f9d0351d | [
"MIT"
] | null | null | null | baklava_price = float(input())
muffin_price = float(input())
shtolen_kg = float(input())
candy_kg = float(input())
bisquits_kg = int(input())
shtolen_price = baklava_price + baklava_price * 0.6
candy_price = muffin_price + muffin_price * 0.8
busquits_price = 7.50
shtolen_sum = shtolen_kg * shtolen_price
candy_sum = ca... | 32.642857 | 51 | 0.765864 |
fcf3887c8a4e262fb98ac2826327b5b48c90f617 | 1,281 | py | Python | adminmgr/media/code/python/red3/BD_204_219_1354_reducer.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 9 | 2019-11-08T02:05:27.000Z | 2021-12-13T12:06:35.000Z | adminmgr/media/code/python/red3/BD_204_219_1354_reducer.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 6 | 2019-11-27T03:23:16.000Z | 2021-06-10T19:15:13.000Z | adminmgr/media/code/python/red3/BD_204_219_1354_reducer.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 4 | 2019-11-26T17:04:27.000Z | 2021-12-13T11:57:03.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import csv
from operator import itemgetter
import sys
res = {}
run = 0
for line in sys.stdin:
line = line.strip()
line_val = line.split('\t')
#print(line_val)
key, val = line_val[0], line_val[1]
key_list = key.split(';')
'''
if len(key_list) == 4:... | 21.35 | 68 | 0.53708 |
fcf3ec0cba8064d47cade9966d4e9ff91a2d5335 | 3,731 | py | Python | db/team.py | leaffan/pynhldb | a0cdd56f0c21b866bfe62aa10b3dd205a9ec0ff1 | [
"MIT"
] | 3 | 2017-02-01T15:37:23.000Z | 2017-08-31T20:41:46.000Z | db/team.py | leaffan/pynhldb | a0cdd56f0c21b866bfe62aa10b3dd205a9ec0ff1 | [
"MIT"
] | 41 | 2017-09-13T02:13:21.000Z | 2018-11-07T03:29:39.000Z | db/team.py | leaffan/pynhldb | a0cdd56f0c21b866bfe62aa10b3dd205a9ec0ff1 | [
"MIT"
] | 1 | 2017-03-09T14:58:39.000Z | 2017-03-09T14:58:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
from sqlalchemy import and_, or_
from sqlalchemy.sql.expression import func
| 28.7 | 72 | 0.499062 |
fcf5dcce6c991029f88a835fca17b7bbc82b5202 | 1,316 | py | Python | Backend/flask_api/functions.py | STCVIT/LivStory | 0c44ae672d17a44f79a8cbc0d7848500d9ff76e2 | [
"MIT"
] | 4 | 2021-05-11T10:43:52.000Z | 2021-11-15T12:30:52.000Z | Backend/flask_api/functions.py | Arya-Wadhwani07/LivStory | 0c44ae672d17a44f79a8cbc0d7848500d9ff76e2 | [
"MIT"
] | null | null | null | Backend/flask_api/functions.py | Arya-Wadhwani07/LivStory | 0c44ae672d17a44f79a8cbc0d7848500d9ff76e2 | [
"MIT"
] | 1 | 2021-11-08T12:23:39.000Z | 2021-11-08T12:23:39.000Z | import firebase_admin
from firebase_admin import credentials, firestore
# from firebase_admin import firestore
cred = credentials.Certificate('./creds/google-services.json')
firebase_admin.initialize_app(cred)
print("initializing storage access")
db = firestore.client()
if __name__ == "__main__":
print("findi... | 28.608696 | 86 | 0.607903 |
fcf5ffc9ef02cc09ed9ac38bacf1f6162d980844 | 114 | py | Python | semanticeditor/utils/general.py | spookylukey/semanticeditor | 82777fe63869c0f38530b9c20696de995d2fa874 | [
"BSD-3-Clause"
] | null | null | null | semanticeditor/utils/general.py | spookylukey/semanticeditor | 82777fe63869c0f38530b9c20696de995d2fa874 | [
"BSD-3-Clause"
] | null | null | null | semanticeditor/utils/general.py | spookylukey/semanticeditor | 82777fe63869c0f38530b9c20696de995d2fa874 | [
"BSD-3-Clause"
] | null | null | null | """
Generic utilities
"""
| 11.4 | 23 | 0.508772 |
fcf6168c1892c3343e6804e126e224dff6e56701 | 349 | py | Python | study/curso-em-video/exercises/037.py | jhonatanmaia/python | d53c64e6bab598c7e85813fd3f107c6f23c1fc46 | [
"MIT"
] | null | null | null | study/curso-em-video/exercises/037.py | jhonatanmaia/python | d53c64e6bab598c7e85813fd3f107c6f23c1fc46 | [
"MIT"
] | null | null | null | study/curso-em-video/exercises/037.py | jhonatanmaia/python | d53c64e6bab598c7e85813fd3f107c6f23c1fc46 | [
"MIT"
] | null | null | null | x=int(input('Enter the number to convert: '))
print('Select the convertion')
print('''
[ 1 ] Binary
[ 1 ] Octal
[ 3 ] HexaDeicmal
''')
y=int(input('1 - Binary 2 - Octal 3 - Hexadecimal'))
if y==1:
bin(x)[2:]
print('{}'.format(x))
elif y==2:
oct(x)
print('{}'.format(x))
elif y==3:
hex(x)
print(... | 17.45 | 52 | 0.558739 |
fcf88703f04498783f3d859062f98aeed22166fd | 1,947 | py | Python | src/pipeline.py | latticetower/electra_cute | 84e167e6519062227c6c246a5bc6e132c0cbbc63 | [
"MIT"
] | null | null | null | src/pipeline.py | latticetower/electra_cute | 84e167e6519062227c6c246a5bc6e132c0cbbc63 | [
"MIT"
] | null | null | null | src/pipeline.py | latticetower/electra_cute | 84e167e6519062227c6c246a5bc6e132c0cbbc63 | [
"MIT"
] | null | null | null | """Main module with image processing pipeline with several stages:
1. Processing: simplyfy image to get better results.
Here we do color clustering and similar image transformations.
2. Select shapes: find similar shapes on image
3. Classify shapes
4. Connect shapes: find lines on image and make connections between sh... | 30.904762 | 82 | 0.634309 |
fcf9b23691f404815dc0aa6f16880a8b85a89c19 | 970 | py | Python | other/q16.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 79 | 2018-03-27T12:37:49.000Z | 2022-01-21T10:18:17.000Z | other/q16.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | null | null | null | other/q16.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 27 | 2018-04-08T03:07:06.000Z | 2021-10-30T00:01:50.000Z | """
n,1n1.
:
n=5,1~n1,2,3,4,5.11,1.
n=11,1~n1,2,3,4,5,6,7,8,9,10,11.11(
1),10(1),11(1,2),4
"""
if __name__ == '__main__':
print(OneCounter.get_nums_of_one(9991))
| 22.55814 | 76 | 0.530928 |
fcfada5ca785383cf0f56e4e1dc9cd5953621980 | 7,449 | py | Python | temboo/core/Library/Dropbox/FilesAndMetadata/ListFolderContents.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 7 | 2016-03-07T02:07:21.000Z | 2022-01-21T02:22:41.000Z | temboo/core/Library/Dropbox/FilesAndMetadata/ListFolderContents.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | null | null | null | temboo/core/Library/Dropbox/FilesAndMetadata/ListFolderContents.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 8 | 2016-06-14T06:01:11.000Z | 2020-04-22T09:21:44.000Z | # -*- coding: utf-8 -*-
###############################################################################
#
# ListFolderContents
# Retrieves metadata (including folder contents) for a folder or file in Dropbox.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Versi... | 50.331081 | 278 | 0.694053 |
fcfbc54d24c8be5b0405bbea9f43e260f70f3679 | 1,187 | py | Python | _unittests/ut_module/test_code_style.py | sdpython/onnxcustom | ac253aa8b276ea34527fa61897792e61668fc216 | [
"MIT"
] | 7 | 2021-12-20T07:30:34.000Z | 2022-01-25T00:10:44.000Z | _unittests/ut_module/test_code_style.py | sdpython/onnxcustom | ac253aa8b276ea34527fa61897792e61668fc216 | [
"MIT"
] | 15 | 2020-07-09T17:02:52.000Z | 2022-02-12T00:33:05.000Z | _unittests/ut_module/test_code_style.py | sdpython/onnxcustom | ac253aa8b276ea34527fa61897792e61668fc216 | [
"MIT"
] | 3 | 2020-07-14T20:52:54.000Z | 2021-12-20T07:30:47.000Z | """
@brief test log(time=0s)
"""
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import check_pep8, ExtTestCase
if __name__ == "__main__":
unittest.main()
| 31.236842 | 76 | 0.536647 |
fcfbe07ad2636be7a7abd3023142fbdca5f0e03a | 16,277 | py | Python | alphabrew/GUI/MainWindow.py | jwjulien/alphabrew | 2cd9a4662bad6252ee27562edd9116d0b224180f | [
"MIT"
] | null | null | null | alphabrew/GUI/MainWindow.py | jwjulien/alphabrew | 2cd9a4662bad6252ee27562edd9116d0b224180f | [
"MIT"
] | null | null | null | alphabrew/GUI/MainWindow.py | jwjulien/alphabrew | 2cd9a4662bad6252ee27562edd9116d0b224180f | [
"MIT"
] | null | null | null | # ======================================================================================================================
# File: GUI/MainWindow.py
# Project: AlphaBrew
# Description: Extensions and functionality for the main GUI window.
# Author: Jared Julien <jaredjulien@gmail.com>
# Copyrig... | 45.980226 | 121 | 0.522762 |
fcfc1dfc919229f8945327e93c8aabcb984030c5 | 1,031 | py | Python | tests/mocks/meetup.py | PyColorado/boulderpython.org | fbe6ba581f213523fd7cde0816c6f31edbb4804a | [
"MIT"
] | 5 | 2018-01-18T16:47:53.000Z | 2018-05-19T14:42:18.000Z | tests/mocks/meetup.py | PyColorado/boulderpython.org | fbe6ba581f213523fd7cde0816c6f31edbb4804a | [
"MIT"
] | 28 | 2017-08-11T16:03:17.000Z | 2018-12-02T17:30:19.000Z | tests/mocks/meetup.py | PyColorado/boulderpython.org | fbe6ba581f213523fd7cde0816c6f31edbb4804a | [
"MIT"
] | 7 | 2017-08-11T04:46:05.000Z | 2019-07-11T15:16:45.000Z | # -*- coding: utf-8 -*-
"""
meetup.py
~~~~~~~~~
a mock for the Meetup APi client
"""
| 24.547619 | 93 | 0.553831 |
fcfcfef3cd3f1a18a070af42b7395114766e5ec0 | 731 | py | Python | stytra/gui/parameter_widgets.py | mark-dawn/stytra | be1d5be0a44aeb685d475240d056ef7adf60ed06 | [
"MIT"
] | null | null | null | stytra/gui/parameter_widgets.py | mark-dawn/stytra | be1d5be0a44aeb685d475240d056ef7adf60ed06 | [
"MIT"
] | null | null | null | stytra/gui/parameter_widgets.py | mark-dawn/stytra | be1d5be0a44aeb685d475240d056ef7adf60ed06 | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QDoubleSpinBox, QWidget, QLabel
| 30.458333 | 63 | 0.645691 |
fcff74cf536c4366cc44440f43c5a4a2a4cf6d83 | 1,124 | py | Python | test.py | tkianai/StylizePoseGAN | c975a2b581bd925f41bd08211148538054922745 | [
"MIT"
] | 1 | 2019-12-31T09:28:36.000Z | 2019-12-31T09:28:36.000Z | test.py | tkianai/StylizePoseGAN | c975a2b581bd925f41bd08211148538054922745 | [
"MIT"
] | 1 | 2020-01-03T13:10:04.000Z | 2020-01-03T13:10:04.000Z | test.py | tkianai/StylizePoseGAN | c975a2b581bd925f41bd08211148538054922745 | [
"MIT"
] | null | null | null |
import os
import math
from options.test_options import TestOptions
from utils import misc
from data.build import build_dataloader
from models import build_model
from collections import OrderedDict
if __name__ == "__main__":
opt = TestOptions().parse(save=False)
main(opt)
| 34.060606 | 140 | 0.710854 |
fcff9cc3e23b570d8492cf00e65943351af677a0 | 1,264 | py | Python | accounts/views.py | manuggz/memes_telegram_bot | 2ed73aac099923d08c89616ec35c965204cac119 | [
"Apache-2.0"
] | null | null | null | accounts/views.py | manuggz/memes_telegram_bot | 2ed73aac099923d08c89616ec35c965204cac119 | [
"Apache-2.0"
] | null | null | null | accounts/views.py | manuggz/memes_telegram_bot | 2ed73aac099923d08c89616ec35c965204cac119 | [
"Apache-2.0"
] | null | null | null | from django.contrib.auth import authenticate, login
from django.contrib.auth.models import User
from django.shortcuts import render, HttpResponseRedirect
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import views as auth_views
| 35.111111 | 108 | 0.699367 |
fcffbb8be658a956fb865be73b94931d9639eccb | 435 | py | Python | modeling/src/load_data.py | alyildiz/covid_19_xray | 4128cfa7146fd4f26ef5f53ee2f9231800c1abcb | [
"MIT"
] | null | null | null | modeling/src/load_data.py | alyildiz/covid_19_xray | 4128cfa7146fd4f26ef5f53ee2f9231800c1abcb | [
"MIT"
] | null | null | null | modeling/src/load_data.py | alyildiz/covid_19_xray | 4128cfa7146fd4f26ef5f53ee2f9231800c1abcb | [
"MIT"
] | null | null | null | from sklearn.model_selection import train_test_split
from src.utils import load_dataset
| 31.071429 | 83 | 0.76092 |
1e00cb7173018d7a05a900e6e209afc8a8d390a6 | 15,190 | py | Python | data-analysis/monitor.py | JakobHavtorn/es-rl | 30d81ad908a30e78d03c83d37454dbe8e05d1452 | [
"MIT"
] | 1 | 2021-09-03T17:54:14.000Z | 2021-09-03T17:54:14.000Z | data-analysis/monitor.py | JakobHavtorn/es-rl | 30d81ad908a30e78d03c83d37454dbe8e05d1452 | [
"MIT"
] | null | null | null | data-analysis/monitor.py | JakobHavtorn/es-rl | 30d81ad908a30e78d03c83d37454dbe8e05d1452 | [
"MIT"
] | null | null | null | import argparse
import os
import sys
import time
import warnings
from ast import literal_eval
warnings.filterwarnings("ignore")
import IPython
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import torch
import context
from context import utils
import uti... | 45.208333 | 166 | 0.66682 |
1e01bbc8a305d285c05e7d458242ea4366cd73ec | 2,329 | py | Python | src/trt_packnet/src/packnet_trt.py | surfii3z/packnet-sfm | 94edecfcd0d96c66330ab3c54133eb37ad286969 | [
"MIT"
] | 10 | 2021-04-06T23:30:11.000Z | 2022-03-29T09:22:47.000Z | src/trt_packnet/src/packnet_trt.py | surfii3z/packnet-sfm | 94edecfcd0d96c66330ab3c54133eb37ad286969 | [
"MIT"
] | 2 | 2021-05-04T14:18:38.000Z | 2021-05-05T13:16:59.000Z | src/trt_packnet/src/packnet_trt.py | surfii3z/packnet-sfm | 94edecfcd0d96c66330ab3c54133eb37ad286969 | [
"MIT"
] | 2 | 2021-05-05T12:48:25.000Z | 2022-03-14T23:31:02.000Z | import tensorrt as trt
import pycuda.driver as cuda
import cv2
import numpy as np
if __name__ == "__main__":
import pycuda.autoinit # This is needed for initializing CUDA driver
trt_packnet = TrtPacknet("packnet") | 38.180328 | 126 | 0.629025 |
1e0295cc93121468ac47831901ff4745a891d601 | 2,717 | py | Python | day-3-if-condition.py | roshansinghbisht/hello-python | 595418a47e66217ed8759c91cdb535e8fa88412b | [
"MIT"
] | null | null | null | day-3-if-condition.py | roshansinghbisht/hello-python | 595418a47e66217ed8759c91cdb535e8fa88412b | [
"MIT"
] | null | null | null | day-3-if-condition.py | roshansinghbisht/hello-python | 595418a47e66217ed8759c91cdb535e8fa88412b | [
"MIT"
] | null | null | null | # TASK:
# Given an integer, n, perform the following conditional actions:
# If n is odd, print Weird
# If n is even and in the inclusive range of 2 to 5, print Not Weird
# If n is even and in the inclusive range of 6 to 20, print Weird
# If n is even and greater than 20, print Not Weird
if __name__ == '__main__':
... | 38.814286 | 81 | 0.694148 |
1e04859ff7d5d3c3aacb33208a98e3c4d2b062d2 | 23,314 | py | Python | 5.2_CUSTOM_LIBRARY/day_by_day_best_low_error_point_forecast_between_all_models.py | pedroMoya/M5_kaggle_accuracy_KAGGLE_M5_A_share | 68126d57c44c18530782ccfe8a9df499889a47a3 | [
"MIT"
] | 2 | 2020-06-02T18:39:45.000Z | 2021-01-01T19:17:15.000Z | 5.2_CUSTOM_LIBRARY/day_by_day_best_low_error_point_forecast_between_all_models.py | pedroMoya/M5_kaggle_accuracy_KAGGLE_M5_A_share | 68126d57c44c18530782ccfe8a9df499889a47a3 | [
"MIT"
] | 1 | 2021-01-01T19:17:08.000Z | 2021-03-19T00:10:52.000Z | 5.2_CUSTOM_LIBRARY/day_by_day_best_low_error_point_forecast_between_all_models.py | pedroMoya/M5_kaggle_accuracy_KAGGLE_M5_A_share | 68126d57c44c18530782ccfe8a9df499889a47a3 | [
"MIT"
] | 1 | 2021-01-01T19:17:17.000Z | 2021-01-01T19:17:17.000Z | # analyzing each point forecast and selecting the best, day by day, saving forecasts and making final forecast
import os
import sys
import datetime
import logging
import logging.handlers as handlers
import json
import itertools as it
import pandas as pd
import numpy as np
# open local settings
with open('./settings.js... | 75.449838 | 117 | 0.643304 |
1e05368e04a4bf87ae51064f35640bd83d50e0b3 | 1,308 | py | Python | Day_20/part2.py | Uklusi/AdventOfCode2018 | adf8bc8f5654ee5caa6a0c5611bd7eb2bba89107 | [
"MIT"
] | null | null | null | Day_20/part2.py | Uklusi/AdventOfCode2018 | adf8bc8f5654ee5caa6a0c5611bd7eb2bba89107 | [
"MIT"
] | null | null | null | Day_20/part2.py | Uklusi/AdventOfCode2018 | adf8bc8f5654ee5caa6a0c5611bd7eb2bba89107 | [
"MIT"
] | null | null | null | from AoCUtils import *
from collections import defaultdict
# import re
# Assumptions:
# NO LOOPS
# No things like "^N(E|W)N$" where we have two branching paths to control simultaneously
# The only things not excluded are "^N(EW|)N" where the bracked ends with | and the other option is nullpotent
result = 0
with open... | 25.153846 | 110 | 0.610092 |
1e08bf6c174e80d317e171840bcccc9978e86d5e | 3,798 | py | Python | tests/_event/test_mouse_up_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | tests/_event/test_mouse_up_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | tests/_event/test_mouse_up_interface.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | from random import randint
from typing import Any
from typing import Dict
from retrying import retry
import apysc as ap
from apysc._event.mouse_up_interface import MouseUpInterface
from apysc._expression import expression_data_util
from apysc._type.variable_name_interface import VariableNameInterface
| 36.519231 | 78 | 0.651659 |
1e0a84eff400caa1b64f0d51ecb416d92de0482f | 378 | py | Python | margen/segment02/pitch.py | DaviRaubach/la_otra_margen | 5f7f2745d11a4dc6cd824236ad2af9af150289b2 | [
"CC0-1.0"
] | null | null | null | margen/segment02/pitch.py | DaviRaubach/la_otra_margen | 5f7f2745d11a4dc6cd824236ad2af9af150289b2 | [
"CC0-1.0"
] | null | null | null | margen/segment02/pitch.py | DaviRaubach/la_otra_margen | 5f7f2745d11a4dc6cd824236ad2af9af150289b2 | [
"CC0-1.0"
] | null | null | null | import abjad
I_pitches = {
"matA": abjad.PitchSegment([1, 6, 11, -6, -1, 4]),
"matB": abjad.PitchSegment([1, 6, 11]),
}
II_pitches = {
"matA": abjad.PitchSegment([4, -1, -6, -10, -4, 1]),
"matB": abjad.PitchSegment([4, -1, -6])
}
III_pitches = {
"matA": abjad.PitchSegment([1, -4, -10, 11, 6... | 25.2 | 56 | 0.529101 |
1e0b4b7dce1a9c078202227eab05854ab777342d | 2,674 | py | Python | etc/compute_topics.py | learning2hash/learning2hash.github.io | 71447a57e0288660ba5fc245e19b2cc748884be6 | [
"MIT"
] | 15 | 2018-04-23T12:54:31.000Z | 2022-02-08T08:46:43.000Z | etc/compute_topics.py | learning2hash/learning2hash.github.io | 71447a57e0288660ba5fc245e19b2cc748884be6 | [
"MIT"
] | 5 | 2019-05-21T13:23:24.000Z | 2021-06-14T12:35:39.000Z | etc/compute_topics.py | learning2hash/learning2hash.github.io | 71447a57e0288660ba5fc245e19b2cc748884be6 | [
"MIT"
] | 4 | 2019-05-17T19:47:52.000Z | 2020-08-06T02:13:56.000Z | import argparse
import json
import nltk
nltk.download('stopwords')
nltk.download('wordnet')
nltk.download('punkt')
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
from gensim.corpora import Dictionary
from gensim.models import LdaModel
if __name__ == "__main__":
args = parse_arguments... | 32.216867 | 143 | 0.651832 |
1e0bccc81b0c212a8ab41b2597bdffc455ed2eb3 | 105 | py | Python | app/schema/token.py | jburckel/fastapi-login-example | f2e2574dd8f4fce31cae3237bb92d90315350137 | [
"MIT"
] | null | null | null | app/schema/token.py | jburckel/fastapi-login-example | f2e2574dd8f4fce31cae3237bb92d90315350137 | [
"MIT"
] | null | null | null | app/schema/token.py | jburckel/fastapi-login-example | f2e2574dd8f4fce31cae3237bb92d90315350137 | [
"MIT"
] | 1 | 2020-09-21T12:44:43.000Z | 2020-09-21T12:44:43.000Z | from .mixin import AppSchemaBase
| 15 | 32 | 0.752381 |
1e0dae1b3513d3a8edaa965d13268367fc74f036 | 212 | py | Python | models/1-Tom/train/kaggle-hubmap-main/src/02_train/umap.py | navekshasood/HuBMAP---Hacking-the-Kidney | 018100fe4bfa5e8764b9df5a9d188e2c670ac061 | [
"MIT"
] | null | null | null | models/1-Tom/train/kaggle-hubmap-main/src/02_train/umap.py | navekshasood/HuBMAP---Hacking-the-Kidney | 018100fe4bfa5e8764b9df5a9d188e2c670ac061 | [
"MIT"
] | null | null | null | models/1-Tom/train/kaggle-hubmap-main/src/02_train/umap.py | navekshasood/HuBMAP---Hacking-the-Kidney | 018100fe4bfa5e8764b9df5a9d188e2c670ac061 | [
"MIT"
] | null | null | null | import umap
# import umap.umap_ as umap
import pickle
train_data = pickle.load(open("feature_train", "rb"))
test_data = pickle.load(open("feature_test", "rb"))
embedding = umap.UMAP().fit_transform(train_data) | 23.555556 | 53 | 0.75 |
1e0f362a45c4f8460dcc3847929a4cd4b6c3c07d | 1,394 | py | Python | python/src/widget-play/simple_widgets.py | nagi49000/ipywidgets-play | ebb80366cc4bca2315e8c91d74fc6dbc5ccbc73f | [
"BSD-3-Clause"
] | null | null | null | python/src/widget-play/simple_widgets.py | nagi49000/ipywidgets-play | ebb80366cc4bca2315e8c91d74fc6dbc5ccbc73f | [
"BSD-3-Clause"
] | null | null | null | python/src/widget-play/simple_widgets.py | nagi49000/ipywidgets-play | ebb80366cc4bca2315e8c91d74fc6dbc5ccbc73f | [
"BSD-3-Clause"
] | null | null | null | from ipywidgets import interact
import ipywidgets as widgets
from IPython.display import display
| 30.304348 | 108 | 0.596844 |
1e0fe02e0be417fdd78c793e298ac2aafbdcdf1e | 1,049 | py | Python | utils/general.py | bfortuner/VOCdetect | f11e363d60b1d91bd36bc98d69496f847287ad28 | [
"MIT"
] | 336 | 2017-08-22T18:54:19.000Z | 2022-03-22T04:07:08.000Z | utils/general.py | emeraldic/kaggle-starter | 7f993161afca8809e8a6ea46bffe76b4d6163082 | [
"MIT"
] | 1 | 2020-02-14T14:12:15.000Z | 2020-02-14T14:12:15.000Z | utils/general.py | emeraldic/kaggle-starter | 7f993161afca8809e8a6ea46bffe76b4d6163082 | [
"MIT"
] | 73 | 2017-08-26T22:09:58.000Z | 2022-03-29T13:00:02.000Z | import uuid
def dict_to_html(dd, level=0):
"""
Convert dict to html using basic html tags
"""
import simplejson
text = ''
for k, v in dd.items():
text += '<br>' + ' '*(4*level) + '<b>%s</b>: %s' % (k, dict_to_html(v, level+1) if isinstance(v, dict) else (simplejson.dumps(v) if isi... | 29.138889 | 173 | 0.613918 |
1e103b6268414ebaad3a488c7647eeed6d64c91d | 475 | py | Python | record.py | anuwish/sesame-melody | 420267d9c2a61270b1a87588d4366fb5ab37d599 | [
"MIT"
] | null | null | null | record.py | anuwish/sesame-melody | 420267d9c2a61270b1a87588d4366fb5ab37d599 | [
"MIT"
] | null | null | null | record.py | anuwish/sesame-melody | 420267d9c2a61270b1a87588d4366fb5ab37d599 | [
"MIT"
] | null | null | null | import alsaaudio, wave
mixer = alsaaudio.Mixer(control='Mic', cardindex=0)
mixer.setrec(1)
mixer.setvolume(80, 0, alsaaudio.PCM_CAPTURE)
inp = alsaaudio.PCM(type=alsaaudio.PCM_CAPTURE, device='sysdefault:CARD=Headset')
inp.setchannels(1)
inp.setrate(44100)
inp.setformat(alsaaudio.PCM_FORMAT_S16_LE)
inp.setperiodsize(1... | 27.941176 | 81 | 0.76 |
1e10795547893b97626bf889976edccb3aa14aa6 | 346 | py | Python | introcs-1.0/looppi.py | JaydenYL/Projects | b51c0476f7be80f0b0d6aa84592966ecb4343d76 | [
"MIT"
] | 5 | 2021-09-06T04:27:56.000Z | 2021-12-14T14:50:27.000Z | introcs-1.0/looppi.py | JaydenYL/Projects | b51c0476f7be80f0b0d6aa84592966ecb4343d76 | [
"MIT"
] | null | null | null | introcs-1.0/looppi.py | JaydenYL/Projects | b51c0476f7be80f0b0d6aa84592966ecb4343d76 | [
"MIT"
] | null | null | null | import sys
import stdio
import random
import math
n = int(sys.argv[1])
a = 0
for i in range(n):
while True:
x = -1.0 + 2*random.random()
y = -1.0 + 2*random.random()
a += 1
if x*x +y*y <=1.0:
break
i +=1
stdio.writeln(str(i) + 'times')
stdio.writeln(4*i/a)
stdio.wr... | 15.727273 | 36 | 0.528902 |
1e10ef45b52c4e2522c238a72b8ef46be09c94f0 | 2,593 | py | Python | users/arxiv/users/legacy/cookies.py | SamanthaFeidFischer/arxiv-auth | 08df4e0196a04a06eac1d26477b3ad56ebf56f08 | [
"MIT"
] | 1 | 2018-12-11T05:02:22.000Z | 2018-12-11T05:02:22.000Z | users/arxiv/users/legacy/cookies.py | SamanthaFeidFischer/arxiv-auth | 08df4e0196a04a06eac1d26477b3ad56ebf56f08 | [
"MIT"
] | 14 | 2019-06-20T13:36:13.000Z | 2021-06-25T15:19:59.000Z | users/arxiv/users/legacy/cookies.py | SamanthaFeidFischer/arxiv-auth | 08df4e0196a04a06eac1d26477b3ad56ebf56f08 | [
"MIT"
] | null | null | null | """Provides functions for working with legacy session cookies."""
from typing import Tuple
from base64 import b64encode, b64decode
import hashlib
from datetime import datetime, timedelta
from .exceptions import InvalidCookie
from . import util
def unpack(cookie: str) -> Tuple[str, str, str, datetime, str]:
"""
... | 28.184783 | 78 | 0.641728 |
1e1194850bf1c9cb226ea7cee2ea3e68d51eaf5f | 64 | py | Python | micro-ecommerce/payment_gateway/__init__.py | nelsonwenner/bookstore-api | 566357e841f97d083400047b604ae5fdf64c7efa | [
"MIT"
] | 49 | 2020-08-26T18:32:33.000Z | 2022-03-28T03:45:00.000Z | micro-ecommerce/payment_gateway/__init__.py | nelsonwenner/bookstore-api | 566357e841f97d083400047b604ae5fdf64c7efa | [
"MIT"
] | 14 | 2021-01-05T02:32:30.000Z | 2022-03-12T00:53:38.000Z | micro-ecommerce/payment_gateway/__init__.py | nelsonwenner/bookstore-api | 566357e841f97d083400047b604ae5fdf64c7efa | [
"MIT"
] | 24 | 2020-08-28T01:56:48.000Z | 2022-03-28T18:32:23.000Z | default_app_config = 'payment_gateway.apps.PaymentGatewayConfig' | 64 | 64 | 0.890625 |
1e1320aabea77a60dd623df1015e78a43269a830 | 593 | py | Python | setup.py | prickles/geokey-checklist | 559bc22cd7bc817e316dd9482436f301832b76a9 | [
"MIT"
] | null | null | null | setup.py | prickles/geokey-checklist | 559bc22cd7bc817e316dd9482436f301832b76a9 | [
"MIT"
] | null | null | null | setup.py | prickles/geokey-checklist | 559bc22cd7bc817e316dd9482436f301832b76a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from os.path import join
from setuptools import setup, find_packages
name = 'geokey-checklist'
version = __import__(name.replace('-', '_')).__version__
repository = join('https://github.com/ExCiteS', name)
setup(
name=name,
version=version,
description='Create checklists for GeoKey... | 25.782609 | 72 | 0.693086 |
1e1325c96f909e959d9f72d5206661c1c7c083e5 | 16,997 | py | Python | dhalsim/physical_process.py | SimchaVos/DHALSIM | d97dae584d87edfed516e6cc28a240861f7165e1 | [
"MIT"
] | null | null | null | dhalsim/physical_process.py | SimchaVos/DHALSIM | d97dae584d87edfed516e6cc28a240861f7165e1 | [
"MIT"
] | null | null | null | dhalsim/physical_process.py | SimchaVos/DHALSIM | d97dae584d87edfed516e6cc28a240861f7165e1 | [
"MIT"
] | 2 | 2021-06-22T20:16:08.000Z | 2021-06-22T20:21:03.000Z | import argparse
import csv
import os
import signal
import logging
from datetime import datetime
from decimal import Decimal
import pandas as pd
import progressbar
import sqlite3
import sys
import time
from pathlib import Path
from dhalsim.parser.file_generator import BatchReadmeGenerator, GeneralReadmeGenerator
from ... | 37.687361 | 108 | 0.595576 |
1e144ee79f04572155d0b30f5461d3ff048e0e9a | 2,746 | py | Python | aiida_vasp/utils/neb.py | DropD/aiida_vasp | 9967f5501a6fc1c67981154068135cec7be5396a | [
"MIT"
] | 3 | 2016-11-18T07:19:57.000Z | 2016-11-28T08:28:38.000Z | aiida_vasp/utils/neb.py | DropD/aiida_vasp | 9967f5501a6fc1c67981154068135cec7be5396a | [
"MIT"
] | null | null | null | aiida_vasp/utils/neb.py | DropD/aiida_vasp | 9967f5501a6fc1c67981154068135cec7be5396a | [
"MIT"
] | null | null | null | """
Utility functions for running NEB calculations
"""
import numpy as np
from aiida.orm import StructureData
from aiida.engine import calcfunction
from ase.neb import NEB
| 32.690476 | 106 | 0.672251 |
1e16e212df58abc55b333c32adf7bad6f18c87d3 | 240 | py | Python | generate_videos.py | weiqiao/pydrake_kuka | 2f1c9a5bb3946cd8a51be93e4225ec099a6427de | [
"MIT"
] | 5 | 2018-11-21T22:36:25.000Z | 2021-05-30T19:05:07.000Z | generate_videos.py | weiqiao/pydrake_kuka | 2f1c9a5bb3946cd8a51be93e4225ec099a6427de | [
"MIT"
] | 7 | 2018-10-19T20:33:51.000Z | 2018-11-15T23:22:01.000Z | generate_videos.py | weiqiao/pydrake_kuka | 2f1c9a5bb3946cd8a51be93e4225ec099a6427de | [
"MIT"
] | 5 | 2018-08-17T22:42:45.000Z | 2021-04-01T14:21:45.000Z | import os
import random
# Fullscreen meshlab on right monitor for this to work
for k in range(100, 200):
n_objects = random.randint(5, 10)
os.system("python kuka_pydrake_sim.py -T 60 --seed %d --hacky_save_video -N %d" % (k, n_objects))
| 30 | 98 | 0.725 |
1e17b72cf2b4124832cbe8928b8fedf3bcbc6efe | 832 | py | Python | article/views/product_views.py | rayenmhamdi/Kye_BackendAPI | a4fa8a345d2678b5bd3a9b74451e9274ca9abad2 | [
"MIT"
] | null | null | null | article/views/product_views.py | rayenmhamdi/Kye_BackendAPI | a4fa8a345d2678b5bd3a9b74451e9274ca9abad2 | [
"MIT"
] | null | null | null | article/views/product_views.py | rayenmhamdi/Kye_BackendAPI | a4fa8a345d2678b5bd3a9b74451e9274ca9abad2 | [
"MIT"
] | null | null | null | # Create your views here.
from rest_framework import generics
from rest_framework.permissions import IsAuthenticated
from article.models import Product
from article.serializers import ProductSerializer
| 30.814815 | 81 | 0.768029 |
1e17f7e7bd55d4f6e429e9260e2a13c0d3c9260e | 7,371 | py | Python | django/pyrog/models.py | arkhn/fhir-river | a12179c34fad131d16dedc20c61297ed83d805e6 | [
"Apache-2.0"
] | 42 | 2020-03-25T16:47:30.000Z | 2022-01-31T21:26:38.000Z | django/pyrog/models.py | arkhn/fhir-river | a12179c34fad131d16dedc20c61297ed83d805e6 | [
"Apache-2.0"
] | 367 | 2020-04-08T12:46:34.000Z | 2022-02-16T01:15:32.000Z | django/pyrog/models.py | arkhn/fhir-river | a12179c34fad131d16dedc20c61297ed83d805e6 | [
"Apache-2.0"
] | 3 | 2020-05-14T08:24:46.000Z | 2021-08-04T05:00:16.000Z | import uuid
from django.conf import settings
from django.db import models
from cuid import cuid
| 38.19171 | 109 | 0.723647 |
1e18d59e9f00c08920b31e70562b3e3da5999653 | 880 | py | Python | 算法设计与分析/作业/homework2T1.py | TD21forever/hdu-term-project-helper | f42f553efd1d7b59162d3fc793ac14ae30850efd | [
"Apache-2.0"
] | 17 | 2021-01-09T06:49:09.000Z | 2022-02-23T01:36:20.000Z | 算法设计与分析/作业/homework2T1.py | TD21forever/hdu-term-project-helper | f42f553efd1d7b59162d3fc793ac14ae30850efd | [
"Apache-2.0"
] | null | null | null | 算法设计与分析/作业/homework2T1.py | TD21forever/hdu-term-project-helper | f42f553efd1d7b59162d3fc793ac14ae30850efd | [
"Apache-2.0"
] | 1 | 2021-06-22T12:56:16.000Z | 2021-06-22T12:56:16.000Z | # -*- coding: utf-8 -*-
# @Author: TD21forever
# @Date: 2019-05-26 12:14:07
# @Last Modified by: TD21forever
# @Last Modified time: 2019-06-17 23:11:15
import numpy as np
'''
dp[item][cap] item cap
'''
if __name__ == '__main__':
waste = [0, 2, 3, 4]
value = [0, 3, 4, 5]
num = 3
capacity = 10
... | 25.882353 | 61 | 0.613636 |
1e1915fc863d83b4acac897a551ef48419b4ba83 | 10,384 | py | Python | disentanglement_lib/visualize/visualize_scores.py | erow/disentanglement_lib | c875207fdeadc44880277542447544941bc0bd0a | [
"Apache-2.0"
] | null | null | null | disentanglement_lib/visualize/visualize_scores.py | erow/disentanglement_lib | c875207fdeadc44880277542447544941bc0bd0a | [
"Apache-2.0"
] | null | null | null | disentanglement_lib/visualize/visualize_scores.py | erow/disentanglement_lib | c875207fdeadc44880277542447544941bc0bd0a | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The DisentanglementLib 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
#
# Un... | 38.746269 | 86 | 0.659765 |
1e1b71e63a431e5508cb85fe2edcd146520349f0 | 18,539 | py | Python | _00_pentaton_v02_w_cardContainers.py | ManuelKienast/pent | ea4a2ce23b41368220b6109953b88fc81baf222a | [
"MIT"
] | null | null | null | _00_pentaton_v02_w_cardContainers.py | ManuelKienast/pent | ea4a2ce23b41368220b6109953b88fc81baf222a | [
"MIT"
] | null | null | null | _00_pentaton_v02_w_cardContainers.py | ManuelKienast/pent | ea4a2ce23b41368220b6109953b88fc81baf222a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 18 09:17:23 2018
@author: Manuel
the pentaton logic go around II
"""
import random
random.seed(0)
print(random.getrandbits(5))
# =============================================================================
#
# Variables
# =====================... | 30.193811 | 112 | 0.462431 |
1e1cc73e30977ae43a9cf7e8a84711da0700a5cb | 580 | py | Python | viewmodels/shared/viewmodel.py | PASTAplus/web-x | 7e27a354bbc3873f6e9ea9881e6d1f00b8d52a33 | [
"Apache-2.0"
] | null | null | null | viewmodels/shared/viewmodel.py | PASTAplus/web-x | 7e27a354bbc3873f6e9ea9881e6d1f00b8d52a33 | [
"Apache-2.0"
] | 8 | 2022-01-31T20:03:12.000Z | 2022-03-28T02:42:07.000Z | viewmodels/shared/viewmodel.py | PASTAplus/web-x | 7e27a354bbc3873f6e9ea9881e6d1f00b8d52a33 | [
"Apache-2.0"
] | 1 | 2022-03-18T14:36:42.000Z | 2022-03-18T14:36:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:Mod: viewmodel
:Synopsis:
:Author:
servilla
:Created:
5/25/21
"""
from typing import Optional
from starlette.requests import Request
from services import cookie_auth
| 17.575758 | 96 | 0.677586 |
1e1f987a5674c8ebd8c0480fbd04b03094c446ea | 6,545 | py | Python | packages/w3af/w3af/plugins/audit/frontpage.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | 3 | 2019-04-09T22:59:33.000Z | 2019-06-14T09:23:24.000Z | tools/w3af/w3af/plugins/audit/frontpage.py | sravani-m/Web-Application-Security-Framework | d9f71538f5cba6fe1d8eabcb26c557565472f6a6 | [
"MIT"
] | null | null | null | tools/w3af/w3af/plugins/audit/frontpage.py | sravani-m/Web-Application-Security-Framework | d9f71538f5cba6fe1d8eabcb26c557565472f6a6 | [
"MIT"
] | null | null | null | """
frontpage.py
Copyright 2006 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
w3af is distributed in the hope that i... | 36.160221 | 85 | 0.633308 |
1e1fccb8698e424f72b1c5a0409aadcf08618ca1 | 428 | py | Python | example/example/spiders/javdb.py | hwpchn/AroayCloudScraper | b919eda08d411914e687be81728d4cb79a098bff | [
"MIT"
] | 11 | 2021-04-28T20:53:23.000Z | 2022-03-08T02:04:49.000Z | example/example/spiders/javdb.py | hwpchn/AroayCloudScraper | b919eda08d411914e687be81728d4cb79a098bff | [
"MIT"
] | 2 | 2021-05-13T02:31:39.000Z | 2021-07-03T14:11:26.000Z | example/example/spiders/javdb.py | hwpchn/AroayCloudScraper | b919eda08d411914e687be81728d4cb79a098bff | [
"MIT"
] | 6 | 2021-05-25T01:12:43.000Z | 2022-01-03T17:54:18.000Z | import scrapy
from aroay_cloudscraper import CloudScraperRequest
| 26.75 | 82 | 0.635514 |
1e1fd90fcd4ff3e27162c8ff0486f5db7ac5081f | 10,473 | py | Python | lib/innvestigate/src/innvestigate/applications/imagenet.py | vwesselkamp/deepfake-fingerprint-atacks | 0befc913b081913255399d4264f09bce0d39cbcb | [
"MIT"
] | null | null | null | lib/innvestigate/src/innvestigate/applications/imagenet.py | vwesselkamp/deepfake-fingerprint-atacks | 0befc913b081913255399d4264f09bce0d39cbcb | [
"MIT"
] | null | null | null | lib/innvestigate/src/innvestigate/applications/imagenet.py | vwesselkamp/deepfake-fingerprint-atacks | 0befc913b081913255399d4264f09bce0d39cbcb | [
"MIT"
] | null | null | null | """Example applications for image classifcation.
Each function returns a pretrained ImageNet model.
The models are based on keras.applications models and
contain additionally pretrained patterns.
The returned dictionary contains the following
keys\: model, in, sm_out, out, image_shape, color_coding,
preprocess_f, pat... | 35.144295 | 119 | 0.543684 |
1e20d14aa5cadf888513af055af81b5931b4e301 | 3,036 | py | Python | ExpSettings/Dataset/SyntheticImages/Dataset.py | gokhangg/Uncertainix | feb86dc9a8152bc133f99c56d8f15bf760754218 | [
"Apache-2.0"
] | null | null | null | ExpSettings/Dataset/SyntheticImages/Dataset.py | gokhangg/Uncertainix | feb86dc9a8152bc133f99c56d8f15bf760754218 | [
"Apache-2.0"
] | null | null | null | ExpSettings/Dataset/SyntheticImages/Dataset.py | gokhangg/Uncertainix | feb86dc9a8152bc133f99c56d8f15bf760754218 | [
"Apache-2.0"
] | null | null | null | # *=========================================================================
# *
# * Copyright Erasmus MC Rotterdam and contributors
# * This software is licensed under the Apache 2 license, quoted below.
# * Copyright 2019 Erasmus MC Rotterdam.
# * Copyright 2019 Gokhan Gunay <g.gunay@erasmsumc.nl>
# * Licensed... | 30.666667 | 96 | 0.665349 |
1e21588a29965f54305e6a3a852be97af34059ee | 274 | py | Python | 0x05-python-exceptions/2-safe_print_list_integers.py | C-distin/alx-higher_level_programming | ee018135b24ac07d40f2309a4febf21b8a25aee4 | [
"MIT"
] | null | null | null | 0x05-python-exceptions/2-safe_print_list_integers.py | C-distin/alx-higher_level_programming | ee018135b24ac07d40f2309a4febf21b8a25aee4 | [
"MIT"
] | null | null | null | 0x05-python-exceptions/2-safe_print_list_integers.py | C-distin/alx-higher_level_programming | ee018135b24ac07d40f2309a4febf21b8a25aee4 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
| 22.833333 | 56 | 0.510949 |
1e216a52fcace8e51079270b0a1a4780429a1a79 | 525 | py | Python | devind_helpers/import_from_file/json_reader.py | devind-team/devind-django-helpers | 5c64d46a12802bbe0b70e44aa9d19bf975511b6e | [
"MIT"
] | null | null | null | devind_helpers/import_from_file/json_reader.py | devind-team/devind-django-helpers | 5c64d46a12802bbe0b70e44aa9d19bf975511b6e | [
"MIT"
] | 4 | 2022-02-18T09:24:05.000Z | 2022-03-31T16:46:29.000Z | devind_helpers/import_from_file/json_reader.py | devind-team/devind-django-helpers | 5c64d46a12802bbe0b70e44aa9d19bf975511b6e | [
"MIT"
] | null | null | null | """ json."""
import json
from typing import Iterable
from .base_reader import BaseReader
| 21.875 | 64 | 0.626667 |
1e2189ffa27e1afbb5c4da2909001bbf792167ef | 6,298 | py | Python | emotion.py | JulienGremillot/human-pose-test | ddc368d3280a6ed4af6530557f9cdc92e9e891e5 | [
"Intel"
] | null | null | null | emotion.py | JulienGremillot/human-pose-test | ddc368d3280a6ed4af6530557f9cdc92e9e891e5 | [
"Intel"
] | null | null | null | emotion.py | JulienGremillot/human-pose-test | ddc368d3280a6ed4af6530557f9cdc92e9e891e5 | [
"Intel"
] | null | null | null | import argparse
import cv2
import numpy as np
from inference import Network
from openvino.inference_engine import IENetwork, IECore
import pylab as plt
import math
import matplotlib
from scipy.ndimage.filters import gaussian_filter
INPUT_STREAM = "emotion.mp4"
CPU_EXTENSION = "C:\\Program Files (x86)\\IntelSWTools\\o... | 35.988571 | 151 | 0.633217 |
1e21935ad05a3e22ab493070b022e1f59facb320 | 65 | py | Python | digital/common/policies/__init__.py | knowx/digital | 47872a783856444cce6ff8ebda355f3f3da727ac | [
"Apache-2.0"
] | null | null | null | digital/common/policies/__init__.py | knowx/digital | 47872a783856444cce6ff8ebda355f3f3da727ac | [
"Apache-2.0"
] | null | null | null | digital/common/policies/__init__.py | knowx/digital | 47872a783856444cce6ff8ebda355f3f3da727ac | [
"Apache-2.0"
] | null | null | null | import itertools
| 13 | 28 | 0.738462 |
1e23a375424a79efaefd2e41a9abefad2073029b | 6,378 | py | Python | warehouse/csrf.py | hickford/warehouse | 87d3403b3e09d1213177133744f20430fca030ca | [
"Apache-2.0"
] | 1 | 2019-01-31T02:44:40.000Z | 2019-01-31T02:44:40.000Z | warehouse/csrf.py | hickford/warehouse | 87d3403b3e09d1213177133744f20430fca030ca | [
"Apache-2.0"
] | 1 | 2016-09-14T00:57:23.000Z | 2016-09-14T00:57:23.000Z | warehouse/csrf.py | hickford/warehouse | 87d3403b3e09d1213177133744f20430fca030ca | [
"Apache-2.0"
] | 1 | 2020-11-05T09:46:12.000Z | 2020-11-05T09:46:12.000Z | # Copyright 2014 Donald Stufft
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 39.614907 | 79 | 0.661806 |
1e23d441f729f1d167dcbbed508c8e322c004063 | 2,285 | py | Python | features/steps/backup.py | Zierman/tabsave | 88848a9476e519a6d6aff26e06d2a0b94f24a8e4 | [
"MIT"
] | null | null | null | features/steps/backup.py | Zierman/tabsave | 88848a9476e519a6d6aff26e06d2a0b94f24a8e4 | [
"MIT"
] | 19 | 2021-12-17T06:41:13.000Z | 2022-01-15T23:21:57.000Z | features/steps/backup.py | Zierman/tabsave | 88848a9476e519a6d6aff26e06d2a0b94f24a8e4 | [
"MIT"
] | null | null | null | from io import StringIO
from behave import *
import tabsave
from features.environment import *
use_step_matcher("re")
use_step_matcher("parse")
| 33.602941 | 105 | 0.678337 |
1e2479aa4691931bd2f825d6ade59f1caec6769f | 10,166 | py | Python | gps_nav/nav_a2b.py | heng2j/delamain | 9eb522358fa4c253d74bca185b654522fc63f7f7 | [
"MIT"
] | 2 | 2021-02-07T19:19:45.000Z | 2021-05-04T14:28:28.000Z | gps_nav/nav_a2b.py | DevGlitch/delamain | 9eb522358fa4c253d74bca185b654522fc63f7f7 | [
"MIT"
] | null | null | null | gps_nav/nav_a2b.py | DevGlitch/delamain | 9eb522358fa4c253d74bca185b654522fc63f7f7 | [
"MIT"
] | 1 | 2021-05-15T18:37:33.000Z | 2021-05-15T18:37:33.000Z | import carla
import os
import math
import numpy as np
import pandas as pd
import networkx as nx
from scipy import spatial
import matplotlib.pyplot as plt
def gnss_live_location(event):
"""Get, print, and store the GNSS Measurements.
:return: Float values of Latitude, and Longitude, and Altitude
"""
l... | 34.815068 | 136 | 0.637419 |
1e2483e1d54d7612f075a68d1c2fadeaa1f2c2d9 | 3,194 | py | Python | gui/main_password.py | FrCln/password-manager | 7e5aca609846e38db634de754be4e7c35a5f21a2 | [
"MIT"
] | null | null | null | gui/main_password.py | FrCln/password-manager | 7e5aca609846e38db634de754be4e7c35a5f21a2 | [
"MIT"
] | null | null | null | gui/main_password.py | FrCln/password-manager | 7e5aca609846e38db634de754be4e7c35a5f21a2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainpassword.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
import os
from PyQt5 impor... | 43.162162 | 92 | 0.705698 |
1e24a4bcea7210feea2e64a1a837cdebd8fae380 | 3,679 | py | Python | votr/main.py | ned1313/flask-voting-gcp | 4a9031ab8b3f5a2ca329c867c9816159cbc0440d | [
"MIT"
] | null | null | null | votr/main.py | ned1313/flask-voting-gcp | 4a9031ab8b3f5a2ca329c867c9816159cbc0440d | [
"MIT"
] | null | null | null | votr/main.py | ned1313/flask-voting-gcp | 4a9031ab8b3f5a2ca329c867c9816159cbc0440d | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, Response, redirect, url_for
import sqlalchemy
from werkzeug.exceptions import abort
from . import sql
# This global variable is declared with a value of `None`, instead of calling
# `init_connection_engine()` immediately, to simplify testing. In general, it
# is saf... | 30.658333 | 129 | 0.564827 |
1e269c0c671cb7d1a1134a954062a3c56a92d537 | 2,426 | py | Python | model/mosesdecoder/contrib/moses-speedtest/check_for_regression.py | saeedesm/UNMT_AH | cc171bf66933b5c0ad8a0ab87e57f7364312a7df | [
"Apache-2.0"
] | 3 | 2019-12-02T14:53:29.000Z | 2020-08-12T18:01:49.000Z | tools/mosesdecoder-master/contrib/moses-speedtest/check_for_regression.py | Pangeamt/nectm | 6b84f048698f2530b9fdbb30695f2e2217c3fbfe | [
"Apache-2.0"
] | 2 | 2020-11-06T14:40:10.000Z | 2020-12-29T19:03:11.000Z | tools/mosesdecoder-master/contrib/moses-speedtest/check_for_regression.py | Pangeamt/nectm | 6b84f048698f2530b9fdbb30695f2e2217c3fbfe | [
"Apache-2.0"
] | 2 | 2020-03-26T16:05:11.000Z | 2020-08-06T16:35:39.000Z | """Checks if any of the latests tests has performed considerably different than
the previous ones. Takes the log directory as an argument."""
import os
import sys
from testsuite_common import Result, processLogLine, bcolors, getLastTwoLines
LOGDIR = sys.argv[1] #Get the log directory as an argument
PERCENTAGE = 5 #De... | 37.90625 | 81 | 0.622424 |
1e26f3ae4b816561d50777eda1291f820556c297 | 198 | py | Python | Darlington/phase1/python Basic 1/day 16 solution/qtn6.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Darlington/phase1/python Basic 1/day 16 solution/qtn6.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Darlington/phase1/python Basic 1/day 16 solution/qtn6.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | #program to find the location of Python module sources.
import sys
print("\nList of directories in sys module:")
print(sys.path)
print("\nList of directories in os module:")
import os
print(os.path) | 28.285714 | 55 | 0.767677 |
1e27572635bb944d65a894fcd32f1b2fbbb5298a | 1,557 | py | Python | src/spaceone/repository/info/schema_info.py | choonho/repository | 9522ecad06dd4e36c718e203864d1d58574cdbfc | [
"Apache-2.0"
] | null | null | null | src/spaceone/repository/info/schema_info.py | choonho/repository | 9522ecad06dd4e36c718e203864d1d58574cdbfc | [
"Apache-2.0"
] | null | null | null | src/spaceone/repository/info/schema_info.py | choonho/repository | 9522ecad06dd4e36c718e203864d1d58574cdbfc | [
"Apache-2.0"
] | null | null | null | import functools
from spaceone.api.repository.v1 import schema_pb2
from spaceone.core.pygrpc.message_type import *
from spaceone.repository.model.schema_model import Schema
from spaceone.repository.info.repository_info import RepositoryInfo
__all__ = ['SchemaInfo', 'SchemasInfo']
| 37.97561 | 92 | 0.688504 |
1e2924325b62cae2a75ba561cabea3422e088d01 | 8,189 | py | Python | source/utils.py | ERUD1T3/artificial-neural-network | f1decd9cf852831fd33bc80d41ac785b472f47ac | [
"Unlicense"
] | null | null | null | source/utils.py | ERUD1T3/artificial-neural-network | f1decd9cf852831fd33bc80d41ac785b472f47ac | [
"Unlicense"
] | null | null | null | source/utils.py | ERUD1T3/artificial-neural-network | f1decd9cf852831fd33bc80d41ac785b472f47ac | [
"Unlicense"
] | null | null | null | ############################################################
# Dev: Josias Moukpe
# Class: Machine Learning
# Date: 2/23/2022
# file: utils.py
# Description: utility functions for artificial neural
# network learning
#############################################################
import random
def log_csv(p... | 32.88755 | 88 | 0.50519 |
1e2a027f0a188f537a7a8f740aeb32a17712a695 | 9,762 | py | Python | sim2real_docs/create_random_values.py | agchang-cgl/sim2real-docs | 590dada30e28edda2d9d5a996d90af5989bce2fb | [
"Apache-2.0"
] | 38 | 2021-12-13T17:19:17.000Z | 2022-03-31T05:07:49.000Z | sim2real_docs/create_random_values.py | agchang-cgl/sim2real-docs | 590dada30e28edda2d9d5a996d90af5989bce2fb | [
"Apache-2.0"
] | 1 | 2022-01-17T03:17:23.000Z | 2022-01-17T03:17:23.000Z | sim2real_docs/create_random_values.py | agchang-cgl/sim2real-docs | 590dada30e28edda2d9d5a996d90af5989bce2fb | [
"Apache-2.0"
] | 4 | 2022-01-13T15:10:33.000Z | 2022-03-10T08:17:09.000Z | # Copyright FMR LLC <opensource@fidelity.com>
# SPDX-License-Identifier: Apache-2.0
"""
The script generates variations for the parameters using configuration file and stores them in respective named tuple
"""
import math
import random
from collections import namedtuple
import numpy as np
# configuration parameters
s... | 37.69112 | 117 | 0.721061 |
1e2c70f4123e227934c612aca4b3f6707598fb24 | 198 | py | Python | accounts/forms/__init__.py | BloodLagbe/blood_lagbe | 597fcabea3523c9932381c591f65c0a91cc5f74c | [
"Apache-2.0"
] | 3 | 2021-04-24T16:30:09.000Z | 2021-06-19T08:02:22.000Z | accounts/forms/__init__.py | BloodLagbe/blood_lagbe | 597fcabea3523c9932381c591f65c0a91cc5f74c | [
"Apache-2.0"
] | 16 | 2021-04-24T07:44:34.000Z | 2021-04-28T17:12:25.000Z | accounts/forms/__init__.py | BloodLagbe/blood_lagbe | 597fcabea3523c9932381c591f65c0a91cc5f74c | [
"Apache-2.0"
] | 4 | 2021-04-24T23:42:51.000Z | 2021-06-20T16:53:00.000Z | from .forms import(
LoginForm,
RegistrationForm,
ProfileForm
)
from .search_doner import SearchDoner
__all__ = [
LoginForm,
RegistrationForm,
ProfileForm,
SearchDoner
]
| 14.142857 | 37 | 0.69697 |
1e2d16408849e2e5b286bab95aa9d9e60c7f2852 | 3,069 | py | Python | odoo-13.0/addons/sale_coupon/tests/test_program_multi_company.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/sale_coupon/tests/test_program_multi_company.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/sale_coupon/tests/test_program_multi_company.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.sale_coupon.tests.common import TestSaleCouponCommon
from odoo.exceptions import UserError
from odoo.tests import tagged
| 39.346154 | 128 | 0.596611 |
1e2fa6d20a358fbcaed25a697cfbe03b9d190323 | 3,544 | py | Python | .nix/pkgs/development/python-modules/nsf-test-lib/src/nsft_pgp_utils/_colon_listing_impl.py | jraygauthier/nixos_secure_factory | 67adb93b153902226301d4a68e7b6e3a0af660c2 | [
"Apache-2.0"
] | 1 | 2021-04-17T10:13:42.000Z | 2021-04-17T10:13:42.000Z | .nix/pkgs/development/python-modules/nsf-test-lib/src/nsft_pgp_utils/_colon_listing_impl.py | jraygauthier/nixos_secure_factory | 67adb93b153902226301d4a68e7b6e3a0af660c2 | [
"Apache-2.0"
] | 4 | 2019-10-21T17:40:17.000Z | 2021-11-11T13:46:20.000Z | .nix/pkgs/development/python-modules/nsf-test-lib/src/nsft_pgp_utils/_colon_listing_impl.py | jraygauthier/nixos_secure_factory | 67adb93b153902226301d4a68e7b6e3a0af660c2 | [
"Apache-2.0"
] | 2 | 2019-10-10T18:32:01.000Z | 2021-08-24T16:02:09.000Z | from typing import Iterator, Dict, List, Union, Optional, Any
from .ctx_auth_types import OptGpgAuthContext
from .ctx_proc_types import OptGpgProcContextSoftT
from .key_types import GpgKeyWExtInfo, GpgKeyExtInfo
from .process import gpg_stdout_it
from .trust_types import mk_gpg_calc_trust_from_colon_sep_field_value
... | 28.580645 | 88 | 0.614278 |
1e2fe111cbac19550fa36403d83402b0f4ff2800 | 347 | py | Python | panther_ioc_rules/sunburst_sha256_iocs.py | panther-labs/panther-cli | 4e5c0a21570e1a02dada990fd91e324416afac96 | [
"MIT"
] | 4 | 2019-10-17T19:33:29.000Z | 2019-10-21T15:23:30.000Z | panther_ioc_rules/sunburst_sha256_iocs.py | jacknagz/panther-analysis | fceab78ba5624136776596ee1b25fa0dc8a02a42 | [
"Apache-2.0"
] | null | null | null | panther_ioc_rules/sunburst_sha256_iocs.py | jacknagz/panther-analysis | fceab78ba5624136776596ee1b25fa0dc8a02a42 | [
"Apache-2.0"
] | null | null | null | from panther_iocs import SUNBURST_SHA256_IOCS, ioc_match
| 31.545455 | 88 | 0.769452 |
1e33b14869fbf3f3e217d7b69abbc2a6f6ec5c34 | 1,652 | py | Python | setup.py | KevinMusgrave/pytorch-adapt | ff1491e1bfcc586afb8ee619712c8816ddf10358 | [
"MIT"
] | 131 | 2021-11-19T14:29:59.000Z | 2022-03-26T16:33:30.000Z | setup.py | KevinMusgrave/pytorch-adapt | ff1491e1bfcc586afb8ee619712c8816ddf10358 | [
"MIT"
] | 28 | 2021-11-19T17:31:56.000Z | 2022-03-02T18:42:51.000Z | setup.py | KevinMusgrave/pytorch-adapt | ff1491e1bfcc586afb8ee619712c8816ddf10358 | [
"MIT"
] | 8 | 2021-11-22T17:22:45.000Z | 2022-03-08T15:49:28.000Z | import sys
import setuptools
sys.path.insert(0, "src")
import pytorch_adapt
with open("README.md", "r") as fh:
long_description = fh.read()
extras_require_ignite = ["pytorch-ignite == 0.5.0.dev20220221"]
extras_require_lightning = ["pytorch-lightning"]
extras_require_record_keeper = ["record-keeper >= 0.9.31"]... | 28.482759 | 90 | 0.659806 |
1e33bfecf12d884b056149d9e05862e880469b84 | 307 | py | Python | bh_modules/erlangcase.py | jfcherng-sublime/ST-BracketHighlighter | 223ffd4ceafd58686503e3328934c039e959a88c | [
"Unlicense",
"MIT"
] | 1,047 | 2015-01-01T16:11:42.000Z | 2022-03-12T08:29:13.000Z | bh_modules/erlangcase.py | jfcherng-sublime/ST-BracketHighlighter | 223ffd4ceafd58686503e3328934c039e959a88c | [
"Unlicense",
"MIT"
] | 374 | 2015-01-07T02:47:55.000Z | 2022-03-24T12:59:09.000Z | bh_modules/erlangcase.py | jfcherng-sublime/ST-BracketHighlighter | 223ffd4ceafd58686503e3328934c039e959a88c | [
"Unlicense",
"MIT"
] | 223 | 2015-01-11T04:21:06.000Z | 2021-10-05T15:00:32.000Z | """
BracketHighlighter.
Copyright (c) 2013 - 2016 Isaac Muse <isaacmuse@gmail.com>
License: MIT
"""
from BracketHighlighter.bh_plugin import import_module
lowercase = import_module("bh_modules.lowercase")
def validate(*args):
"""Check if bracket is lowercase."""
return lowercase.validate(*args)
| 21.928571 | 58 | 0.749186 |
1e33c5a421e868d7a2be981bc1e0819633898250 | 6,715 | py | Python | anet-video-captioning/model/modules.py | chihyaoma/cyclical-visual-captioning | 337eee17a8789e58d7bf687ad9ecf27c8da44f14 | [
"MIT"
] | 43 | 2020-05-14T21:25:23.000Z | 2022-03-24T06:17:19.000Z | anet-video-captioning/model/modules.py | chihyaoma/cyclical-visual-captioning | 337eee17a8789e58d7bf687ad9ecf27c8da44f14 | [
"MIT"
] | 3 | 2020-06-09T16:07:17.000Z | 2020-11-18T07:11:47.000Z | anet-video-captioning/model/modules.py | chihyaoma/cyclical-visual-captioning | 337eee17a8789e58d7bf687ad9ecf27c8da44f14 | [
"MIT"
] | 3 | 2020-06-02T21:31:40.000Z | 2021-09-16T02:37:32.000Z |
import torch
import torch.nn as nn
import torch.nn.functional as F
def proj_masking(feat, projector, mask=None):
"""Universal projector and masking"""
proj_feat = projector(feat.view(-1, feat.size(2)))
proj_feat = proj_feat.view(feat.size(0), feat.size(1), -1)
if mask is not None:
# check ... | 37.937853 | 111 | 0.610127 |