hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a0551500b3c2d01b7a509b573d09f5adffb97a6 | 2,982 | py | Python | test/calibration/experiments/test_rough_frequency.py | LaurinFischer/qiskit-experiments | d8202f4eeb76df04855b024c1127a7d901a34da3 | [
"Apache-2.0"
] | 1 | 2022-03-31T06:56:04.000Z | 2022-03-31T06:56:04.000Z | test/calibration/experiments/test_rough_frequency.py | matteoacrossi/qiskit-experiments | 44d249ff2ec2e90cd630431f66e560528572815e | [
"Apache-2.0"
] | null | null | null | test/calibration/experiments/test_rough_frequency.py | matteoacrossi/qiskit-experiments | 44d249ff2ec2e90cd630431f66e560528572815e | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 38.230769 | 95 | 0.716968 |
4a0551ba8e8175e4ae15d924ce4f3e54f3e57618 | 7,996 | py | Python | week5/retrieval.py | IanRiera/MCV_Museum-Painting-Retrieval | 655db26107b81810d485de7d308eefb7322992fc | [
"MIT"
] | null | null | null | week5/retrieval.py | IanRiera/MCV_Museum-Painting-Retrieval | 655db26107b81810d485de7d308eefb7322992fc | [
"MIT"
] | 1 | 2020-10-21T16:08:40.000Z | 2020-10-21T16:08:40.000Z | week5/retrieval.py | IanRiera/MCV_Museum-Painting-Retrieval | 655db26107b81810d485de7d308eefb7322992fc | [
"MIT"
] | null | null | null | import os
import cv2 as cv
import numpy as np
from tqdm import tqdm
import os
import multiprocessing.dummy as mp
from functools import partial
from itertools import repeat
import week5.masks as masks
import week5.histograms as histograms
import week5.text_boxes as text_boxes_detection
import week5.noise_removal as no... | 48.168675 | 125 | 0.557029 |
4a05535545114bf5d1525030a078f8cf91148c73 | 570 | py | Python | packages/python/plotly/plotly/validators/scattergl/marker/_color.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/scattergl/marker/_color.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/scattergl/marker/_color.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="color", parent_name="scattergl.marker", **kwargs):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 35.625 | 86 | 0.633333 |
4a0553d9c9cae084e1c40ff6fd68da6393584397 | 4,240 | py | Python | tests/parser_tests/test_parserTests.py | clokep/mwcomposerfromhell | 02ba160ad55ee7fc1b69834cd5cb256e98a52648 | [
"0BSD"
] | 3 | 2019-10-03T06:46:19.000Z | 2021-09-25T13:39:32.000Z | tests/parser_tests/test_parserTests.py | clokep/mwcomposerfromhell | 02ba160ad55ee7fc1b69834cd5cb256e98a52648 | [
"0BSD"
] | 1 | 2020-03-18T07:24:28.000Z | 2020-05-07T11:58:59.000Z | tests/parser_tests/test_parserTests.py | clokep/mwcomposerfromhell | 02ba160ad55ee7fc1b69834cd5cb256e98a52648 | [
"0BSD"
] | 1 | 2021-07-05T11:30:13.000Z | 2021-07-05T11:30:13.000Z | from collections import defaultdict
from datetime import datetime
from pathlib import Path
import mwparserfromhell
import pytest
from mwcomposerfromhell import ArticleResolver, Namespace, WikicodeToHtmlComposer
from mwcomposerfromhell.parser_tests_parser import MediaWikiParserTestsParser
from tests import patch_datet... | 32.615385 | 86 | 0.673821 |
4a0555a4d6410b38f36aea3d4227c1f6ae1ed3b3 | 391 | py | Python | django/hypatia/wsgi.py | arunchaganty/odd-nails | d3667ea666c02b7a71af1c26c4b22b9f4ab4c7c0 | [
"Apache-2.0"
] | null | null | null | django/hypatia/wsgi.py | arunchaganty/odd-nails | d3667ea666c02b7a71af1c26c4b22b9f4ab4c7c0 | [
"Apache-2.0"
] | 1 | 2016-08-03T12:44:05.000Z | 2016-08-04T06:10:31.000Z | django/hypatia/wsgi.py | arunchaganty/hypatia | d3667ea666c02b7a71af1c26c4b22b9f4ab4c7c0 | [
"Apache-2.0"
] | null | null | null | """
WSGI config for hypatia project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTI... | 23 | 78 | 0.787724 |
4a0555abbe09670f29bdff1daf337673e1e3b634 | 332 | py | Python | fadoilulmun-im/liniearSearch.py | mochhilmi/KumpulanAlgoritma | 7d92b94ce9e5559b5c3882b7b31dbe672621dce4 | [
"MIT"
] | 4 | 2020-10-10T12:24:10.000Z | 2020-10-13T05:32:41.000Z | fadoilulmun-im/liniearSearch.py | mochhilmi/KumpulanAlgoritma | 7d92b94ce9e5559b5c3882b7b31dbe672621dce4 | [
"MIT"
] | 11 | 2020-10-06T11:29:17.000Z | 2020-10-16T07:50:15.000Z | fadoilulmun-im/liniearSearch.py | mochhilmi/KumpulanAlgoritma | 7d92b94ce9e5559b5c3882b7b31dbe672621dce4 | [
"MIT"
] | 10 | 2020-10-06T11:26:04.000Z | 2020-10-13T02:27:24.000Z | def linierSearch(arr, n, x):
for i in range(0, n):
if arr[i] == x:
return i
return False
arr = [1, 3, 6, 7, 10, 90]
ygdicari = 90
hasil = linierSearch(arr, len(arr), ygdicari)
if hasil:
print("Elemen di temukan di index ke", hasil)
else:
print("Elemen yang dicari tidak ada dalam a... | 19.529412 | 53 | 0.593373 |
4a0555bf4843ab7da52cdbdd1f17e70e99346c16 | 35,410 | py | Python | lib/sqlalchemy/sql/crud.py | brussee/sqlalchemy | 5e3357c70e419c244156ac3885b2cf784b5b3fc0 | [
"MIT"
] | null | null | null | lib/sqlalchemy/sql/crud.py | brussee/sqlalchemy | 5e3357c70e419c244156ac3885b2cf784b5b3fc0 | [
"MIT"
] | null | null | null | lib/sqlalchemy/sql/crud.py | brussee/sqlalchemy | 5e3357c70e419c244156ac3885b2cf784b5b3fc0 | [
"MIT"
] | null | null | null | # sql/crud.py
# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""Functions used by compiler.py to determine the parameters rendered
within INSERT and... | 32.756707 | 79 | 0.580457 |
4a0555d87c495a969ea79075a643bfa62887d159 | 8,966 | py | Python | train_BootrapEnsemble_MNIST.py | Neronjust2017/Bayesian-neural-networks | 9d7f781f5c2dfa8fadf26300b4b5b64366c939cd | [
"MIT"
] | 4 | 2020-07-07T12:29:03.000Z | 2021-11-17T07:20:17.000Z | train_BootrapEnsemble_MNIST.py | Neronjust2017/Bayesian-neural-networks | 9d7f781f5c2dfa8fadf26300b4b5b64366c939cd | [
"MIT"
] | null | null | null | train_BootrapEnsemble_MNIST.py | Neronjust2017/Bayesian-neural-networks | 9d7f781f5c2dfa8fadf26300b4b5b64366c939cd | [
"MIT"
] | 1 | 2020-05-29T08:07:48.000Z | 2020-05-29T08:07:48.000Z | from __future__ import division, print_function
import time
import torch.utils.data
from torchvision import transforms, datasets
import argparse
import matplotlib
from src.Bootstrap_Ensemble.model import *
import copy
matplotlib.use('Agg')
import matplotlib.pyplot as plt
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
pars... | 37.049587 | 124 | 0.56915 |
4a0556325bbedd93834ead784e53f8dbd1e078d9 | 441 | py | Python | quest/urls.py | syeddanish41/MedLense | c2b4dea3c00dce56eaaf309ccbbb62edbacf2ab6 | [
"MIT"
] | 3 | 2018-09-24T09:47:36.000Z | 2018-11-27T18:06:03.000Z | quest/urls.py | syeddanish41/MedLens | c2b4dea3c00dce56eaaf309ccbbb62edbacf2ab6 | [
"MIT"
] | 1 | 2021-06-10T20:47:05.000Z | 2021-06-10T20:47:05.000Z | quest/urls.py | syeddanish41/MedLens | c2b4dea3c00dce56eaaf309ccbbb62edbacf2ab6 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
# changed view.index to view.run_mob
url(r'^$', views.run_query, name = 'index'),
#url(r'^form/', views.get_name, name = 'get_name'),
# currently not in use
url(r'^explore/$', views.explore, name='explore'),
url(r'^explore_article/$', views.ex... | 36.75 | 78 | 0.707483 |
4a0556aa920d497b2c494cabc5a10eb4fd4a8a8b | 1,155 | py | Python | github/create/issue/src/formula/formula.py | rogerio-ignacio-developer/formulas-github | 12cf7401f31e4a6212289b839c02de1d612c8271 | [
"Apache-2.0"
] | 32 | 2021-01-27T17:43:23.000Z | 2022-03-23T18:00:41.000Z | github/create/issue/src/formula/formula.py | rogerio-ignacio-developer/formulas-github | 12cf7401f31e4a6212289b839c02de1d612c8271 | [
"Apache-2.0"
] | 12 | 2021-01-26T18:14:59.000Z | 2021-10-04T12:24:41.000Z | github/create/issue/src/formula/formula.py | rogerio-ignacio-developer/formulas-github | 12cf7401f31e4a6212289b839c02de1d612c8271 | [
"Apache-2.0"
] | 11 | 2021-01-28T13:54:24.000Z | 2022-03-16T12:16:27.000Z | #!/usr/bin/python3
import requests
import json
import re
def run(token, owner, repository, title, body, labels, assignees):
url = f"https://api.github.com/repos/{owner}/{repository}/issues"
data = {}
data["title"] = title
data["body"] = body
if labels not in (None, ''):
label_list = ... | 26.25 | 105 | 0.6 |
4a05573f9d2083a3ce8fe0fa19a5cfecb622d0d9 | 2,780 | py | Python | sleepify-dash/apps/app1.py | Sleepify/Sleepify | ed45fd39410650e719f5171bc0542c87a48fc32e | [
"MIT"
] | null | null | null | sleepify-dash/apps/app1.py | Sleepify/Sleepify | ed45fd39410650e719f5171bc0542c87a48fc32e | [
"MIT"
] | null | null | null | sleepify-dash/apps/app1.py | Sleepify/Sleepify | ed45fd39410650e719f5171bc0542c87a48fc32e | [
"MIT"
] | null | null | null | import sys
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
from dash.dependencies import Input, Output
import pandas as pd
from os.path import dirname, join as path_join
from app import app
sys.path.insert(0, path_join(dirname(__file__), "..", ".."))
import base64
f... | 28.659794 | 94 | 0.534173 |
4a05577559422973c30b2fbb37c3f5c6453fcd7a | 4,083 | py | Python | configs/solov2/solov2_r50_fpn_8gpu_1x.py | damsalevente/SOLO | d045e0f5daf07e5ea582da6af2caf4075861e46b | [
"BSD-2-Clause"
] | null | null | null | configs/solov2/solov2_r50_fpn_8gpu_1x.py | damsalevente/SOLO | d045e0f5daf07e5ea582da6af2caf4075861e46b | [
"BSD-2-Clause"
] | null | null | null | configs/solov2/solov2_r50_fpn_8gpu_1x.py | damsalevente/SOLO | d045e0f5daf07e5ea582da6af2caf4075861e46b | [
"BSD-2-Clause"
] | null | null | null | # model settings
model = dict(
type='SOLOv2',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3), # C2, C3, C4, C5
frozen_stages=1,
style='pytorch'),
neck=dict(
type='FPN',
in... | 30.470149 | 96 | 0.609846 |
4a055782537fef5b7387a07f831876a8992daac9 | 53,552 | py | Python | cardinal_pythonlib/psychiatry/drugs.py | bopopescu/pythonlib | 9c2187d6092ba133342ca3374eb7c86f9d296c30 | [
"Apache-2.0"
] | null | null | null | cardinal_pythonlib/psychiatry/drugs.py | bopopescu/pythonlib | 9c2187d6092ba133342ca3374eb7c86f9d296c30 | [
"Apache-2.0"
] | null | null | null | cardinal_pythonlib/psychiatry/drugs.py | bopopescu/pythonlib | 9c2187d6092ba133342ca3374eb7c86f9d296c30 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# cardinal_pythonlib/psychiatry/drugs.py
"""
===============================================================================
Original code copyright (C) 2009-2020 Rudolf Cardinal (rudolf@pobox.com).
This file is part of cardinal_pythonlib.
Licensed under the Apache License, Version... | 36.85616 | 124 | 0.546291 |
4a0557dfcae7790a91fe64268f925c93437f8782 | 2,606 | py | Python | pypeln/task/api/ordered.py | Davidnet/pypeln | 6e1295c2ac7914dadfa546a937537aa2c2a5978d | [
"MIT"
] | null | null | null | pypeln/task/api/ordered.py | Davidnet/pypeln | 6e1295c2ac7914dadfa546a937537aa2c2a5978d | [
"MIT"
] | null | null | null | pypeln/task/api/ordered.py | Davidnet/pypeln | 6e1295c2ac7914dadfa546a937537aa2c2a5978d | [
"MIT"
] | null | null | null | import typing as tp
from pypeln import utils as pypeln_utils
from pypeln.utils import A, B, T
from ..stage import Stage
from ..worker import ProcessFn, Worker
from .to_stage import to_stage
class Ordered(tp.NamedTuple):
async def __call__(self, worker: Worker, **kwargs):
elems = []
async for e... | 26.323232 | 169 | 0.605909 |
4a0557f7a960b0dcee83cd7ce052bafa0500ed95 | 2,183 | py | Python | src/sentry/tasks/store.py | vperron/sentry | 4ea0c8cb120a3165f0e0b185c64213b69ab621ea | [
"BSD-3-Clause"
] | null | null | null | src/sentry/tasks/store.py | vperron/sentry | 4ea0c8cb120a3165f0e0b185c64213b69ab621ea | [
"BSD-3-Clause"
] | null | null | null | src/sentry/tasks/store.py | vperron/sentry | 4ea0c8cb120a3165f0e0b185c64213b69ab621ea | [
"BSD-3-Clause"
] | null | null | null | """
sentry.tasks.store
~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from celery.utils.log import get_task_logger
from time import time
from sentry.cache import default_cache
from... | 26.950617 | 88 | 0.67934 |
4a0558ad3382ccb1a278142cb5237ca0dd9e06ca | 1,329 | py | Python | old/realsense.py | ostapstephan/SeniorProject | f0d3f8067dec98474641c6ec3696dbd86f066a51 | [
"MIT"
] | 1 | 2018-10-03T00:30:34.000Z | 2018-10-03T00:30:34.000Z | old/realsense.py | ostapstephan/SeniorProject | f0d3f8067dec98474641c6ec3696dbd86f066a51 | [
"MIT"
] | null | null | null | old/realsense.py | ostapstephan/SeniorProject | f0d3f8067dec98474641c6ec3696dbd86f066a51 | [
"MIT"
] | null | null | null | import pyrealsense2 as rs
import numpy as np
import cv2
# Configure depth and color streams
pipeline = rs.pipeline()
config = rs.config()
# config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30)
config.enable_stream(rs.stream.color, 640, 480, rs.format.bgr8, 30)
# config.enable_all_streams()
# Start strea... | 29.533333 | 108 | 0.680963 |
4a05590389623c4020d742051e5fdc73246d818f | 1,672 | py | Python | src/config.py | rohit04saluja/pinetmonitor | 286eb763ba4142438b63cffec8afafe4983e502c | [
"MIT"
] | null | null | null | src/config.py | rohit04saluja/pinetmonitor | 286eb763ba4142438b63cffec8afafe4983e502c | [
"MIT"
] | null | null | null | src/config.py | rohit04saluja/pinetmonitor | 286eb763ba4142438b63cffec8afafe4983e502c | [
"MIT"
] | null | null | null | import os, json, sys, logging
class Telegram :
def __init__ (self, config) :
self.access_token = config['access_token']
self.chat_id = config['chat_id']
self.messages = config['messages']
class Config :
def __init__ (self, configPath=os.path.expanduser("~")+"/.pinetmonitorconfig.json")... | 44 | 100 | 0.600478 |
4a055955938b67d7ef0cb905e02d88f67948dae8 | 100 | py | Python | tests/conftest.py | erobic/MetaNN | f229cde5754c3826045ceabba04d4d4e55d918b5 | [
"MIT"
] | 22 | 2019-06-13T08:21:54.000Z | 2022-01-18T12:43:43.000Z | tests/conftest.py | erobic/MetaNN | f229cde5754c3826045ceabba04d4d4e55d918b5 | [
"MIT"
] | 6 | 2019-08-14T23:13:56.000Z | 2021-06-18T02:12:31.000Z | tests/conftest.py | erobic/MetaNN | f229cde5754c3826045ceabba04d4d4e55d918b5 | [
"MIT"
] | 6 | 2019-06-13T08:27:57.000Z | 2021-12-20T12:38:09.000Z | import sys, os
sys.path.append((os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))))
| 20 | 82 | 0.68 |
4a055acaf4366c021268f052cf314f579e9bd0b2 | 53 | py | Python | utils/__init__.py | yz-cnsdqz/MOJO-release | 476b40c8111861c6ab6b193a68e634d9aeb4e407 | [
"MIT"
] | 58 | 2021-06-18T17:00:06.000Z | 2022-03-20T12:21:12.000Z | utils/__init__.py | wei-mao-2019/gsps | 7f8de905f49bc739747174ade343a431ec8fe74e | [
"MIT"
] | 5 | 2021-09-10T07:04:38.000Z | 2022-01-18T17:35:00.000Z | utils/__init__.py | wei-mao-2019/gsps | 7f8de905f49bc739747174ade343a431ec8fe74e | [
"MIT"
] | 3 | 2021-06-24T04:04:07.000Z | 2021-06-30T14:22:54.000Z | from utils.torch import *
from utils.logger import *
| 17.666667 | 26 | 0.773585 |
4a055ad8589444634474bb8879b24b7c7c1f02da | 7,444 | py | Python | oscarapi/serializers/product.py | remintz/django-oscar-api | 3a378f29bab8e450230cd23b77f2dff35b5d445a | [
"BSD-3-Clause"
] | null | null | null | oscarapi/serializers/product.py | remintz/django-oscar-api | 3a378f29bab8e450230cd23b77f2dff35b5d445a | [
"BSD-3-Clause"
] | null | null | null | oscarapi/serializers/product.py | remintz/django-oscar-api | 3a378f29bab8e450230cd23b77f2dff35b5d445a | [
"BSD-3-Clause"
] | null | null | null | from rest_framework import serializers
from django.utils.translation import ugettext as _
from oscarapi.utils import (
OscarModelSerializer,
overridable,
OscarHyperlinkedModelSerializer
)
from oscar.core.loading import get_model
Product = get_model('catalogue', 'Product')
ProductClass = get_model('catalo... | 36.851485 | 86 | 0.686459 |
4a055b07662a9999827aff44cb388db06daf970b | 14,013 | py | Python | wrkzcoin/daemon.py | wrkzcoin/wrkzcoin-rpc-python | 270607adfbab65b13f5560dd46269859d95e563f | [
"MIT"
] | 1 | 2021-12-08T10:47:21.000Z | 2021-12-08T10:47:21.000Z | wrkzcoin/daemon.py | wrkzcoin/wrkzcoin-rpc-python | 270607adfbab65b13f5560dd46269859d95e563f | [
"MIT"
] | null | null | null | wrkzcoin/daemon.py | wrkzcoin/wrkzcoin-rpc-python | 270607adfbab65b13f5560dd46269859d95e563f | [
"MIT"
] | null | null | null | import logging
import aiohttp
import asyncio
import json
from typing import Dict
class Daemon:
"""
Integrates with JSON-RPC interface of `Wrkzd`.
"""
def __init__(self, host='127.0.0.1', port=17856):
self.url = f'http://{host}:{port}'
self.headers = {'content-type': 'application/json'... | 30.200431 | 118 | 0.426033 |
4a055b162109346f6f817c6542fd74c3a211ea24 | 404 | py | Python | ChessDRF/server/migrations/0003_game_has_transformation.py | Pythongor/Chess-DRF | d8dedd9fa6db85c00e6e3ee4c63729448a9bfba5 | [
"MIT"
] | null | null | null | ChessDRF/server/migrations/0003_game_has_transformation.py | Pythongor/Chess-DRF | d8dedd9fa6db85c00e6e3ee4c63729448a9bfba5 | [
"MIT"
] | 3 | 2021-09-08T03:38:52.000Z | 2022-01-13T03:57:08.000Z | ChessDRF/server/migrations/0003_game_has_transformation.py | Pythongor/Chess-DRF | d8dedd9fa6db85c00e6e3ee4c63729448a9bfba5 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-10-22 09:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('server', '0002_remove_game_transformation'),
]
operations = [
migrations.AddField(
model_name='game',
name='has_tran... | 21.263158 | 54 | 0.616337 |
4a055c4727ef2151734bc3bdd3ae09d3053e0dbc | 6,408 | py | Python | testscripts/RDKB/component/CosaCM/TS_COSACM_GetMDDIPOverride.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/CosaCM/TS_COSACM_GetMDDIPOverride.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/CosaCM/TS_COSACM_GetMDDIPOverride.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2016 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 46.434783 | 322 | 0.732834 |
4a055c9e5399f24a8e67ca71fc5952460f3f627f | 5,234 | py | Python | hagelslag/util/merge_forecast_data.py | djgagne/hagelslag | 57d1051fa3816ae3a5162702cc7f992ffe2c8408 | [
"MIT"
] | 50 | 2016-01-22T23:59:41.000Z | 2022-03-29T12:15:48.000Z | hagelslag/util/merge_forecast_data.py | djgagne/hagelslag | 57d1051fa3816ae3a5162702cc7f992ffe2c8408 | [
"MIT"
] | 20 | 2016-10-25T20:31:26.000Z | 2022-02-28T18:12:01.000Z | hagelslag/util/merge_forecast_data.py | djgagne/hagelslag | 57d1051fa3816ae3a5162702cc7f992ffe2c8408 | [
"MIT"
] | 25 | 2016-07-13T19:06:56.000Z | 2021-12-26T15:26:56.000Z | import argparse
import json
import traceback
from datetime import datetime
from glob import glob
from multiprocessing import Pool
from os.path import exists
import pandas as pd
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--csv", help="CSV data file directory")
parser.add_arg... | 45.912281 | 117 | 0.603554 |
4a055ddfa8c05e7f3f0bd7cf8835984585120f0c | 802 | py | Python | rocket_connect/envelope/migrations/0002_auto_20210404_1915.py | crashbr/rocket.connect | e24914403d0717748501bc3a66a358429372adad | [
"MIT"
] | 23 | 2021-04-15T23:19:51.000Z | 2022-02-21T19:58:31.000Z | rocket_connect/envelope/migrations/0002_auto_20210404_1915.py | crashbr/rocket.connect | e24914403d0717748501bc3a66a358429372adad | [
"MIT"
] | 30 | 2021-04-14T22:04:20.000Z | 2022-03-28T11:22:08.000Z | rocket_connect/envelope/migrations/0002_auto_20210404_1915.py | crashbr/rocket.connect | e24914403d0717748501bc3a66a358429372adad | [
"MIT"
] | 5 | 2021-04-16T14:50:32.000Z | 2022-03-11T23:50:59.000Z | # Generated by Django 3.1.7 on 2021-04-04 19:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('envelope', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='message',
name='type',
fie... | 33.416667 | 255 | 0.629676 |
4a055e3cfac3c4a538e023790f936f4f127777fa | 2,133 | py | Python | frames/hashing.py | Hellowlol/frames | 32ec0fbb997fd13ffda2aeef0c2b3c319a96b389 | [
"MIT"
] | 2 | 2019-03-17T00:50:43.000Z | 2019-06-11T14:04:37.000Z | frames/hashing.py | Hellowlol/frames | 32ec0fbb997fd13ffda2aeef0c2b3c319a96b389 | [
"MIT"
] | 1 | 2019-03-24T18:27:27.000Z | 2019-03-24T18:27:27.000Z | frames/hashing.py | Hellowlol/frames | 32ec0fbb997fd13ffda2aeef0c2b3c319a96b389 | [
"MIT"
] | null | null | null | import binascii
import io
import cv2
import numpy as np
from frames.video import video_frame_by_frame
image_type = ('.png', '.jpeg', '.jpg')
def _binary_array_to_hex(arr):
return binascii.hexlify(arr.flatten()).decode('ascii')
class ImageHash(object):
"""
Hash encapsulation. Can be used for dictiona... | 25.094118 | 104 | 0.631036 |
4a055ec19857882757d433ebca446ab201036be1 | 15,860 | py | Python | geoalchemy2/types.py | andriyor/geoalchemy2 | 6f165b414ccdd6a19349d018db3f0c58a10a1daf | [
"MIT"
] | 1 | 2022-02-01T23:52:06.000Z | 2022-02-01T23:52:06.000Z | geoalchemy2/types.py | krisHans3n/geoalchemy2 | 604c1fcc824d243698ca46227fd05a8cbbb9db2c | [
"MIT"
] | null | null | null | geoalchemy2/types.py | krisHans3n/geoalchemy2 | 604c1fcc824d243698ca46227fd05a8cbbb9db2c | [
"MIT"
] | null | null | null | """ This module defines the :class:`geoalchemy2.types.Geometry`,
:class:`geoalchemy2.types.Geography`, and :class:`geoalchemy2.types.Raster`
classes, that are used when defining geometry, geography and raster
columns/properties in models.
Reference
---------
"""
import warnings
from sqlalchemy.dialects import postgre... | 35.166297 | 100 | 0.625032 |
4a055f2e362901b68886d484f55f60d8c8b6ef62 | 433 | py | Python | tests/managers.py | unchris/django-model-utils | c9c04da1b2b19c44aa2349697b3d07b38c7b34a5 | [
"BSD-3-Clause"
] | 1 | 2017-03-05T01:43:57.000Z | 2017-03-05T01:43:57.000Z | tests/managers.py | unchris/django-model-utils | c9c04da1b2b19c44aa2349697b3d07b38c7b34a5 | [
"BSD-3-Clause"
] | 1 | 2019-08-07T14:32:26.000Z | 2019-08-07T14:32:26.000Z | tests/managers.py | unchris/django-model-utils | c9c04da1b2b19c44aa2349697b3d07b38c7b34a5 | [
"BSD-3-Clause"
] | 1 | 2019-11-04T22:51:26.000Z | 2019-11-04T22:51:26.000Z | from __future__ import unicode_literals, absolute_import
from model_utils.managers import SoftDeletableQuerySet, SoftDeletableManager
class CustomSoftDeleteQuerySet(SoftDeletableQuerySet):
def only_read(self):
return self.filter(is_read=True)
class CustomSoftDeleteManager(SoftDeletableManager):
_qu... | 27.0625 | 76 | 0.803695 |
4a055f56d1bfdd18b991668b0488eb1bfd1e4cc5 | 14,498 | py | Python | indico/modules/rb/models/reservations_test.py | bkmgit/indico | d77ee121e35880a416b9b05e6098ea912d870b5c | [
"MIT"
] | 1 | 2021-06-11T20:02:10.000Z | 2021-06-11T20:02:10.000Z | indico/modules/rb/models/reservations_test.py | bkmgit/indico | d77ee121e35880a416b9b05e6098ea912d870b5c | [
"MIT"
] | null | null | null | indico/modules/rb/models/reservations_test.py | bkmgit/indico | d77ee121e35880a416b9b05e6098ea912d870b5c | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2022 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from datetime import date, datetime, time
import pytest
from dateutil.relativedelta import relativedelta
... | 46.319489 | 120 | 0.665885 |
4a055fb4ae8f463d5fcaa7cfa42077df18f4f8c6 | 15,302 | py | Python | nyc-311.py | vigneshmanikandan97/nyc-311 | 1e0b158168bb77de180164427850c1b97492221e | [
"MIT"
] | 2 | 2021-04-10T18:09:09.000Z | 2021-04-10T18:09:16.000Z | nyc-311.py | vigneshmanikandan97/nyc-311 | 1e0b158168bb77de180164427850c1b97492221e | [
"MIT"
] | null | null | null | nyc-311.py | vigneshmanikandan97/nyc-311 | 1e0b158168bb77de180164427850c1b97492221e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[152]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# In[153]:
# Import CSV using pandas
nyc_df = pd.read_csv("311_Service_Requests_from_2010_to_Present.csv", low_memory = False)
# <h1>Data Analysis</h1>
# <h3>Identifyin... | 30.421471 | 186 | 0.724154 |
4a056037b52d835ca854cdf47d954d244e142bc4 | 769 | py | Python | src/directory/forms.py | Aleksander-Protasevich/django_project | 49d7b0f5e86d544f94340d8343995f6d4b70bbd8 | [
"Apache-2.0"
] | null | null | null | src/directory/forms.py | Aleksander-Protasevich/django_project | 49d7b0f5e86d544f94340d8343995f6d4b70bbd8 | [
"Apache-2.0"
] | null | null | null | src/directory/forms.py | Aleksander-Protasevich/django_project | 49d7b0f5e86d544f94340d8343995f6d4b70bbd8 | [
"Apache-2.0"
] | null | null | null | from django import forms
from django.db.models import fields
from . import models
class AuthorForm(forms.ModelForm):
class Meta:
model = models.Author
fields=('name', 'country')
# def clean(self):
# cleaned_data = super().clean()
# name = cleaned_data.get('name')
# if n... | 23.30303 | 59 | 0.603381 |
4a056082c16a177c7d727527c39e1f1e8d3e9ab9 | 572 | py | Python | shell/util.py | houqp/shell.py | 2b364900db3e2f2c542f21f8c979acd2a3b439b2 | [
"MIT"
] | 42 | 2015-01-08T04:46:03.000Z | 2022-03-06T07:35:04.000Z | shell/util.py | houqp/shell.py | 2b364900db3e2f2c542f21f8c979acd2a3b439b2 | [
"MIT"
] | 2 | 2015-06-04T08:53:43.000Z | 2015-06-08T07:08:51.000Z | shell/util.py | houqp/shell.py | 2b364900db3e2f2c542f21f8c979acd2a3b439b2 | [
"MIT"
] | 7 | 2015-06-03T19:09:53.000Z | 2021-11-27T05:42:23.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import tempfile
from .compat import is_py2, is_py3
def str_to_pipe(s):
input_pipe = tempfile.SpooledTemporaryFile()
if (is_py2 and isinstance(s, unicode)) or (is_py3 and isinstance(s, str)):
s = s.encode('utf-8')
input_pipe.write(s)
input_pipe.see... | 19.066667 | 78 | 0.653846 |
4a0560f7857822ab0ec95d5b62381635dd32212b | 1,762 | py | Python | cvat/settings/testing.py | raunilillemets/cvat | c083b5d3a60270121abc3f3fe596ff94ae0eb60f | [
"MIT"
] | 2 | 2020-01-10T08:50:50.000Z | 2020-01-23T06:11:11.000Z | cvat/settings/testing.py | raunilillemets/cvat | c083b5d3a60270121abc3f3fe596ff94ae0eb60f | [
"MIT"
] | 29 | 2020-01-28T23:08:18.000Z | 2022-03-12T00:05:33.000Z | cvat/settings/testing.py | maitreyamaity/CVAT-SIM-TEST | 6b97145c8f4584d9ad40a4b6541424955e272e42 | [
"MIT"
] | 7 | 2021-07-27T09:15:22.000Z | 2022-03-29T21:20:00.000Z | # Copyright (C) 2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
from .development import *
import tempfile
_temp_dir = tempfile.TemporaryDirectory(suffix="cvat")
DATA_ROOT = os.path.join(_temp_dir.name, 'data')
os.makedirs(DATA_ROOT, exist_ok=True)
SHARE_ROOT = os.path.join(_temp_dir.name, 'share')
os.makedi... | 34.54902 | 80 | 0.727582 |
4a0561338eb58ed60f1fa0212343c7164a2fdf70 | 117 | py | Python | docker/opencv-prebuilt/lib/python3.8/site-packages/cv2/config.py | ndtg-ai/docker-opencv-cpp | 21fe1d9c882cf10ef5f5e48eabe53686b95885dd | [
"MIT"
] | null | null | null | docker/opencv-prebuilt/lib/python3.8/site-packages/cv2/config.py | ndtg-ai/docker-opencv-cpp | 21fe1d9c882cf10ef5f5e48eabe53686b95885dd | [
"MIT"
] | null | null | null | docker/opencv-prebuilt/lib/python3.8/site-packages/cv2/config.py | ndtg-ai/docker-opencv-cpp | 21fe1d9c882cf10ef5f5e48eabe53686b95885dd | [
"MIT"
] | null | null | null | import os
BINARIES_PATHS = [
os.path.join(os.path.join(LOADER_DIR, '../../../../'), 'lib64')
] + BINARIES_PATHS
| 19.5 | 67 | 0.606838 |
4a056158abac281a805223304d5067ea5d8f11ac | 208 | py | Python | trials_colab/stack_gan_trials/main.py | bkemmer/GSoC-TensorFlow-2019 | 9bde2939ee073504630e2810496aae3618b5afa2 | [
"Apache-2.0"
] | 5 | 2021-07-08T15:49:58.000Z | 2022-03-15T11:18:57.000Z | trials_colab/stack_gan_trials/main.py | bkemmer/GSoC-TensorFlow-2019 | 9bde2939ee073504630e2810496aae3618b5afa2 | [
"Apache-2.0"
] | 13 | 2021-04-25T03:32:53.000Z | 2022-03-11T23:53:16.000Z | trials_colab/stack_gan_trials/main.py | bkemmer/GSoC-TensorFlow-2019 | 9bde2939ee073504630e2810496aae3618b5afa2 | [
"Apache-2.0"
] | 8 | 2021-03-08T17:20:43.000Z | 2022-03-15T11:24:03.000Z | # Runner Code
# TODO: Train Stage 1
# TODO: Train Stage 2
import model as stack_gan
# stage1 = stack_gan.StackGanStage1()
# stage1.train_stage1()
stage2 = stack_gan.StackGanStage2()
stage2.train_stage2()
| 17.333333 | 37 | 0.75 |
4a056270b07922775795b37e09350f8a0deaacab | 91 | py | Python | src/onegov/agency/theme/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/theme/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/theme/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.agency.theme.agency_theme import AgencyTheme
__all__ = (
'AgencyTheme',
)
| 15.166667 | 56 | 0.747253 |
4a056421ca9a3ec3d461ab23d643f31cd3e9161a | 655 | py | Python | backend/hekshermgmt/api/v1/utils.py | biocatchltd/hekshermgmt | 651da54cd88c463da9f9bd99446a9024d658e76f | [
"MIT"
] | 1 | 2021-02-22T06:47:55.000Z | 2021-02-22T06:47:55.000Z | backend/hekshermgmt/api/v1/utils.py | biocatchltd/hekshermgmt | 651da54cd88c463da9f9bd99446a9024d658e76f | [
"MIT"
] | 18 | 2021-05-05T14:33:51.000Z | 2022-03-29T08:24:55.000Z | backend/hekshermgmt/api/v1/utils.py | biocatchltd/hekshermgmt | 651da54cd88c463da9f9bd99446a9024d658e76f | [
"MIT"
] | null | null | null | import httpx
from fastapi import Depends, Header, Request
from starlette.responses import Response
from hekshermgmt.context_vars import user
@Depends
def application(request: Request):
"""
A helper dependancy to get the app instance
"""
return request.app
@Depends
async def get_user_name(x_forwarde... | 24.259259 | 83 | 0.746565 |
4a056630a7fc20ab6624204ce67b073f7fd2d113 | 4,072 | py | Python | opendomain_responder/basic_qa.py | maverickjoy/pepper-robot-facedetection-open-domain-answering | e17f4421eddf2334873261711d3cd132e90d1117 | [
"MIT"
] | 7 | 2019-03-13T11:10:47.000Z | 2022-02-20T11:14:26.000Z | opendomain_responder/basic_qa.py | maverickjoy/pepper-robot-facedetection-open-domain-answering | e17f4421eddf2334873261711d3cd132e90d1117 | [
"MIT"
] | 9 | 2019-07-07T09:09:06.000Z | 2022-03-11T23:39:58.000Z | opendomain_responder/basic_qa.py | maverickjoy/pepper-robot-facedetection-open-domain-answering | e17f4421eddf2334873261711d3cd132e90d1117 | [
"MIT"
] | 1 | 2022-03-03T13:25:07.000Z | 2022-03-03T13:25:07.000Z | import re
import json
import requests
import mechanize
from bs4 import BeautifulSoup
from mathsolver import mathsolver
from geo_locator import GeoLocator
# INITIALISING AUTO ANSWER BOT
br = mechanize.Browser()
br.set_handle_equiv(True)
br.set_handle_redirect(True)
br.set_handle_referer(True)
br.set_handle_robots(False... | 31.8125 | 117 | 0.527996 |
4a05669fa21d435c8128d5d8f1323890199668b3 | 13,314 | py | Python | src/hiding_adversarial_attacks/manipulation/utils.py | inovex/hiding-adversarial-attacks | d00ce66349e8fd9c27c6207289ee73c23f1b3f99 | [
"MIT"
] | 1 | 2022-01-14T16:07:01.000Z | 2022-01-14T16:07:01.000Z | src/hiding_adversarial_attacks/manipulation/utils.py | inovex/hiding-adversarial-attacks | d00ce66349e8fd9c27c6207289ee73c23f1b3f99 | [
"MIT"
] | null | null | null | src/hiding_adversarial_attacks/manipulation/utils.py | inovex/hiding-adversarial-attacks | d00ce66349e8fd9c27c6207289ee73c23f1b3f99 | [
"MIT"
] | 1 | 2022-01-14T16:07:06.000Z | 2022-01-14T16:07:06.000Z | import math
import os
from functools import partial
import pandas as pd
import torch
from matplotlib import pyplot as plt
from piqa import SSIM
from torch._vmap_internals import vmap
from torchmetrics.functional import mean_squared_error
from hiding_adversarial_attacks.classifiers.cifar_net import CifarNet
from hidin... | 35.69437 | 87 | 0.709479 |
4a056762beacdb642be484a0bd9db9cc29b95913 | 104 | py | Python | deepspeed/ops/transformer/__init__.py | bratao/DeepSpeed | c50d8955e942e5e26cf81835d59ec3f20ef8540d | [
"MIT"
] | 1 | 2020-09-25T13:54:15.000Z | 2020-09-25T13:54:15.000Z | deepspeed/ops/transformer/__init__.py | bratao/DeepSpeed | c50d8955e942e5e26cf81835d59ec3f20ef8540d | [
"MIT"
] | null | null | null | deepspeed/ops/transformer/__init__.py | bratao/DeepSpeed | c50d8955e942e5e26cf81835d59ec3f20ef8540d | [
"MIT"
] | 1 | 2020-09-13T08:06:51.000Z | 2020-09-13T08:06:51.000Z | from deepspeed.ops.transformer.transformer import DeepSpeedTransformerLayer, DeepSpeedTransformerConfig
| 52 | 103 | 0.913462 |
4a0569a4c2f43d79dedc15f722511e97e20adf8b | 2,931 | py | Python | tbx/core/migrations/0135_auto_20210728_1218.py | elviva404/wagtail-torchbox | 718d9e2c4337073f010296932d369c726a01dbd3 | [
"MIT"
] | 103 | 2015-02-24T17:58:21.000Z | 2022-03-23T08:08:58.000Z | tbx/core/migrations/0135_auto_20210728_1218.py | elviva404/wagtail-torchbox | 718d9e2c4337073f010296932d369c726a01dbd3 | [
"MIT"
] | 145 | 2015-01-13T17:13:43.000Z | 2022-03-29T12:56:20.000Z | tbx/core/migrations/0135_auto_20210728_1218.py | elviva404/wagtail-torchbox | 718d9e2c4337073f010296932d369c726a01dbd3 | [
"MIT"
] | 57 | 2015-01-03T12:00:37.000Z | 2022-02-09T13:11:30.000Z | # Generated by Django 2.2.17 on 2021-07-28 11:18
from django.db import migrations, models
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
("torchbox", "0134_remove_googleadgrantspage_and_related_models"),
]
operations = [
migrations.RemoveField(
... | 36.185185 | 88 | 0.603889 |
4a0569a671819f31028115bd0cdab50572740a39 | 772 | py | Python | pyairwatch/mam/vpp.py | llxp/PyVMwareAirWatch | 5953f3f21b0fece20f2ec027fef42d8a3eb29de1 | [
"MIT"
] | 2 | 2021-04-20T03:41:03.000Z | 2021-09-23T10:56:11.000Z | pyairwatch/mam/vpp.py | llxp/PyVMwareAirWatch | 5953f3f21b0fece20f2ec027fef42d8a3eb29de1 | [
"MIT"
] | null | null | null | pyairwatch/mam/vpp.py | llxp/PyVMwareAirWatch | 5953f3f21b0fece20f2ec027fef42d8a3eb29de1 | [
"MIT"
] | 1 | 2020-11-10T17:27:10.000Z | 2020-11-10T17:27:10.000Z | from .mam import MAM
class VPP(MAM):
"""
A class to manage Internal Applications
"""
def __init__(self, client):
MAM.__init__(self, client)
def get_vpp_details(self, application_id):
path = '/apps/purchased/{}'.format(application_id)
header = {'Content-Type': 'application... | 28.592593 | 87 | 0.629534 |
4a0569ef9a59f96dd90392ec504ef74acc14a751 | 362 | py | Python | assignment3/assignment3_p1/kaggle_submission.py | yutong-xie/CS498-DL-Assignment | a0c93422c31a19ece7abbd2a7bb19f7feb8ea5ef | [
"MIT"
] | null | null | null | assignment3/assignment3_p1/kaggle_submission.py | yutong-xie/CS498-DL-Assignment | a0c93422c31a19ece7abbd2a7bb19f7feb8ea5ef | [
"MIT"
] | null | null | null | assignment3/assignment3_p1/kaggle_submission.py | yutong-xie/CS498-DL-Assignment | a0c93422c31a19ece7abbd2a7bb19f7feb8ea5ef | [
"MIT"
] | null | null | null | import os
import csv
import numpy as np
def write_csv(file_path, y_list):
solution_rows = [('id', 'category')] + [(i, 1-y) for (i, y) in enumerate(y_list)]
with open(file_path, 'w') as f:
writer = csv.writer(f)
writer.writerows(solution_rows)
def output_submission_csv(output_file_path, y_test)... | 27.846154 | 85 | 0.687845 |
4a056b38e1402af574d5406955e859935f70401a | 1,590 | py | Python | scripts/get_es_child_documents.py | svebk/qpr-winter-2017 | 3cf6eead549481591a1d83738af0e56a0ceeae56 | [
"MIT"
] | null | null | null | scripts/get_es_child_documents.py | svebk/qpr-winter-2017 | 3cf6eead549481591a1d83738af0e56a0ceeae56 | [
"MIT"
] | null | null | null | scripts/get_es_child_documents.py | svebk/qpr-winter-2017 | 3cf6eead549481591a1d83738af0e56a0ceeae56 | [
"MIT"
] | null | null | null | import certifi
import json
import os
import sys
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search, Q
def search(obj_parents_l, es):
return Search() \
.using(es) \
.filter(Q('match',
obj_parent=json.dumps(obj_parents_l)))\
.scan()
if __name__ =... | 28.909091 | 75 | 0.571698 |
4a056b8569c2831a535aed7e91b2fe08a9b02b7a | 3,162 | py | Python | create_yml.py | emo-bon/pipeline-v5 | bd500bd380ea96f7d2872f3843c57362109375b4 | [
"Apache-2.0"
] | 1 | 2022-03-10T15:28:51.000Z | 2022-03-10T15:28:51.000Z | create_yml.py | emo-bon/pipeline-v5 | bd500bd380ea96f7d2872f3843c57362109375b4 | [
"Apache-2.0"
] | null | null | null | create_yml.py | emo-bon/pipeline-v5 | bd500bd380ea96f7d2872f3843c57362109375b4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import argparse
from ruamel.yaml import YAML
import os
# RAW_READS_ANALYSIS = "raw-reads"
# ASSEMBLY_ANALYSIS = "assembly"
# AMPLICON_ANALYSIS = "amplicon"
db_fields = [
"ssu_db",
"lsu_db",
"ssu_tax",
"lsu_tax",
"ssu_otus",
"lsu_otus",
"rfam_models",
"rfam_mode... | 26.571429 | 111 | 0.56167 |
4a056ba798de61df36e57b7b06576c8016c1f487 | 4,843 | py | Python | python/ray/tests/test_component_failures_2.py | AshHarvey/ray | f35339b5ff3d5e85c20720637e28bd5a380a545e | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_component_failures_2.py | AshHarvey/ray | f35339b5ff3d5e85c20720637e28bd5a380a545e | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_component_failures_2.py | AshHarvey/ray | f35339b5ff3d5e85c20720637e28bd5a380a545e | [
"Apache-2.0"
] | null | null | null | import os
import signal
import sys
import time
import pytest
import ray
import ray.ray_constants as ray_constants
from ray.cluster_utils import Cluster
from ray.test_utils import RayTestTimeoutException, get_other_nodes
SIGKILL = signal.SIGKILL if sys.platform != "win32" else signal.SIGTERM
@pytest.fixture(params=... | 30.651899 | 79 | 0.644642 |
4a056d33eafa76c1a21a2ff4a77d72a8c6baa39f | 2,418 | py | Python | leetcode/String/929. Unique Email Addresses.py | yanshengjia/algorithm | 0608d286be9c93d51768d47f21e569c6b0be9cda | [
"MIT"
] | 23 | 2019-08-02T12:02:47.000Z | 2022-03-09T15:24:16.000Z | leetcode/String/929. Unique Email Addresses.py | yanshengjia/algorithm | 0608d286be9c93d51768d47f21e569c6b0be9cda | [
"MIT"
] | null | null | null | leetcode/String/929. Unique Email Addresses.py | yanshengjia/algorithm | 0608d286be9c93d51768d47f21e569c6b0be9cda | [
"MIT"
] | 21 | 2019-12-22T04:47:32.000Z | 2021-09-12T14:29:35.000Z | """
Every email consists of a local name and a domain name, separated by the @ sign.
For example, in alice@leetcode.com, alice is the local name, and leetcode.com is the domain name.
Besides lowercase letters, these emails may contain '.'s or '+'s.
If you add periods ('.') between some characters in the local name p... | 39 | 332 | 0.628619 |
4a056d6e5f3d685e3d74bd470be9eec8d995cc58 | 3,323 | py | Python | user.py | myangelaku/Riplay | 96a08de7239acd79cbc2a1ffc3482539ba54c2b5 | [
"MIT"
] | null | null | null | user.py | myangelaku/Riplay | 96a08de7239acd79cbc2a1ffc3482539ba54c2b5 | [
"MIT"
] | null | null | null | user.py | myangelaku/Riplay | 96a08de7239acd79cbc2a1ffc3482539ba54c2b5 | [
"MIT"
] | null | null | null | import requests
import errno
import os
import sys
import urllib.request
# Gets the Score Ids from Ripple's API then downloads the corresponding replays
def getReplays(username, mode):
url = "https://ripple.moe/api/v1/users/scores/best?name=" + username + "&mode=" + str(mode)
data = getJSON(url)
# Check i... | 33.565657 | 160 | 0.589528 |
4a056d947d1c383b46133ea46c86d6a64e04794f | 17,189 | py | Python | src/wired/container.py | theasylum/wired | 6b6a3e83702b18ebb41ca1f94e957bdf7e44986d | [
"MIT"
] | 12 | 2018-07-22T15:40:35.000Z | 2020-12-27T21:39:18.000Z | src/wired/container.py | theasylum/wired | 6b6a3e83702b18ebb41ca1f94e957bdf7e44986d | [
"MIT"
] | 36 | 2019-03-23T13:47:25.000Z | 2020-11-28T18:08:14.000Z | src/wired/container.py | theasylum/wired | 6b6a3e83702b18ebb41ca1f94e957bdf7e44986d | [
"MIT"
] | 6 | 2019-03-23T20:08:57.000Z | 2021-06-03T16:52:06.000Z | import weakref
from zope.interface import Interface, implementedBy, providedBy
from zope.interface.interface import InterfaceClass
from zope.interface.interfaces import IInterface
from zope.interface.adapter import AdapterRegistry
__all__ = ['ServiceContainer', 'ServiceRegistry']
class Sentinel:
def __init__(se... | 35.008147 | 79 | 0.648962 |
4a056e27a438caaa38f259bf440f761365d2ab22 | 11,349 | py | Python | sonnet/python/modules/base_info_test.py | ankitshah009/sonnet | a07676192c6d0f2ed5967d6bc367d62e55835baf | [
"Apache-2.0"
] | 3 | 2019-07-31T12:36:26.000Z | 2020-12-16T14:37:19.000Z | sonnet/python/modules/base_info_test.py | ankitshah009/sonnet | a07676192c6d0f2ed5967d6bc367d62e55835baf | [
"Apache-2.0"
] | null | null | null | sonnet/python/modules/base_info_test.py | ankitshah009/sonnet | a07676192c6d0f2ed5967d6bc367d62e55835baf | [
"Apache-2.0"
] | 3 | 2019-07-29T08:55:20.000Z | 2019-07-30T06:36:56.000Z | # Copyright 2017 The Sonnet Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 38.471186 | 79 | 0.705525 |
4a056ed5b40327e799e3e5923f916f8751bc544e | 1,776 | py | Python | credentials.py | 3xistentialcrisis/Password | dda6343302d7048c90c34c36a0b1a3e240cd95de | [
"MIT"
] | null | null | null | credentials.py | 3xistentialcrisis/Password | dda6343302d7048c90c34c36a0b1a3e240cd95de | [
"MIT"
] | null | null | null | credentials.py | 3xistentialcrisis/Password | dda6343302d7048c90c34c36a0b1a3e240cd95de | [
"MIT"
] | null | null | null | import string
from random import choice
class Credential:
"""
Class that shall generate new instances of user credentials.
"""
#Credentials details array
credential_details = []
def __init__(self,fname,cred_account,cred_username,cred_password):
"""
This __init__ method defines ... | 29.6 | 84 | 0.652027 |
4a056f1fe9687e8863d39dcea805b98daf2a5e6a | 89,590 | py | Python | clients/melati.py | Plow-Controller/Plow | 785b41b10a1a96420d917d3204b9f26aa535ebc7 | [
"MIT"
] | 3 | 2021-08-18T01:30:41.000Z | 2021-08-21T02:33:11.000Z | clients/melati.py | Plow-Controller/plow | 785b41b10a1a96420d917d3204b9f26aa535ebc7 | [
"MIT"
] | null | null | null | clients/melati.py | Plow-Controller/plow | 785b41b10a1a96420d917d3204b9f26aa535ebc7 | [
"MIT"
] | null | null | null | from PyQt5 import QtCore, QtGui, QtWidgets
import os
import sys
import subprocess
import plow_rc
def updateclient():
os.system('echo "Lets get Melati updated for you." ; cd ~/melati-blockchain ; . ./activate ; melati stop all ; deactivate ; sudo kill -9 $(sudo lsof -t -i:57400,2448,2449,2447,2444) ; cd ~/ ; mkdir... | 55.268353 | 879 | 0.694441 |
4a056f99bb2dd9ff138514b9eed262545f75c327 | 1,171 | py | Python | {{ cookiecutter.project_name }}/roles/tasks.py | marksweb/cookiecutter-django | f8ea97593f768f3d1cc260838d2913bdb13026c4 | [
"MIT"
] | 13 | 2020-11-12T06:37:59.000Z | 2022-02-10T11:27:28.000Z | {{ cookiecutter.project_name }}/roles/tasks.py | marksweb/cookiecutter-django | f8ea97593f768f3d1cc260838d2913bdb13026c4 | [
"MIT"
] | 10 | 2018-05-09T14:35:05.000Z | 2019-10-22T09:03:05.000Z | {{ cookiecutter.project_name }}/roles/tasks.py | marksweb/cookiecutter-django | f8ea97593f768f3d1cc260838d2913bdb13026c4 | [
"MIT"
] | 6 | 2018-03-07T18:04:22.000Z | 2019-03-23T18:38:05.000Z |
import os
from jinja2 import Environment, FileSystemLoader
from invoke import run, task
def _template_file(template, destination, template_dir='/var/www/deploy/'):
environment = Environment(loader=FileSystemLoader(template_dir))
template = environment.get_template(template)
rendered_template = template.... | 23.897959 | 75 | 0.675491 |
4a057022b91377667b45951ea0009a8333c40ad2 | 4,987 | py | Python | venv/lib/python3.6/site-packages/compressor/cache.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | 3 | 2020-03-30T13:11:57.000Z | 2020-04-22T13:55:31.000Z | venv/lib/python3.6/site-packages/compressor/cache.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | 9 | 2020-10-29T08:03:28.000Z | 2021-09-08T01:21:10.000Z | venv/lib/python3.6/site-packages/compressor/cache.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | 2 | 2021-01-06T19:25:07.000Z | 2021-05-14T02:00:19.000Z | import json
import hashlib
import os
import socket
import time
from importlib import import_module
from django.core.cache import caches
from django.core.files.base import ContentFile
from django.utils import six
from django.utils.encoding import force_text, smart_bytes
from django.utils.functional import SimpleLazyObj... | 30.042169 | 91 | 0.702827 |
4a05704c6ccc68d2488993f64e173e4eb8713d0d | 6,901 | py | Python | pysm4.py | moehuster/test_union_pay | a7b523fd5d1dbd17d19c9cc3df27d7976289d29c | [
"MIT"
] | 1 | 2019-11-06T09:01:06.000Z | 2019-11-06T09:01:06.000Z | pysm4.py | moehuster/test_union_pay | a7b523fd5d1dbd17d19c9cc3df27d7976289d29c | [
"MIT"
] | 1 | 2019-11-06T09:02:13.000Z | 2019-11-16T05:18:36.000Z | pysm4.py | moehuster/test_union_pay | a7b523fd5d1dbd17d19c9cc3df27d7976289d29c | [
"MIT"
] | 3 | 2019-04-01T03:54:20.000Z | 2020-05-31T04:00:44.000Z | #-*-coding:utf-8-*-
''' pysm4 implementation '''
import copy
#Expanded SM4 box table
SM4_BOXES_TABLE = [
0xd6, 0x90, 0xe9, 0xfe, 0xcc, 0xe1, 0x3d, 0xb7, 0x16, 0xb6, 0x14, 0xc2, 0x28, 0xfb, 0x2c,
0x05, 0x2b, 0x67, 0x9a, 0x76, 0x2a, 0xbe, 0x04, 0xc3, 0xaa, 0x44, 0x13, 0x26, 0x49, 0x86,
0x06, 0x99, 0x9c, 0x42... | 39.890173 | 98 | 0.55876 |
4a0570715b6198e1fd2c3c8efb5bc882060c2d19 | 3,411 | py | Python | alipay/aop/api/domain/SubAccountBalanceFreezeOrder.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/SubAccountBalanceFreezeOrder.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/SubAccountBalanceFreezeOrder.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MultiCurrencyMoney import MultiCurrencyMoney
from alipay.aop.api.domain.SubAccountBaseInfo import SubAccountBaseInfo
class SubAccountBalanceFreezeOrder(object):
def __init__(... | 31.293578 | 93 | 0.616535 |
4a0570722fd90f96c01aebde5d40cc98dd44e427 | 2,795 | py | Python | Example/Gutenkunst2007/Lee_2003/Nets.py | bcdaniels/SloppyCell | 17e68127a6aba19056a5067748a2d18241cc4d76 | [
"BSD-3-Clause"
] | 2 | 2020-05-26T19:29:39.000Z | 2020-08-26T20:54:52.000Z | Example/Gutenkunst2007/Lee_2003/Nets.py | bcdaniels/SloppyCell | 17e68127a6aba19056a5067748a2d18241cc4d76 | [
"BSD-3-Clause"
] | 1 | 2020-05-26T16:50:49.000Z | 2021-07-08T20:35:35.000Z | Example/Gutenkunst2007/Lee_2003/Nets.py | jurquiza/SloppyCellUrquiza2019 | a9f64d9d4172c82735813f09e48f36777a714e9c | [
"BSD-3-Clause"
] | 3 | 2017-09-12T03:12:01.000Z | 2018-10-19T11:08:09.000Z | import scipy
from SloppyCell.ReactionNetworks import *
import LeeNet
reload(LeeNet)
from LeeNet import net
# Network that is at unstimulated fixed point
net.set_var_ic('W', 0)
traj1 = Dynamics.integrate(net, [0, 1e5], rtol=1e-12)
unstimulated = net.copy('unstimulated')
for var in unstimulated.dynamicVars.keys():
... | 33.27381 | 79 | 0.728444 |
4a0571f29629bdcfe8eb8e492ce5cd171e19c824 | 8,368 | py | Python | test/functional/feature_proxy.py | GroinGuy/GroinCoin-GXG-1.2.0 | d71c1b200683a77ccf797d8a500e468351da5ee0 | [
"MIT"
] | 1 | 2019-06-15T00:27:02.000Z | 2019-06-15T00:27:02.000Z | test/functional/feature_proxy.py | GroinGuy/GroinCoin-GXG | d71c1b200683a77ccf797d8a500e468351da5ee0 | [
"MIT"
] | null | null | null | test/functional/feature_proxy.py | GroinGuy/GroinCoin-GXG | d71c1b200683a77ccf797d8a500e468351da5ee0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test groincoind with different proxy configuration.
Test plan:
- Start groincoind's with different pro... | 41.425743 | 123 | 0.625837 |
4a0571ff86c36789ca1d99f3836a354fb8bf0d90 | 740 | py | Python | Tutorials/27fileRead.py | Aaryan-R-S/Python-Tutorials | 89e5ec69e529511137263231d735410e92f0a65d | [
"MIT"
] | null | null | null | Tutorials/27fileRead.py | Aaryan-R-S/Python-Tutorials | 89e5ec69e529511137263231d735410e92f0a65d | [
"MIT"
] | null | null | null | Tutorials/27fileRead.py | Aaryan-R-S/Python-Tutorials | 89e5ec69e529511137263231d735410e92f0a65d | [
"MIT"
] | null | null | null | openFile = open('Tuts/27.txt', "rt") # read + text mode
# openFile = open('Tuts/25.txt', "rb") # read + binary mode
# Print all line by line (dont read file before it) --
# for line in openFile:
# print(line)
# READING--
readFile = openFile.read()
print(readFile)
# OR
# readLine = openFile.readline()
# ... | 22.424242 | 60 | 0.664865 |
4a05726bff54b94cc7dc3865afcf698f5f8a146b | 970 | py | Python | aioftx/markets/markets/api.py | metta-team/aioftx | f5bd028e8bf40c55c1d4632802b792be113e0978 | [
"MIT"
] | null | null | null | aioftx/markets/markets/api.py | metta-team/aioftx | f5bd028e8bf40c55c1d4632802b792be113e0978 | [
"MIT"
] | null | null | null | aioftx/markets/markets/api.py | metta-team/aioftx | f5bd028e8bf40c55c1d4632802b792be113e0978 | [
"MIT"
] | null | null | null | from typing import Optional
from aioftx.session import FTXClientSession
from .schemas import (
GetMarketRequest,
GetMarketResponse,
GetMarketsRequest,
GetMarketsResponse,
Market,
)
async def get_markets(
session: FTXClientSession,
*,
start_time: Optional[int] = None,
end_time: Op... | 26.216216 | 79 | 0.685567 |
4a057279ae8e370e548f6972d1d6326045c67aa3 | 988 | py | Python | handy/network/upload.py | Al3xChen/handy | a4af40fad2e75876ecd1b5918f7ca5c325ae281c | [
"MIT"
] | 5 | 2018-04-03T10:24:04.000Z | 2020-01-16T08:04:12.000Z | handy/network/upload.py | deep2cv/handy | a4af40fad2e75876ecd1b5918f7ca5c325ae281c | [
"MIT"
] | 1 | 2021-03-19T10:32:17.000Z | 2021-03-19T10:32:17.000Z | handy/network/upload.py | Al3xChen/handy | a4af40fad2e75876ecd1b5918f7ca5c325ae281c | [
"MIT"
] | 1 | 2021-04-17T19:28:15.000Z | 2021-04-17T19:28:15.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 30 19:26:46 2018
@author: Frank
"""
from handy.crypto.encrypt import decryptfromfile
import os
def download_repo():
key = input('Type Key:\n')
repo = input('Load Repo File:\n')
repo_path = decryptfromfile(repo,key)
if not repo_path:
print('decryp... | 25.333333 | 83 | 0.62247 |
4a0572bc026243d9eacb19f6ae262c917a140b3d | 1,388 | py | Python | tests/functional/trigger/alter/test_08.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/functional/trigger/alter/test_08.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/functional/trigger/alter/test_08.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: functional.trigger.alter.08
# title: ALTER TRIGGER - POSITION
# decription: ALTER TRIGGER - POSITION
#
# Dependencies:
# CREATE DATABASE
# CREATE TABLE
# CREATE TRIGGER
# SHOW TRIGGER
# tracker_... | 22.754098 | 84 | 0.612392 |
4a057336fea0f10767024abe5c41e5dd15142f48 | 912 | py | Python | sc2spreadsheet/configuration.py | krzosa/sc2spreadsheet | 3c64b3a6cfb0c3431a18530f639f54d2f6ed1a63 | [
"MIT"
] | null | null | null | sc2spreadsheet/configuration.py | krzosa/sc2spreadsheet | 3c64b3a6cfb0c3431a18530f639f54d2f6ed1a63 | [
"MIT"
] | null | null | null | sc2spreadsheet/configuration.py | krzosa/sc2spreadsheet | 3c64b3a6cfb0c3431a18530f639f54d2f6ed1a63 | [
"MIT"
] | null | null | null | # Usernames of all accounts that you play on (ingame username not battle.net)
usernames = ["Sevnin", "Owen"]
# paths to the directories with the replays
# ex. C:\Users\sevni\Documents\StarCraft II\Accounts\102433852\2-S2-1-2701509\Replays\Multiplayer
# format [r"pathToReplays1", r"pathToReplays2", r"pathToReplays3"] ... | 38 | 121 | 0.753289 |
4a057369f7a8e10463bb7e9d970096def6f9dc60 | 20,778 | py | Python | src/epivizfileserver/measurements/measurementClass.py | jkanche/epivizFileParser | 29caf7a0ee2dee6396cbd77ac2d50bb849607b17 | [
"MIT"
] | 1 | 2021-02-11T09:46:07.000Z | 2021-02-11T09:46:07.000Z | src/epivizfileserver/measurements/measurementClass.py | jkanche/epivizFileParser | 29caf7a0ee2dee6396cbd77ac2d50bb849607b17 | [
"MIT"
] | 3 | 2016-02-23T20:48:12.000Z | 2021-09-22T00:36:19.000Z | src/epivizfileserver/measurements/measurementClass.py | jkanche/epivizFileParser | 29caf7a0ee2dee6396cbd77ac2d50bb849607b17 | [
"MIT"
] | 4 | 2020-07-29T14:54:50.000Z | 2021-09-30T20:56:23.000Z | from ..handler import FileHandlerProcess
import parser
import pandas as pd
import requests
import numpy as np
from random import randrange
# import umsgpack
from aiocache import cached, Cache
from aiocache.serializers import JsonSerializer, PickleSerializer
# import logging
# logger = logging.getLogger(__name__)
from... | 35.27674 | 256 | 0.572384 |
4a05741363f9bec61539afbf7f70c12ef818ad24 | 6,671 | py | Python | examples/echo/tests.py | goodboy/pulsar | e4b42d94b7e262a165782747d65f8b39fb8d3ba9 | [
"BSD-3-Clause"
] | 1 | 2020-11-30T07:36:57.000Z | 2020-11-30T07:36:57.000Z | examples/echo/tests.py | goodboy/pulsar | e4b42d94b7e262a165782747d65f8b39fb8d3ba9 | [
"BSD-3-Clause"
] | null | null | null | examples/echo/tests.py | goodboy/pulsar | e4b42d94b7e262a165782747d65f8b39fb8d3ba9 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from asyncio import gather
from pulsar import (send, new_event_loop, get_application,
run_in_loop, get_event_loop)
from pulsar.apps.test import dont_run_with_thread
from examples.echo.manage import server, Echo, EchoServerProtocol
class TestEchoServerThread(unittest.TestCase):
... | 37.477528 | 72 | 0.638285 |
4a0574c7adec5bdef701d729da2ef25bf924d988 | 1,087 | py | Python | Curso Em Video-python/PYTHON (MUNDO 1, MUNDO 2 E MUNDO 3)/pythonAulas/aula20-funcoes-parte1.py | AlamoVinicius/code-pratice | 924a3ff782caf3695bbeeac39fa02fb23781cd75 | [
"MIT"
] | null | null | null | Curso Em Video-python/PYTHON (MUNDO 1, MUNDO 2 E MUNDO 3)/pythonAulas/aula20-funcoes-parte1.py | AlamoVinicius/code-pratice | 924a3ff782caf3695bbeeac39fa02fb23781cd75 | [
"MIT"
] | null | null | null | Curso Em Video-python/PYTHON (MUNDO 1, MUNDO 2 E MUNDO 3)/pythonAulas/aula20-funcoes-parte1.py | AlamoVinicius/code-pratice | 924a3ff782caf3695bbeeac39fa02fb23781cd75 | [
"MIT"
] | null | null | null | def soma(a, b):
print(f'a = {a} e b = {b}') # definição da minha função soma para usar no programa principal
s = a + b
print(f'A soma de A + B = {s}')
# programa principal
soma(b=4, a=5) # a ordem pode ser alterada no parâmentro
soma(8, 9)
soma(2, 1)
'''é possivel passar vários parâmentros usando o "... | 20.903846 | 117 | 0.623735 |
4a0574e4a2f064c2473851ccfa93963e23ab4fba | 1,650 | py | Python | reversible2/gaussian.py | robintibor/reversible2 | e6fea33ba41c7f76ee50295329b4ef27b879a7fa | [
"MIT"
] | null | null | null | reversible2/gaussian.py | robintibor/reversible2 | e6fea33ba41c7f76ee50295329b4ef27b879a7fa | [
"MIT"
] | null | null | null | reversible2/gaussian.py | robintibor/reversible2 | e6fea33ba41c7f76ee50295329b4ef27b879a7fa | [
"MIT"
] | null | null | null | import torch as th
import numpy as np
# For truncated logic see:
# https://discuss.pytorch.org/t/implementing-truncated-normal-initializer/4778/12
# torch.fmod(torch.randn(size),2)
def get_gauss_samples(n_samples, mean, std, truncate_to=None):
if mean.is_cuda:
orig_samples = th.cuda.FloatTensor(n_samples, ... | 40.243902 | 81 | 0.698788 |
4a0574fd5e7ea05f28020b7f84b0b65ea2b6371e | 230 | py | Python | Projects/Investigations/Docker/hello.py | ptpro3/ptpro3.github.io | 5084d42395d8af467336f0664257058a6b63e86b | [
"MIT"
] | 2 | 2019-05-31T01:04:14.000Z | 2019-06-21T11:38:28.000Z | Projects/Investigations/Docker/hello.py | ptpro3/ptpro3.github.io | 5084d42395d8af467336f0664257058a6b63e86b | [
"MIT"
] | null | null | null | Projects/Investigations/Docker/hello.py | ptpro3/ptpro3.github.io | 5084d42395d8af467336f0664257058a6b63e86b | [
"MIT"
] | 4 | 2017-10-24T02:11:17.000Z | 2021-07-19T08:23:48.000Z | from flask import Flask
app = Flask(__name__) # create the application instance :)
@app.route('/')
def hello_world():
return 'Hello, World! - dockerized version'
if __name__ == '__main__':
app.run(debug=True,host='0.0.0.0') | 25.555556 | 58 | 0.695652 |
4a057574b02bb2cea2779c0ff22f5aa7edee1f6c | 3,567 | py | Python | rankguru/tests.py | Dapro9706/rankguru | 4a90ef26257dcf1f3624810edfc9019e503aa72e | [
"MIT"
] | 2 | 2021-09-15T13:03:18.000Z | 2021-09-15T13:17:25.000Z | rankguru/tests.py | Dapro9706/rankguru | 4a90ef26257dcf1f3624810edfc9019e503aa72e | [
"MIT"
] | null | null | null | rankguru/tests.py | Dapro9706/rankguru | 4a90ef26257dcf1f3624810edfc9019e503aa72e | [
"MIT"
] | 1 | 2021-09-15T12:58:51.000Z | 2021-09-15T12:58:51.000Z | from .AbstractAPI import AbstractAPI
from .errors import QPidError, TBidError
from .utils import handle_response
from .globals import PLACE_HOLDER
class RG(AbstractAPI):
"""
The main API interface for the module
Creates new RG object, raises ``AuthError`` if header is invalid
:type header: dict
... | 28.766129 | 95 | 0.590132 |
4a0576020c296e835e288019e32c711586f6ab65 | 90 | py | Python | info/modules/index/__init__.py | zxallen/Information | 1c5f36bbed2f20c078c46760cc5ff11699bc9aa2 | [
"MIT"
] | 2 | 2018-12-24T02:42:44.000Z | 2018-12-24T11:43:13.000Z | info/modules/index/__init__.py | zxallen/Information | 1c5f36bbed2f20c078c46760cc5ff11699bc9aa2 | [
"MIT"
] | null | null | null | info/modules/index/__init__.py | zxallen/Information | 1c5f36bbed2f20c078c46760cc5ff11699bc9aa2 | [
"MIT"
] | 1 | 2018-12-26T01:31:55.000Z | 2018-12-26T01:31:55.000Z | from flask import Blueprint
index_blu = Blueprint("index",__name__)
from .views import * | 18 | 39 | 0.777778 |
4a05771d693f40e7f4705bdaa92319e0dddcf4d7 | 267 | py | Python | app.py | lunixbr/devopslab | 609e3687ec3feeddd9be5a8767b6d277f8d8bcec | [
"MIT"
] | null | null | null | app.py | lunixbr/devopslab | 609e3687ec3feeddd9be5a8767b6d277f8d8bcec | [
"MIT"
] | null | null | null | app.py | lunixbr/devopslab | 609e3687ec3feeddd9be5a8767b6d277f8d8bcec | [
"MIT"
] | null | null | null | #print("Hello World")
from flask import Flask
from flask_wtf.csrf import CSRFProtect
app = Flask(__name__)
csrf = CSRFProtect(app)
@app.route("/")
def pagina_inicial():
return "Laboratorio Pipeline DevOps"
if __name__ == '__main__':
app.run(debug=True)
| 15.705882 | 40 | 0.719101 |
4a05774db9c2f75475e871722d80c2e7094dcbb3 | 1,794 | py | Python | 2018/finals/pwn-mojo/attachments/service.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/finals/pwn-mojo/attachments/service.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/finals/pwn-mojo/attachments/service.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #! /usr/bin/python
# Copyright 2018 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 ag... | 30.931034 | 118 | 0.520624 |
4a05779b562094a408160ac73a859f8c4a04e429 | 12,481 | py | Python | lingvo/tasks/asr/decoder_metrics.py | lukasbindreiter/lingvo | d6f2e6901fadc8440a9e6222ac54b68a8b6faf02 | [
"Apache-2.0"
] | 1 | 2021-04-18T18:17:02.000Z | 2021-04-18T18:17:02.000Z | lingvo/tasks/asr/decoder_metrics.py | lukasbindreiter/lingvo | d6f2e6901fadc8440a9e6222ac54b68a8b6faf02 | [
"Apache-2.0"
] | null | null | null | lingvo/tasks/asr/decoder_metrics.py | lukasbindreiter/lingvo | d6f2e6901fadc8440a9e6222ac54b68a8b6faf02 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2018 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 ... | 41.465116 | 80 | 0.673664 |
4a0577b8da76747574d6eaa73be469c5c7441d13 | 19,636 | py | Python | pkgs/sdk-pkg/src/genie/libs/sdk/triggers/ha/reload/nxos/reload.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | null | null | null | pkgs/sdk-pkg/src/genie/libs/sdk/triggers/ha/reload/nxos/reload.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | null | null | null | pkgs/sdk-pkg/src/genie/libs/sdk/triggers/ha/reload/nxos/reload.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | null | null | null | '''NXOS implementation for Reload triggers'''
# import python
import logging
# import ats
from ats import aetest
from ats.utils.objects import R
# Genie Libs
from genie.libs.sdk.libs.utils.mapping import Mapping
from genie.libs.sdk.triggers.ha.ha import \
TriggerReload as CommonReload, \
... | 49.964377 | 91 | 0.446832 |
4a05783c3b34eae569da77680a99f338ff61bdda | 118 | py | Python | configuration/configuration.py | filipefcl/fs-webservice-auth | 1fb5cfe446aaf06c650495b9e8c6862e493304a6 | [
"MIT"
] | null | null | null | configuration/configuration.py | filipefcl/fs-webservice-auth | 1fb5cfe446aaf06c650495b9e8c6862e493304a6 | [
"MIT"
] | null | null | null | configuration/configuration.py | filipefcl/fs-webservice-auth | 1fb5cfe446aaf06c650495b9e8c6862e493304a6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class Configuration:
def __init__(self):
pass
'''
HIDDEN CODE
''' | 13.111111 | 23 | 0.483051 |
4a05793e00d5e958efdc950d0cbcaa7c56ad2a96 | 3,456 | py | Python | code/robotling/robotling_board.py | boeh-da/robotling | 5925deb670803ece305baa0973914dfb8346524c | [
"MIT"
] | null | null | null | code/robotling/robotling_board.py | boeh-da/robotling | 5925deb670803ece305baa0973914dfb8346524c | [
"MIT"
] | null | null | null | code/robotling/robotling_board.py | boeh-da/robotling | 5925deb670803ece305baa0973914dfb8346524c | [
"MIT"
] | 1 | 2021-05-04T09:35:09.000Z | 2021-05-04T09:35:09.000Z | # ----------------------------------------------------------------------------
# robotling_board.py
# Global definitions for robotling board.
#
# The MIT License (MIT)
# Copyright (c) 2018 Thomas Euler
# 2018-09-13, v1
# 2018-12-22, v1.1 - pins for M4 feather express added
# --------------------------------------------... | 27.212598 | 78 | 0.537616 |
4a057a4ac49445696fc96328e5ca5f6e5bdd3855 | 4,750 | py | Python | project_euler/001-050/14.py | floppp/programming_challenges | 42df1b72faf5ddf907296f90e9b14e014d2ea13b | [
"MIT"
] | null | null | null | project_euler/001-050/14.py | floppp/programming_challenges | 42df1b72faf5ddf907296f90e9b14e014d2ea13b | [
"MIT"
] | null | null | null | project_euler/001-050/14.py | floppp/programming_challenges | 42df1b72faf5ddf907296f90e9b14e014d2ea13b | [
"MIT"
] | null | null | null | ## VERSION RECURSIVA SIN MEJORAS
# Tiempo: 55.16645 segundos (con operacion binaria aprox lo mismo)
# Resultado 837.799
import time
def collatz(n, lista):
lista.append(n)
if n == 1:
return 1, lista
elif n % 2:
return collatz(int(n*3 + 1), lista)
else:
return collatz(n >> 1, l... | 25.40107 | 80 | 0.615158 |
4a057c1d5df6182ed588075fe0af822725e37196 | 11,903 | py | Python | lte/gateway/python/magma/pipelined/tests/test_redirect.py | rdefosse/magma | d12ac827d0cdb39f499ce202e9e1196cc50b68d7 | [
"BSD-3-Clause"
] | 1 | 2021-11-03T21:37:26.000Z | 2021-11-03T21:37:26.000Z | lte/gateway/python/magma/pipelined/tests/test_redirect.py | rdefosse/magma | d12ac827d0cdb39f499ce202e9e1196cc50b68d7 | [
"BSD-3-Clause"
] | 143 | 2020-09-08T06:24:23.000Z | 2022-03-29T05:56:53.000Z | lte/gateway/python/magma/pipelined/tests/test_redirect.py | rdefosse/magma | d12ac827d0cdb39f499ce202e9e1196cc50b68d7 | [
"BSD-3-Clause"
] | 2 | 2021-05-27T18:15:16.000Z | 2021-05-27T18:41:39.000Z | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... | 39.54485 | 80 | 0.620264 |
4a057d0f31f05d795c08f320983e999079b393be | 1,859 | py | Python | src/dataset/label_extractor.py | Digital-Pathology/CustomDataset | 7b438b3151fcf766ef4853af03ea64b0616fc40a | [
"MIT"
] | null | null | null | src/dataset/label_extractor.py | Digital-Pathology/CustomDataset | 7b438b3151fcf766ef4853af03ea64b0616fc40a | [
"MIT"
] | null | null | null | src/dataset/label_extractor.py | Digital-Pathology/CustomDataset | 7b438b3151fcf766ef4853af03ea64b0616fc40a | [
"MIT"
] | null | null | null |
"""
An automatic (or overloaded) label inference class
"""
import abc
from collections import defaultdict
import csv
from email.policy import default
import json
import os
from . import util
class LabelExtractor(abc.ABC): # strategy pattern
""" Strategy Pattern --> extracts labels from path for dictionary... | 28.6 | 98 | 0.669177 |
4a057d2a2834807d76f7aee9d535c0e72001783f | 6,323 | py | Python | jwskate/jws/compact.py | guillp/jwskate | 271e88d4eca929a4be85e765f3bdbf8b649a2b9a | [
"MIT"
] | null | null | null | jwskate/jws/compact.py | guillp/jwskate | 271e88d4eca929a4be85e765f3bdbf8b649a2b9a | [
"MIT"
] | null | null | null | jwskate/jws/compact.py | guillp/jwskate | 271e88d4eca929a4be85e765f3bdbf8b649a2b9a | [
"MIT"
] | null | null | null | """This module implements the JWS Compact format."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Iterable, Optional, Tuple, Union
from binapy import BinaPy
from jwskate.jwk.base import Jwk
from jwskate.token import BaseCompactToken
from .signature import JwsSignature
if TYPE_CH... | 31.147783 | 116 | 0.601613 |
4a057d52d5f7a75992fed04e23068cfcfd8340bb | 60 | py | Python | sample/helpers.py | wisemantis/sample_python | d444243d543bc6d99c41e68520e6ead34fc7b812 | [
"BSD-2-Clause"
] | null | null | null | sample/helpers.py | wisemantis/sample_python | d444243d543bc6d99c41e68520e6ead34fc7b812 | [
"BSD-2-Clause"
] | null | null | null | sample/helpers.py | wisemantis/sample_python | d444243d543bc6d99c41e68520e6ead34fc7b812 | [
"BSD-2-Clause"
] | null | null | null | def get_answer():
"""Get an answer."""
return True
| 12 | 24 | 0.566667 |
4a057d6da7d499a9f6fbd7255dc6ca13f63ae7a4 | 19,347 | py | Python | resnet/estimator_benchmark.py | biolins/frivolous_dnns | 23d9a057ac517770cdfe9d8ac71543c328fcf76d | [
"MIT"
] | null | null | null | resnet/estimator_benchmark.py | biolins/frivolous_dnns | 23d9a057ac517770cdfe9d8ac71543c328fcf76d | [
"MIT"
] | null | null | null | resnet/estimator_benchmark.py | biolins/frivolous_dnns | 23d9a057ac517770cdfe9d8ac71543c328fcf76d | [
"MIT"
] | 2 | 2021-05-31T23:08:13.000Z | 2021-12-28T19:11:08.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.694 | 85 | 0.658655 |
4a057dc839b4ecf4c451e20faffe181aedc33917 | 1,378 | py | Python | tests/pytest_extension/doc/test_doc_parametrize.py | broglep-work/python-pytest-cases | 4976c0073a2fad5fbe5de34a5d1199efda0b7da9 | [
"BSD-3-Clause"
] | 213 | 2018-07-05T21:21:21.000Z | 2022-03-22T04:54:53.000Z | tests/pytest_extension/doc/test_doc_parametrize.py | broglep-work/python-pytest-cases | 4976c0073a2fad5fbe5de34a5d1199efda0b7da9 | [
"BSD-3-Clause"
] | 259 | 2018-06-22T16:46:33.000Z | 2022-03-23T19:39:15.000Z | tests/pytest_extension/doc/test_doc_parametrize.py | broglep-work/python-pytest-cases | 4976c0073a2fad5fbe5de34a5d1199efda0b7da9 | [
"BSD-3-Clause"
] | 27 | 2019-03-26T12:46:49.000Z | 2022-02-21T16:56:23.000Z | # Authors: Sylvain MARIE <sylvain.marie@se.com>
# + All contributors to <https://github.com/smarie/python-pytest-cases>
#
# License: 3-clause BSD, <https://github.com/smarie/python-pytest-cases/blob/master/LICENSE>
import pytest
from pytest_cases import parametrize, fixture, fixture_ref, lazy_value
@pytest.f... | 27.56 | 92 | 0.600145 |
4a057ecaf60283aadc9b57386fe0723aca024a76 | 5,809 | py | Python | artemis/ml/tools/processors.py | wouterkool/artemis | 5ac3143d22ba2e7addc93396d059110104096233 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | artemis/ml/tools/processors.py | wouterkool/artemis | 5ac3143d22ba2e7addc93396d059110104096233 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | artemis/ml/tools/processors.py | wouterkool/artemis | 5ac3143d22ba2e7addc93396d059110104096233 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-11-25T12:48:03.000Z | 2018-11-25T12:48:03.000Z | from abc import abstractmethod
import numpy as np
from artemis.general.mymath import recent_moving_average
from six.moves import xrange
__author__ = 'peter'
class OneHotEncoding(object):
def __init__(self, n_classes = None, form = 'bin', dtype = None):
assert form in ('bin', 'sign')
if dtype is ... | 32.093923 | 115 | 0.641763 |
4a057ee596d178bb7d3e667a3ddbfcea36c49685 | 83,296 | py | Python | virtual/lib/python3.6/site-packages/sqlalchemy/engine/base.py | mzazakeith/flask-blog | 2833404cc5e96ffdbfb767f35b9caf2bdcce7997 | [
"MIT"
] | 207 | 2018-10-01T08:53:01.000Z | 2022-03-14T12:15:54.000Z | virtual/lib/python3.6/site-packages/sqlalchemy/engine/base.py | mzazakeith/flask-blog | 2833404cc5e96ffdbfb767f35b9caf2bdcce7997 | [
"MIT"
] | 11 | 2019-12-26T17:21:03.000Z | 2022-03-21T22:17:07.000Z | lib/python2.7/site-packages/sqlalchemy/engine/base.py | anish03/weather-dash | d517fa9da9028d1fc5d8fd71d77cee829ddee87b | [
"MIT"
] | 53 | 2019-03-12T16:50:21.000Z | 2022-03-15T23:16:18.000Z | # engine/base.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from __future__ import with_statement
"""Defines :class:`.Connection` and :class:`.En... | 37.268904 | 84 | 0.609153 |
4a057fe627e825da97b4bfb5ece5d87b327b55f2 | 72,966 | py | Python | O365/calendar.py | qsollet/python-o365 | e138c12e44ff2f6788407b9305c7a84d5cd3047d | [
"Apache-2.0"
] | null | null | null | O365/calendar.py | qsollet/python-o365 | e138c12e44ff2f6788407b9305c7a84d5cd3047d | [
"Apache-2.0"
] | null | null | null | O365/calendar.py | qsollet/python-o365 | e138c12e44ff2f6788407b9305c7a84d5cd3047d | [
"Apache-2.0"
] | null | null | null | import calendar
import datetime as dt
import logging
import pytz
# noinspection PyPep8Naming
from bs4 import BeautifulSoup as bs
from dateutil.parser import parse
from .utils import CaseEnum
from .utils import HandleRecipientsMixin
from .utils import AttachableMixin, ImportanceLevel, TrackerSet
from .utils import Bas... | 35.506569 | 140 | 0.586177 |
4a0580eb6b8b82e6f0bd3177a4d3e1de93e3422b | 3,976 | py | Python | oauth2client/contrib/_win32_opener.py | keyrrjperino/google-spreadsheet-get | e00769d7fb715ff6e86c5404b97407d36ca3c786 | [
"MIT"
] | 41 | 2016-07-20T06:30:26.000Z | 2021-05-18T20:31:18.000Z | oauth2client/contrib/_win32_opener.py | keyrrjperino/google-spreadsheet-get | e00769d7fb715ff6e86c5404b97407d36ca3c786 | [
"MIT"
] | 20 | 2016-09-09T17:48:13.000Z | 2022-03-16T17:25:58.000Z | oauth2client/contrib/_win32_opener.py | keyrrjperino/google-spreadsheet-get | e00769d7fb715ff6e86c5404b97407d36ca3c786 | [
"MIT"
] | 5 | 2017-09-21T20:44:22.000Z | 2022-03-18T16:01:26.000Z | # Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 36.145455 | 74 | 0.57998 |
4a0581b06cf8298b4204d1c881d6b83785654d8e | 1,791 | py | Python | vision/google/cloud/vision_v1p3beta1/__init__.py | conwaychriscosmo/google-cloud-python | 8e7b7f8a5f4bb04d13f4d88ec3848f017faf834a | [
"Apache-2.0"
] | 1 | 2019-03-26T21:44:51.000Z | 2019-03-26T21:44:51.000Z | vision/google/cloud/vision_v1p3beta1/__init__.py | conwaychriscosmo/google-cloud-python | 8e7b7f8a5f4bb04d13f4d88ec3848f017faf834a | [
"Apache-2.0"
] | 1 | 2019-03-29T22:03:48.000Z | 2019-04-02T22:24:45.000Z | vision/google/cloud/vision_v1p3beta1/__init__.py | conwaychriscosmo/google-cloud-python | 8e7b7f8a5f4bb04d13f4d88ec3848f017faf834a | [
"Apache-2.0"
] | 1 | 2019-03-29T18:26:16.000Z | 2019-03-29T18:26:16.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 34.442308 | 79 | 0.778894 |
4a0583c081927bd3e331b829d8c6926f68fb849b | 138 | py | Python | lib/egauge/constants.py | goztrk/django-htk | c56bf112e5d627780d2f4288460eae5cce80fa9e | [
"MIT"
] | 206 | 2015-10-15T07:05:08.000Z | 2021-02-19T11:48:36.000Z | lib/egauge/constants.py | goztrk/django-htk | c56bf112e5d627780d2f4288460eae5cce80fa9e | [
"MIT"
] | 8 | 2017-10-16T10:18:31.000Z | 2022-03-09T14:24:27.000Z | lib/egauge/constants.py | goztrk/django-htk | c56bf112e5d627780d2f4288460eae5cce80fa9e | [
"MIT"
] | 61 | 2015-10-15T08:12:44.000Z | 2022-03-10T12:25:06.000Z | EGAUGE_API_URLS = {
'stored' : 'http://%s.egaug.es/cgi-bin/egauge-show',
'instantaneous' : 'http://%s.egaug.es/cgi-bin/egauge',
}
| 27.6 | 58 | 0.623188 |
4a0583ca9e4193addf6b6d4d2f43995b67342480 | 2,468 | py | Python | coko/classes/configuration.py | dante-signal31/coko | c803433f28602b0ecbbd86329d624557e4986a10 | [
"BSD-3-Clause"
] | null | null | null | coko/classes/configuration.py | dante-signal31/coko | c803433f28602b0ecbbd86329d624557e4986a10 | [
"BSD-3-Clause"
] | null | null | null | coko/classes/configuration.py | dante-signal31/coko | c803433f28602b0ecbbd86329d624557e4986a10 | [
"BSD-3-Clause"
] | null | null | null | import dataclasses
import os.path
from typing import List
import coko.classes.exceptions as exceptions
@dataclasses.dataclass
class FileOwnership:
uid: int
guid: int
permissions: int
permissions_octal: bool = dataclasses.field(default=False)
def __post_init__(self)-> None:
# We let user ... | 35.768116 | 87 | 0.618314 |
4a0583f33b83f803903be225c24812d7dd98a649 | 16,960 | py | Python | fragbuilder/pdb_tools.py | berquist/fragbuilder | bb17bb1e20e6d6cc2770281228b222b1a54f1cf6 | [
"BSD-2-Clause"
] | 8 | 2015-04-11T17:43:13.000Z | 2021-12-02T10:18:45.000Z | fragbuilder/pdb_tools.py | berquist/fragbuilder | bb17bb1e20e6d6cc2770281228b222b1a54f1cf6 | [
"BSD-2-Clause"
] | null | null | null | fragbuilder/pdb_tools.py | berquist/fragbuilder | bb17bb1e20e6d6cc2770281228b222b1a54f1cf6 | [
"BSD-2-Clause"
] | 6 | 2015-04-01T07:18:26.000Z | 2021-04-24T11:11:18.000Z | import math
import sys
from math_utils import *
from names import *
from bio_pdb import PDBParser
from bio_pdb import is_aa
from bio_pdb import calc_dihedral
class PDB:
""" Usually instantiated from something like:
pdbfile = fragbuilder.PDB("1UBQ.pdb")
"""
def __init__(self, pdbfile):
... | 43.598972 | 128 | 0.517453 |
4a05847e3922837240f3f8835817f23a485afbc7 | 340 | py | Python | users/models.py | harryghgim/django-blog | 13b5613766664e3250c12824c25a021bce33c8e4 | [
"MIT"
] | null | null | null | users/models.py | harryghgim/django-blog | 13b5613766664e3250c12824c25a021bce33c8e4 | [
"MIT"
] | 10 | 2021-03-21T15:46:43.000Z | 2022-03-12T00:40:23.000Z | users/models.py | gwanghyeongim/django-blog | 13b5613766664e3250c12824c25a021bce33c8e4 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from PIL import Image
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
image = models.ImageField(default='default.jpg', upload_to='profile_pics')
def __str__(self):
return f'{self.user.... | 28.333333 | 78 | 0.747059 |
4a0584be3cedf5f91ec4798730b269a045b9911d | 33,574 | py | Python | telemetry/telemetry/internal/actions/action_runner.py | cloudera/catapult | b15a8c1c417380f4c8289596354cd10496eac12d | [
"BSD-3-Clause"
] | null | null | null | telemetry/telemetry/internal/actions/action_runner.py | cloudera/catapult | b15a8c1c417380f4c8289596354cd10496eac12d | [
"BSD-3-Clause"
] | 1 | 2021-02-23T22:20:14.000Z | 2021-02-23T22:20:14.000Z | telemetry/telemetry/internal/actions/action_runner.py | isabella232/catapult | b15a8c1c417380f4c8289596354cd10496eac12d | [
"BSD-3-Clause"
] | 1 | 2020-12-12T10:38:37.000Z | 2020-12-12T10:38:37.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import time
import urlparse
from telemetry.internal.actions.drag import DragAction
from telemetry.internal.actions.javascript_click import Cl... | 42.445006 | 80 | 0.707452 |
4a058524717a4bace37c9185cf82ad7fe4acf95d | 5,748 | py | Python | CodonSubstitution/build/biopython/Bio/Phylo/PAML/_parse_yn00.py | JackCurragh/DARNED | 13963d129bd8f69fb1106ad1f47394b3211a939c | [
"MIT"
] | 37 | 2015-02-24T18:58:30.000Z | 2021-03-07T21:22:18.000Z | CodonSubstitution/build/biopython/Bio/Phylo/PAML/_parse_yn00.py | JackCurragh/DARNED | 13963d129bd8f69fb1106ad1f47394b3211a939c | [
"MIT"
] | 12 | 2016-06-09T21:57:00.000Z | 2020-09-11T18:48:51.000Z | CodonSubstitution/build/biopython/Bio/Phylo/PAML/_parse_yn00.py | JackCurragh/DARNED | 13963d129bd8f69fb1106ad1f47394b3211a939c | [
"MIT"
] | 19 | 2016-03-26T08:15:17.000Z | 2021-04-12T05:03:29.000Z | # Copyright (C) 2011 by Brandon Invergo (b.invergo@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import re
def parse_ng86(lines, results):
""" Parse the Nei & Gojobori (1986) section... | 44.215385 | 85 | 0.540884 |
4a0586e8ae07e766d3053324f4da13149773c3a1 | 3,082 | py | Python | gltbx/extract_opengl_specs.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | gltbx/extract_opengl_specs.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | gltbx/extract_opengl_specs.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | """
To update opengl_specs.txt:
1. In an empty temporary directory run:
wget_opengl_specs.csh
2. In $GLTBX_DIST run:
python extract_opengl_specs.py /tmpdir/html/*/*.html > opengl_specs.txt
"""
from __future__ import absolute_import, division, print_function
import sys, os
sequential_defines = ["GL... | 32.104167 | 79 | 0.623621 |
4a05892cff3e4f050528c59373abaf5c0e07c92b | 1,846 | py | Python | app/core/migrations/0001_initial.py | MouadLo/recipe-app-api | 9d72136357ec92111bd13156791e06e1cb605a52 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | MouadLo/recipe-app-api | 9d72136357ec92111bd13156791e06e1cb605a52 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | MouadLo/recipe-app-api | 9d72136357ec92111bd13156791e06e1cb605a52 | [
"MIT"
] | 1 | 2022-02-23T04:18:37.000Z | 2022-02-23T04:18:37.000Z | # Generated by Django 4.0.2 on 2022-02-23 06:07
from django.db import migrations, models
import django.db.models.manager
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]
operations = [
migrations.CreateModel... | 48.578947 | 266 | 0.630553 |
4a0589fee6a3e2074bb7023500af30f23f8a57e5 | 17,505 | py | Python | Logistic_regression_analysis.py | yochaiedlitz/T2DM_UKB_predictions | 1e6b22e3d51d515eb065d7d5f46408f86f33d0b8 | [
"MIT"
] | 1 | 2022-01-17T13:13:02.000Z | 2022-01-17T13:13:02.000Z | Logistic_regression_analysis.py | yochaiedlitz/T2DM_UKB_predictions | 1e6b22e3d51d515eb065d7d5f46408f86f33d0b8 | [
"MIT"
] | null | null | null | Logistic_regression_analysis.py | yochaiedlitz/T2DM_UKB_predictions | 1e6b22e3d51d515eb065d7d5f46408f86f33d0b8 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import pickle
import os
from sklearn.linear_model import LogisticRegressionCV
from sklearn.metrics import roc_auc_score, make_scorer,roc_curve, auc,average_precision_score,precision_recall_curve
import matplotlib.pyplot as plt
import matplotlib
import shap
import seaborn as sns
fr... | 44.541985 | 128 | 0.659183 |
4a058b5b2230dbdb7f9db4282f67f0f8b6d7e0c3 | 3,161 | py | Python | src/validators/ExampleValidator.py | JiaZhou-PU/HERON | e8dbbfd2d2d308047528e7242932407fc2208e49 | [
"Apache-2.0"
] | null | null | null | src/validators/ExampleValidator.py | JiaZhou-PU/HERON | e8dbbfd2d2d308047528e7242932407fc2208e49 | [
"Apache-2.0"
] | null | null | null | src/validators/ExampleValidator.py | JiaZhou-PU/HERON | e8dbbfd2d2d308047528e7242932407fc2208e49 | [
"Apache-2.0"
] | null | null | null |
# Copyright 2020, Battelle Energy Alliance, LLC
# ALL RIGHTS RESERVED
"""
Example class for validators.
"""
import numpy as np
from utils import InputData, InputTypes
from .Validator import Validator
class Example(Validator):
"""
Example class for validating dispatch decisions.
Arbitrarily, uses percent... | 34.736264 | 99 | 0.597912 |
4a058c682544fc4838f46d766853bb2e06603a77 | 861 | py | Python | Quickly_Find_Multiple_Left_Rotations_of_Array.py | pushpakjalan02/GeeksForGeeks-Solutions | 22bc880672eca39a1b1fbdab8f9067bee46fa7a2 | [
"MIT"
] | null | null | null | Quickly_Find_Multiple_Left_Rotations_of_Array.py | pushpakjalan02/GeeksForGeeks-Solutions | 22bc880672eca39a1b1fbdab8f9067bee46fa7a2 | [
"MIT"
] | null | null | null | Quickly_Find_Multiple_Left_Rotations_of_Array.py | pushpakjalan02/GeeksForGeeks-Solutions | 22bc880672eca39a1b1fbdab8f9067bee46fa7a2 | [
"MIT"
] | null | null | null | # Quickly find multiple left rotations of an array | Set 1
# Given an array of size n and multiple values around which we need to left rotate the array. How to quickly find multiple left rotations?
# URL: https://www.geeksforgeeks.org/quickly-find-multiple-left-rotations-of-an-array/
import sys
def display_rotations... | 33.115385 | 138 | 0.674797 |
4a058c817ede39d8392f288523fe1ecf9a7d60ba | 247 | py | Python | test/python/quantum_info/__init__.py | ismaila-at-za-ibm/qiskit-terra | 08303ec98ac7b33fde55266dc3a74466fbdcae95 | [
"Apache-2.0"
] | 2 | 2021-09-06T19:25:36.000Z | 2021-11-17T10:46:12.000Z | test/python/quantum_info/__init__.py | ismaila-at-za-ibm/qiskit-terra | 08303ec98ac7b33fde55266dc3a74466fbdcae95 | [
"Apache-2.0"
] | null | null | null | test/python/quantum_info/__init__.py | ismaila-at-za-ibm/qiskit-terra | 08303ec98ac7b33fde55266dc3a74466fbdcae95 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Qiskit quantum information integration tests."""
| 27.444444 | 77 | 0.720648 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.