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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
309a793d124d8043e06024a8ec2117f965378849 | 613 | py | Python | 1W/2/1.py | allenalvin333/Hackerrank_Prep | 26ed5b874daba4775d006824d36f9e82ea5ff1ea | [
"MIT"
] | 2 | 2021-11-25T13:38:36.000Z | 2021-11-25T13:42:56.000Z | 1W/2/1.py | allenalvin333/Hackerrank_Prep | 26ed5b874daba4775d006824d36f9e82ea5ff1ea | [
"MIT"
] | null | null | null | 1W/2/1.py | allenalvin333/Hackerrank_Prep | 26ed5b874daba4775d006824d36f9e82ea5ff1ea | [
"MIT"
] | 1 | 2021-11-25T13:38:43.000Z | 2021-11-25T13:38:43.000Z | # https://www.hackerrank.com/challenges/one-week-preparation-kit-lonely-integer/problem
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'lonelyinteger' function below.
#
# The function is expected to return an INTEGER.
# The function accepts INTEGER_ARRAY a as parameter.
#
d... | 19.15625 | 87 | 0.681892 |
d405a858b7a12eee9b613f515db4a9bf14118f80 | 2,382 | py | Python | allennlp/tests/training/learning_rate_schedulers_test.py | MaxMotovilov/allennlp | d4ee5db1c630d6c631a828ee12fcbf6154de288c | [
"Apache-2.0"
] | 21 | 2019-03-11T13:39:05.000Z | 2021-11-02T11:43:32.000Z | allennlp/tests/training/learning_rate_schedulers_test.py | MaxMotovilov/allennlp | d4ee5db1c630d6c631a828ee12fcbf6154de288c | [
"Apache-2.0"
] | 8 | 2020-01-28T22:40:24.000Z | 2021-08-25T15:30:18.000Z | allennlp/tests/training/learning_rate_schedulers_test.py | MaxMotovilov/allennlp | d4ee5db1c630d6c631a828ee12fcbf6154de288c | [
"Apache-2.0"
] | 4 | 2019-11-04T07:21:49.000Z | 2022-03-01T14:59:14.000Z | # pylint: disable=no-self-use,invalid-name,protected-access
import torch
from allennlp.common.checks import ConfigurationError
from allennlp.training.optimizers import Optimizer
from allennlp.common.testing import AllenNlpTestCase
from allennlp.training.learning_rate_schedulers import LearningRateScheduler
from allenn... | 54.136364 | 113 | 0.598237 |
bd3e2f4bbf5b4a400ba0199866140c38d68a9abf | 2,785 | py | Python | google-cloud-sdk/lib/surface/compute/security_policies/export.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/lib/surface/compute/security_policies/export.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/lib/surface/compute/security_policies/export.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 3 | 2017-07-27T18:44:13.000Z | 2020-07-25T17:48:53.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 38.680556 | 80 | 0.729982 |
9bbe6170cae3f7c6884c000a621df925ba387f85 | 4,223 | py | Python | convolutional-neural-networks/mnist-mlp/src/mnist_mlp.py | gdario/deep-learning-v2-pytorch | 8ec03d822fa75ffbfff3f598c82bb2a0688f67fa | [
"MIT"
] | null | null | null | convolutional-neural-networks/mnist-mlp/src/mnist_mlp.py | gdario/deep-learning-v2-pytorch | 8ec03d822fa75ffbfff3f598c82bb2a0688f67fa | [
"MIT"
] | null | null | null | convolutional-neural-networks/mnist-mlp/src/mnist_mlp.py | gdario/deep-learning-v2-pytorch | 8ec03d822fa75ffbfff3f598c82bb2a0688f67fa | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torchvision import datasets
import torchvision.transforms as transforms
from torch.utils.data.sampler import SubsetRandomSampler
import torch.nn as nn
import torch.nn.functional as F
# location of the MNIST images
ROOT = '~/.pytorch'
# number of subprocesses to use for data loading... | 32.484615 | 86 | 0.624438 |
5142496b843a2ba0fc3a54cfde455d41f833dd9c | 401 | py | Python | video_player/wsgi.py | lewisorenge/VIDEO_HISTORY | bd687960cf74909de552869546ad9afab9c9d561 | [
"MIT"
] | null | null | null | video_player/wsgi.py | lewisorenge/VIDEO_HISTORY | bd687960cf74909de552869546ad9afab9c9d561 | [
"MIT"
] | null | null | null | video_player/wsgi.py | lewisorenge/VIDEO_HISTORY | bd687960cf74909de552869546ad9afab9c9d561 | [
"MIT"
] | null | null | null | """
WSGI config for video_player 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/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
f95f8eb2989a7da946c5d74faa54fd197343b8f8 | 14,175 | py | Python | api/tests/opentrons/protocol_engine/state/test_labware_state.py | Corey-ONeal/opentrons-app_ws-remote | a255b76c8a07457787d575da12b2d5bdb6220a91 | [
"Apache-2.0"
] | null | null | null | api/tests/opentrons/protocol_engine/state/test_labware_state.py | Corey-ONeal/opentrons-app_ws-remote | a255b76c8a07457787d575da12b2d5bdb6220a91 | [
"Apache-2.0"
] | null | null | null | api/tests/opentrons/protocol_engine/state/test_labware_state.py | Corey-ONeal/opentrons-app_ws-remote | a255b76c8a07457787d575da12b2d5bdb6220a91 | [
"Apache-2.0"
] | null | null | null | """Labware state store tests."""
import pytest
from datetime import datetime, timezone
from typing import Tuple
from opentrons.calibration_storage.helpers import uri_from_details
from opentrons_shared_data.deck.dev_types import DeckDefinitionV2
from opentrons.protocols.models import LabwareDefinition
from opentrons.ty... | 30.159574 | 87 | 0.683175 |
37655a5ccc40c6e4534cb0cd94bd4d15b5655064 | 184,577 | py | Python | www/src/Lib/test/test_logging.py | raspberrypieman/brython | 2cc23d1da6acda604d4a56b4c9d464eb7e374eda | [
"BSD-3-Clause"
] | 5 | 2018-07-02T19:10:39.000Z | 2021-09-27T04:05:10.000Z | www/src/Lib/test/test_logging.py | raspberrypieman/brython | 2cc23d1da6acda604d4a56b4c9d464eb7e374eda | [
"BSD-3-Clause"
] | 3 | 2018-06-10T06:28:06.000Z | 2021-09-24T13:54:19.000Z | www/src/Lib/test/test_logging.py | raspberrypieman/brython | 2cc23d1da6acda604d4a56b4c9d464eb7e374eda | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2001-2017 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permissio... | 35.577679 | 120 | 0.566739 |
7b0b410fc21a7a049e4e108b21fe35a408ea05ed | 2,845 | py | Python | server.py | grebtsew/Text_To_Speech_Server_Node | 6b3bccccbc470cae9a42944494e5f1c0cdc9b8cd | [
"MIT"
] | 1 | 2022-02-13T13:14:24.000Z | 2022-02-13T13:14:24.000Z | server.py | grebtsew/Text_To_Speech_Server_Node | 6b3bccccbc470cae9a42944494e5f1c0cdc9b8cd | [
"MIT"
] | null | null | null | server.py | grebtsew/Text_To_Speech_Server_Node | 6b3bccccbc470cae9a42944494e5f1c0cdc9b8cd | [
"MIT"
] | 1 | 2022-02-13T13:14:26.000Z | 2022-02-13T13:14:26.000Z | from threading import Thread
import http.server
import socketserver
from functools import partial
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
class S(BaseHTTPRequestHandler):
CRYPT = "password-1"
connection_list = []
def __init__(self, speaker, *args, **kwargs):
self.sp... | 33.081395 | 97 | 0.553954 |
fc939d6f22fae14af28b7bc8455a62728d561bbd | 2,161 | py | Python | benchmarks/bind.py | 01org/pyMIC | f775239a208dc1daaf89451af06e0138b80099e9 | [
"BSD-3-Clause"
] | 38 | 2015-01-15T05:24:20.000Z | 2017-07-12T08:03:44.000Z | benchmarks/bind.py | 01org/pyMIC | f775239a208dc1daaf89451af06e0138b80099e9 | [
"BSD-3-Clause"
] | 15 | 2015-02-17T12:04:50.000Z | 2017-01-13T06:26:17.000Z | benchmarks/bind.py | 01org/pyMIC | f775239a208dc1daaf89451af06e0138b80099e9 | [
"BSD-3-Clause"
] | 16 | 2015-02-17T01:00:30.000Z | 2017-09-23T03:52:40.000Z | #!/usr/bin/python
# Copyright (c) 2014-2016, Intel Corporation All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice... | 34.301587 | 75 | 0.73901 |
7225b1616fb6abb1f6ace69d1a55096abdf9968c | 497 | py | Python | Sorting algorithms/3.7-count_sort.py | neeveermoree/data_structures_and_algorithms | 8aa37cade53539909383fb9d4952b13ca19c931a | [
"MIT"
] | null | null | null | Sorting algorithms/3.7-count_sort.py | neeveermoree/data_structures_and_algorithms | 8aa37cade53539909383fb9d4952b13ca19c931a | [
"MIT"
] | null | null | null | Sorting algorithms/3.7-count_sort.py | neeveermoree/data_structures_and_algorithms | 8aa37cade53539909383fb9d4952b13ca19c931a | [
"MIT"
] | null | null | null | def count_sort(arr):
length = len(arr)
max_val = -1
for i in range(length):
if arr[i] > max_val:
max_val = arr[i]
tmp_arr = [0] * (max_val + 1)
for i in range(length):
tmp_arr[arr[i]] += 1
arr_idx = 0
for i in range(max_val+1):
occurence_amount = tmp_arr[i... | 22.590909 | 37 | 0.523139 |
3f0e8c86afb85e9afe47aca0a9ea0cc20ec6fccd | 671 | py | Python | var/spack/repos/builtin/packages/py-joblib/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2018-11-27T03:39:44.000Z | 2021-09-06T15:50:35.000Z | var/spack/repos/builtin/packages/py-joblib/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-01-11T20:11:52.000Z | 2019-01-11T20:11:52.000Z | var/spack/repos/builtin/packages/py-joblib/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-10-14T14:20:17.000Z | 2020-10-14T14:20:17.000Z | # Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyJoblib(PythonPackage):
"""Python function as pipeline jobs"""
homepage = "http://pa... | 31.952381 | 78 | 0.707899 |
71fbfda357b67042e884bae5b4d049ec1c02f7de | 1,857 | py | Python | OcCo_TF/utils/visu_util.py | sun-pyo/OcCo | e2e12dbaa8f9b98fb8c42fc32682f49e99be302f | [
"MIT"
] | 158 | 2020-08-19T18:13:28.000Z | 2022-03-30T13:55:32.000Z | OcCo_TF/utils/visu_util.py | sun-pyo/OcCo | e2e12dbaa8f9b98fb8c42fc32682f49e99be302f | [
"MIT"
] | 28 | 2020-05-30T04:02:33.000Z | 2022-03-30T15:46:38.000Z | OcCo_TF/utils/visu_util.py | sun-pyo/OcCo | e2e12dbaa8f9b98fb8c42fc32682f49e99be302f | [
"MIT"
] | 18 | 2020-08-19T19:52:38.000Z | 2022-02-06T11:42:26.000Z | # Copyright (c) 2020. Author: Hanchen Wang, hc.wang96@gmail.com
# Original Author: Wentao Yuan (wyuan1@cs.cmu.edu) 05/31/2018
import numpy as np
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from open3d.open3d.io import read_point_cloud
# from open3d.open3d_pybind.io import read_point_... | 42.204545 | 113 | 0.590199 |
82aab537751a336bb073255d37c00fcda26e0054 | 2,472 | py | Python | core/dbt/parser/schema_renderer.py | tomasfarias/dbt-core | ed5df342ca5d99c5e6971ee6d11c8cf3e6e263b3 | [
"Apache-2.0"
] | 799 | 2021-10-13T21:40:33.000Z | 2022-03-31T16:19:31.000Z | core/dbt/parser/schema_renderer.py | tomasfarias/dbt-core | ed5df342ca5d99c5e6971ee6d11c8cf3e6e263b3 | [
"Apache-2.0"
] | 939 | 2021-10-13T17:45:24.000Z | 2022-03-31T22:09:58.000Z | core/dbt/parser/schema_renderer.py | tomasfarias/dbt-core | ed5df342ca5d99c5e6971ee6d11c8cf3e6e263b3 | [
"Apache-2.0"
] | 175 | 2021-10-14T18:59:06.000Z | 2022-03-31T16:17:32.000Z | from typing import Dict, Any
from dbt.config.renderer import BaseRenderer, Keypath
# This class renders dictionaries derived from "schema" yaml files.
# It calls Jinja on strings (in deep_map_render), except for certain
# keys which are skipped because they need to be rendered later
# (tests and description). Test c... | 33.863014 | 78 | 0.582929 |
76d80a324344bf98ad92659d5566133ac0c84155 | 6,982 | py | Python | rasa/core/policies/fallback.py | vconsult/rasa | f7c5dda5143009cf596c1c889920ed870c0c7779 | [
"Apache-2.0"
] | 1 | 2019-11-03T02:21:17.000Z | 2019-11-03T02:21:17.000Z | rasa/core/policies/fallback.py | vconsult/rasa | f7c5dda5143009cf596c1c889920ed870c0c7779 | [
"Apache-2.0"
] | null | null | null | rasa/core/policies/fallback.py | vconsult/rasa | f7c5dda5143009cf596c1c889920ed870c0c7779 | [
"Apache-2.0"
] | 1 | 2021-06-08T17:24:15.000Z | 2021-06-08T17:24:15.000Z | import json
import logging
import os
from typing import Any, List, Text, Optional, Dict, Tuple
from rasa.core.actions.action import ACTION_LISTEN_NAME
import rasa.utils.io
from rasa.core import utils
from rasa.core.domain import Domain
from rasa.core.policies.policy import Policy
from rasa.core.trackers import Dialo... | 36.554974 | 88 | 0.634918 |
11f5645b79fbbb72467701ddfd0284a81cbef5a6 | 1,274 | py | Python | apis/titles/src/delete_title/index.py | isaacatmann/CommunityPatch | e09d8a7704aab8f644f625d52e7d0aac97fba0c2 | [
"MIT"
] | 29 | 2018-02-14T21:46:24.000Z | 2022-03-07T04:31:31.000Z | apis/titles/src/delete_title/index.py | isaacatmann/CommunityPatch | e09d8a7704aab8f644f625d52e7d0aac97fba0c2 | [
"MIT"
] | 4 | 2018-11-15T22:00:45.000Z | 2020-05-01T20:49:52.000Z | apis/titles/src/delete_title/index.py | isaacatmann/CommunityPatch | e09d8a7704aab8f644f625d52e7d0aac97fba0c2 | [
"MIT"
] | 4 | 2019-07-18T08:07:11.000Z | 2020-12-01T20:12:57.000Z | import json
import logging
import os
import boto3
from botocore.exceptions import ClientError
logger = logging.getLogger()
logger.setLevel(logging.INFO)
communitypatchtable = boto3.resource("dynamodb").Table(
os.getenv("COMMUNITY_PATCH_TABLE")
)
def lambda_handler(event, context):
authenticated_claims = ev... | 26.541667 | 80 | 0.631868 |
9f6ae59ce2020095d264835b43be4e3c37f80e1a | 7,135 | py | Python | program/screen.py | SOO22/Gesture-Library | 48251c7b402aa851943f158bfe7a23bf0ba1f688 | [
"MIT"
] | null | null | null | program/screen.py | SOO22/Gesture-Library | 48251c7b402aa851943f158bfe7a23bf0ba1f688 | [
"MIT"
] | null | null | null | program/screen.py | SOO22/Gesture-Library | 48251c7b402aa851943f158bfe7a23bf0ba1f688 | [
"MIT"
] | null | null | null | ''' code for display screen '''
from tkinter import *
from PIL import Image,ImageTk
import library as imgMan
class GestureScreen(Frame):
def __init__(self,parent):
super().__init__(parent)
self.topFrame = parent
self.activeSession = Frame(self)
self.slideShowSession = Frame(self)
... | 36.968912 | 112 | 0.62691 |
e88c19bc3a700e16b82c670441df3fe08bf0e88b | 17,342 | py | Python | pymatgen/analysis/chemenv/utils/scripts_utils.py | wangyusu/pymatgen | a90af2fe71eff15134ca33c6e58f07caba425ae9 | [
"MIT"
] | 921 | 2015-01-25T22:17:05.000Z | 2022-03-27T20:58:38.000Z | pymatgen/analysis/chemenv/utils/scripts_utils.py | wangyusu/pymatgen | a90af2fe71eff15134ca33c6e58f07caba425ae9 | [
"MIT"
] | 1,631 | 2015-01-05T21:05:04.000Z | 2022-03-31T18:40:17.000Z | pymatgen/analysis/chemenv/utils/scripts_utils.py | wangyusu/pymatgen | a90af2fe71eff15134ca33c6e58f07caba425ae9 | [
"MIT"
] | 851 | 2015-01-01T17:38:00.000Z | 2022-03-31T02:14:07.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module contains some script utils that are used in the chemenv package.
"""
import re
from collections import OrderedDict
import numpy as np
from pymatgen.ext.matproj import MPRester
from pymatgen.... | 40.804706 | 119 | 0.537943 |
dd488e765ed61d258ea8848dd2bdf35e9ec5efee | 19,279 | py | Python | qupulse/utils/types.py | zea2/qupulse | 49a930bfe95f3f0c878daab5e52fd0c8aa8a4ff6 | [
"MIT"
] | null | null | null | qupulse/utils/types.py | zea2/qupulse | 49a930bfe95f3f0c878daab5e52fd0c8aa8a4ff6 | [
"MIT"
] | null | null | null | qupulse/utils/types.py | zea2/qupulse | 49a930bfe95f3f0c878daab5e52fd0c8aa8a4ff6 | [
"MIT"
] | null | null | null | import typing
import abc
import inspect
import numbers
import fractions
import functools
import warnings
import collections
import operator
import numpy
import sympy
import qupulse.utils.numeric as qupulse_numeric
__all__ = ["MeasurementWindow", "ChannelID", "HashableNumpyArray", "TimeType", "time_from_float", "DocS... | 34.061837 | 119 | 0.644484 |
d08ddc3e51e647ef6cd512edbaf0730031a72112 | 57,014 | py | Python | LoopStructural/modelling/core/geological_model.py | vpicavet/LoopStructural | cde34fabc53b4d5cb0f8e22f53a574fac44dfbd6 | [
"MIT"
] | null | null | null | LoopStructural/modelling/core/geological_model.py | vpicavet/LoopStructural | cde34fabc53b4d5cb0f8e22f53a574fac44dfbd6 | [
"MIT"
] | null | null | null | LoopStructural/modelling/core/geological_model.py | vpicavet/LoopStructural | cde34fabc53b4d5cb0f8e22f53a574fac44dfbd6 | [
"MIT"
] | null | null | null | """
Main entry point for creating a geological model
"""
import logging
import numpy as np
import pandas as pd
from LoopStructural.datasets import normal_vector_headers
from LoopStructural.interpolators.discrete_fold_interpolator import \
DiscreteFoldInterpolator as DFI
from LoopStructural.interpolators.finite_dif... | 38.837875 | 139 | 0.579735 |
e8ad905d96c8dbec4300ea1b820001aab2aa6762 | 3,990 | py | Python | models/core.py | awesome-archive/Wechat-Admin | 6970ff4793bb57a864818011c3187370127fd0f9 | [
"MIT"
] | null | null | null | models/core.py | awesome-archive/Wechat-Admin | 6970ff4793bb57a864818011c3187370127fd0f9 | [
"MIT"
] | null | null | null | models/core.py | awesome-archive/Wechat-Admin | 6970ff4793bb57a864818011c3187370127fd0f9 | [
"MIT"
] | null | null | null | from sqlalchemy.ext.hybrid import hybrid_method, hybrid_property
from ext import db
from config import avatar_tmpl
from .mixin import BaseMixin
friendship = db.Table(
'friends',
db.Column('user_id', db.String(20), db.ForeignKey('users.id')),
db.Column('friend_id', db.String(20), db.ForeignKey('users.id')... | 28.297872 | 68 | 0.615539 |
75ec36cab2dd4f304dd59d008364345d842c0679 | 2,676 | py | Python | flarestack/analyses/tde/unblind_tde_catalogues.py | robertdstein/flarestack | 2ce7e67da336514f6f38f06126a1fbd82131e441 | [
"MIT"
] | null | null | null | flarestack/analyses/tde/unblind_tde_catalogues.py | robertdstein/flarestack | 2ce7e67da336514f6f38f06126a1fbd82131e441 | [
"MIT"
] | 25 | 2019-11-14T15:46:24.000Z | 2020-11-27T11:14:22.000Z | flarestack/analyses/tde/unblind_tde_catalogues.py | robertdstein/flarestack | 2ce7e67da336514f6f38f06126a1fbd82131e441 | [
"MIT"
] | 2 | 2020-01-06T19:39:27.000Z | 2020-07-16T20:32:29.000Z | """Script to unblind the TDE catalogues. Draws the background TS values
generated by compare_spectral_indices.py, in order to
quantify the significance of the result. Produces relevant post-unblinding
plots.
"""
import numpy as np
from flarestack.core.unblinding import create_unblinder
from flarestack.data.icecube.gfu.... | 27.587629 | 112 | 0.64574 |
3e37fb9efb718f07cec35fb6b5846ac661489e42 | 4,105 | py | Python | pytransact/test/test_relations.py | jacob22/pytransact | c3c5e7e30138fa28f4affa199835e96b6369c609 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-07-10T15:21:16.000Z | 2019-07-10T15:21:16.000Z | pytransact/test/test_relations.py | jacob22/pytransact | c3c5e7e30138fa28f4affa199835e96b6369c609 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | pytransact/test/test_relations.py | jacob22/pytransact | c3c5e7e30138fa28f4affa199835e96b6369c609 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2019 Open End AB
#
# 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, s... | 32.579365 | 75 | 0.666991 |
0e459a40d2471c6fa2d7d518f4aab5f0b4dc6b15 | 2,553 | py | Python | docs/source/plugins/ase/test_gpaw_parallel.py | BIGDATA2015-AIIDA-EXTENSION/query_engine | d1cfc7cfe6084854005d2376e3825310c66876b5 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | docs/source/plugins/ase/test_gpaw_parallel.py | BIGDATA2015-AIIDA-EXTENSION/query_engine | d1cfc7cfe6084854005d2376e3825310c66876b5 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | docs/source/plugins/ase/test_gpaw_parallel.py | BIGDATA2015-AIIDA-EXTENSION/query_engine | d1cfc7cfe6084854005d2376e3825310c66876b5 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
__copyright__ = u"Copyright (c), 2014, École Polytechnique Fédérale de Lausanne (EPFL), Switzerland, Laboratory of Theory and Simulation of Materials (THEOS). All rights reserved."
__license__ = "Non-Commercial, End-User Software License Agreement, see LICENSE.txt file"
__version__ = "0.3.0"
i... | 32.730769 | 180 | 0.62123 |
042652ea27f550ceb541023662ad6ce6eda7af32 | 4,201 | py | Python | lib/blockchain/blockr.py | Litetoken/liteblockd | e9f70708f4a2416071db024e0a0e00642e643084 | [
"MIT"
] | null | null | null | lib/blockchain/blockr.py | Litetoken/liteblockd | e9f70708f4a2416071db024e0a0e00642e643084 | [
"MIT"
] | null | null | null | lib/blockchain/blockr.py | Litetoken/liteblockd | e9f70708f4a2416071db024e0a0e00642e643084 | [
"MIT"
] | null | null | null | '''
blockr.io
'''
import logging
from lib import config, util, util_litecoin
def get_host():
if config.BLOCKCHAIN_SERVICE_CONNECT:
return config.BLOCKCHAIN_SERVICE_CONNECT
else:
return 'http://tltc.blockr.io' if config.TESTNET else 'http://ltc.blockr.io'
def check():
pass
def getinfo():
... | 36.530435 | 145 | 0.552488 |
b0baa7a5a3d41ff4d9e670928d724df7e7d3f8a1 | 3,385 | py | Python | IRC/Hexchat/session_saver.py | Veek/Python | 7f49a9d98ecd7d059fb25d4be5b76d6d7b8b0c13 | [
"MIT"
] | null | null | null | IRC/Hexchat/session_saver.py | Veek/Python | 7f49a9d98ecd7d059fb25d4be5b76d6d7b8b0c13 | [
"MIT"
] | null | null | null | IRC/Hexchat/session_saver.py | Veek/Python | 7f49a9d98ecd7d059fb25d4be5b76d6d7b8b0c13 | [
"MIT"
] | null | null | null | import hexchat
import time
__module_name__ = "Session Saver"
__module_version__ = "0.1"
__module_description__ = "Periodically saves current session for next start"
def debug(msg):
hexchat.prnt('DEBUG: {}'.format(msg))
#-----------------------------------------------------------------------
def get_tab_data():
... | 32.864078 | 81 | 0.62836 |
c922fe395fdd278f9e89fa782cc4f21105339b31 | 3,032 | py | Python | bibliographygen.py | HDLOfficial/Python-Pack | 1957b7c4e1f2598867637682c19c663311f5b5e0 | [
"MIT"
] | 1 | 2018-04-11T23:40:57.000Z | 2018-04-11T23:40:57.000Z | bibliographygen.py | HDLOfficial/Python-Pack | 1957b7c4e1f2598867637682c19c663311f5b5e0 | [
"MIT"
] | 1 | 2018-03-12T00:42:48.000Z | 2020-12-27T00:16:33.000Z | bibliographygen.py | HDLOfficial/Python-Pack | 1957b7c4e1f2598867637682c19c663311f5b5e0 | [
"MIT"
] | 1 | 2018-04-11T23:40:42.000Z | 2018-04-11T23:40:42.000Z | print ("[Bibliography Generator]")
print ("Current MLA: MLA8")
print ("\nPress enter to continue...")
retry = False
authfirsttrue = False
authlasttrue = False
webtitletrue = False
urltrue = False
monthtrue = False
daytrue = False
yeartrue = False
input ("")
article = input ("Please enter the article title (Not required... | 34.067416 | 159 | 0.634565 |
11c12c4409fad5094f04b702afe75c1bd4d57dd5 | 4,513 | py | Python | experiments/exp_adult_5and7.py | Leaflowave/PrivCQ | 8acc6ad0888793fb7fa190a1bd5b4f9eb1140514 | [
"MIT"
] | null | null | null | experiments/exp_adult_5and7.py | Leaflowave/PrivCQ | 8acc6ad0888793fb7fa190a1bd5b4f9eb1140514 | [
"MIT"
] | null | null | null | experiments/exp_adult_5and7.py | Leaflowave/PrivCQ | 8acc6ad0888793fb7fa190a1bd5b4f9eb1140514 | [
"MIT"
] | null | null | null | import group_frequency_oracle as freq
import linecache
import random
def query_on_adult_dim2(oraclePath,oracleInterval,queryPath,trueOraclePath,aggregation="count"):
# adult_2 equal 5 and 7
queriesStr=linecache.getline(queryPath,1)
queries=eval(queriesStr)
answer=[0]*500
trueOracleStr=li... | 48.010638 | 114 | 0.534899 |
81efe4e7d13f1ec108af5c8c3fd72e58ca667268 | 981 | py | Python | setup.py | erfantarighi/perfectmoney | 926ad1abe470a18462f4e7c8533ff1da028d9e85 | [
"MIT"
] | 3 | 2021-08-02T18:26:31.000Z | 2022-03-07T08:59:31.000Z | setup.py | erfantarighi/perfectmoney | 926ad1abe470a18462f4e7c8533ff1da028d9e85 | [
"MIT"
] | 2 | 2021-12-18T10:43:16.000Z | 2021-12-19T11:28:27.000Z | setup.py | erfantarighi/perfectmoney | 926ad1abe470a18462f4e7c8533ff1da028d9e85 | [
"MIT"
] | 4 | 2021-12-18T17:23:00.000Z | 2022-03-07T08:53:52.000Z |
from setuptools import setup, find_packages
import perfectmoney
requirements_path='requirements.txt'
with open("README.md", "r") as fh:
long_description = fh.read()
def parse_requirements(filename):
lineiter = (line.strip() for line in open(filename))
return [line for line in lineiter if line and not lin... | 32.7 | 75 | 0.726809 |
dfa7a8f7d25b17d6f549e3209eb423b4c68f3f3f | 3,761 | py | Python | tests/test_redis.py | UmboCV/logutils | 3f9d37f1dc649f3a01c7a1593b3a40f77aafa89f | [
"BSD-3-Clause"
] | null | null | null | tests/test_redis.py | UmboCV/logutils | 3f9d37f1dc649f3a01c7a1593b3a40f77aafa89f | [
"BSD-3-Clause"
] | null | null | null | tests/test_redis.py | UmboCV/logutils | 3f9d37f1dc649f3a01c7a1593b3a40f77aafa89f | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (C) 2011-2013 Vinay Sajip. See LICENSE.txt for details.
#
import logging
from logutils.testing import TestHandler, Matcher
from logutils.redis import RedisQueueHandler, RedisQueueListener
from redis import Redis
import socket
import subprocess
import time
import unittest
class QueueListener(RedisQueueLis... | 37.61 | 74 | 0.608615 |
9d743573977d5bb3dc9686000ecf9d26a723a49d | 2,407 | py | Python | HS110/energyUsage.py | xmitur01/SmartBoiler | d789c95b73a2aebb586372a0f448a61be4370edc | [
"Apache-2.0"
] | null | null | null | HS110/energyUsage.py | xmitur01/SmartBoiler | d789c95b73a2aebb586372a0f448a61be4370edc | [
"Apache-2.0"
] | null | null | null | HS110/energyUsage.py | xmitur01/SmartBoiler | d789c95b73a2aebb586372a0f448a61be4370edc | [
"Apache-2.0"
] | null | null | null | """
Implementation of power usage monitoring service. Used with socket Tp-Link HS110
author: J.Mitura (xmitur01)
version: 1.0
"""
import kasa
import time
import asyncio
import paho.mqtt.client as mqtt
import os
import sys
def getEnergyUsage():
"""Query plug for energy usage data. Runs as async task.
:return... | 25.606383 | 100 | 0.648941 |
f5d2982b9bee2d3c0d56db3053893c749f80617c | 27,710 | py | Python | pysnmp/HP-ICF-XRRP.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/HP-ICF-XRRP.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/HP-ICF-XRRP.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module HP-ICF-XRRP (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-XRRP
# Produced by pysmi-0.3.4 at Mon Apr 29 19:23:30 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 149.783784 | 4,327 | 0.759329 |
0e763e8f528fbf8f3831dfc7cbd6df836fc6bda1 | 21,638 | py | Python | nemo/collections/asr/models/label_models.py | rilango/NeMo | 6f23ff725c596f25fab6043d95e7c0b4a5f56331 | [
"Apache-2.0"
] | 2 | 2019-11-14T17:25:12.000Z | 2021-02-22T19:54:48.000Z | nemo/collections/asr/models/label_models.py | rilango/NeMo | 6f23ff725c596f25fab6043d95e7c0b4a5f56331 | [
"Apache-2.0"
] | null | null | null | nemo/collections/asr/models/label_models.py | rilango/NeMo | 6f23ff725c596f25fab6043d95e7c0b4a5f56331 | [
"Apache-2.0"
] | 2 | 2020-06-13T15:04:41.000Z | 2020-08-19T20:13:01.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 45.173278 | 254 | 0.671827 |
9d92bb027810dbf6c8c2c492753d543624ade5ca | 14,370 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_dns_nameserver.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/ansible/modules/network/f5/bigip_dns_nameserver.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/ansible/modules/network/f5/bigip_dns_nameserver.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 30.639659 | 91 | 0.61023 |
db8fe827e64f1f6f3382a171827657cd4134f04f | 668 | py | Python | manage.py | lambrosopos/bible-school-web-app | 7206026d0cb014c518314b76bd6fd7a223582044 | [
"MIT"
] | null | null | null | manage.py | lambrosopos/bible-school-web-app | 7206026d0cb014c518314b76bd6fd7a223582044 | [
"MIT"
] | null | null | null | manage.py | lambrosopos/bible-school-web-app | 7206026d0cb014c518314b76bd6fd7a223582044 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bible_school.settings')
try:
from django.core.management import execute_from_command_line
except... | 29.043478 | 76 | 0.681138 |
34140e2945fc1b05d05ff5965c53f2b479b8786b | 758 | py | Python | utils/message_util.py | jylibjtu/cool_dispatcher | 20252e3dc367c20a31d6122afc5e273efa3ff002 | [
"BSD-3-Clause"
] | 2 | 2021-04-11T03:21:40.000Z | 2021-06-08T10:13:59.000Z | utils/message_util.py | jylibjtu/cool_dispatcher | 20252e3dc367c20a31d6122afc5e273efa3ff002 | [
"BSD-3-Clause"
] | null | null | null | utils/message_util.py | jylibjtu/cool_dispatcher | 20252e3dc367c20a31d6122afc5e273efa3ff002 | [
"BSD-3-Clause"
] | 1 | 2021-12-02T04:11:01.000Z | 2021-12-02T04:11:01.000Z | #!/usr/bin/env python
#-*- coding:utf-8 -*-
# author:junyili
# datetime:20-1-16 下午6:12
import json
def get_queue(target, server):
return "{}_feed_queue_{}".format(target, server.replace(":", "__").replace(".", "_"))
def get_server(target, queue):
return queue.replace("{}_feed_queue_".format(target), "").repla... | 22.969697 | 98 | 0.66095 |
3532d95c1c24ff085674bff910de32358273fdba | 872 | py | Python | jdcloud_sdk/services/ipanti/models/BlackIpSetSpec.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/services/ipanti/models/BlackIpSetSpec.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/services/ipanti/models/BlackIpSetSpec.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | null | null | null | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 29.066667 | 75 | 0.696101 |
cdad6099cfde376549045b18065cff402c22de50 | 805 | py | Python | plants/bottle-filling/attacks/stop_and_fill.py | gizakor/virtuaplant | 14507234e8fcd2dd2cb8baaf71e4839df6045084 | [
"MIT"
] | null | null | null | plants/bottle-filling/attacks/stop_and_fill.py | gizakor/virtuaplant | 14507234e8fcd2dd2cb8baaf71e4839df6045084 | [
"MIT"
] | null | null | null | plants/bottle-filling/attacks/stop_and_fill.py | gizakor/virtuaplant | 14507234e8fcd2dd2cb8baaf71e4839df6045084 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
from pymodbus.exceptions import ConnectionException
import logging
logging.basicConfig()
log = logging.getLogger()
log.setLevel(logging.INFO)
#####################################
# Code
#####################################
clien... | 28.75 | 64 | 0.648447 |
332cc7d47e27efa1827fc0b2d130b85608c56daf | 6,067 | py | Python | insights/tests/client/apps/test_compliance.py | JoseLSegura/insights-core | ef5d423cd1e7236dbd20820d4d6ad4b153d69b6e | [
"Apache-2.0"
] | null | null | null | insights/tests/client/apps/test_compliance.py | JoseLSegura/insights-core | ef5d423cd1e7236dbd20820d4d6ad4b153d69b6e | [
"Apache-2.0"
] | null | null | null | insights/tests/client/apps/test_compliance.py | JoseLSegura/insights-core | ef5d423cd1e7236dbd20820d4d6ad4b153d69b6e | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
from insights.client.apps.compliance import ComplianceClient, COMPLIANCE_CONTENT_TYPE
from mock.mock import patch, Mock
from pytest import raises
import os
PATH = '/usr/share/xml/scap/ref_id.xml'
@patch("insights.client.apps.compliance.ComplianceClient._assert_oscap_rpms_exist")
@patch("insi... | 48.150794 | 155 | 0.755233 |
b681736677e6fa4b02e4e013b1b1524b40b539e4 | 9,641 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_fsp_vlan_dynamicmapping_interface_ipv6_ip6extraaddr.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_fsp_vlan_dynamicmapping_interface_ipv6_ip6extraaddr.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_fsp_vlan_dynamicmapping_interface_ipv6_ip6extraaddr.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import absolute_import, division, print_function
# Copyright 2019-2021 Fortinet, Inc.
#
# This program 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, either version 3 of the ... | 33.475694 | 153 | 0.604605 |
d632d16328869302e335c9a9643e2bf0c339a5ad | 4,351 | py | Python | applications/ShallowWaterApplication/python_scripts/utilities/wave_theory_utilities.py | clazaro/Kratos | b947b82c90dfcbf13d60511427f85990d36b90be | [
"BSD-4-Clause"
] | null | null | null | applications/ShallowWaterApplication/python_scripts/utilities/wave_theory_utilities.py | clazaro/Kratos | b947b82c90dfcbf13d60511427f85990d36b90be | [
"BSD-4-Clause"
] | null | null | null | applications/ShallowWaterApplication/python_scripts/utilities/wave_theory_utilities.py | clazaro/Kratos | b947b82c90dfcbf13d60511427f85990d36b90be | [
"BSD-4-Clause"
] | null | null | null | from numpy import pi, sqrt, tanh
from scipy.optimize import root
class WaveTheory:
'''Base class for waves calculations.'''
def __init__(self, depth, gravity=9.81, *, period=0, wavelength=0, amplitude=0):
self.gravity = gravity
self.depth = depth
if wavelength > 0 and period > 0:
... | 32.714286 | 106 | 0.642841 |
156ff319d2138735cf6695b0f7c1ec2ff91cf70f | 3,218 | py | Python | airflow/providers/mysql/transfers/presto_to_mysql.py | Hartorn/airflow | a79e2d4c4aa105f3fac5ae6a28e29af9cd572407 | [
"Apache-2.0"
] | 1 | 2020-08-13T15:17:03.000Z | 2020-08-13T15:17:03.000Z | airflow/providers/mysql/transfers/presto_to_mysql.py | Hartorn/airflow | a79e2d4c4aa105f3fac5ae6a28e29af9cd572407 | [
"Apache-2.0"
] | 37 | 2020-07-21T07:50:02.000Z | 2022-03-29T22:31:28.000Z | airflow/providers/mysql/transfers/presto_to_mysql.py | vuppalli/airflow | dfe8337ca2d3ed173d9ecc112938271519792c40 | [
"Apache-2.0"
] | 2 | 2020-03-08T14:12:55.000Z | 2020-06-10T10:17:32.000Z | #
# 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... | 40.225 | 74 | 0.701678 |
d637e624415d9224afbdc4b9b89fa6830d61de36 | 300 | py | Python | OLED/OLED12864_I2C_5x5/test1.py | 859462029/microbit-lib | fd767fb44173f317e4640a7af08afdb065770d91 | [
"MIT"
] | 44 | 2018-01-29T16:27:34.000Z | 2022-03-18T18:11:33.000Z | OLED/OLED12864_I2C_5x5/test1.py | bsliao0211/microbit-lib | fd767fb44173f317e4640a7af08afdb065770d91 | [
"MIT"
] | 8 | 2018-09-03T15:12:54.000Z | 2022-03-08T13:30:16.000Z | OLED/OLED12864_I2C_5x5/test1.py | bsliao0211/microbit-lib | fd767fb44173f317e4640a7af08afdb065770d91 | [
"MIT"
] | 36 | 2018-02-07T03:35:24.000Z | 2022-03-15T15:21:19.000Z | '''
I2C OLED 128x64 demo
Author: shaoziyang
Date: 2018.3
http://www.micropython.org.cn
'''
from microbit import *
from oled12864_i2c import OLED12864_I2C
oled = OLED12864_I2C()
oled.clear()
oled.rect(0,0,60,30)
n = 0
while 1:
oled.text(1,1, str(n))
n+=1
sleep(200)
| 13.636364 | 39 | 0.636667 |
5bef5b7be0c30765906882b162fa9c25bddf13f0 | 14,183 | py | Python | jams/color/__init__.py | MuellerSeb/jams_python | 1bca04557da79d8f8a4c447f5ccc517c40ab7dfc | [
"MIT"
] | 9 | 2019-06-03T03:24:16.000Z | 2021-12-03T07:14:00.000Z | jams/color/__init__.py | MuellerSeb/jams_python | 1bca04557da79d8f8a4c447f5ccc517c40ab7dfc | [
"MIT"
] | 6 | 2020-03-25T21:56:59.000Z | 2021-11-08T14:58:27.000Z | jams/color/__init__.py | MuellerSeb/jams_python | 1bca04557da79d8f8a4c447f5ccc517c40ab7dfc | [
"MIT"
] | 5 | 2019-10-17T12:04:33.000Z | 2021-09-28T07:45:07.000Z | #!/usr/bin/env python
from __future__ import division, absolute_import, print_function
"""
Functions working with colours and producing colour tables.
Provided colours
----------------
Can be accessed also with colours(list of colours)
ufzdarkblue, ufzblue, ufzlightblue,
ufzred, ufzorange, ufz... | 40.17847 | 132 | 0.660509 |
0d7f7752bc60a4d3580379fe37aa4109a39ef073 | 4,882 | py | Python | server.py | TheSmartMonkey/blockchain | af7e5ce749e0bf4d6587f0872514e978627925c4 | [
"MIT"
] | 1 | 2021-01-09T17:45:44.000Z | 2021-01-09T17:45:44.000Z | server.py | TheSmartMonkey/blockchain | af7e5ce749e0bf4d6587f0872514e978627925c4 | [
"MIT"
] | null | null | null | server.py | TheSmartMonkey/blockchain | af7e5ce749e0bf4d6587f0872514e978627925c4 | [
"MIT"
] | null | null | null | import json
import requests
from flask import Flask, jsonify, request
from node import Node,BackgroundMiner,SignatureError,OutOfToken
import logging
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG,format='%(asctime)s %(levelname)s %(message)s')
# Instantiate the Node
app = Flask(__nam... | 31.095541 | 155 | 0.652806 |
93d027c41cc57965e867b17266d7d2552a03a014 | 10,047 | py | Python | sbaas/analysis/visualization/visualization_io.py | SBRG/sbaas | 9df76bbffdd620cf8566744a2b0503935998fbe0 | [
"Apache-2.0"
] | 1 | 2017-05-13T04:35:08.000Z | 2017-05-13T04:35:08.000Z | sbaas/analysis/visualization/visualization_io.py | SBRG/sbaas | 9df76bbffdd620cf8566744a2b0503935998fbe0 | [
"Apache-2.0"
] | null | null | null | sbaas/analysis/visualization/visualization_io.py | SBRG/sbaas | 9df76bbffdd620cf8566744a2b0503935998fbe0 | [
"Apache-2.0"
] | 2 | 2017-02-23T19:32:38.000Z | 2020-01-14T19:13:05.000Z | from sbaas.analysis.analysis_base import *
from .visualization_query import visualization_query
class visualization_io(base_analysis):
def __init__(self, session_I=None):
if session_I: self.session = session_I;
else: self.session = Session();
self.visualization_query = visualization_query(... | 47.169014 | 152 | 0.529511 |
85e36e74b6aeceec3edbf379cbf274a3ad867a7b | 1,359 | py | Python | setup.py | taogeT/flask-vue | 7a742f1de60ce8e0ca5eb7a22f03d826f242b86b | [
"Apache-2.0"
] | 84 | 2016-10-16T21:13:37.000Z | 2021-12-20T07:33:36.000Z | setup.py | taogeT/flask-vuejs | 7a742f1de60ce8e0ca5eb7a22f03d826f242b86b | [
"Apache-2.0"
] | 4 | 2017-01-27T09:36:06.000Z | 2019-09-05T13:51:07.000Z | setup.py | taogeT/flask-vuejs | 7a742f1de60ce8e0ca5eb7a22f03d826f242b86b | [
"Apache-2.0"
] | 19 | 2017-02-28T13:42:05.000Z | 2020-06-02T00:46:08.000Z | # -*- coding: UTF-8 -*-
"""
Flask-Vue
-------------
Flask supports for Vue.js 1.0+ (Python3 version).
"""
try:
from setuptools import setup
except:
from distutils.core import setup
import codecs
version = '0.3.5'
setup(
name='Flask-Vue',
version=version,
url='https://github.com/taogeT/flask-vue',... | 28.3125 | 71 | 0.602649 |
9fb6e22f8ad42ff5bdc742a7085ce4b6a04c2094 | 3,292 | py | Python | _cssh.py | robieta/cloud_scripts | 515a6ca1333f6f573fb10f08cc6dff5afbad7113 | [
"Apache-2.0"
] | null | null | null | _cssh.py | robieta/cloud_scripts | 515a6ca1333f6f573fb10f08cc6dff5afbad7113 | [
"Apache-2.0"
] | null | null | null | _cssh.py | robieta/cloud_scripts | 515a6ca1333f6f573fb10f08cc6dff5afbad7113 | [
"Apache-2.0"
] | null | null | null |
import re
import subprocess
import sys
from constants import USER, GCLOUD, PROJECTS, populate_template
project_string = "\n".join(
[" {}: {}".format(key, val) for key, val in sorted(PROJECTS.items())])
def construct_command(machine_id, port_list=None):
port_list = port_list or []
project=None
user = USE... | 31.653846 | 155 | 0.59113 |
a98b5bc158525968710dd5076917b7eca6e029cf | 67,009 | py | Python | mne/channels/channels.py | emilelemoine/mne-python | 5dceaba66db25af7327492634720ae8ba246ff5d | [
"BSD-3-Clause"
] | 1 | 2021-02-16T13:33:13.000Z | 2021-02-16T13:33:13.000Z | mne/channels/channels.py | emilelemoine/mne-python | 5dceaba66db25af7327492634720ae8ba246ff5d | [
"BSD-3-Clause"
] | 12 | 2020-07-23T15:41:38.000Z | 2021-02-24T09:38:41.000Z | mne/channels/channels.py | timonmerk/mne-python | d02ac81019cec662dd8245c167f6657e57ec44a3 | [
"BSD-3-Clause"
] | null | null | null | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Denis Engemann <denis.engemann@gmail.com>
# Andrew Dykstra <andrew.r.dykstra@gmail.com>
# Teon Brooks <teon.brooks@gmail.com>
# Daniel McCloy <dan.mccloy@gmail.com>
#
#... | 37.965439 | 79 | 0.589786 |
ab08d2538a9fafc7207dc3d7ded7287d8f124fff | 756 | py | Python | PSGapp/managesettings.py | mikewillems/spider-disco | a2e238015c94c7394b247df4701e23fffea22513 | [
"MIT"
] | null | null | null | PSGapp/managesettings.py | mikewillems/spider-disco | a2e238015c94c7394b247df4701e23fffea22513 | [
"MIT"
] | 1 | 2018-11-23T00:52:01.000Z | 2018-11-23T08:44:26.000Z | PSGapp/managesettings.py | mikewillems/spider-disco | a2e238015c94c7394b247df4701e23fffea22513 | [
"MIT"
] | 1 | 2018-11-22T21:12:13.000Z | 2018-11-22T21:12:13.000Z | def readsettings(filename):
settings = {}
lines = []
with open(filename) as f:
lines = f.readlines()
for line in lines:
key, val = tuple(line.strip(',').strip().split(': '))
key = key.strip('"')
if val[0]=='"':
val = val.strip('"')
elif val=='None':
... | 28 | 61 | 0.465608 |
8307e40ab9a84b2878670ccd11558a7c79ea01d8 | 596 | py | Python | plotly/validators/layout/scene/yaxis/tickfont/_family.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/layout/scene/yaxis/tickfont/_family.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/layout/scene/yaxis/tickfont/_family.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name='family',
parent_name='layout.scene.yaxis.tickfont',
**kwargs
):
super(FamilyValidator, self).__init__(
plotly_name=plot... | 28.380952 | 68 | 0.598993 |
9f2257cc9a2736e12d74f0bd1e80d3cffdd04085 | 1,244 | py | Python | baekjoon/python/find_parents_of_tree_11725.py | yskang/AlgorithmPracticeWithPython | f7129bd1924a7961489198f0ee052d2cd1e9cf40 | [
"MIT"
] | null | null | null | baekjoon/python/find_parents_of_tree_11725.py | yskang/AlgorithmPracticeWithPython | f7129bd1924a7961489198f0ee052d2cd1e9cf40 | [
"MIT"
] | null | null | null | baekjoon/python/find_parents_of_tree_11725.py | yskang/AlgorithmPracticeWithPython | f7129bd1924a7961489198f0ee052d2cd1e9cf40 | [
"MIT"
] | null | null | null | # Title: 트리의 부모 찾기
# Link: https://www.acmicpc.net/problem/11725
import sys
sys.setrecursionlimit(10 ** 6)
def read_list_int():
return list(map(int, sys.stdin.readline().strip().split(' ')))
def read_single_int():
return int(sys.stdin.readline().strip())
class Node:
def __init__(sel... | 23.471698 | 67 | 0.578778 |
f29f8d3776193bbe8f818fb6e1e9ad7867663d5c | 4,821 | py | Python | src/android/toga_android/app.py | moondial-pal/toga | 93724a3540f1450814af69ad4ad18367c86c168d | [
"BSD-3-Clause"
] | null | null | null | src/android/toga_android/app.py | moondial-pal/toga | 93724a3540f1450814af69ad4ad18367c86c168d | [
"BSD-3-Clause"
] | null | null | null | src/android/toga_android/app.py | moondial-pal/toga | 93724a3540f1450814af69ad4ad18367c86c168d | [
"BSD-3-Clause"
] | null | null | null | from rubicon.java import android_events
from toga.handlers import wrapped_handler
from .libs.activity import IPythonApp, MainActivity
from .window import Window
import asyncio
# `MainWindow` is defined here in `app.py`, not `window.py`, to mollify the test suite.
class MainWindow(Window):
pass
class TogaApp(... | 34.191489 | 117 | 0.661896 |
b65cf0685a48caa16127ac5ea16c1ea8919bf80f | 15,450 | py | Python | lib/storage/drbd_cmdgen.py | apyrgio/snf-ganeti | c59bb92f5bf4a98d90b4f10fb509a5a2f11c65b7 | [
"BSD-2-Clause"
] | 2 | 2018-09-26T10:09:23.000Z | 2018-09-27T07:27:06.000Z | lib/storage/drbd_cmdgen.py | apyrgio/snf-ganeti | c59bb92f5bf4a98d90b4f10fb509a5a2f11c65b7 | [
"BSD-2-Clause"
] | null | null | null | lib/storage/drbd_cmdgen.py | apyrgio/snf-ganeti | c59bb92f5bf4a98d90b4f10fb509a5a2f11c65b7 | [
"BSD-2-Clause"
] | null | null | null | #
#
# Copyright (C) 2006, 2007, 2010, 2011, 2012, 2013 Google 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
... | 33.5141 | 80 | 0.654369 |
8aeee1ab6574ec44cdde384f6c576af540bae86b | 6,646 | py | Python | tests/interceptors/exception_interceptor.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | tests/interceptors/exception_interceptor.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | tests/interceptors/exception_interceptor.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.977143 | 80 | 0.680409 |
2cf3dbd2ca3814afc78821fc220b8c6c3cecd9b6 | 12,515 | py | Python | judo/data_structures/states.py | FragileTech/judo | 564f2860a56f0474d7f2bf72ee22bff9e8565033 | [
"MIT"
] | null | null | null | judo/data_structures/states.py | FragileTech/judo | 564f2860a56f0474d7f2bf72ee22bff9e8565033 | [
"MIT"
] | 34 | 2020-11-14T07:46:22.000Z | 2022-03-12T00:58:36.000Z | judo/data_structures/states.py | FragileTech/judo | 564f2860a56f0474d7f2bf72ee22bff9e8565033 | [
"MIT"
] | 1 | 2020-11-04T07:41:21.000Z | 2020-11-04T07:41:21.000Z | import copy
from typing import Dict, Generator, Iterable, List, Optional, Tuple, Union
import numpy
import judo
from judo.functions.api import API
from judo.functions.hashing import hasher
from judo.judo_tensor import tensor
from judo.typing import StateDict, Tensor
class States:
"""
Data structure that han... | 36.70088 | 99 | 0.570915 |
80fe754637f27efeb47e6a9b17fe5339e5995d5a | 1,943 | py | Python | vsts/vsts/gallery/v4_1/models/extension_filter_result.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/gallery/v4_1/models/extension_filter_result.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/gallery/v4_1/models/extension_filter_result.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 57.147059 | 234 | 0.6351 |
64bf60ce1ab3cc1cad13d5bab5df134024a2cf95 | 4,436 | py | Python | net/simple_netdb/simple_db.py | charlieh0tel/linux_stuff | e963ab1725f5278b18b11839e6ea72755daa9c62 | [
"MIT"
] | null | null | null | net/simple_netdb/simple_db.py | charlieh0tel/linux_stuff | e963ab1725f5278b18b11839e6ea72755daa9c62 | [
"MIT"
] | null | null | null | net/simple_netdb/simple_db.py | charlieh0tel/linux_stuff | e963ab1725f5278b18b11839e6ea72755daa9c62 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import ipaddress
import json
import sys
DOMAIN="murgatroid.com"
class MacAddress(object):
def __init__(self, bytes):
self._bytes = bytes
@classmethod
def Parse(cls, s):
bytes = map(lambda x: int(x, 16), s.split(":"))
assert len(bytes) == 6
return... | 27.725 | 76 | 0.509693 |
60b267d3dfd35372b36ae215d8e50b67ae7af424 | 1,867 | py | Python | acme/jax/networks/duelling.py | Tsaousis/acme | 14278693bcc5fef0839ac60792d452d3d80acfd7 | [
"Apache-2.0"
] | 2,650 | 2020-06-01T16:31:25.000Z | 2022-03-31T07:32:41.000Z | acme/jax/networks/duelling.py | Tsaousis/acme | 14278693bcc5fef0839ac60792d452d3d80acfd7 | [
"Apache-2.0"
] | 199 | 2020-06-02T01:09:09.000Z | 2022-03-31T17:11:20.000Z | acme/jax/networks/duelling.py | Tsaousis/acme | 14278693bcc5fef0839ac60792d452d3d80acfd7 | [
"Apache-2.0"
] | 344 | 2020-06-01T16:45:21.000Z | 2022-03-30T11:15:09.000Z | # python3
# Copyright 2018 DeepMind Technologies 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 re... | 30.112903 | 78 | 0.688806 |
86ea160d4b5d2b9d1b8f16eb501f32a068a64857 | 551 | py | Python | Leak #5 - Lost In Translation/windows/Resources/Pc/PyScripts/Install/winnt/KiSu/_Uninstall.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 9 | 2019-11-22T04:58:40.000Z | 2022-02-26T16:47:28.000Z | Leak #5 - Lost In Translation/windows/Resources/Pc/PyScripts/Install/winnt/KiSu/_Uninstall.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | null | null | null | Leak #5 - Lost In Translation/windows/Resources/Pc/PyScripts/Install/winnt/KiSu/_Uninstall.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 8 | 2017-09-27T10:31:18.000Z | 2022-01-08T10:30:46.000Z | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: _Uninstall.py
import dsz
import dsz.lp
dsz.lp.AddResDirToPath('DeMi')
import demi
import demi.windows.module
import glob
import os
import re
import s... | 22.958333 | 101 | 0.709619 |
20c63748bfe79ed4e6a3272f1159ec3abaa4ea0a | 1,002 | py | Python | resources/lib/tools.py | dolorosus/script.kodi.hue.ambilight | 32573c42ba983da156a1ff9bdbe2d4e7a4b1bc8e | [
"WTFPL"
] | 1 | 2022-01-03T11:31:54.000Z | 2022-01-03T11:31:54.000Z | resources/lib/tools.py | dolorosus/script.kodi.hue.ambilight | 32573c42ba983da156a1ff9bdbe2d4e7a4b1bc8e | [
"WTFPL"
] | null | null | null | resources/lib/tools.py | dolorosus/script.kodi.hue.ambilight | 32573c42ba983da156a1ff9bdbe2d4e7a4b1bc8e | [
"WTFPL"
] | null | null | null | import os
TESTING_ENV = False
try:
import xbmc
import xbmcgui
import xbmcaddon
__addon__ = xbmcaddon.Addon()
__cwd__ = __addon__.getAddonInfo('path')
__icon__ = os.path.join(__cwd__, "icon.png")
__settings__ = os.path.join(__cwd__, "resources", "settings.xml")
__xml__ = os.path.join(_... | 22.772727 | 77 | 0.621756 |
d238802a68d649e3091ec527d6f2d0375608c506 | 5,667 | py | Python | benchmarks/bench_kernel_pca_solvers_time_vs_n_samples.py | emarkou/scikit-learn | d73822f84f2832dcc25f0ff58769f60871a78025 | [
"BSD-3-Clause"
] | 3 | 2019-11-18T13:47:42.000Z | 2021-08-22T23:37:47.000Z | benchmarks/bench_kernel_pca_solvers_time_vs_n_samples.py | emarkou/scikit-learn | d73822f84f2832dcc25f0ff58769f60871a78025 | [
"BSD-3-Clause"
] | 3 | 2017-02-16T09:20:02.000Z | 2021-06-25T15:29:34.000Z | benchmarks/bench_kernel_pca_solvers_time_vs_n_samples.py | emarkou/scikit-learn | d73822f84f2832dcc25f0ff58769f60871a78025 | [
"BSD-3-Clause"
] | 2 | 2017-06-27T12:40:35.000Z | 2021-08-22T23:37:35.000Z | """
==========================================================
Kernel PCA Solvers comparison benchmark: time vs n_samples
==========================================================
This benchmark shows that the approximate solvers provided in Kernel PCA can
help significantly improve its execution speed when an approx... | 36.798701 | 79 | 0.678842 |
4e7fc1892b4f590477697d8f66d665a6e1583c57 | 37,795 | py | Python | PyCLUE/utils/classifier_utils/conv_bert_uitls.py | yyht/PyCLUE_albert | 71143d797e967a4215f3a8c1664b56369da4e58e | [
"MIT"
] | null | null | null | PyCLUE/utils/classifier_utils/conv_bert_uitls.py | yyht/PyCLUE_albert | 71143d797e967a4215f3a8c1664b56369da4e58e | [
"MIT"
] | null | null | null | PyCLUE/utils/classifier_utils/conv_bert_uitls.py | yyht/PyCLUE_albert | 71143d797e967a4215f3a8c1664b56369da4e58e | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import copy
import json
import math
import re
import numpy as np
import six
import tensorflow as tf
from . import bert_utils
def gelu(input_tensor):
"""Gaussian Error Linear Unit.
This... | 42.802945 | 172 | 0.688742 |
524fe7ba4949c6bd06590775c29d096ac57fe936 | 93 | py | Python | appjardin/apps.py | MFCY17/mfcy | d0a034fd05d11a8278ba8285d3d8f9b8cf2d9eaf | [
"Apache-2.0"
] | null | null | null | appjardin/apps.py | MFCY17/mfcy | d0a034fd05d11a8278ba8285d3d8f9b8cf2d9eaf | [
"Apache-2.0"
] | null | null | null | appjardin/apps.py | MFCY17/mfcy | d0a034fd05d11a8278ba8285d3d8f9b8cf2d9eaf | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class AppjardinConfig(AppConfig):
name = 'appjardin'
| 15.5 | 33 | 0.763441 |
5b205df5c361b0a69a89b7b3901b8c94b6431b47 | 2,098 | py | Python | hash/hash_spoof.py | aeakoski/fun_with_numbers | 26329447aa55a762f2529c5029cfb0905c80afc1 | [
"MIT"
] | null | null | null | hash/hash_spoof.py | aeakoski/fun_with_numbers | 26329447aa55a762f2529c5029cfb0905c80afc1 | [
"MIT"
] | 5 | 2019-09-30T18:57:51.000Z | 2020-03-15T21:56:05.000Z | hash/hash_spoof.py | aeakoski/fun_with_numbers | 26329447aa55a762f2529c5029cfb0905c80afc1 | [
"MIT"
] | null | null | null | import hashlib
import random
import string
import time
import statistics
import matplotlib.pyplot as plt
import numpy
correctHash = "04bb14edf208831df2dcdd7f3cae2448cf818baf2de0cf9b3b0b1a58d3ad584d"
goodEnoughHash = "________________________________________________________________"
stopwatchVector = []
timeResults... | 26.897436 | 83 | 0.661582 |
ccbc28f5e7f7709870d193c9503db1550afc1813 | 452 | py | Python | jarm/formats/tls_1_3_middle_out.py | andrew-paloalto/pyjarm | 3152621458482adc3a6c77963fddda2f00909dd7 | [
"0BSD"
] | 26 | 2021-01-16T13:16:32.000Z | 2022-03-29T07:45:09.000Z | jarm/formats/tls_1_3_middle_out.py | andrew-paloalto/pyjarm | 3152621458482adc3a6c77963fddda2f00909dd7 | [
"0BSD"
] | 4 | 2021-01-29T09:28:43.000Z | 2021-05-29T15:16:57.000Z | jarm/formats/tls_1_3_middle_out.py | andrew-paloalto/pyjarm | 3152621458482adc3a6c77963fddda2f00909dd7 | [
"0BSD"
] | 5 | 2021-01-15T17:09:28.000Z | 2021-10-16T19:17:33.000Z | from jarm.constants import TLS_1_3, ALL, REVERSE, MIDDLE_OUT, SUPPORT_1_3
from jarm.formats.common import CommonTLSFormat
class TLS_1_3_Middle_Out(CommonTLSFormat):
def __init__(self):
super().__init__(
version=TLS_1_3,
cipher_list=ALL,
cipher_order=MIDDLE_OUT,
... | 28.25 | 73 | 0.639381 |
3bef1608186cedb3e6e4745c485dcf2b3b1c2bfe | 12,869 | py | Python | utils/pycloudstack/pycloudstack/vmguest.py | ruomengh/tdx-tools | 6c146f63d85f13681196e28bb463500279a5ada6 | [
"Apache-2.0"
] | 11 | 2021-12-21T01:32:59.000Z | 2022-03-30T14:37:45.000Z | utils/pycloudstack/pycloudstack/vmguest.py | ruomengh/tdx-tools | 6c146f63d85f13681196e28bb463500279a5ada6 | [
"Apache-2.0"
] | 15 | 2022-01-12T00:40:59.000Z | 2022-03-31T17:03:42.000Z | utils/pycloudstack/pycloudstack/vmguest.py | ruomengh/tdx-tools | 6c146f63d85f13681196e28bb463500279a5ada6 | [
"Apache-2.0"
] | 7 | 2021-12-20T11:45:46.000Z | 2022-03-15T06:22:52.000Z | """
VM Guest class
"""
import os
import uuid
import logging
import time
import socket
import errno
import datetime
import getpass
from .cmdrunner import SSHCmdRunner, NativeCmdRunner
from .dut import DUT
from .vmimg import VMImage
from .vmm import VMMLibvirt
from .vmparam import VM_TYPE_TD, VM_TYPE_SGX, VM_STATE_RUNNIN... | 30.860911 | 100 | 0.547595 |
0d4bb7e90578298cd864a628b7a1d2f0218b9e64 | 637 | py | Python | tests/test_rdn_prl.py | SZanko/radontea | ec01a8ea557362b4511e68eeb542b97831e365af | [
"BSD-3-Clause"
] | 10 | 2016-08-22T15:45:08.000Z | 2021-12-09T20:10:03.000Z | tests/test_rdn_prl.py | SZanko/radontea | ec01a8ea557362b4511e68eeb542b97831e365af | [
"BSD-3-Clause"
] | 6 | 2017-10-03T14:33:21.000Z | 2021-04-12T21:10:08.000Z | tests/test_rdn_prl.py | paulmueller/radontea | 01fb924b2a241914328c6526ced7248807f3adea | [
"BSD-3-Clause"
] | 7 | 2018-10-22T16:53:47.000Z | 2022-02-14T13:14:56.000Z | import numpy as np
import radontea
def test_radon_simple():
x = np.zeros((10, 10))
x[2:5, 3:6] = 1
sino = radontea.radon_parallel(x, angles=[0, np.pi/2, np.pi, np.pi*3/2])
assert np.allclose(sino[0], [0, 0, 0, 3, 3, 3, 0, 0, 0, 0])
assert np.allclose(sino[1], [0, 0, 3, 3, 3, 0, 0, 0, 0, 0])
a... | 28.954545 | 76 | 0.544741 |
b90a9d9641b75f5392b4a1500c9539cc25966215 | 9,594 | py | Python | cctbx/regression/tst_maptbx_box.py | mphancock/cctbx_project | ec8a239c5bcee9c9b2d1c6c95dc3fff2580bbb85 | [
"BSD-3-Clause-LBNL"
] | null | null | null | cctbx/regression/tst_maptbx_box.py | mphancock/cctbx_project | ec8a239c5bcee9c9b2d1c6c95dc3fff2580bbb85 | [
"BSD-3-Clause-LBNL"
] | null | null | null | cctbx/regression/tst_maptbx_box.py | mphancock/cctbx_project | ec8a239c5bcee9c9b2d1c6c95dc3fff2580bbb85 | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
import os
import iotbx.pdb
from libtbx.test_utils import approx_equal
from cctbx.sgtbx import space_group_info
from cctbx.development import random_structure
import cctbx.maptbx.box
from libtbx import group_args
import iotbx.pdb
from iotbx.map_manager imp... | 35.272059 | 112 | 0.717115 |
1e460e020e7683e096008cd9c8d845113bda8afa | 956 | py | Python | simple_converge/datasets/DataframeImageCategoricalDataset.py | EytanKats/simple_converge | b63cc374573d628b5c33f2502904ceca56a6f994 | [
"MIT"
] | null | null | null | simple_converge/datasets/DataframeImageCategoricalDataset.py | EytanKats/simple_converge | b63cc374573d628b5c33f2502904ceca56a6f994 | [
"MIT"
] | 2 | 2022-01-05T14:04:14.000Z | 2022-01-05T14:08:35.000Z | simple_converge/datasets/DataframeImageCategoricalDataset.py | EytanKats/simple_converge | b63cc374573d628b5c33f2502904ceca56a6f994 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from datasets.BaseDataframeDataset import BaseDataframeDataset
default_settings = {
'image_path_column': 'path',
'label_name_column': 'label',
'labels': []
}
class DataframeImageCategoricalDataset(BaseDataframeDataset):
def __init__(
self,
... | 25.837838 | 110 | 0.599372 |
05e81732261b3c43a5a319cfafcf2429dfbf8933 | 5,164 | py | Python | RUN_style_trafo.py | christiansimonis/style-img | b310693eca3f7cd71903a6cbc3b619bca7aa89e6 | [
"HPND",
"Unlicense",
"BSD-3-Clause"
] | 6 | 2021-07-20T15:16:55.000Z | 2021-11-08T11:12:03.000Z | RUN_style_trafo.py | christiansimonis/style-img | b310693eca3f7cd71903a6cbc3b619bca7aa89e6 | [
"HPND",
"Unlicense",
"BSD-3-Clause"
] | null | null | null | RUN_style_trafo.py | christiansimonis/style-img | b310693eca3f7cd71903a6cbc3b619bca7aa89e6 | [
"HPND",
"Unlicense",
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------------------------------------------------------------
__author__ = "Christian Simonis"
__copyright__ = "Copyright 2021"
__version__ = "1.0"
__maintainer__ = "Christian Simonis"
__email__ = "christian.Simonis.1989@gmail.com"
__status__ = "wor... | 66.205128 | 449 | 0.574167 |
f82d6589cade7b02c0750867ff17c5d4174c9c50 | 8,056 | py | Python | libs/shape.py | hoangnt2601/roLabelImg | 42ce6406d2b5e0deb479b81c397beaab33b52c22 | [
"MIT"
] | 535 | 2017-08-25T02:15:28.000Z | 2022-03-29T14:23:56.000Z | libs/shape.py | hoangnt2601/roLabelImg | 42ce6406d2b5e0deb479b81c397beaab33b52c22 | [
"MIT"
] | 26 | 2017-06-22T05:26:06.000Z | 2022-03-31T11:53:35.000Z | libs/shape.py | hoangnt2601/roLabelImg | 42ce6406d2b5e0deb479b81c397beaab33b52c22 | [
"MIT"
] | 166 | 2017-07-03T09:50:30.000Z | 2022-03-29T02:19:36.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from lib import distance
import math
DEFAULT_LINE_COLOR = QColor(0, 255, 0, 128)
DEFAULT_FILL_COLOR = QColor(255, 0, 0, 128)
DE... | 33.152263 | 119 | 0.592229 |
edac60319262d20159db032a498c1194648496f3 | 73,002 | py | Python | sympy/physics/quantum/spin.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 1 | 2020-09-09T20:40:17.000Z | 2020-09-09T20:40:17.000Z | sympy/physics/quantum/spin.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 14 | 2018-02-08T10:11:03.000Z | 2019-04-16T10:32:46.000Z | sympy/physics/quantum/spin.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 1 | 2022-02-04T13:50:29.000Z | 2022-02-04T13:50:29.000Z | """Quantum mechanical angular momemtum."""
from sympy.concrete.summations import Sum
from sympy.core.add import Add
from sympy.core.containers import Tuple
from sympy.core.expr import Expr
from sympy.core.mul import Mul
from sympy.core.numbers import (I, Integer, Rational, pi)
from sympy.core.singleton import S
from s... | 33.954419 | 131 | 0.581464 |
2d23b407d4703a6b1e8d23c1c0a6f31c500cd9f3 | 29,644 | py | Python | lib/models/mpii_pose_hrnet/zxm19-pose_hrnet.py | mobeixiaoxin/deep-high-resolution-net.pytorch | 081dea8b60726cc0db45ef907f49b4748ac7bba2 | [
"MIT"
] | null | null | null | lib/models/mpii_pose_hrnet/zxm19-pose_hrnet.py | mobeixiaoxin/deep-high-resolution-net.pytorch | 081dea8b60726cc0db45ef907f49b4748ac7bba2 | [
"MIT"
] | null | null | null | lib/models/mpii_pose_hrnet/zxm19-pose_hrnet.py | mobeixiaoxin/deep-high-resolution-net.pytorch | 081dea8b60726cc0db45ef907f49b4748ac7bba2 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Bin Xiao (Bin.Xiao@microsoft.com)
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __futu... | 38.902887 | 179 | 0.514607 |
be202f99090d21787436a195f5750a018f2f3975 | 794 | py | Python | examples/st7735r_minitft_simpletest.py | TG-Techie/Adafruit_CircuitPython_ST7735R | 7bc2f385464db75a0bd580f3297439d2ad330fa1 | [
"MIT"
] | null | null | null | examples/st7735r_minitft_simpletest.py | TG-Techie/Adafruit_CircuitPython_ST7735R | 7bc2f385464db75a0bd580f3297439d2ad330fa1 | [
"MIT"
] | null | null | null | examples/st7735r_minitft_simpletest.py | TG-Techie/Adafruit_CircuitPython_ST7735R | 7bc2f385464db75a0bd580f3297439d2ad330fa1 | [
"MIT"
] | null | null | null | """
This example will test out the display on the Mini TFT Breakout
"""
import board
import displayio
from adafruit_st7735r import ST7735R
spi = board.SPI()
tft_cs = board.D5
tft_dc = board.D6
displayio.release_displays()
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=board.D9)
displ... | 24.8125 | 89 | 0.715365 |
7041da2ee3862c6bf69aede8838f10380957b97f | 4,720 | py | Python | utils/signatures.py | Migilo/panoramix | 0e52ba4cb1b7bb03f8a79e3226e9c142351578dc | [
"MIT"
] | 490 | 2019-10-09T03:52:40.000Z | 2022-03-29T09:44:05.000Z | utils/signatures.py | Migilo/panoramix | 0e52ba4cb1b7bb03f8a79e3226e9c142351578dc | [
"MIT"
] | 43 | 2019-10-09T13:39:57.000Z | 2022-03-12T15:29:24.000Z | utils/signatures.py | Migilo/panoramix | 0e52ba4cb1b7bb03f8a79e3226e9c142351578dc | [
"MIT"
] | 136 | 2019-10-15T13:52:27.000Z | 2022-03-24T05:22:26.000Z | # coding: tilde
from .profiler import checkpoint
import json
from .helpers import opcode, colorize, cleanup_mul_1
from .helpers import COLOR_HEADER, COLOR_BLUE, COLOR_OKGREEN, COLOR_WARNING, FAIL, ENDC, COLOR_BOLD, COLOR_UNDERLINE, COLOR_GREEN, COLOR_GRAY
import hashlib
import os.path
from .supplement import fetch_... | 24.081633 | 173 | 0.556568 |
b41620b61b9308c81d4a761c33b1e69fd1bbe48a | 981 | py | Python | __iox__.py | langsgit/Jupytercli | 4038d9b6ab3b90807d2c78e6962a49418c69d039 | [
"MIT"
] | null | null | null | __iox__.py | langsgit/Jupytercli | 4038d9b6ab3b90807d2c78e6962a49418c69d039 | [
"MIT"
] | null | null | null | __iox__.py | langsgit/Jupytercli | 4038d9b6ab3b90807d2c78e6962a49418c69d039 | [
"MIT"
] | null | null | null | ## __iox__: Operating-System with Tradeable-Platform based on PayPal-Account and Cubical-Bank as well Rufusles-Security by AsusTech.org and Xioami.org
def __AutomatedStrategies__():
pass
def __BarsType__():
pass
def __Indicarors__():
pass
def __Indexes__():
pass
def __PayPalVendoring__():
pass
def __Atom... | 14.014286 | 150 | 0.745158 |
86e059e69d35fd064386bc2e1b89cf4a126df2c1 | 18,454 | py | Python | q2_beast/_version.py | ebolyen/q2-beast | dee874edf5ef04b8fedb6ddcc9d6ba33f1699451 | [
"BSD-3-Clause"
] | 1 | 2020-04-08T03:16:09.000Z | 2020-04-08T03:16:09.000Z | q2_beast/_version.py | ebolyen/q2-beast | dee874edf5ef04b8fedb6ddcc9d6ba33f1699451 | [
"BSD-3-Clause"
] | null | null | null | q2_beast/_version.py | ebolyen/q2-beast | dee874edf5ef04b8fedb6ddcc9d6ba33f1699451 | [
"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.420345 | 79 | 0.584535 |
52aede310fb235bef7fc92979234c1feb5bed1f9 | 669 | py | Python | adv/vice.py.r.lt.py | betairylia/dl | 4eb06837b13decc569066a43b58e205f3b716ff8 | [
"Apache-2.0"
] | null | null | null | adv/vice.py.r.lt.py | betairylia/dl | 4eb06837b13decc569066a43b58e205f3b716ff8 | [
"Apache-2.0"
] | null | null | null | adv/vice.py.r.lt.py | betairylia/dl | 4eb06837b13decc569066a43b58e205f3b716ff8 | [
"Apache-2.0"
] | null | null | null | import adv_test
from adv import *
def module():
return Vice
class Vice(Adv):
a1 = ('bk',0.2)
#comment = 'reach 100 resist with Silke Lends a Hand'
#import slot
#conf = {}
#conf['slots.a'] = slot.a.Silke_Lends_a_Hand()+slot.a.RR()
if __name__ == '__main__':
conf = {}
conf['acl'] = "... | 20.90625 | 78 | 0.547085 |
5b5681531d2ff56d722fe9cc1ae9271ee5404c61 | 714 | py | Python | server/plugins/sip/scripts/sip.py | dhmoore/sal | 9e9780d6a16f93e75d64187fa15e5425cf98991c | [
"Apache-2.0"
] | null | null | null | server/plugins/sip/scripts/sip.py | dhmoore/sal | 9e9780d6a16f93e75d64187fa15e5425cf98991c | [
"Apache-2.0"
] | null | null | null | server/plugins/sip/scripts/sip.py | dhmoore/sal | 9e9780d6a16f93e75d64187fa15e5425cf98991c | [
"Apache-2.0"
] | null | null | null | #!/usr/local/sal/Python.framework/Versions/Current/bin/python3
import os
import subprocess
import sal
def main():
sal.add_plugin_results('Sip', {'SIP': sip_status()})
def sip_status():
if not os.path.exists('/usr/bin/csrutil'):
status = 'Not Supported'
else:
cmd = ['/usr/bin/csrutil',... | 22.3125 | 86 | 0.645658 |
5615c08f0593608954bc4a35bf647c1be35f22f3 | 17,628 | py | Python | tests/test_sessions.py | Wallyhs04/httpie | 6bdcdf1eba5a0b15e025388c84e34eecbe0394ee | [
"BSD-3-Clause"
] | 1 | 2021-11-27T12:53:15.000Z | 2021-11-27T12:53:15.000Z | tests/test_sessions.py | Wallyhs04/httpie | 6bdcdf1eba5a0b15e025388c84e34eecbe0394ee | [
"BSD-3-Clause"
] | 4 | 2022-03-01T19:19:15.000Z | 2022-03-23T07:23:16.000Z | tests/test_sessions.py | Wallyhs04/httpie | 6bdcdf1eba5a0b15e025388c84e34eecbe0394ee | [
"BSD-3-Clause"
] | null | null | null | import json
import os
import shutil
from datetime import datetime
from unittest import mock
import pytest
from .fixtures import FILE_PATH_ARG, UNICODE
from httpie.encoding import UTF8
from httpie.plugins import AuthPlugin
from httpie.plugins.builtin import HTTPBasicAuth
from httpie.plugins.registry import plugin_mana... | 34.162791 | 124 | 0.550318 |
5163ceb5d6d79d3593a07809cecf3e27f9015011 | 1,363 | py | Python | src/explorepy_test/tools.py | bmeatayi/explorepy-test | 9af4195f3d79a00dd9c9f777b882aeda0fbf0536 | [
"MIT"
] | null | null | null | src/explorepy_test/tools.py | bmeatayi/explorepy-test | 9af4195f3d79a00dd9c9f777b882aeda0fbf0536 | [
"MIT"
] | null | null | null | src/explorepy_test/tools.py | bmeatayi/explorepy-test | 9af4195f3d79a00dd9c9f777b882aeda0fbf0536 | [
"MIT"
] | null | null | null | from .parser import Parser
import os.path
import csv
def bin2csv(bin_file):
filename, extension = os.path.splitext(bin_file)
assert extension == '.BIN', "File type error! File extension must be BIN."
eeg_out_file = filename + '_eeg.csv'
orn_out_file = filename + '_orn.csv'
with open(bin_file, "rb... | 41.30303 | 123 | 0.581805 |
746a1fc64bc7ccf4a5869dabc1d8b55cceb4ca98 | 11,561 | py | Python | AutotestWebD/apps/myadmin/views/userRole.py | yangjourney/sosotest | 2e88099a829749910ca325253c9b1a2e368d21a0 | [
"MIT"
] | 422 | 2019-08-18T05:04:20.000Z | 2022-03-31T06:49:19.000Z | AutotestWebD/apps/myadmin/views/userRole.py | LinSongJian1985/sosotest | 091863dee531b5726650bb63efd6f169267cbeb4 | [
"MIT"
] | 10 | 2019-10-24T09:55:38.000Z | 2021-09-29T17:28:43.000Z | AutotestWebD/apps/myadmin/views/userRole.py | LinSongJian1985/sosotest | 091863dee531b5726650bb63efd6f169267cbeb4 | [
"MIT"
] | 202 | 2019-08-18T05:04:27.000Z | 2022-03-30T05:57:18.000Z | # Create your views here.
import json
from urllib import parse
from all_models.models import *
from apps.common.config import commonWebConfig
from apps.common.func.WebFunc import *
from apps.myadmin.service.AdminUserService import AdminUserService
from apps.myadmin.service.PlatformPermissionUserService import Platform... | 47.381148 | 173 | 0.615518 |
d25c654a3b77608df2ef22ae1e49a2dcf1649c00 | 3,785 | py | Python | tensorflow/compiler/plugin/poplar/tests/multi_run_test.py | pierricklee/tensorflow | c6a61d7b19a9242b06f40120ab42f0fdb0b5c462 | [
"Apache-2.0"
] | null | null | null | tensorflow/compiler/plugin/poplar/tests/multi_run_test.py | pierricklee/tensorflow | c6a61d7b19a9242b06f40120ab42f0fdb0b5c462 | [
"Apache-2.0"
] | null | null | null | tensorflow/compiler/plugin/poplar/tests/multi_run_test.py | pierricklee/tensorflow | c6a61d7b19a9242b06f40120ab42f0fdb0b5c462 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.373832 | 80 | 0.618494 |
3b9cd87660d43d48740e11d25c5aad91f737927a | 7,187 | py | Python | humfrey/ckan/tasks.py | ox-it/humfrey | c92e46a24a9bf28aa9638a612f166d209315e76b | [
"BSD-3-Clause"
] | 6 | 2015-01-09T15:53:07.000Z | 2020-02-13T14:00:53.000Z | humfrey/ckan/tasks.py | ox-it/humfrey | c92e46a24a9bf28aa9638a612f166d209315e76b | [
"BSD-3-Clause"
] | null | null | null | humfrey/ckan/tasks.py | ox-it/humfrey | c92e46a24a9bf28aa9638a612f166d209315e76b | [
"BSD-3-Clause"
] | 1 | 2017-05-12T20:46:15.000Z | 2017-05-12T20:46:15.000Z | import collections
import copy
import functools
import itertools
import logging
from celery.task import task
import ckanclient
from django.conf import settings
from django_hosts.reverse import reverse_full
import rdflib
from humfrey.signals import graphs_updated
from humfrey.sparql.endpoint import Endpoint
from humfr... | 36.29798 | 128 | 0.633088 |
6a7fc33aabd60bb7da0eebe1cd98b57135987aeb | 29,620 | bzl | Python | distdir_deps.bzl | fmeum/bazel | 20269a6b298c0db7dc155ccb1b3e76ddfe717e00 | [
"Apache-2.0"
] | 1 | 2022-03-22T11:55:06.000Z | 2022-03-22T11:55:06.000Z | distdir_deps.bzl | fmeum/bazel | 20269a6b298c0db7dc155ccb1b3e76ddfe717e00 | [
"Apache-2.0"
] | null | null | null | distdir_deps.bzl | fmeum/bazel | 20269a6b298c0db7dc155ccb1b3e76ddfe717e00 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 42.374821 | 168 | 0.617218 |
a814fe0dc50764a8cb1259d552ae11a6348b0ac5 | 5,215 | py | Python | synapse/tools/ingest.py | larrycameron80/synapse | 24bf21c40b4a467e5dc28c8204aecaf502d5cddf | [
"Apache-2.0"
] | null | null | null | synapse/tools/ingest.py | larrycameron80/synapse | 24bf21c40b4a467e5dc28c8204aecaf502d5cddf | [
"Apache-2.0"
] | 4 | 2017-10-03T21:50:40.000Z | 2017-11-20T15:49:38.000Z | synapse/tools/ingest.py | larrycameron80/synapse | 24bf21c40b4a467e5dc28c8204aecaf502d5cddf | [
"Apache-2.0"
] | null | null | null | import sys
import time
import argparse
import collections
import synapse.common as s_common
import synapse.cortex as s_cortex
import synapse.telepath as s_telepath
import synapse.lib.cmdr as s_cmdr
import synapse.lib.tufo as s_tufo
import synapse.lib.ingest as s_ingest
import synapse.lib.output as s_output
def main(... | 31.79878 | 132 | 0.587152 |
bbfd1c7ba1321f37767ca9e70c824aa0d6f4fb46 | 538 | py | Python | flower/api/__init__.py | alexsilva/flower | f9a2040ce9e011fc0d2c01c0c6a2df6dd3faac0b | [
"BSD-3-Clause"
] | 7 | 2019-10-07T11:16:06.000Z | 2021-09-24T11:57:56.000Z | flower/api/__init__.py | alexsilva/flower | f9a2040ce9e011fc0d2c01c0c6a2df6dd3faac0b | [
"BSD-3-Clause"
] | null | null | null | flower/api/__init__.py | alexsilva/flower | f9a2040ce9e011fc0d2c01c0c6a2df6dd3faac0b | [
"BSD-3-Clause"
] | 8 | 2019-08-27T16:05:32.000Z | 2021-12-15T17:29:03.000Z | from __future__ import absolute_import
class BaseWebSocketHandler(object):
# listeners = [], should be created in derived class
listeners = []
def open(self):
listeners = self.listeners
listeners.append(self)
def on_message(self, message):
pass
def on_close(self):
... | 21.52 | 56 | 0.633829 |
473e41e82d499b3ced5f5411f0cc6f107e5b0adc | 805 | py | Python | Alfred/manage.py | janakrajchadha/A.L.F.R.E.D | e924a5be5ae53ec41b4d666fb343580e2ac3c7a8 | [
"MIT"
] | null | null | null | Alfred/manage.py | janakrajchadha/A.L.F.R.E.D | e924a5be5ae53ec41b4d666fb343580e2ac3c7a8 | [
"MIT"
] | null | null | null | Alfred/manage.py | janakrajchadha/A.L.F.R.E.D | e924a5be5ae53ec41b4d666fb343580e2ac3c7a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "prodbot.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... | 35 | 77 | 0.642236 |
cb29ad0541078c3119819010dc235fd9be3726a4 | 12,430 | py | Python | server_mysql.py | balajirama/private_wall | ffa5b4efbe098823fbbace4d7a607e8861446c71 | [
"MIT"
] | null | null | null | server_mysql.py | balajirama/private_wall | ffa5b4efbe098823fbbace4d7a607e8861446c71 | [
"MIT"
] | null | null | null | server_mysql.py | balajirama/private_wall | ffa5b4efbe098823fbbace4d7a607e8861446c71 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, session, flash, get_flashed_messages
from flask_bcrypt import Bcrypt
from mysqlconnection import connectToMySQL
from datetime import datetime
import re
import os
import my_utils
app = Flask(__name__)
bcrypt = Bcrypt(app)
app.secret_key = 'darksecret'
dbname... | 43.461538 | 341 | 0.636122 |
81c1927fb60d02cb22a7196eb2d6d734a0f547e9 | 9,797 | py | Python | veles/external/kitchen/text/converters.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 1,007 | 2015-07-20T12:01:41.000Z | 2022-03-30T23:08:35.000Z | veles/external/kitchen/text/converters.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 52 | 2015-07-21T10:26:24.000Z | 2019-01-24T05:46:43.000Z | veles/external/kitchen/text/converters.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 235 | 2015-07-20T09:42:42.000Z | 2021-12-06T18:12:26.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Red Hat, Inc.
#
# kitchen is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# k... | 44.940367 | 90 | 0.645402 |
696999b6ba3c82d5f4805c47aad4bb9dd510d3d6 | 5,286 | py | Python | code/pytorch/methods/TD3.py | hzm2016/assistive-gym-robosuite | 5c529f4444cc386383618bfa584341740a8468f9 | [
"MIT"
] | 1 | 2021-11-22T07:45:28.000Z | 2021-11-22T07:45:28.000Z | code/pytorch/methods/TD3.py | hzm2016/assistive-gym-robosuite | 5c529f4444cc386383618bfa584341740a8468f9 | [
"MIT"
] | null | null | null | code/pytorch/methods/TD3.py | hzm2016/assistive-gym-robosuite | 5c529f4444cc386383618bfa584341740a8468f9 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.nn.functional as F
import glob
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# Implementation of Twin Delayed Deep Deterministic Policy Gradients (TD3)
# Paper: https://arxiv.org/ab... | 33.66879 | 97 | 0.687855 |
6937a8ada5c930df0e3c9e12b0cd2b3fdc61f651 | 527 | py | Python | oldest.py | Akash-manna/getting-started-with-python | eb3b4330a8ad6a41ebece48203c5554ac64c78c8 | [
"MIT"
] | 2 | 2019-03-04T12:23:21.000Z | 2021-06-08T13:22:26.000Z | oldest.py | Akash-manna/getting-started-with-python | eb3b4330a8ad6a41ebece48203c5554ac64c78c8 | [
"MIT"
] | null | null | null | oldest.py | Akash-manna/getting-started-with-python | eb3b4330a8ad6a41ebece48203c5554ac64c78c8 | [
"MIT"
] | 1 | 2019-03-04T12:23:22.000Z | 2019-03-04T12:23:22.000Z | #4. If the ages of Mr.X, Mr.Y and Mr.Z are inout through the keyboard, Write a Python program to determine the oldest person among them.
x = int(input("Enter the Age of Mr.X: "))
y = int(input("Enter the Age of Mr.Y: "))
z = int(input("Enter the Age of Mr.Z: "))
if (x>y)and (x>z):
print("The Oldest Person is Mr.X wi... | 35.133333 | 136 | 0.650854 |
08b6bd3b04308cbbd36bf3bfc4ddb6abf383c438 | 42,778 | py | Python | Wrapping/Generators/Python/itkExtras.py | jamesobutler/ITK | ddbaeae13c1711fcb3010b6e81b108cb10677875 | [
"Apache-2.0"
] | null | null | null | Wrapping/Generators/Python/itkExtras.py | jamesobutler/ITK | ddbaeae13c1711fcb3010b6e81b108cb10677875 | [
"Apache-2.0"
] | null | null | null | Wrapping/Generators/Python/itkExtras.py | jamesobutler/ITK | ddbaeae13c1711fcb3010b6e81b108cb10677875 | [
"Apache-2.0"
] | null | null | null | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | 33.896989 | 102 | 0.628711 |
6234526cd44af5a387e8b53426862041993f171d | 339 | py | Python | pretalx_view_as_raw_table/urls.py | s-light/pretalx-view_as_raw_table | bc36b8a9dfb4730d94f7d1f22459c93df918fb82 | [
"Apache-2.0"
] | null | null | null | pretalx_view_as_raw_table/urls.py | s-light/pretalx-view_as_raw_table | bc36b8a9dfb4730d94f7d1f22459c93df918fb82 | [
"Apache-2.0"
] | null | null | null | pretalx_view_as_raw_table/urls.py | s-light/pretalx-view_as_raw_table | bc36b8a9dfb4730d94f7d1f22459c93df918fb82 | [
"Apache-2.0"
] | null | null | null | """."""
from django.conf.urls import url
from pretalx.event.models.event import SLUG_CHARS
from .views import helloworld
# from .views import rawtable
urlpatterns = [
url(
f'^orga/event/(?P<event>[{SLUG_CHARS}]+)/raw_table',
helloworld.world,
# rawtable.RawTable.as_view(),
name='... | 18.833333 | 60 | 0.640118 |
437216401ff912c6037d586581484c556e77690b | 3,369 | py | Python | algs19_networkx_replacement/directed_graph.py | zhubaiyuan/learning-algorithms | ea9ee674878d535a9e9987c0d948c0357e0ed4da | [
"MIT"
] | null | null | null | algs19_networkx_replacement/directed_graph.py | zhubaiyuan/learning-algorithms | ea9ee674878d535a9e9987c0d948c0357e0ed4da | [
"MIT"
] | null | null | null | algs19_networkx_replacement/directed_graph.py | zhubaiyuan/learning-algorithms | ea9ee674878d535a9e9987c0d948c0357e0ed4da | [
"MIT"
] | null | null | null | # data associated with an edge can contain a weight
WEIGHT = 'weight'
class DirectedGraph:
"""
Use Dictionary to store all vertices. Values are lists of neighboring nodes.
"""
def __init__(self):
self.adjacency = {}
self.positions = {}
self.weights = {}
self.E = 0
... | 28.550847 | 80 | 0.511428 |
6ac7b8f5a262e9c40e10312453680f574601a4d2 | 2,233 | py | Python | fractal/contrib/kafka/event_bus.py | douwevandermeij/fractal | 66b04892b4d6fd8ee6a0c07b6e230f4321165085 | [
"MIT"
] | 2 | 2021-08-12T05:19:08.000Z | 2022-01-29T16:22:37.000Z | fractal/contrib/kafka/event_bus.py | douwevandermeij/fractal | 66b04892b4d6fd8ee6a0c07b6e230f4321165085 | [
"MIT"
] | null | null | null | fractal/contrib/kafka/event_bus.py | douwevandermeij/fractal | 66b04892b4d6fd8ee6a0c07b6e230f4321165085 | [
"MIT"
] | null | null | null | import json
import logging
import threading
from typing import List, Type
from kafka import KafkaConsumer
from fractal.core.command_bus.command_bus import CommandBus
from fractal.core.event_sourcing.event import ReceivingEvent
from fractal.core.event_sourcing.event_bus import EventBus
from fractal.core.event_sourcing... | 28.628205 | 81 | 0.614868 |
504ca3f1ba1bd965d91f7d00743c3981b774de37 | 2,568 | py | Python | build/lib/accounting/accounting/doctype/account/test_account.py | shariquerik/accounting | 74867a71918a99500fb78c75652841bcb8e509a1 | [
"MIT"
] | 3 | 2021-02-21T16:24:26.000Z | 2021-06-25T07:38:08.000Z | build/lib/accounting/accounting/doctype/account/test_account.py | shariquerik/accounting | 74867a71918a99500fb78c75652841bcb8e509a1 | [
"MIT"
] | null | null | null | build/lib/accounting/accounting/doctype/account/test_account.py | shariquerik/accounting | 74867a71918a99500fb78c75652841bcb8e509a1 | [
"MIT"
] | 1 | 2021-03-10T06:59:09.000Z | 2021-03-10T06:59:09.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Shariq and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
def create_accounts():
if not frappe.db.exists('Account', 'Company Root'):
frappe.get_doc({
'doctype': 'Account',
'account_name': 'Company Root',
'... | 26.474227 | 69 | 0.668224 |
2d1034144574a28a533c25f8e69dbf8dcb22e355 | 3,032 | py | Python | TextBox/compareFolders.py | kschweiger/ToolBox | 7531ec484f3185bcde56076eebd0a3ce6aaec22b | [
"MIT"
] | null | null | null | TextBox/compareFolders.py | kschweiger/ToolBox | 7531ec484f3185bcde56076eebd0a3ce6aaec22b | [
"MIT"
] | null | null | null | TextBox/compareFolders.py | kschweiger/ToolBox | 7531ec484f3185bcde56076eebd0a3ce6aaec22b | [
"MIT"
] | null | null | null | import glob
def main(folders, width, title):
files = {}
fileNames = {}
folderName = {}
filePaths = {}
fileSets = {}
for folder in folders:
folderName[folder] = folder.split("/")[-2] if folder.endswith("/") else folder.split("/")[-1]
files[folder] = glob.glob(folder+"/*.pdf")
... | 32.255319 | 114 | 0.5 |
7ed5516bf29427d7eb187e8ef71f36dd738d20c0 | 2,873 | py | Python | ohbehave/app.py | joeflack4/ohbehave | 4af4e3e3692c43a8c8196080ee86b4e0b912579e | [
"MIT"
] | null | null | null | ohbehave/app.py | joeflack4/ohbehave | 4af4e3e3692c43a8c8196080ee86b4e0b912579e | [
"MIT"
] | null | null | null | ohbehave/app.py | joeflack4/ohbehave | 4af4e3e3692c43a8c8196080ee86b4e0b912579e | [
"MIT"
] | null | null | null | """Application Source Code
Comments from boilerplate author
# run following in command
# gunicorn graph:app.server -b :8000
# Resources
See: data/google_sheets.py (docstring)
"""
# ------------------------------ Import Libraries -----------------------------
from dash import dash, dash_table, html
# from dash import ... | 33.022989 | 79 | 0.545075 |
5170d0e4b00d8c4f26d944978f7420e50f4dc021 | 20,976 | py | Python | ana/pmt/ddpart.py | hanswenzel/opticks | b75b5929b6cf36a5eedeffb3031af2920f75f9f0 | [
"Apache-2.0"
] | 11 | 2020-07-05T02:39:32.000Z | 2022-03-20T18:52:44.000Z | ana/pmt/ddpart.py | hanswenzel/opticks | b75b5929b6cf36a5eedeffb3031af2920f75f9f0 | [
"Apache-2.0"
] | null | null | null | ana/pmt/ddpart.py | hanswenzel/opticks | b75b5929b6cf36a5eedeffb3031af2920f75f9f0 | [
"Apache-2.0"
] | 4 | 2020-09-03T20:36:32.000Z | 2022-01-19T07:42:21.000Z | #!/usr/bin/env python
#
# Copyright (c) 2019 Opticks Team. All Rights Reserved.
#
# This file is part of Opticks
# (see https://bitbucket.org/simoncblyth/opticks).
#
# 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... | 29.880342 | 158 | 0.549199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.