hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
057e454be9c87817df41cf172ad5057caed4d8e4 | 3,379 | py | Python | src/specializer/profile.py | rrthomas/m | d4b4a2a6f16ebb6e27ba01d3be26f1dc50c051e9 | [
"MIT"
] | 5 | 2019-05-13T00:40:40.000Z | 2022-03-05T23:16:56.000Z | src/specializer/profile.py | rrthomas/m | d4b4a2a6f16ebb6e27ba01d3be26f1dc50c051e9 | [
"MIT"
] | 164 | 2019-05-07T16:47:50.000Z | 2021-02-27T23:37:16.000Z | src/specializer/profile.py | rrthomas/smite | d4b4a2a6f16ebb6e27ba01d3be26f1dc50c051e9 | [
"MIT"
] | 1 | 2021-02-08T09:51:19.000Z | 2021-02-08T09:51:19.000Z | '''
Library for reading and processing profile files.
(c) 2019-2020 Mit authors
The package is distributed under the MIT/X11 License.
THIS PROGRAM IS PROVIDED AS IS, WITH NO WARRANTY. USE IS AT THE USER’S
RISK.
'''
import json, random
from dataclasses import dataclass
from specializer_spec import Instructions
from... | 27.696721 | 73 | 0.615567 |
682702bff8aa3a87ce4a92ba12138f128e81b5d3 | 4,548 | py | Python | bigfastapi/models/plan_models.py | kofimokome/bigfastapi | d9cf181271847c1f420747da8e114af7ad717598 | [
"MIT"
] | null | null | null | bigfastapi/models/plan_models.py | kofimokome/bigfastapi | d9cf181271847c1f420747da8e114af7ad717598 | [
"MIT"
] | null | null | null | bigfastapi/models/plan_models.py | kofimokome/bigfastapi | d9cf181271847c1f420747da8e114af7ad717598 | [
"MIT"
] | null | null | null | from sqlite3 import IntegrityError
from uuid import uuid4
from sqlalchemy import ForeignKey
import bigfastapi.db.database as database
from datetime import datetime
from sqlalchemy.schema import Column
from sqlalchemy.types import String, DateTime, Text, JSON
from bigfastapi.schemas import plan_schemas
from bigfastapi.... | 35.255814 | 87 | 0.651715 |
a228a02f0d3f2ae4723d66aa7f43f2d6db9e5113 | 31,383 | py | Python | neutron/services/segments/plugin.py | stackhpc/neutron | df94641b43964834ba14c69eb4fb17cc45349117 | [
"Apache-2.0"
] | null | null | null | neutron/services/segments/plugin.py | stackhpc/neutron | df94641b43964834ba14c69eb4fb17cc45349117 | [
"Apache-2.0"
] | null | null | null | neutron/services/segments/plugin.py | stackhpc/neutron | df94641b43964834ba14c69eb4fb17cc45349117 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Hewlett Packard Enterprise Development, LP
#
# 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/LICENS... | 45.881579 | 79 | 0.62929 |
7674c3e9effe4ae84480b4c7a4c96705e9b4392a | 10,916 | py | Python | pyaidoop/calibration/calibhandeye_handeye.py | aidoop/pyaidoop | fa42d0010b95b6641227033700f7dc31844cbe3b | [
"MIT"
] | null | null | null | pyaidoop/calibration/calibhandeye_handeye.py | aidoop/pyaidoop | fa42d0010b95b6641227033700f7dc31844cbe3b | [
"MIT"
] | null | null | null | pyaidoop/calibration/calibhandeye_handeye.py | aidoop/pyaidoop | fa42d0010b95b6641227033700f7dc31844cbe3b | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import cv2.aruco as aruco
import math
import sys
import os
from pyaidoop.etc.hm_util import *
from pyaidoop.aruco.aruco_detect import ArucoDetect
from applications.etc.util import PrintMsg
class HandEyeAruco:
def __init__(self, markerSelectDict, markerSize, mtx, dist, use_board=True... | 37.641379 | 113 | 0.584463 |
c23d5296155d5af8d160546e3a91e68b343cbd5e | 6,408 | py | Python | Bio/PDB/QCPSuperimposer/__init__.py | Rizwanabro/biopython1 | b2ac2226eeab01dbdeac4dfd2d24a897589eb56d | [
"BSD-3-Clause"
] | 2 | 2016-04-15T22:39:55.000Z | 2020-12-11T16:11:33.000Z | Bio/PDB/QCPSuperimposer/__init__.py | Rizwanabro/biopython1 | b2ac2226eeab01dbdeac4dfd2d24a897589eb56d | [
"BSD-3-Clause"
] | null | null | null | Bio/PDB/QCPSuperimposer/__init__.py | Rizwanabro/biopython1 | b2ac2226eeab01dbdeac4dfd2d24a897589eb56d | [
"BSD-3-Clause"
] | 1 | 2020-11-06T20:20:12.000Z | 2020-11-06T20:20:12.000Z | # Copyright (C) 2015, Anuj Sharma (anuj.sharma80@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""
QCPSuperimposer finds the best rotation and translation to put
two point sets on top of ... | 33.202073 | 93 | 0.598471 |
a15d00d9c16d28702038a349e4a6d73ff469ff6c | 1,495 | py | Python | datadog_checks_base/tests/models/config_models/shared.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 663 | 2016-08-23T05:23:45.000Z | 2022-03-29T00:37:23.000Z | datadog_checks_base/tests/models/config_models/shared.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 6,642 | 2016-06-09T16:29:20.000Z | 2022-03-31T22:24:09.000Z | datadog_checks_base/tests/models/config_models/shared.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 1,222 | 2017-01-27T15:51:38.000Z | 2022-03-31T18:17:51.000Z | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from __future__ import annotations
from typing import Optional
from pydantic import BaseModel, root_validator, validator
from datadog_checks.base.utils.functions import identity
from datadog_checks.base... | 30.510204 | 108 | 0.715719 |
9304f4517a61a9cb19fc5bdfa1ea207ebb3086bf | 1,350 | py | Python | setup.py | marcogiusti/nvd3_py | 1db7aa908836563d371fe4e9131827443eaf53af | [
"MIT"
] | null | null | null | setup.py | marcogiusti/nvd3_py | 1db7aa908836563d371fe4e9131827443eaf53af | [
"MIT"
] | null | null | null | setup.py | marcogiusti/nvd3_py | 1db7aa908836563d371fe4e9131827443eaf53af | [
"MIT"
] | 1 | 2021-12-07T23:26:26.000Z | 2021-12-07T23:26:26.000Z | #!/usr/bin/env python
# Copyright (c) 2016 Marco Giusti
# See LICENSE for details.
from setuptools import setup
def get_version(filename="nvd3.py", varname="__version__"):
glb = {}
with open(filename) as fp:
for line in fp:
if varname in line:
exec(line, glb)
... | 27.55102 | 66 | 0.592593 |
4aa983a4b81f0080c47d86182164f607ecfb6269 | 18,295 | py | Python | rllib/utils/exploration/curiosity.py | jamesliu/ray | 11ab412db1fa3603a3006e8ed414e80dd1f11c0c | [
"Apache-2.0"
] | 3 | 2020-12-12T05:10:44.000Z | 2021-04-12T21:52:47.000Z | rllib/utils/exploration/curiosity.py | jamesliu/ray | 11ab412db1fa3603a3006e8ed414e80dd1f11c0c | [
"Apache-2.0"
] | 227 | 2021-10-01T08:00:01.000Z | 2021-12-28T16:47:26.000Z | rllib/utils/exploration/curiosity.py | gramhagen/ray | c18caa4db36d466718bdbcb2229aa0b2dc03da1f | [
"Apache-2.0"
] | 1 | 2020-12-02T06:26:20.000Z | 2020-12-02T06:26:20.000Z | from gym.spaces import Discrete, MultiDiscrete, Space
import numpy as np
from typing import Optional, Tuple, Union
from ray.rllib.models.action_dist import ActionDistribution
from ray.rllib.models.catalog import ModelCatalog
from ray.rllib.models.modelv2 import ModelV2
from ray.rllib.models.tf.tf_action_dist import Ca... | 45.397022 | 79 | 0.623558 |
fdc60dc954e1c7ec07bddafff706c70110fd762e | 11,953 | py | Python | tools/create_data.py | Divadi/mmdetection3d-1 | e9b37389f820e33b9657d194cce8afbf88dfe45d | [
"Apache-2.0"
] | null | null | null | tools/create_data.py | Divadi/mmdetection3d-1 | e9b37389f820e33b9657d194cce8afbf88dfe45d | [
"Apache-2.0"
] | null | null | null | tools/create_data.py | Divadi/mmdetection3d-1 | e9b37389f820e33b9657d194cce8afbf88dfe45d | [
"Apache-2.0"
] | null | null | null | import argparse
from os import path as osp
from tools.data_converter import indoor_converter as indoor
from tools.data_converter import aiodrive_converter as aiodrive
from tools.data_converter import kitti_converter as kitti
from tools.data_converter import lyft_converter as lyft_converter
from tools.data_converter im... | 37.353125 | 130 | 0.653392 |
7bfe0750818b8704c470b08cfc723b79db4049f3 | 7,403 | py | Python | servicemanager/smprocess.py | uk-gov-mirror/hmrc.service-manager | 6d6fcc4a1d25d094e7d0c798fc4219cf20a6f234 | [
"Apache-2.0"
] | 1 | 2021-11-13T09:20:35.000Z | 2021-11-13T09:20:35.000Z | servicemanager/smprocess.py | uk-gov-mirror/hmrc.service-manager | 6d6fcc4a1d25d094e7d0c798fc4219cf20a6f234 | [
"Apache-2.0"
] | null | null | null | servicemanager/smprocess.py | uk-gov-mirror/hmrc.service-manager | 6d6fcc4a1d25d094e7d0c798fc4219cf20a6f234 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from signal import SIGINT, SIGKILL
import os
import re
import time
import subprocess
def kill_pid(context, pid, force=False, wait=False):
if _is_system_or_smserver_or_test_process(pid):
return "Not allowed to kill system, test or smserver process (pid = %d)" % pid
try:
... | 28.917969 | 137 | 0.639876 |
ee6f26d90a4be1997de2804fa47c7400fa2dd1ef | 18,452 | py | Python | xso/_version.py | ben1post/xarray-simlab-ode | 8d17af369374feeeb73efc9962e563834b8121e7 | [
"BSD-3-Clause"
] | null | null | null | xso/_version.py | ben1post/xarray-simlab-ode | 8d17af369374feeeb73efc9962e563834b8121e7 | [
"BSD-3-Clause"
] | null | null | null | xso/_version.py | ben1post/xarray-simlab-ode | 8d17af369374feeeb73efc9962e563834b8121e7 | [
"BSD-3-Clause"
] | null | null | null |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.416507 | 79 | 0.584435 |
f97900f86ce8eb05f0aa9ea3e9e6b72a286d82ed | 1,060 | py | Python | webcam_counting.py | positivenull/object_detection | 28596c38372bf6049b057c10990f878d4791387a | [
"MIT"
] | null | null | null | webcam_counting.py | positivenull/object_detection | 28596c38372bf6049b057c10990f878d4791387a | [
"MIT"
] | 17 | 2020-01-28T22:59:38.000Z | 2022-03-11T23:59:02.000Z | webcam_counting.py | positivenull/object_detection | 28596c38372bf6049b057c10990f878d4791387a | [
"MIT"
] | null | null | null | #----------------------------------------------
#--- Author : Ahmet Ozlu
#--- Mail : ahmetozlu93@gmail.com
#--- Date : 27th July 2019
#----------------------------------------------
# Imports
import tensorflow as tf
# Object detection imports
from utils import backbone
from api import obje... | 44.166667 | 282 | 0.713208 |
d83de7665653a7427357692c77f2ef6f30ef04cd | 4,307 | py | Python | sentimentanalyser/model_train.py | ashhadulislam/sentiment-analyser-lib | 0f19026833c643d66467d5dc54070da32e67ab28 | [
"MIT"
] | 1 | 2019-04-23T19:33:03.000Z | 2019-04-23T19:33:03.000Z | sentimentanalyser/model_train.py | ashhadulislam/sentiment-analyser-lib | 0f19026833c643d66467d5dc54070da32e67ab28 | [
"MIT"
] | 2 | 2019-04-23T19:15:14.000Z | 2019-05-02T10:44:09.000Z | sentimentanalyser/model_train.py | ashhadulislam/sentiment-analyser-lib | 0f19026833c643d66467d5dc54070da32e67ab28 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.externals import joblib
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.naive_bayes import MultinomialNB
from sklearn.neighbors import KNeighborsClassifier
from sklearn.neura... | 37.12931 | 108 | 0.575575 |
2c1a75711b6e31bbbd26d154805d03a4bb174c31 | 9,499 | py | Python | rl_games/algos_torch/torch_ext.py | NikitaRdn/rl_games | 50d9a460f8ba41de5dbac4abed04f8de9b849f4f | [
"MIT"
] | null | null | null | rl_games/algos_torch/torch_ext.py | NikitaRdn/rl_games | 50d9a460f8ba41de5dbac4abed04f8de9b849f4f | [
"MIT"
] | null | null | null | rl_games/algos_torch/torch_ext.py | NikitaRdn/rl_games | 50d9a460f8ba41de5dbac4abed04f8de9b849f4f | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.optim.optimizer import Optimizer
def policy_kl(p0_mu, p0_sigma, p1_mu, p1_sigma, reduce=True):
c1 = torch.log(p1_sigma/p0_sigma + 1e-5)
c2 = (p0_sigma**2 + (p1_mu - p0_mu)**2)/(2.0 * (p1... | 35.181481 | 130 | 0.63154 |
6dc3901ea6ab6dfe1e53eaa22c88642653d77cf6 | 1,587 | py | Python | test/functional/feature_uacomment.py | brewhaus2/Placeholders-X16R | 8757eef1a0596df490be28a0f259ab26597ac851 | [
"MIT"
] | 23 | 2018-12-18T16:46:37.000Z | 2022-01-03T23:11:09.000Z | test/functional/feature_uacomment.py | brewhaus2/Placeholders-X16R | 8757eef1a0596df490be28a0f259ab26597ac851 | [
"MIT"
] | 1 | 2018-12-15T19:08:42.000Z | 2018-12-15T19:09:35.000Z | test/functional/feature_uacomment.py | brewhaus2/Placeholders-X16R | 8757eef1a0596df490be28a0f259ab26597ac851 | [
"MIT"
] | 11 | 2018-12-12T05:45:24.000Z | 2021-04-23T03:07:21.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Copyright (c) 2017-2018 The Placeholder Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the -uacomment option."""
from test_framewor... | 42.891892 | 136 | 0.687461 |
547390164a68c0827cbbd52223063bc29d60772d | 3,869 | py | Python | nova/conf/__init__.py | teresa-ho/stx-nova | 1f82323439da2449edbbaed2fe1c8414a550c86f | [
"Apache-2.0"
] | null | null | null | nova/conf/__init__.py | teresa-ho/stx-nova | 1f82323439da2449edbbaed2fe1c8414a550c86f | [
"Apache-2.0"
] | null | null | null | nova/conf/__init__.py | teresa-ho/stx-nova | 1f82323439da2449edbbaed2fe1c8414a550c86f | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 OpenStack Foundation
# 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 requ... | 30.706349 | 78 | 0.825019 |
acc3a6393817054ee581be3be5b9ca5d5ae647f8 | 2,578 | py | Python | nodepool_job_launcher/nodepool_job_launcher.py | yrobla/nodepool_job_launcher | 534efade82aaaa705f80e4e6ba76ec339276b47a | [
"BSD-3-Clause"
] | null | null | null | nodepool_job_launcher/nodepool_job_launcher.py | yrobla/nodepool_job_launcher | 534efade82aaaa705f80e4e6ba76ec339276b47a | [
"BSD-3-Clause"
] | null | null | null | nodepool_job_launcher/nodepool_job_launcher.py | yrobla/nodepool_job_launcher | 534efade82aaaa705f80e4e6ba76ec339276b47a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import gear
import jenkins
import json
import sys
import time
import yaml
from uuid import uuid4
class Launcher():
def __init__(self, configfile, job):
self.configfile = configfile
self.job = job
self.jobs = {}
self.gearman = None
self.jenkins = None
... | 31.060241 | 98 | 0.593871 |
fc9d4af0937e50e6b32038bea9096598c6dd8f6f | 22,390 | py | Python | demo/demo.py | LeyeTech/HumanPose | db2406cda271b898ce1a79afd2adaca9a852046c | [
"MIT"
] | 2 | 2021-07-26T07:27:35.000Z | 2021-07-28T03:30:55.000Z | demo/demo.py | LeyeTech/HumanPose | db2406cda271b898ce1a79afd2adaca9a852046c | [
"MIT"
] | null | null | null | demo/demo.py | LeyeTech/HumanPose | db2406cda271b898ce1a79afd2adaca9a852046c | [
"MIT"
] | null | null | null | #coding: utf-8
import os
import cv2
import time
import fire
import numpy as np
import struct
import threading
import queue
import imagesize
from typing import Union
import os.path as osp
from queue import Queue
from loguru import logger
import msg_pb2
from dev_agent import DevAgent
from msg_udp_handler import MsgUdpH... | 33.924242 | 93 | 0.565029 |
458ba40c94aef64d325f54fc44b686bfc3b9938c | 7,390 | py | Python | netapp/santricity/models/symbol/battery_type_data.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 5 | 2016-08-23T17:52:22.000Z | 2019-05-16T08:45:30.000Z | netapp/santricity/models/symbol/battery_type_data.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 2 | 2016-11-10T05:30:21.000Z | 2019-04-05T15:03:37.000Z | netapp/santricity/models/symbol/battery_type_data.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 7 | 2016-08-25T16:11:44.000Z | 2021-02-22T05:31:25.000Z | # coding: utf-8
"""
BatteryTypeData.py
The Clear BSD License
Copyright (c) – 2016, NetApp, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
... | 40.163043 | 844 | 0.657104 |
afdd01ed4fc2975427f8605b35d2f9f739958752 | 1,550 | py | Python | code/snippets/algotrading/sma_crossover.py | nchikkam/hk | d2229298d2bb5fa9e1cc2cedd40d9ff29dd0a91b | [
"MIT"
] | null | null | null | code/snippets/algotrading/sma_crossover.py | nchikkam/hk | d2229298d2bb5fa9e1cc2cedd40d9ff29dd0a91b | [
"MIT"
] | null | null | null | code/snippets/algotrading/sma_crossover.py | nchikkam/hk | d2229298d2bb5fa9e1cc2cedd40d9ff29dd0a91b | [
"MIT"
] | 1 | 2021-04-10T06:04:04.000Z | 2021-04-10T06:04:04.000Z | from pyalgotrade import strategy
from pyalgotrade.technical import ma
from pyalgotrade.technical import cross
class SMACrossOver(strategy.BacktestingStrategy):
def __init__(self, feed, instrument, smaPeriod):
strategy.BacktestingStrategy.__init__(self, feed)
self.__instrument = instrument
... | 40.789474 | 99 | 0.673548 |
d539742df392842dc18f0d3b6511492b64b12125 | 4,900 | py | Python | recipe/run_test.py | conda-forge/python-hostlist-feedstock | 4a3c03d78cd644f763598b64793580c8dd6570c3 | [
"BSD-3-Clause"
] | null | null | null | recipe/run_test.py | conda-forge/python-hostlist-feedstock | 4a3c03d78cd644f763598b64793580c8dd6570c3 | [
"BSD-3-Clause"
] | 4 | 2018-07-05T18:37:28.000Z | 2020-10-20T09:33:26.000Z | recipe/run_test.py | conda-forge/python-hostlist-feedstock | 4a3c03d78cd644f763598b64793580c8dd6570c3 | [
"BSD-3-Clause"
] | 3 | 2018-07-05T16:42:57.000Z | 2020-01-23T10:15:34.000Z | from hostlist import expand_hostlist, collect_hostlist, BadHostlist
import unittest
class TestExpand1(unittest.TestCase):
def expand_eq(self, hostlist, expanded_list):
self.assertEqual(expand_hostlist(hostlist), expanded_list)
def expand_sort_eq(self, hostlist, expanded_list):
self.assertEqua... | 39.516129 | 91 | 0.500408 |
4084ebc35d71c113b0ccda77e5ca824b89544fed | 9,266 | py | Python | app/nmea_0183.py | martinmarsh/boat | c7bdc9f249e38ccada397ff1c435f2861614a31b | [
"Apache-2.0"
] | 1 | 2020-09-12T22:17:40.000Z | 2020-09-12T22:17:40.000Z | app/nmea_0183.py | martinmarsh/boat | c7bdc9f249e38ccada397ff1c435f2861614a31b | [
"Apache-2.0"
] | null | null | null | app/nmea_0183.py | martinmarsh/boat | c7bdc9f249e38ccada397ff1c435f2861614a31b | [
"Apache-2.0"
] | null | null | null | import datetime
from typing import Callable
import aioserial
import arrow
def sign_nmea(symbol, types):
if types.get(symbol):
return types[symbol]
else:
return 0
def get_micro_secs(real_str: str) -> int:
"""
If there is a decimal point returns fractional part as an integer in units
... | 40.462882 | 120 | 0.594 |
a9f46ff44285ab4a885bb499115864503f7020e4 | 5,457 | py | Python | tests/integrational/native_sync/test_channel_groups.py | jarrodsinclair/pubnub-python | db62855da968bc80dc024210175bf14c0f9e1e1e | [
"MIT"
] | 146 | 2015-01-05T03:14:53.000Z | 2022-03-16T16:51:52.000Z | tests/integrational/native_sync/test_channel_groups.py | jarrodsinclair/pubnub-python | db62855da968bc80dc024210175bf14c0f9e1e1e | [
"MIT"
] | 48 | 2015-01-15T15:27:41.000Z | 2022-03-21T14:17:05.000Z | tests/integrational/native_sync/test_channel_groups.py | jarrodsinclair/pubnub-python | db62855da968bc80dc024210175bf14c0f9e1e1e | [
"MIT"
] | 128 | 2015-01-05T03:40:59.000Z | 2022-03-02T20:50:58.000Z | import logging
import time
import unittest
import pubnub
from pubnub.models.consumer.channel_group import PNChannelGroupsAddChannelResult, PNChannelGroupsListResult, \
PNChannelGroupsRemoveChannelResult, PNChannelGroupsRemoveGroupResult
from pubnub.pubnub import PubNub
from tests.helper import pnconf_copy
from tes... | 31.726744 | 110 | 0.64541 |
3d8979edca2e9ab9a141867181bc031fdc8e0837 | 769 | py | Python | jynx/__init__.py | fiber-space/jynx | e5dbf3f6c1601fecae9ba131cb7352b43beb0f43 | [
"MIT"
] | 1 | 2019-01-04T17:34:24.000Z | 2019-01-04T17:34:24.000Z | jynx/__init__.py | fiber-space/jynx | e5dbf3f6c1601fecae9ba131cb7352b43beb0f43 | [
"MIT"
] | null | null | null | jynx/__init__.py | fiber-space/jynx | e5dbf3f6c1601fecae9ba131cb7352b43beb0f43 | [
"MIT"
] | null | null | null | ############## setting jynx on Java classpath ################
import sys
import os
import sentinel
import jclasspath
jynxpath = os.path.dirname(sentinel.__file__)
sitepath = os.path.dirname(jynxpath)
orgpath = os.path.join(sitepath, "org")
genpath = os.path.join(orgpath, "jynx", "gen")
basepath = ... | 25.633333 | 70 | 0.590377 |
08c8ada6779a170b09fb86dfcf9ebdfd607f90d8 | 8,929 | py | Python | models/FCModel.py | yavuzdrmzksr/SD-FSIC | 29eb91c4d6e5ef91b1a7e4e3c425b0b751ba877b | [
"MIT"
] | 9 | 2021-02-20T06:22:06.000Z | 2022-02-22T03:58:10.000Z | models/FCModel.py | yavuzdrmzksr/SD-FSIC | 29eb91c4d6e5ef91b1a7e4e3c425b0b751ba877b | [
"MIT"
] | null | null | null | models/FCModel.py | yavuzdrmzksr/SD-FSIC | 29eb91c4d6e5ef91b1a7e4e3c425b0b751ba877b | [
"MIT"
] | 5 | 2021-03-15T09:16:01.000Z | 2022-01-12T13:58:59.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import *
import misc.utils as utils
from .CaptionModel import CaptionModel
class LSTMCore(nn.Module):
def __init__(se... | 43.556098 | 179 | 0.587636 |
e326a6359e3bffa5b874531b7e5dae3f4a55e782 | 5,961 | py | Python | python_toolbox/monkeypatching_tools.py | hboshnak/python_toolbox | cb9ef64b48f1d03275484d707dc5079b6701ad0c | [
"MIT"
] | 119 | 2015-02-05T17:59:47.000Z | 2022-02-21T22:43:40.000Z | python_toolbox/monkeypatching_tools.py | hboshnak/python_toolbox | cb9ef64b48f1d03275484d707dc5079b6701ad0c | [
"MIT"
] | 4 | 2019-04-24T14:01:14.000Z | 2020-05-21T12:03:29.000Z | python_toolbox/monkeypatching_tools.py | hboshnak/python_toolbox | cb9ef64b48f1d03275484d707dc5079b6701ad0c | [
"MIT"
] | 14 | 2015-03-30T06:30:42.000Z | 2021-12-24T23:45:11.000Z | # Copyright 2009-2017 Ram Rachum.
# This program is distributed under the MIT license.
'''Tools for monkeypatching.'''
import collections
import inspect
import types
from python_toolbox import misc_tools
from python_toolbox import dict_tools
from python_toolbox import decorator_tools
from python_toolbox import cachi... | 37.968153 | 79 | 0.595705 |
962c96ddee609fb50571662648dd32e66c7da10d | 4,947 | py | Python | jpoker/themes/pokersource.eu-2009/test-svg2html.py | jakob-stoeck/jpoker | a022e9878c5409d1358263e87748c29f34a22b73 | [
"MIT"
] | 4 | 2015-08-10T23:54:02.000Z | 2019-02-18T10:06:21.000Z | jpoker/themes/pokersource.eu-2009/test-svg2html.py | jakob-stoeck/jpoker | a022e9878c5409d1358263e87748c29f34a22b73 | [
"MIT"
] | null | null | null | jpoker/themes/pokersource.eu-2009/test-svg2html.py | jakob-stoeck/jpoker | a022e9878c5409d1358263e87748c29f34a22b73 | [
"MIT"
] | null | null | null | #!@PYTHON@
# -*- mode: python -*-
#
# Copyright (C) 2008 Johan Euphrosine <proppy@aminche.com>
# Copyright (C) 2008 Loic Dachary <loic@dachary.org>
# Copyright (C) 2006 Mekensleep
#
# Mekensleep
# 24 rue vieille du temple
# 75004 Paris
# licensing@mekensleep.com
#
# This program is free software; you can redistri... | 81.098361 | 450 | 0.703457 |
3d51e6bbbd9fb0f1b2b229c4ba088208b25bb40d | 3,410 | py | Python | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/add_sharding_node_request.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/add_sharding_node_request.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/add_sharding_node_request.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class AddShardingNodeRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the v... | 25.639098 | 75 | 0.556891 |
898cdf25d4d574a4f625ae6e9f2ca623c9b64795 | 3,459 | py | Python | run.py | mrbelieve128/Used-Script | 2a8ab03fc500f2dd8b3e5631ce85ccf31238828d | [
"Unlicense"
] | null | null | null | run.py | mrbelieve128/Used-Script | 2a8ab03fc500f2dd8b3e5631ce85ccf31238828d | [
"Unlicense"
] | null | null | null | run.py | mrbelieve128/Used-Script | 2a8ab03fc500f2dd8b3e5631ce85ccf31238828d | [
"Unlicense"
] | null | null | null | import os
import sys
import time
import datetime
fpath = os.getcwd()
path=os.path.abspath(os.path.dirname(__file__))
def shift_time(filename):
time_stamp_create = os.path.getctime(filename)
time_stamp_modify = os.path.getmtime(filename)
if time_stamp_create > time_stamp_modify:
time_stamp = time_s... | 32.327103 | 121 | 0.529055 |
ea9314f6c95a42f6f1ca4495c449f6f1df60d0d5 | 462 | py | Python | household/migrations/0014_financialyear_year_range.py | desafinadude/municipal-data | 1c86c55bbb59f9c8087f6920fae3585dd90d5d43 | [
"MIT"
] | 19 | 2018-01-09T10:54:15.000Z | 2022-01-25T13:10:55.000Z | household/migrations/0014_financialyear_year_range.py | desafinadude/municipal-data | 1c86c55bbb59f9c8087f6920fae3585dd90d5d43 | [
"MIT"
] | 29 | 2018-01-12T12:12:38.000Z | 2022-01-31T15:30:36.000Z | household/migrations/0014_financialyear_year_range.py | desafinadude/municipal-data | 1c86c55bbb59f9c8087f6920fae3585dd90d5d43 | [
"MIT"
] | 13 | 2018-02-11T02:12:57.000Z | 2021-11-22T11:03:22.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2020-04-08 09:49
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('household', '0013_auto_20200323_1448'),
]
operations = [
migrations.AddFie... | 22 | 49 | 0.625541 |
82a9f0530bc16962ac9dd481c77d42a38b0c3362 | 3,688 | py | Python | python/kwiver/vital/tests/test_descriptor.py | VIAME/kwiver | b746303025a834f6799b69dfb90d0c8061df64c4 | [
"BSD-3-Clause"
] | 1 | 2020-10-14T18:22:42.000Z | 2020-10-14T18:22:42.000Z | python/kwiver/vital/tests/test_descriptor.py | VIAME/kwiver | b746303025a834f6799b69dfb90d0c8061df64c4 | [
"BSD-3-Clause"
] | null | null | null | python/kwiver/vital/tests/test_descriptor.py | VIAME/kwiver | b746303025a834f6799b69dfb90d0c8061df64c4 | [
"BSD-3-Clause"
] | null | null | null | """
ckwg +31
Copyright 2016 by Kitware, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the ... | 34.792453 | 78 | 0.663232 |
32f24e734b83a9a96229ebfb1cc1158747109947 | 1,283 | py | Python | generators/sine_generator.py | mo-seph/inver-synth | d8c41871e7a58c1dacf492f2e7636f46b8e1ee1a | [
"Apache-2.0"
] | null | null | null | generators/sine_generator.py | mo-seph/inver-synth | d8c41871e7a58c1dacf492f2e7636f46b8e1ee1a | [
"Apache-2.0"
] | null | null | null | generators/sine_generator.py | mo-seph/inver-synth | d8c41871e7a58c1dacf492f2e7636f46b8e1ee1a | [
"Apache-2.0"
] | null | null | null | from generators.generator import *
import numpy as np
import math
class SineGenerator(SoundGenerator):
def generate(self,parameters:dict,filename:str,length:float,sample_rate:int)->np.ndarray:
#print("Doing Sine!")
samples = int(length * sample_rate)
data = np.zeros(samples)
params ... | 30.547619 | 93 | 0.573655 |
250b2a4dce464be862598d4eaf8f09ba5f421f38 | 2,023 | py | Python | extract_all.py | LeviVasconcelos/h36m-fetch | ec8f27e201cc8252dee43cf38f534c51b757b8cd | [
"Apache-2.0"
] | null | null | null | extract_all.py | LeviVasconcelos/h36m-fetch | ec8f27e201cc8252dee43cf38f534c51b757b8cd | [
"Apache-2.0"
] | null | null | null | extract_all.py | LeviVasconcelos/h36m-fetch | ec8f27e201cc8252dee43cf38f534c51b757b8cd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from os import path, makedirs
import tarfile
from tqdm import tqdm
subjects = ['S1', 'S5', 'S6', 'S7', 'S8', 'S9', 'S11']
#subjects = ['S1']
# https://stackoverflow.com/a/6718435
def commonprefix(m):
s1 = min(m)
s2 = max(m)
for i, c in enumerate(s1):
if c != s2[i]:
... | 34.288136 | 90 | 0.625309 |
f1c3dd4fd4213bf5909259b7781f7742a295661c | 2,225 | py | Python | electrum_grs/tests/test_verifier.py | Groestlcoin/electrum-grs | 80f00b8d3511bf40be71fc8c0ffe179ab1d57dd5 | [
"MIT"
] | 9 | 2016-09-15T10:10:36.000Z | 2019-08-01T09:08:30.000Z | electrum_grs/tests/test_verifier.py | Groestlcoin/electrum-grs | 80f00b8d3511bf40be71fc8c0ffe179ab1d57dd5 | [
"MIT"
] | 5 | 2017-10-28T08:46:00.000Z | 2019-03-15T00:59:01.000Z | electrum_grs/tests/test_verifier.py | Groestlcoin/electrum-grs | 80f00b8d3511bf40be71fc8c0ffe179ab1d57dd5 | [
"MIT"
] | 5 | 2017-08-24T03:44:27.000Z | 2019-03-03T20:42:25.000Z | # -*- coding: utf-8 -*-
from electrum_grs.bitcoin import hash_encode
from electrum_grs.transaction import Transaction
from electrum_grs.util import bfh
from electrum_grs.verifier import SPV, InnerNodeOfSpvProofIsValidTx
from . import TestCaseForTestnet
MERKLE_BRANCH = [
'f2994fd4546086b21b4916b76cf901afb5c4db1c... | 43.627451 | 91 | 0.742921 |
b0127db87b06e696550858268ff8f36cc1bb7473 | 2,913 | py | Python | cc/taskmgr.py | markokr/cc | e11aa4a36f545bf12d150e17cd172a5fb7e50f61 | [
"BSD-2-Clause"
] | 3 | 2015-01-26T20:05:32.000Z | 2018-05-18T13:25:40.000Z | cc/taskmgr.py | markokr/cc | e11aa4a36f545bf12d150e17cd172a5fb7e50f61 | [
"BSD-2-Clause"
] | null | null | null | cc/taskmgr.py | markokr/cc | e11aa4a36f545bf12d150e17cd172a5fb7e50f61 | [
"BSD-2-Clause"
] | null | null | null | """Client side task handling.
"""
import uuid
import skytools
from zmq.eventloop import IOLoop
from cc.reqs import TaskSendMessage
from cc.stream import CCReqStream
class TaskInfo:
"""Per-task state, replies."""
log = skytools.getLogger('TaskInfo')
def __init__(self, task, task_cbfunc, ccrq):
... | 27.742857 | 98 | 0.569173 |
9bbc5e056edc2056cbb3ebf744333474be446db2 | 10,458 | py | Python | tests/nodeos_multiple_version_protocol_feature_test.py | UOSnetwork/uos | 72513a5efa82af1ebfb74ee7710e2744e866ae41 | [
"MIT"
] | 29 | 2018-09-25T20:19:10.000Z | 2021-03-31T03:23:43.000Z | tests/nodeos_multiple_version_protocol_feature_test.py | UOSnetwork/eos | 72513a5efa82af1ebfb74ee7710e2744e866ae41 | [
"MIT"
] | 26 | 2019-01-16T16:06:26.000Z | 2019-12-23T12:18:26.000Z | tests/nodeos_multiple_version_protocol_feature_test.py | UOSnetwork/eos | 72513a5efa82af1ebfb74ee7710e2744e866ae41 | [
"MIT"
] | 8 | 2018-11-06T14:13:15.000Z | 2019-05-28T03:37:09.000Z | #!/usr/bin/env python3
from testUtils import Utils
from Cluster import Cluster, PFSetupPolicy
from TestHelper import TestHelper
from WalletMgr import WalletMgr
from Node import Node
import signal
import json
import time
import os
from os.path import join, exists
from datetime import datetime
# Parse command line arg... | 52.29 | 162 | 0.737139 |
5b703982f0d242f9cb83fd9a9cc775186dc1474e | 4,782 | py | Python | build-scripts/compile_all.py | kmccarron-rh/content | 87de96776a941adb0939cad1c96e5001a8614f51 | [
"BSD-3-Clause"
] | 1,138 | 2018-09-05T06:31:44.000Z | 2022-03-31T03:38:24.000Z | build-scripts/compile_all.py | kmccarron-rh/content | 87de96776a941adb0939cad1c96e5001a8614f51 | [
"BSD-3-Clause"
] | 4,743 | 2018-09-04T15:14:04.000Z | 2022-03-31T23:17:57.000Z | build-scripts/compile_all.py | kmccarron-rh/content | 87de96776a941adb0939cad1c96e5001a8614f51 | [
"BSD-3-Clause"
] | 400 | 2018-09-08T20:08:49.000Z | 2022-03-30T20:54:32.000Z | from __future__ import print_function
import argparse
import logging
import sys
import os.path
from glob import glob
import ssg.build_profile
import ssg.build_yaml
import ssg.utils
import ssg.controls
import ssg.products
import ssg.environment
def create_parser():
parser = argparse.ArgumentParser()
parser.ad... | 34.905109 | 108 | 0.747386 |
d2b1c8290359b307683f0ba1380127cb567a148f | 39,852 | py | Python | test/functional/p2p_compactblocks.py | picscoin/picscoin | 65d757c1732a41d7370ec29caf06a9dd2c79b39a | [
"MIT"
] | null | null | null | test/functional/p2p_compactblocks.py | picscoin/picscoin | 65d757c1732a41d7370ec29caf06a9dd2c79b39a | [
"MIT"
] | null | null | null | test/functional/p2p_compactblocks.py | picscoin/picscoin | 65d757c1732a41d7370ec29caf06a9dd2c79b39a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2019 The Picscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test compact blocks (BIP 152).
Version 1 compact blocks are pre-segwit (txids)
Version 2 compact bloc... | 46.610526 | 500 | 0.672162 |
b761985839ca01ada9c3240e4282469448e58eb8 | 3,903 | py | Python | tests/makeresults.py | jonathanHuwP/CrystalGrowthTracker | af94ece95818407679a2a7c63be91731ba7ae5c2 | [
"Apache-2.0"
] | null | null | null | tests/makeresults.py | jonathanHuwP/CrystalGrowthTracker | af94ece95818407679a2a7c63be91731ba7ae5c2 | [
"Apache-2.0"
] | 14 | 2021-09-06T15:17:14.000Z | 2021-12-14T12:18:08.000Z | tests/makeresults.py | jonathanHuwP/CrystalGrowthTracker | af94ece95818407679a2a7c63be91731ba7ae5c2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on 06 Oct 2021
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 writi... | 29.793893 | 84 | 0.645657 |
2e21f6591e3d1c4c9970a3d57cdc099fde699043 | 16,250 | py | Python | src/fasterRCNN/faster_rcnn/faster_rcnn.py | acvi2018/person-detection | 63e73493f4b6d2b18dad2b0a1b7813b03fc12681 | [
"Apache-2.0"
] | 3 | 2018-03-10T17:52:35.000Z | 2019-01-18T04:57:13.000Z | src/fasterRCNN/faster_rcnn/faster_rcnn.py | acvi2018/person-detection | 63e73493f4b6d2b18dad2b0a1b7813b03fc12681 | [
"Apache-2.0"
] | null | null | null | src/fasterRCNN/faster_rcnn/faster_rcnn.py | acvi2018/person-detection | 63e73493f4b6d2b18dad2b0a1b7813b03fc12681 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from utils.timer import Timer
from utils.blob import im_list_to_blob
from fast_rcnn.nms_wrapper import nms
from rpn_msr.proposal_layer import proposal_layer as proposal_layer_py
from rpn... | 40.829146 | 124 | 0.635631 |
c9e4416dc5162e58dc3fc3b1ba1c373526bff803 | 34,772 | py | Python | src/v5.1/resources/swagger_client/api/budgets_api.py | xmarcosx/edfi-notebook | 0564ebdf1d0f45a9d25056e7e61369f0a837534d | [
"Apache-2.0"
] | 2 | 2021-04-27T17:18:17.000Z | 2021-04-27T19:14:39.000Z | src/v5.1/resources/swagger_client/api/budgets_api.py | xmarcosx/edfi-notebook | 0564ebdf1d0f45a9d25056e7e61369f0a837534d | [
"Apache-2.0"
] | null | null | null | src/v5.1/resources/swagger_client/api/budgets_api.py | xmarcosx/edfi-notebook | 0564ebdf1d0f45a9d25056e7e61369f0a837534d | [
"Apache-2.0"
] | 1 | 2022-01-06T09:43:11.000Z | 2022-01-06T09:43:11.000Z | # coding: utf-8
"""
Ed-Fi Operational Data Store API
The Ed-Fi ODS / API enables applications to read and write education data stored in an Ed-Fi ODS through a secure REST interface. *** > *Note: Consumers of ODS / API information should sanitize all data for display and storage. The ODS / API provides reas... | 49.392045 | 493 | 0.639969 |
3c77a04487ea444a96de49deb544d942aa2c3066 | 3,028 | py | Python | tests/integration/conftest.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | tests/integration/conftest.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | tests/integration/conftest.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | import os
from datetime import datetime
import pytest
import py42.sdk as _sdk
from py42.util import convert_datetime_to_epoch
def pytest_addoption(parser):
parser.addini("alert_id", "Alert id that exists in the system.")
parser.addini("device_id", "Device id that exists in the system.")
parser.addini("o... | 32.55914 | 88 | 0.712021 |
bb4d2a2111c22d3029cc5133efaeed21f7f8f556 | 2,454 | py | Python | noteKeeper/main/forms.py | Aryan284/Note-Keeper | d97253fc2720d723afd0b5751a67bfc533bca8ee | [
"MIT"
] | 8 | 2020-06-27T17:41:11.000Z | 2022-02-08T06:49:20.000Z | noteKeeper/main/forms.py | Aryan284/Note-Keeper | d97253fc2720d723afd0b5751a67bfc533bca8ee | [
"MIT"
] | 5 | 2021-06-02T02:17:23.000Z | 2022-03-02T15:02:33.000Z | noteKeeper/main/forms.py | Aryan284/Note-Keeper | d97253fc2720d723afd0b5751a67bfc533bca8ee | [
"MIT"
] | 4 | 2020-06-21T05:31:04.000Z | 2021-11-07T04:01:35.000Z | from django import forms
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from .models import UserProfile, Notes, Papers
from datetime import datetime
class NotesForm(forms.ModelForm):
sub_slug = f... | 33.162162 | 123 | 0.725754 |
fc3740025b8f76375ff832d81ba2f5c1180898fd | 4,851 | py | Python | jaxvi/infer.py | sagar87/jaxvi | 78829552589f8d44082cf8a1a8e02da549d7c298 | [
"MIT"
] | null | null | null | jaxvi/infer.py | sagar87/jaxvi | 78829552589f8d44082cf8a1a8e02da549d7c298 | [
"MIT"
] | null | null | null | jaxvi/infer.py | sagar87/jaxvi | 78829552589f8d44082cf8a1a8e02da549d7c298 | [
"MIT"
] | null | null | null | from typing import Callable, NamedTuple, Tuple
import jax.numpy as jnp
from jax.scipy.stats import norm, multivariate_normal
from jax import jacfwd
from jax import grad
from jax.ops import index_update
from jaxvi.models import Model
# class ADVIState(NamedTuple):
# phi: jnp.DeviceArray
# grad_phi: jnp.DeviceA... | 32.125828 | 87 | 0.615131 |
1b7e5dc1034bf44c36ebd5463d38bdb2c4d5dde2 | 1,433 | py | Python | social_core/backends/eveonline.py | shnaqawi/social-core | 402e15bd2854ade0b8f0d19663966473f0e1c6ff | [
"BSD-3-Clause"
] | 745 | 2016-12-03T16:38:37.000Z | 2022-03-29T17:18:52.000Z | social_core/backends/eveonline.py | shnaqawi/social-core | 402e15bd2854ade0b8f0d19663966473f0e1c6ff | [
"BSD-3-Clause"
] | 624 | 2016-12-06T16:01:46.000Z | 2022-03-29T15:50:35.000Z | virtual/lib/python3.6/site-packages/social_core/backends/eveonline.py | dennismwaniki67/awards | 80ed10541f5f751aee5f8285ab1ad54cfecba95f | [
"MIT"
] | 583 | 2016-12-03T16:40:38.000Z | 2022-03-28T05:32:37.000Z | """
EVE Online Single Sign-On (SSO) OAuth2 backend
Documentation at https://eveonline-third-party-documentation.readthedocs.io/en/latest/sso/index.html
"""
from .oauth import BaseOAuth2
class EVEOnlineOAuth2(BaseOAuth2):
"""EVE Online OAuth authentication backend"""
name = 'eveonline'
BASE_URL = 'https://... | 33.325581 | 100 | 0.618283 |
7b55c931adb4169cb4f0db58aec55d96df947802 | 485 | py | Python | adjacentElementsProduct.py | FeMaffezzolli/PythonSnippets | aef7d273182c1c4a0cb29aefb4e6ced3a1aa146b | [
"MIT"
] | null | null | null | adjacentElementsProduct.py | FeMaffezzolli/PythonSnippets | aef7d273182c1c4a0cb29aefb4e6ced3a1aa146b | [
"MIT"
] | null | null | null | adjacentElementsProduct.py | FeMaffezzolli/PythonSnippets | aef7d273182c1c4a0cb29aefb4e6ced3a1aa146b | [
"MIT"
] | null | null | null | def adjacentElementsProduct(inputArray):
""" Given an array of integers, find the pair of adjacent elements
that has the largest product and return that product. -> int
"""
iter = len(inputArray) - 1
maxProd = inputArray[0]*inputArray[1]
for i in... | 34.642857 | 79 | 0.54433 |
6852b3726fb2be74d8b0fa16ae1bf41675d5117f | 16,486 | py | Python | WS8552.py | pipesanta/WS8552-python | e480a3e623266c877f1b69d09d587656d010ec03 | [
"MIT"
] | null | null | null | WS8552.py | pipesanta/WS8552-python | e480a3e623266c877f1b69d09d587656d010ec03 | [
"MIT"
] | null | null | null | WS8552.py | pipesanta/WS8552-python | e480a3e623266c877f1b69d09d587656d010ec03 | [
"MIT"
] | null | null | null | import serial
import time
class WS8552_FingerPrintReader(object):
# define ACK_SUCCESS 0x00 //Operation successfully
# define ACK_FAIL 0x01 // Operation failed
# define ACK_FULL 0x04 // Fingerprint database is full
# define ACK_NOUSER 0x05 //No such user
# define ACK_FIN_EXIST 0x07 // alre... | 38.25058 | 139 | 0.584921 |
8025c80290c56309746e6834c0b3dea516e80c66 | 106 | py | Python | setup.py | nguyentritai2906/bmlfs | cf5128065289caae9f38a29bbb762bcf2fe7fd3a | [
"MIT"
] | null | null | null | setup.py | nguyentritai2906/bmlfs | cf5128065289caae9f38a29bbb762bcf2fe7fd3a | [
"MIT"
] | null | null | null | setup.py | nguyentritai2906/bmlfs | cf5128065289caae9f38a29bbb762bcf2fe7fd3a | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name='bmlfs', version='1.0', packages=find_packages())
| 26.5 | 60 | 0.773585 |
218a129f0f9af152717e5a29ebf8ad9b051b76af | 717 | py | Python | analysis/APICOVID.py | clearyb1/COVIDDataViz | e3001afafaf67d2447181268d8ca796c27a6df13 | [
"MIT"
] | null | null | null | analysis/APICOVID.py | clearyb1/COVIDDataViz | e3001afafaf67d2447181268d8ca796c27a6df13 | [
"MIT"
] | null | null | null | analysis/APICOVID.py | clearyb1/COVIDDataViz | e3001afafaf67d2447181268d8ca796c27a6df13 | [
"MIT"
] | null | null | null | import requests
from urllib.request import urlopen
import pandas as pd
import json
import geopandas
gdf = geopandas.read_file("https://opendata.arcgis.com/datasets/a0e3a1c53ad8422faf00604ee08955db_0.geojson")
print(gdf.head())
df1 = pd.DataFrame(gdf)
url = "https://opendata.arcgis.com/datasets/a0e3a1c53ad8422faf006... | 31.173913 | 120 | 0.796374 |
5af99ec87ca445b81a68c6cb59daa8ce0b7c1124 | 93 | py | Python | scripts/reflow_count.py | WoodRain/Vulkan-Docs | 521e98405f8587ce6506811125c001f1eda26314 | [
"CC-BY-4.0"
] | null | null | null | scripts/reflow_count.py | WoodRain/Vulkan-Docs | 521e98405f8587ce6506811125c001f1eda26314 | [
"CC-BY-4.0"
] | null | null | null | scripts/reflow_count.py | WoodRain/Vulkan-Docs | 521e98405f8587ce6506811125c001f1eda26314 | [
"CC-BY-4.0"
] | null | null | null | # The value to start tagging VU statements at, unless overridden by -nextvu
startVUID = 2790
| 31 | 75 | 0.784946 |
95b5431bbb228b3bde36eccaf4c39c0d7710a42a | 401 | py | Python | doc/examples/world.py | mcieslik-mctp/papy | 708e50827b5db46bbea081982cb74b9b0e464064 | [
"MIT"
] | 23 | 2015-01-12T10:28:48.000Z | 2020-05-09T20:50:26.000Z | doc/examples/world.py | mcieslik-mctp/papy | 708e50827b5db46bbea081982cb74b9b0e464064 | [
"MIT"
] | null | null | null | doc/examples/world.py | mcieslik-mctp/papy | 708e50827b5db46bbea081982cb74b9b0e464064 | [
"MIT"
] | 11 | 2015-02-05T05:56:19.000Z | 2019-05-18T08:17:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from numap import NuMap
def hello_world(element):
print("Hello element: %s" % element)
return element
ELEMENTS = ('element_0', 'element_1', 'element_2', 'element_3', 'element_4')
result_iterator = NuMap(hello_world, ELEMENTS)
results = tuple(result_iterator)
asse... | 26.733333 | 83 | 0.700748 |
a5aee64ecbcb2933a0855fe653b0da33194d9e7b | 5,154 | py | Python | maxent/coarse_models.py | abramschon/maxent | 2f67d2dc156ad2c240a86785c1ad7339184bd914 | [
"MIT"
] | null | null | null | maxent/coarse_models.py | abramschon/maxent | 2f67d2dc156ad2c240a86785c1ad7339184bd914 | [
"MIT"
] | null | null | null | maxent/coarse_models.py | abramschon/maxent | 2f67d2dc156ad2c240a86785c1ad7339184bd914 | [
"MIT"
] | null | null | null | import numpy as np
from math import comb
from numba import njit
from .utils import get_state_space
from .samplers import gibbs_sampling
class Independent:
"""
Represents an independent or factorised model
If sampling is True, all estimates will be based off of samples and the state space will not be set up... | 37.079137 | 129 | 0.591385 |
3e4199dd69147dd425140d38268d33d3c35b6c52 | 1,871 | py | Python | ooobuild/lo/sheet/x_label_ranges.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/sheet/x_label_ranges.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/sheet/x_label_ranges.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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... | 35.980769 | 128 | 0.734901 |
ca334b169ea985fafcf44f2d2bfe027be5d8017b | 5,232 | py | Python | gcloud_utils/bigquery/bigquery.py | dekomote/gcloud-utils | 549b7728ef2c82f736ea10f2619004397cdaaaa0 | [
"Apache-2.0"
] | null | null | null | gcloud_utils/bigquery/bigquery.py | dekomote/gcloud-utils | 549b7728ef2c82f736ea10f2619004397cdaaaa0 | [
"Apache-2.0"
] | null | null | null | gcloud_utils/bigquery/bigquery.py | dekomote/gcloud-utils | 549b7728ef2c82f736ea10f2619004397cdaaaa0 | [
"Apache-2.0"
] | null | null | null | #pylint: disable=too-many-arguments,bare-except
"""Module to handle Google BigQuery Service"""
import logging
from google.cloud import bigquery
from google.api_core.exceptions import NotFound
from gcloud_utils.bigquery.query_builder import QueryBuilder
from gcloud_utils.base_client import BaseClient
class Bigquery... | 36.082759 | 91 | 0.625765 |
59cc98749fb4dd328b30bcedd1ca6c73f8141cca | 1,679 | py | Python | examples/library/wsadmin.py | ajaco56/ansible-websphere | d02c0749a1b37040a20ca5a8895d7d4c13b1d8aa | [
"MIT"
] | 75 | 2016-02-12T10:30:21.000Z | 2022-01-27T01:37:02.000Z | examples/library/wsadmin.py | ajaco56/ansible-websphere | d02c0749a1b37040a20ca5a8895d7d4c13b1d8aa | [
"MIT"
] | 13 | 2017-10-06T19:42:02.000Z | 2021-08-02T18:49:54.000Z | examples/library/wsadmin.py | ajaco56/ansible-websphere | d02c0749a1b37040a20ca5a8895d7d4c13b1d8aa | [
"MIT"
] | 72 | 2016-01-31T01:34:33.000Z | 2022-03-16T23:22:14.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Amir Mofasser <amir.mofasser@gmail.com> (@amimof)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import os
import subprocess
import platform
import datetime
def main():
# Read arguments
... | 35.723404 | 253 | 0.634306 |
4111f7f6ba81b12d9f72fc8ca43ca9bfa74fb3d2 | 4,747 | py | Python | userbot/modules/purge.py | RysepProject/WeebProject | eb153d1901ba8dcf028f395ede9e7f52a19f58e7 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-01-28T08:56:47.000Z | 2021-01-28T08:56:47.000Z | userbot/modules/purge.py | RysepProject/WeebProject | eb153d1901ba8dcf028f395ede9e7f52a19f58e7 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/purge.py | RysepProject/WeebProject | eb153d1901ba8dcf028f395ede9e7f52a19f58e7 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 21 | 2021-02-01T14:01:42.000Z | 2021-08-22T01:13:28.000Z | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot module for purging unneeded messages(usually spam or ot). """
from asyncio import sleep
from telethon.err... | 31.437086 | 85 | 0.594691 |
23ba2c041d305ef001b44049aa0862fb628a9ac5 | 625 | py | Python | human_services/locations/admin.py | DarwishMenna/pathways-backend | e9825e0373c586ce8f07ee8b70aecc7de679fb41 | [
"BSD-3-Clause"
] | 12 | 2017-08-30T18:21:00.000Z | 2021-12-09T04:04:17.000Z | human_services/locations/admin.py | DarwishMenna/pathways-backend | e9825e0373c586ce8f07ee8b70aecc7de679fb41 | [
"BSD-3-Clause"
] | 424 | 2017-08-08T18:32:14.000Z | 2022-03-30T21:42:51.000Z | human_services/locations/admin.py | DarwishMenna/pathways-backend | e9825e0373c586ce8f07ee8b70aecc7de679fb41 | [
"BSD-3-Clause"
] | 7 | 2017-09-29T21:14:37.000Z | 2019-12-30T21:07:37.000Z | from django.contrib import admin
from parler.admin import TranslatableAdmin
from human_services.locations import models
class ServiceAtLocationAdmin(admin.ModelAdmin):
raw_id_fields = ['service', 'location']
admin.site.register(models.ServiceAtLocation, ServiceAtLocationAdmin)
class LocationAdmin(TranslatableAdm... | 31.25 | 69 | 0.8064 |
e1121e41aad7c0934c6ffd7e148f1758bb0b44cf | 87,709 | py | Python | ui.py | elrnv/RenderManForBlender | ca6b2ce1fb8b9e4acb893dfe640067c1beaa3c36 | [
"MIT"
] | null | null | null | ui.py | elrnv/RenderManForBlender | ca6b2ce1fb8b9e4acb893dfe640067c1beaa3c36 | [
"MIT"
] | null | null | null | ui.py | elrnv/RenderManForBlender | ca6b2ce1fb8b9e4acb893dfe640067c1beaa3c36 | [
"MIT"
] | null | null | null | # ##### BEGIN MIT LICENSE BLOCK #####
#
# Copyright (c) 2015 - 2017 Pixar
#
# 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 u... | 35.495346 | 136 | 0.573385 |
776e22d10af942d5c39d15e7d53ed7fb11c01e6d | 23 | py | Python | forum/models/__init__.py | codertimeless/StudentAssociation | 3f6caf2b362623d4f8cf82bab9529951a375fe6a | [
"Apache-2.0"
] | null | null | null | forum/models/__init__.py | codertimeless/StudentAssociation | 3f6caf2b362623d4f8cf82bab9529951a375fe6a | [
"Apache-2.0"
] | 15 | 2020-03-09T11:56:13.000Z | 2022-02-10T15:03:01.000Z | forum/models/__init__.py | codertimeless/StudentAssociation | 3f6caf2b362623d4f8cf82bab9529951a375fe6a | [
"Apache-2.0"
] | null | null | null | from .article import *
| 11.5 | 22 | 0.73913 |
332aaec7c0625da5cd0585e7c065846abcb5522b | 11,975 | py | Python | fabric_cf/actor/core/kernel/slice.py | fabric-testbed/ActorBase | 3c7dd040ee79fef0759e66996c93eeec57c790b2 | [
"MIT"
] | null | null | null | fabric_cf/actor/core/kernel/slice.py | fabric-testbed/ActorBase | 3c7dd040ee79fef0759e66996c93eeec57c790b2 | [
"MIT"
] | null | null | null | fabric_cf/actor/core/kernel/slice.py | fabric-testbed/ActorBase | 3c7dd040ee79fef0759e66996c93eeec57c790b2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# 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 ... | 34.912536 | 116 | 0.679081 |
ffa9b62a3baa257c03c0f7684ea92bf3460fef79 | 3,008 | py | Python | notebooks/Users/tri.dang@innitico.com/UseSecretExample.py | tdang2/databricks_explorer | f9a34d1c1baf5edf6aee6b9ae1058331063bc23a | [
"Apache-2.0"
] | null | null | null | notebooks/Users/tri.dang@innitico.com/UseSecretExample.py | tdang2/databricks_explorer | f9a34d1c1baf5edf6aee6b9ae1058331063bc23a | [
"Apache-2.0"
] | null | null | null | notebooks/Users/tri.dang@innitico.com/UseSecretExample.py | tdang2/databricks_explorer | f9a34d1c1baf5edf6aee6b9ae1058331063bc23a | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC # Description
# MAGIC This is an example of setting up databricks using Azure key vault to prevent exposing secrets to the public.
# MAGIC
# MAGIC To use Azure secret feature, refer to this: https://docs.azuredatabricks.net/user-guide/secrets/secrets.html#secrets
# MAGI... | 36.240964 | 141 | 0.705452 |
be1ee749f0f29987f6dea2c520a99990feaf2041 | 373 | py | Python | graveyard/figures.py | bmj-hackathon/kaggle_airbus_ship_detection | ea2c655418e13452fd9dcfe51ae99d703e16d758 | [
"MIT"
] | null | null | null | graveyard/figures.py | bmj-hackathon/kaggle_airbus_ship_detection | ea2c655418e13452fd9dcfe51ae99d703e16d758 | [
"MIT"
] | 1 | 2021-09-08T01:14:02.000Z | 2021-09-08T01:14:02.000Z | graveyard/figures.py | bmj-hackathon/kaggle_airbus_ship_detection | ea2c655418e13452fd9dcfe51ae99d703e16d758 | [
"MIT"
] | null | null | null | # %% TEST 3D scatter
# iris = px.data.iris()
# print(go.Scatter3d)
# print("Iris", iris)
# trace=[go.Scatter3d(iris, x='sepal_length', y='sepal_width', z='petal_width', color='species')]
import numpy as np
import plotly.graph_objs as go
t = np.linspace(0, 10, 50)
x, y, z = np.cos(t), np.sin(t), t
test_fig = go.Figur... | 28.692308 | 97 | 0.659517 |
06628f0f11ec3878d1154072fd076862e183e510 | 1,749 | py | Python | katana/json.py | kusanagi/katana-sdk-python3 | cd089409ec0d822f4d7bd6b4bebd527e003089ee | [
"MIT"
] | 2 | 2017-03-21T20:02:47.000Z | 2017-05-02T19:32:01.000Z | katana/json.py | kusanagi/katana-sdk-python3 | cd089409ec0d822f4d7bd6b4bebd527e003089ee | [
"MIT"
] | 19 | 2017-03-10T12:09:34.000Z | 2018-06-01T18:10:06.000Z | katana/json.py | kusanagi/katana-sdk-python3 | cd089409ec0d822f4d7bd6b4bebd527e003089ee | [
"MIT"
] | 5 | 2017-03-10T11:40:50.000Z | 2019-03-26T06:28:33.000Z | """
Python 3 SDK for the KATANA(tm) Framework (http://katana.kusanagi.io)
Copyright (c) 2016-2018 KUSANAGI S.L. All rights reserved.
Distributed under the MIT license.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
"""
import datetime
import... | 26.104478 | 76 | 0.663808 |
0336936ddba157966224b5bba67af34d8162cf4e | 65,928 | py | Python | madminer/fisherinformation/information.py | diana-hep/madminer | 3a585d2887a31886cdeadddb0a284f0472146fce | [
"MIT"
] | 46 | 2019-06-29T14:56:00.000Z | 2021-08-02T06:05:41.000Z | madminer/fisherinformation/information.py | diana-hep/madminer | 3a585d2887a31886cdeadddb0a284f0472146fce | [
"MIT"
] | 52 | 2019-06-18T18:42:58.000Z | 2021-10-04T14:56:39.000Z | madminer/fisherinformation/information.py | diana-hep/madminer | 3a585d2887a31886cdeadddb0a284f0472146fce | [
"MIT"
] | 20 | 2019-06-17T15:29:49.000Z | 2021-09-22T18:14:35.000Z | import logging
import numpy as np
import os
from madminer.analysis import DataAnalyzer
from madminer.utils.various import math_commands, weighted_quantile, sanitize_array, mdot
from madminer.utils.various import less_logging
from madminer.ml import ParameterizedRatioEstimator, ScoreEstimator, Ensemble, load_estimator
... | 41.859048 | 122 | 0.625546 |
36a74ebdf20e551238b5e85a5ffb1066a4bde13a | 19,816 | py | Python | parsers/PHAROS/src/loadPHAROS.py | RENCI-AUTOMAT/Data_services | eb60f822021b138298eabb3852b20b30739afaa5 | [
"MIT"
] | 2 | 2022-02-01T04:10:30.000Z | 2022-03-23T22:01:35.000Z | parsers/PHAROS/src/loadPHAROS.py | RENCI-AUTOMAT/Data_services | eb60f822021b138298eabb3852b20b30739afaa5 | [
"MIT"
] | 83 | 2020-08-18T16:09:43.000Z | 2022-03-25T19:17:25.000Z | parsers/PHAROS/src/loadPHAROS.py | RENCI-AUTOMAT/Data_services | eb60f822021b138298eabb3852b20b30739afaa5 | [
"MIT"
] | null | null | null | import os
import hashlib
import argparse
import pandas as pd
import logging
import mysql.connector
import re
import random
import requests
from Common.loader_interface import SourceDataLoader
from Common.kgxmodel import kgxnode, kgxedge
from Common.utils import LoggingUtil, GetData
##############
# Class: FooDB load... | 40.942149 | 354 | 0.566058 |
f3b84c4111d617e4c7fa31831541752b9a1726c1 | 6,142 | py | Python | docs/conf.py | njsmith/cryptography | 06e279228295cebea115e3decbf99d27b5315e63 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-03-08T09:25:06.000Z | 2022-03-08T09:25:06.000Z | docs/conf.py | iamkennis/cryptography | 06e279228295cebea115e3decbf99d27b5315e63 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | docs/conf.py | iamkennis/cryptography | 06e279228295cebea115e3decbf99d27b5315e63 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
#
# Cryptography documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 6 19:19:14 201... | 29.815534 | 79 | 0.690492 |
ceada10df100714dfd411a3271da7b6ab1d02f25 | 3,570 | py | Python | src/libnrl/graph.py | Mandy001/vae_network_embedding | 07bbc08ce1bd2cb5c542648a281060d18df9669c | [
"MIT"
] | 2 | 2018-06-24T07:46:19.000Z | 2018-06-24T13:11:16.000Z | src/libnrl/graph.py | Mandy001/vae_network_embedding | 07bbc08ce1bd2cb5c542648a281060d18df9669c | [
"MIT"
] | null | null | null | src/libnrl/graph.py | Mandy001/vae_network_embedding | 07bbc08ce1bd2cb5c542648a281060d18df9669c | [
"MIT"
] | null | null | null | """Graph utilities."""
# from time import time
import networkx as nx
import pickle as pkl
import numpy as np
import scipy.sparse as sp
__author__ = "Zhang Zhengyan"
__email__ = "zhangzhengyan14@mails.tsinghua.edu.cn"
class Graph(object):
def __init__(self):
self.G = None
self.look_up_dict = {}
... | 30.254237 | 83 | 0.485994 |
f28edb49eb06467582058505a9972e8e5ed370d2 | 8,831 | py | Python | tests/iteration_test.py | nirs/py-lmdb | 5341338964c0fe34eb29020cb7ca2716c22475d9 | [
"OLDAP-2.8"
] | 241 | 2015-01-06T07:12:08.000Z | 2019-06-08T19:20:27.000Z | tests/iteration_test.py | nirs/py-lmdb | 5341338964c0fe34eb29020cb7ca2716c22475d9 | [
"OLDAP-2.8"
] | 119 | 2015-02-16T08:56:00.000Z | 2019-06-08T01:00:12.000Z | tests/iteration_test.py | nirs/py-lmdb | 5341338964c0fe34eb29020cb7ca2716c22475d9 | [
"OLDAP-2.8"
] | 61 | 2015-02-04T08:19:31.000Z | 2019-06-07T18:14:24.000Z | #! /usr/bin/env python
#
# Copyright 2013 The py-lmdb authors, all rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted only as authorized by the OpenLDAP
# Public License.
#
# A copy of this license is available in the file LICENSE in the
# top-level dir... | 34.228682 | 77 | 0.611822 |
6c6260b154fce05b0f8e0d3d9c4e1cfe355cfad4 | 777 | py | Python | trendmicro_apex/icon_trendmicro_apex/actions/delete_openioc_file/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | trendmicro_apex/icon_trendmicro_apex/actions/delete_openioc_file/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | trendmicro_apex/icon_trendmicro_apex/actions/delete_openioc_file/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import DeleteOpeniocFileInput, DeleteOpeniocFileOutput, Input, Component
# Custom imports below
import urllib.parse
import json
class DeleteOpeniocFile(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='delete_openioc_file',
... | 29.884615 | 85 | 0.653797 |
eb8c8701a31017e67f49114358b4dfa44933b000 | 4,196 | py | Python | oauth2_provider/settings.py | Careerleaf/django-oauth-toolkit | 04bb47c4ab1d9c89b4f4d29c6fb89c5f428b3f78 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | oauth2_provider/settings.py | Careerleaf/django-oauth-toolkit | 04bb47c4ab1d9c89b4f4d29c6fb89c5f428b3f78 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | oauth2_provider/settings.py | Careerleaf/django-oauth-toolkit | 04bb47c4ab1d9c89b4f4d29c6fb89c5f428b3f78 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """
This module is largely inspired by django-rest-framework settings.
Settings for the OAuth2 Provider are all namespaced in the OAUTH2_PROVIDER setting.
For example your project's `settings.py` file might look like this:
OAUTH2_PROVIDER = {
'CLIENT_ID_GENERATOR_CLASS':
'oauth2_provider.generators.Client... | 32.276923 | 110 | 0.695663 |
cf16d71adb8eb2f7cccfcd8c78f591665ff2371f | 966 | py | Python | writeups/2020/angstrom-ctf/shifter/solve.py | welchbj/ctf | fd4e2cea692b134163cc9bd66c2b4796bdefed8c | [
"MIT"
] | 65 | 2019-10-07T01:29:16.000Z | 2022-03-18T14:20:40.000Z | writeups/2020/angstrom-ctf/shifter/solve.py | welchbj/ctf | fd4e2cea692b134163cc9bd66c2b4796bdefed8c | [
"MIT"
] | null | null | null | writeups/2020/angstrom-ctf/shifter/solve.py | welchbj/ctf | fd4e2cea692b134163cc9bd66c2b4796bdefed8c | [
"MIT"
] | 12 | 2020-05-04T01:16:53.000Z | 2022-01-02T14:33:41.000Z | #!/usr/bin/env python2
from __future__ import print_function
import string
from pwn import *
NUM_PROBLEMS = 50
ALPHABET = string.ascii_uppercase
def get_fib_numbers():
with open('fib.lst', 'r') as f:
return [
int(line.strip()) for line in f.readlines()
if line.strip()
]... | 19.32 | 57 | 0.585921 |
94baae9fb398f23e0da4f408489f2e63625ecba7 | 7,958 | py | Python | src/schemathesis/cli/cassettes.py | tuffnatty/schemathesis | c104923f31235df49555ab0c8d92b5cb81957de0 | [
"MIT"
] | null | null | null | src/schemathesis/cli/cassettes.py | tuffnatty/schemathesis | c104923f31235df49555ab0c8d92b5cb81957de0 | [
"MIT"
] | null | null | null | src/schemathesis/cli/cassettes.py | tuffnatty/schemathesis | c104923f31235df49555ab0c8d92b5cb81957de0 | [
"MIT"
] | null | null | null | import base64
import re
import sys
import threading
from queue import Queue
from typing import Any, Dict, Generator, Iterator, List, Optional, cast
import attr
import click
import requests
from requests.cookies import RequestsCookieJar
from requests.structures import CaseInsensitiveDict
from .. import constants
from ... | 35.368889 | 120 | 0.669515 |
df97bc5a7d17403da1428553ff736add8169de5a | 7,474 | py | Python | regular_tweet.py | edyesed/bobdylan_ebooks | 4fc408f52ada1a2883356548e18f970c41f550ec | [
"Apache-2.0"
] | null | null | null | regular_tweet.py | edyesed/bobdylan_ebooks | 4fc408f52ada1a2883356548e18f970c41f550ec | [
"Apache-2.0"
] | 2 | 2018-07-19T23:44:48.000Z | 2021-02-08T20:19:17.000Z | regular_tweet.py | edyesed/bobdylan_ebooks | 4fc408f52ada1a2883356548e18f970c41f550ec | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import sys
import os
# regular include stuff
import json
import boto3
import email
import requests
import re
import elasticsearch
from elasticsearch import RequestsHttpConnection
from requests_aws4auth import AWS4Auth
import pymarkovchain
import twitter
from pprint import pprint
f... | 35.590476 | 159 | 0.586968 |
1fbd43dba06f40c915052dcd1977b146561ff26b | 3,423 | py | Python | saber.py | L0ntra/TauNet_CS300_Project | 862b52658d147514043ba1a343eea9c19f5898a7 | [
"MIT"
] | null | null | null | saber.py | L0ntra/TauNet_CS300_Project | 862b52658d147514043ba1a343eea9c19f5898a7 | [
"MIT"
] | null | null | null | saber.py | L0ntra/TauNet_CS300_Project | 862b52658d147514043ba1a343eea9c19f5898a7 | [
"MIT"
] | null | null | null | # Copyright (c) 2015 Gregory Gaston
# License: https://opensource.org/licenses/MIT
#
# This file impliments the ciphersaber2 encryption algorythm
# Code based off of Bart Massy's pseudo code:
# https://github.com/BartMassey/ciphersaber2
# With additional insperation from:
# https://web.archive.org/web/2005012912462... | 35.65625 | 99 | 0.688869 |
f8ff164c7b99d263ef5622eb983cd4b6a79fdda1 | 863 | py | Python | firefly_flask/app/models.py | Haehnchen/trivago-firefly | ee92450fda42059f1865971849dc234a42dc9027 | [
"MIT"
] | null | null | null | firefly_flask/app/models.py | Haehnchen/trivago-firefly | ee92450fda42059f1865971849dc234a42dc9027 | [
"MIT"
] | null | null | null | firefly_flask/app/models.py | Haehnchen/trivago-firefly | ee92450fda42059f1865971849dc234a42dc9027 | [
"MIT"
] | null | null | null | from . import db
from sqlalchemy.dialects.mysql import LONGTEXT
class Search(db.Model):
__tablename__ = 'spots'
id = db.Column(db.Integer, primary_key=True)
search_string = db.Column(db.Text)
lat = db.Column(db.Float)
lon = db.Column(db.Float)
location_name = db.Column(db.Text)
json_result ... | 28.766667 | 66 | 0.682503 |
7ad6817a4d7d49c3d45479195b01d7e0556c67a2 | 5,916 | py | Python | python/epl/parallel/partitioner.py | chenyang472043503/EasyParallelLibrary | cd2873fe04c86c62e55418129ba2f1dc83d222b4 | [
"Apache-2.0"
] | 1 | 2022-03-02T08:31:05.000Z | 2022-03-02T08:31:05.000Z | python/epl/parallel/partitioner.py | chenyang472043503/EasyParallelLibrary | cd2873fe04c86c62e55418129ba2f1dc83d222b4 | [
"Apache-2.0"
] | null | null | null | python/epl/parallel/partitioner.py | chenyang472043503/EasyParallelLibrary | cd2873fe04c86c62e55418129ba2f1dc83d222b4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Alibaba Group Holding Limited. 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 ... | 36.073171 | 80 | 0.668188 |
4fbc2856dbb78d3cec8a148864871a83ef97df18 | 9,680 | py | Python | ez_setup.py | codemaniac/sopex | 64a503ea9267a5a9ca18e40b026d5ac22c0e6ae8 | [
"BSD-2-Clause"
] | 10 | 2017-02-09T17:10:32.000Z | 2021-10-20T17:03:27.000Z | ez_setup.py | codemaniac/sopex | 64a503ea9267a5a9ca18e40b026d5ac22c0e6ae8 | [
"BSD-2-Clause"
] | 2 | 2017-02-20T13:43:40.000Z | 2020-06-05T14:04:24.000Z | ez_setup.py | codemaniac/sopex | 64a503ea9267a5a9ca18e40b026d5ac22c0e6ae8 | [
"BSD-2-Clause"
] | 3 | 2017-02-20T13:44:39.000Z | 2020-06-05T13:53:10.000Z | #!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools... | 40.165975 | 86 | 0.657335 |
75510582787d8158f591968a76f5e96a2f3f0a5d | 879 | py | Python | setup.py | niallmcc/treehaus | 069a8f478856e5d55b22b96d83be8f13e0853cd7 | [
"Apache-2.0"
] | null | null | null | setup.py | niallmcc/treehaus | 069a8f478856e5d55b22b96d83be8f13e0853cd7 | [
"Apache-2.0"
] | null | null | null | setup.py | niallmcc/treehaus | 069a8f478856e5d55b22b96d83be8f13e0853cd7 | [
"Apache-2.0"
] | null | null | null | """setuptools based setup module for treehaus.
"""
from setuptools import setup, find_packages
setup(
name='treehaus',
version='0.1.0',
description='Python3 persistent balanced trees',
long_description="Python3 library for reading and writing persistent balanced trees",
url='https://github.com/... | 19.108696 | 89 | 0.637088 |
c0a58c7154e50e9e1bb872b7b737ddc4b8813446 | 1,988 | py | Python | apps/tasks/permissions.py | gannetson/sportschooldeopenlucht | 0c78e5a95b22a963244112e478119ba60c572141 | [
"BSD-3-Clause"
] | 1 | 2019-01-19T06:58:39.000Z | 2019-01-19T06:58:39.000Z | apps/tasks/permissions.py | gannetson/sportschooldeopenlucht | 0c78e5a95b22a963244112e478119ba60c572141 | [
"BSD-3-Clause"
] | null | null | null | apps/tasks/permissions.py | gannetson/sportschooldeopenlucht | 0c78e5a95b22a963244112e478119ba60c572141 | [
"BSD-3-Clause"
] | null | null | null | from apps.tasks.models import TaskMember
from rest_framework import permissions
from .models import Task
class IsTaskAuthorOrReadOnly(permissions.BasePermission):
"""
Allows access only to task author.
"""
def _get_task_from_request(self, request):
if request.DATA:
task_id = reque... | 34.275862 | 107 | 0.65493 |
6cb123ab8fa2896b31a3b8960b269e1da5d0524f | 24,604 | py | Python | tests/test_envelope.py | cm-abhijit/py-stellar-base | 2f55ad7004f9522f1c5c7de69f66dc82401cfd6f | [
"Apache-2.0"
] | null | null | null | tests/test_envelope.py | cm-abhijit/py-stellar-base | 2f55ad7004f9522f1c5c7de69f66dc82401cfd6f | [
"Apache-2.0"
] | null | null | null | tests/test_envelope.py | cm-abhijit/py-stellar-base | 2f55ad7004f9522f1c5c7de69f66dc82401cfd6f | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
from os import path
import pytest
from stellar_base.operation import *
from stellar_base.asset import Asset
from stellar_base.keypair import Keypair
from stellar_base.transaction import Transaction
from stellar_base.transaction_envelope import TransactionEnvelope as Te
class TestOp:
source = 'GDJV... | 70.096866 | 1,036 | 0.754349 |
d74ead82e4d0b7aa8f3567fcd89d910ed67f7cf3 | 3,450 | py | Python | src/pydap/responses/html/__init__.py | Juanlu001/pydap | cbe37e2cbc0ede33c76344cfe438373a4adab3f3 | [
"MIT"
] | 83 | 2016-05-26T17:31:55.000Z | 2022-03-24T20:57:59.000Z | src/pydap/responses/html/__init__.py | Juanlu001/pydap | cbe37e2cbc0ede33c76344cfe438373a4adab3f3 | [
"MIT"
] | 237 | 2016-05-06T16:35:24.000Z | 2022-03-17T17:59:28.000Z | src/pydap/responses/html/__init__.py | Juanlu001/pydap | cbe37e2cbc0ede33c76344cfe438373a4adab3f3 | [
"MIT"
] | 70 | 2016-05-11T17:07:29.000Z | 2022-03-01T17:48:53.000Z | """HTML DAP response
This is a simple HTML response that allows that to be analysed on the browser.
The user can select a subset of the data and download in different formats.
"""
from jinja2 import Environment, PackageLoader, ChoiceLoader
from webob import Response
from webob.dec import wsgify
from webob.exc import... | 33.173077 | 78 | 0.557391 |
2d94b131a8456d8a9c173d0ff44f100141e73006 | 229 | py | Python | pytorch3d/__init__.py | fabibo3/pytorch3d | 36b7656753ae759aed2eb7ffb432b6eca4d42fe2 | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/__init__.py | fabibo3/pytorch3d | 36b7656753ae759aed2eb7ffb432b6eca4d42fe2 | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/__init__.py | fabibo3/pytorch3d | 36b7656753ae759aed2eb7ffb432b6eca4d42fe2 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
__version__ = "0.4.0"
| 28.625 | 71 | 0.742358 |
10c61b7020798fd38dce530aba6f25bed0961ed4 | 4,412 | py | Python | aiida/orm/nodes/data/enum.py | azadoks/aiida-core | b806b7fef8fc79090deccfe2019b77cb922e0581 | [
"MIT",
"BSD-3-Clause"
] | 180 | 2019-07-12T07:45:26.000Z | 2022-03-22T13:16:57.000Z | aiida/orm/nodes/data/enum.py | azadoks/aiida-core | b806b7fef8fc79090deccfe2019b77cb922e0581 | [
"MIT",
"BSD-3-Clause"
] | 2,325 | 2019-07-04T13:41:44.000Z | 2022-03-31T12:17:10.000Z | aiida/orm/nodes/data/enum.py | azadoks/aiida-core | b806b7fef8fc79090deccfe2019b77cb922e0581 | [
"MIT",
"BSD-3-Clause"
] | 88 | 2019-07-06T01:42:39.000Z | 2022-03-18T14:20:09.000Z | # -*- coding: utf-8 -*-
"""Data plugin that allows to easily wrap an :class:`enum.Enum` member.
Nomenclature is taken from Python documentation: https://docs.python.org/3/library/enum.html
Given the following example implementation:
.. code:: python
from enum import Enum
class Color(Enum):
RED = 1
... | 39.392857 | 119 | 0.665684 |
27becd8c3629fa5b053fb726f9f562862dfacef4 | 141 | py | Python | .history/config_20210927032607.py | GraceOswal/pitch-perfect | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | [
"MIT"
] | null | null | null | .history/config_20210927032607.py | GraceOswal/pitch-perfect | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | [
"MIT"
] | null | null | null | .history/config_20210927032607.py | GraceOswal/pitch-perfect | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv as ld
ld()
class Config:
debug = True
SECRET_KEY = os.environ.get('SECRET_KEY')
SQLA
| 12.818182 | 45 | 0.687943 |
79c75bf1649b63f7d35e2b5c5bd206ffc38b0a69 | 9,824 | py | Python | photutils/segmentation/detect.py | nden/photutils | 87879b2464ccfcd160f6a0c53ea4c0869a6e1cc2 | [
"BSD-3-Clause"
] | null | null | null | photutils/segmentation/detect.py | nden/photutils | 87879b2464ccfcd160f6a0c53ea4c0869a6e1cc2 | [
"BSD-3-Clause"
] | null | null | null | photutils/segmentation/detect.py | nden/photutils | 87879b2464ccfcd160f6a0c53ea4c0869a6e1cc2 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy.stats import gaussian_fwhm_to_sigma
from astropy.convolution import Gaussian2DKernel
from .core import SegmentationImage
from ..detection import detect_threshold
from ..utils.convolution import filter_data
__all__ = ['de... | 39.139442 | 80 | 0.649939 |
274f876173017b521d29730faa4f32c4fe9bf44b | 405 | py | Python | backend/hopeland_33964/wsgi.py | crowdbotics-apps/hopeland-33964 | 2ff0cdb07a2133ec23a31b4a1a9bcc9d7202a6ad | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/hopeland_33964/wsgi.py | crowdbotics-apps/hopeland-33964 | 2ff0cdb07a2133ec23a31b4a1a9bcc9d7202a6ad | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/hopeland_33964/wsgi.py | crowdbotics-apps/hopeland-33964 | 2ff0cdb07a2133ec23a31b4a1a9bcc9d7202a6ad | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for hopeland_33964 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANG... | 23.823529 | 78 | 0.792593 |
bf3d99b02fda105b5ffc50a575e11c6bade21451 | 4,721 | py | Python | experimental/sql/src/ibis_frontend.py | webmiche/iree-llvm-sandbox | 7511f8c210c586b44fc47a836a9cbfaa438acaf0 | [
"Apache-2.0"
] | null | null | null | experimental/sql/src/ibis_frontend.py | webmiche/iree-llvm-sandbox | 7511f8c210c586b44fc47a836a9cbfaa438acaf0 | [
"Apache-2.0"
] | null | null | null | experimental/sql/src/ibis_frontend.py | webmiche/iree-llvm-sandbox | 7511f8c210c586b44fc47a836a9cbfaa438acaf0 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
from dataclasses import dataclass
from modulefinder import Module
from unittest import result
from xdsl.dialects.builtin import ArrayAttr,... | 40.350427 | 78 | 0.711714 |
76e686652f230b4af4bfbcb51f789f5cb7590c65 | 775 | py | Python | students/k3343/laboratory_works/Dimova_Alina/laboratory_work_2/lab_w2/hotel/migrations/0002_auto_20200523_1710.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 10 | 2020-03-20T09:06:12.000Z | 2021-07-27T13:06:02.000Z | students/k3343/laboratory_works/Dimova_Alina/laboratory_work_2/lab_w2/hotel/migrations/0002_auto_20200523_1710.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 134 | 2020-03-23T09:47:48.000Z | 2022-03-12T01:05:19.000Z | students/k3343/laboratory_works/Dimova_Alina/laboratory_work_2/lab_w2/hotel/migrations/0002_auto_20200523_1710.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 71 | 2020-03-20T12:45:56.000Z | 2021-10-31T19:22:25.000Z | # Generated by Django 3.0.4 on 2020-05-23 14:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hotel', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='cleaning',
name='day_of_week',
... | 32.291667 | 206 | 0.566452 |
b321acdf1af1f4feea30a649c252b10c4001b005 | 3,247 | py | Python | quizzit/settings.py | diyajaiswal11/Quizzit | 792251bcfbd05cffd7e3f999175623d345f680da | [
"MIT"
] | 18 | 2020-07-05T21:15:46.000Z | 2022-01-15T19:23:52.000Z | quizzit/settings.py | diyajaiswal11/Quizzit | 792251bcfbd05cffd7e3f999175623d345f680da | [
"MIT"
] | 5 | 2020-06-11T00:17:49.000Z | 2021-06-10T20:20:43.000Z | quizzit/settings.py | diyajaiswal11/Quizzit | 792251bcfbd05cffd7e3f999175623d345f680da | [
"MIT"
] | 1 | 2021-05-25T05:49:42.000Z | 2021-05-25T05:49:42.000Z | """
Django settings for quizzit project.
Generated by 'django-admin startproject' using Django 2.2.10.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
... | 24.78626 | 91 | 0.696643 |
98156a4780fa4ead2a9a27c2aff64ed75e17d56e | 102 | py | Python | glue/managers/__init__.py | glensc/glue | bb02512a2913da0e095f8d02fcfe3dea3ae8c9d0 | [
"BSD-3-Clause"
] | 514 | 2015-01-01T17:27:02.000Z | 2022-03-22T03:41:15.000Z | glue/managers/__init__.py | seawenzhu/glue | 37aecf52db6f5fd52cdb9e288fde80fa45a37c19 | [
"BSD-3-Clause"
] | 66 | 2015-01-02T06:03:54.000Z | 2022-01-10T13:16:14.000Z | glue/managers/__init__.py | seawenzhu/glue | 37aecf52db6f5fd52cdb9e288fde80fa45a37c19 | [
"BSD-3-Clause"
] | 80 | 2015-01-16T02:22:50.000Z | 2021-09-15T09:47:45.000Z | from .project import ProjectManager
from .simple import SimpleManager
from .watch import WatchManager
| 25.5 | 35 | 0.852941 |
32b479e77f51f9f614f2962d47697fe57041ff2d | 729 | py | Python | src/yaml2resume/helpers.py | jpleger/yaml2resume | f74b3384e7b22859e8168b98ae18dc59c38b9d19 | [
"BSD-2-Clause"
] | 2 | 2021-05-31T14:58:41.000Z | 2022-01-08T02:08:00.000Z | src/yaml2resume/helpers.py | jpleger/yaml2resume | f74b3384e7b22859e8168b98ae18dc59c38b9d19 | [
"BSD-2-Clause"
] | null | null | null | src/yaml2resume/helpers.py | jpleger/yaml2resume | f74b3384e7b22859e8168b98ae18dc59c38b9d19 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
import os
def get_yaml_abspath(yaml_files, config = {}):
# We need to get a list of file names, but exclude config.yaml, since we know that isn't what we want/need.
# This is in the case of people going yaml2resume gen *.yaml
yaml_files = [os.path.abspath(os.path.expanduser(os.path.e... | 48.6 | 131 | 0.70096 |
9a201881620e0fc17bffdeb75b8f46569ebe973f | 9,731 | py | Python | tests/test_api.py | rafilkmp3/healthcheck-as-a-service | a35be50ceff8ec7ab7e2c45ec49831d65807b51b | [
"BSD-3-Clause"
] | null | null | null | tests/test_api.py | rafilkmp3/healthcheck-as-a-service | a35be50ceff8ec7ab7e2c45ec49831d65807b51b | [
"BSD-3-Clause"
] | null | null | null | tests/test_api.py | rafilkmp3/healthcheck-as-a-service | a35be50ceff8ec7ab7e2c45ec49831d65807b51b | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 healthcheck-as-a-service authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import unittest
import json
import mock
import inspect
import os
from healthcheck import api, backends
from . import managers
class APITestCas... | 32.328904 | 86 | 0.583291 |
24b10c3915f3377b260a955df74edd5d1cd12904 | 126 | py | Python | app.py | phenmp/atassist-api | 01320c6251c5d8f65ece4e184c005d75dc680636 | [
"MIT"
] | null | null | null | app.py | phenmp/atassist-api | 01320c6251c5d8f65ece4e184c005d75dc680636 | [
"MIT"
] | null | null | null | app.py | phenmp/atassist-api | 01320c6251c5d8f65ece4e184c005d75dc680636 | [
"MIT"
] | null | null | null | from flask import Flask
from controllers import api
app = Flask(__name__)
app.register_blueprint(api)
app.run(debug=True)
| 12.6 | 27 | 0.785714 |
9998bb1536e78e1783e0ee4b04ae4ecb06068702 | 1,144 | py | Python | topaz/modules/ffi/data_converter.py | mswart/topaz | 4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae | [
"BSD-3-Clause"
] | 6 | 2015-04-10T20:11:03.000Z | 2021-11-10T07:03:46.000Z | topaz/modules/ffi/data_converter.py | mswart/topaz | 4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae | [
"BSD-3-Clause"
] | 1 | 2017-01-24T10:17:55.000Z | 2017-01-24T10:17:55.000Z | topaz/modules/ffi/data_converter.py | mswart/topaz | 4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae | [
"BSD-3-Clause"
] | 2 | 2017-01-23T18:47:35.000Z | 2019-11-13T08:31:18.000Z | from topaz.module import ModuleDef
from topaz.modules.ffi.type import type_object
# A rather abstract base class
class DataConverter(object):
moduledef = ModuleDef('FFI::DataConverter')
@moduledef.method('native_type')
def native_type(self, space, args_w):
#if len(args_w) == 0:
# raise ... | 36.903226 | 74 | 0.628497 |
f3b068bae6778a58fad97a581232c3b64346a14c | 1,817 | py | Python | Tcloudvenv/lib/python3.8/site-packages/aliyunsdkkms/request/v20160120/EncryptRequest.py | bjhltest/TcloudMonkey | b6416ade1fe48e7f4f4c0f4d045d1fd878788299 | [
"MIT"
] | 1 | 2020-12-05T03:03:46.000Z | 2020-12-05T03:03:46.000Z | Tcloudvenv/lib/python3.8/site-packages/aliyunsdkkms/request/v20160120/EncryptRequest.py | bjhltest/TcloudMonkey | b6416ade1fe48e7f4f4c0f4d045d1fd878788299 | [
"MIT"
] | null | null | null | Tcloudvenv/lib/python3.8/site-packages/aliyunsdkkms/request/v20160120/EncryptRequest.py | bjhltest/TcloudMonkey | b6416ade1fe48e7f4f4c0f4d045d1fd878788299 | [
"MIT"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.627451 | 74 | 0.764447 |
9428a804f6eacf76cbbc0d51029cac867348b318 | 440 | py | Python | boseraSpider/items.py | shenchao45/BoseraSpider | ef532dbdfa5ebb0e4a79aa12623bf140852e6753 | [
"MIT"
] | null | null | null | boseraSpider/items.py | shenchao45/BoseraSpider | ef532dbdfa5ebb0e4a79aa12623bf140852e6753 | [
"MIT"
] | null | null | null | boseraSpider/items.py | shenchao45/BoseraSpider | ef532dbdfa5ebb0e4a79aa12623bf140852e6753 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class BoseraspiderItem(scrapy.Item):
# define the fields for your item here like:
date = scrapy.Field()
fundIncome = scrapy.Field()
yiel... | 23.157895 | 51 | 0.686364 |
079cae3646bc7105f6caef56667ba1463d7c8c61 | 1,268 | py | Python | setup.py | bernadinm/sentry-auth-saml2 | efb12e050a829eb2287bec0df8aac9ece4b0545d | [
"Apache-2.0"
] | null | null | null | setup.py | bernadinm/sentry-auth-saml2 | efb12e050a829eb2287bec0df8aac9ece4b0545d | [
"Apache-2.0"
] | null | null | null | setup.py | bernadinm/sentry-auth-saml2 | efb12e050a829eb2287bec0df8aac9ece4b0545d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
sentry-auth-saml2
=================
"""
from setuptools import setup, find_packages
install_requires = [
'python3-saml>=1.4.0'
]
tests_require = [
'flake8>=2.0,<2.1',
]
setup(
name='sentry-auth-saml2',
version='0.1.0.dev',
author='Sentry',
author_email='support@gets... | 25.877551 | 57 | 0.625394 |
f7cbecfcab829520c7c4b661ac2744a6bb0c6b6c | 2,586 | py | Python | flyingcracker/fc3/myjson.py | grahamu/flyingcracker | 6816444d315a3d989c580407c4f3067259d9f6ce | [
"BSD-3-Clause"
] | null | null | null | flyingcracker/fc3/myjson.py | grahamu/flyingcracker | 6816444d315a3d989c580407c4f3067259d9f6ce | [
"BSD-3-Clause"
] | 9 | 2015-04-20T20:21:13.000Z | 2021-09-22T17:43:36.000Z | flyingcracker/fc3/myjson.py | grahamu/flyingcracker | 6816444d315a3d989c580407c4f3067259d9f6ce | [
"BSD-3-Clause"
] | null | null | null | import json
from decimal import Decimal
from django.core.serializers.json import DjangoJSONEncoder
from django.db import models
from django.http import HttpResponse
from django.utils.encoding import force_text
from django.utils.functional import Promise
class JsonResponse(HttpResponse):
def __init__(self, data):... | 32.325 | 94 | 0.601701 |
7edadb675ef89b8666fb092e73cbf210b3c1aef1 | 2,093 | py | Python | src/python/main.py | lalkakonus/ir-hw4 | 4a6ae818ab1d3c790cbf2db1fe69d7f50e0b6719 | [
"Apache-2.0"
] | null | null | null | src/python/main.py | lalkakonus/ir-hw4 | 4a6ae818ab1d3c790cbf2db1fe69d7f50e0b6719 | [
"Apache-2.0"
] | null | null | null | src/python/main.py | lalkakonus/ir-hw4 | 4a6ae818ab1d3c790cbf2db1fe69d7f50e0b6719 | [
"Apache-2.0"
] | 1 | 2021-01-20T13:35:16.000Z | 2021-01-20T13:35:16.000Z | import lightgbm as lgb
from dataloader import Loader
from matplotlib import pyplot as plt
class LightGBM:
def __init__(self):
self.model = None
self.param = {'objective': 'lambdarank',
'boosting': 'dart',
'learning_rate': 0.04,
'fo... | 33.758065 | 99 | 0.615385 |
3cd483a6a1694c3b3a28b0bdb713d36e887c9417 | 13,297 | py | Python | docassemble_webapp/docassemble/webapp/users/views.py | mikeappell/docassemble | 6d1ac662eab82966743f040dbf74c8a312384894 | [
"MIT"
] | 1 | 2021-06-17T05:04:41.000Z | 2021-06-17T05:04:41.000Z | docassemble_webapp/docassemble/webapp/users/views.py | toolness/docassemble | 8273ae257daa2e318ad58f36829d1c83880b0961 | [
"MIT"
] | null | null | null | docassemble_webapp/docassemble/webapp/users/views.py | toolness/docassemble | 8273ae257daa2e318ad58f36829d1c83880b0961 | [
"MIT"
] | null | null | null | from docassemble.webapp.app_object import app
from docassemble.webapp.db_object import db
from flask import redirect, render_template, render_template_string, request, flash, current_app
from flask import url_for as url_for
from flask_user import current_user, login_required, roles_required, emails
from docassemble.web... | 43.740132 | 214 | 0.646838 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.