hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bf0eacddd2853377451624b292038d303779566f | 81 | py | Python | src/rimuc/__init__.py | srackham/rimu-py | 3da67cb362b6d34fd363e9f4ce5e0afb019baa4c | [
"MIT"
] | null | null | null | src/rimuc/__init__.py | srackham/rimu-py | 3da67cb362b6d34fd363e9f4ce5e0afb019baa4c | [
"MIT"
] | 4 | 2020-03-24T17:59:43.000Z | 2021-06-02T00:48:53.000Z | src/rimuc/__init__.py | srackham/rimu-py | 3da67cb362b6d34fd363e9f4ce5e0afb019baa4c | [
"MIT"
] | null | null | null | from rimuc.rimuc import main, readResource
from rimuc.resources import resources
| 27 | 42 | 0.851852 |
bf0f9c054a12b0b6dbe3d0df5978701f903438a0 | 4,157 | py | Python | UGRID/ESTOFS_water_levels.py | petercunning/notebook | 5b26f2dc96bcb36434542b397de6ca5fa3b61a0a | [
"MIT"
] | 32 | 2015-01-07T01:48:05.000Z | 2022-03-02T07:07:42.000Z | UGRID/ESTOFS_water_levels.py | petercunning/notebook | 5b26f2dc96bcb36434542b397de6ca5fa3b61a0a | [
"MIT"
] | 1 | 2015-04-13T21:00:18.000Z | 2015-04-13T21:00:18.000Z | UGRID/ESTOFS_water_levels.py | petercunning/notebook | 5b26f2dc96bcb36434542b397de6ca5fa3b61a0a | [
"MIT"
] | 30 | 2015-01-28T09:31:29.000Z | 2022-03-07T03:08:28.000Z | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <markdowncell>
# #Extract ESTOFS water levels using NetCDF4-Python and analyze/visualize with Pandas
# <codecell>
# Plot forecast water levels from NECOFS model from list of lon,lat locations
# (uses the nearest point, no interpolation)
%matplotlib inline
import ... | 24.597633 | 115 | 0.690883 |
bf0fd0fccbb5557293b4ea72b289acf6830c47c6 | 5,947 | py | Python | datahub/company/test/test_contact_matching.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 6 | 2019-12-02T16:11:24.000Z | 2022-03-18T10:02:02.000Z | datahub/company/test/test_contact_matching.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 1,696 | 2019-10-31T14:08:37.000Z | 2022-03-29T12:35:57.000Z | datahub/company/test/test_contact_matching.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 9 | 2019-11-22T12:42:03.000Z | 2021-09-03T14:25:05.000Z | import pytest
from datahub.company.contact_matching import (
ContactMatchingStatus,
find_active_contact_by_email_address,
MatchStrategy,
)
from datahub.company.test.factories import ContactFactory
from datahub.interaction.test.factories import CompanyInteractionFactory
EMAIL_MATCHING_CONTACT_TEST_DATA = ... | 29.735 | 97 | 0.585842 |
bf0ff252d5a80eb424fe2ca9f264baafddb04d3e | 47 | py | Python | venv/lib/python3.7/hmac.py | OseiasBeu/PyECom | 2ea4e7e3be4ca015fb1bbc1083aa3f2d44accc5f | [
"CC0-1.0"
] | 1 | 2020-08-16T04:04:23.000Z | 2020-08-16T04:04:23.000Z | venv/lib/python3.7/hmac.py | OseiasBeu/PyECom | 2ea4e7e3be4ca015fb1bbc1083aa3f2d44accc5f | [
"CC0-1.0"
] | null | null | null | venv/lib/python3.7/hmac.py | OseiasBeu/PyECom | 2ea4e7e3be4ca015fb1bbc1083aa3f2d44accc5f | [
"CC0-1.0"
] | null | null | null | /home/oseiasbeu/anaconda3/lib/python3.7/hmac.py | 47 | 47 | 0.829787 |
bf1097af9af67892577cd0e6f68b0676b6d2f18d | 1,406 | py | Python | foodgram/migrations/0008_auto_20210303_2022.py | valkhmyrov/foodgram-project | d250ccb998d1141e8b01dc34f6af4dc500a44108 | [
"MIT"
] | null | null | null | foodgram/migrations/0008_auto_20210303_2022.py | valkhmyrov/foodgram-project | d250ccb998d1141e8b01dc34f6af4dc500a44108 | [
"MIT"
] | null | null | null | foodgram/migrations/0008_auto_20210303_2022.py | valkhmyrov/foodgram-project | d250ccb998d1141e8b01dc34f6af4dc500a44108 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-03-03 20:22
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 35.15 | 169 | 0.603841 |
bf10e64b5c7a44cc7bb5e05325893fc3b556c425 | 218 | py | Python | feed.py | rlexmann/CatFeeder | 7564b84fc16a058301d7a01074cbfbcc64c0fea2 | [
"MIT"
] | null | null | null | feed.py | rlexmann/CatFeeder | 7564b84fc16a058301d7a01074cbfbcc64c0fea2 | [
"MIT"
] | null | null | null | feed.py | rlexmann/CatFeeder | 7564b84fc16a058301d7a01074cbfbcc64c0fea2 | [
"MIT"
] | null | null | null | import os
import sys
import fcntl
fh=0
run_once()
| 15.571429 | 51 | 0.642202 |
bf115681aa4774c626fdc97f8177b78f76d96832 | 221 | py | Python | tests/test_faulty.py | ashwoods/gst-c-crash | 44f4fbae488d5e5e9432f4546f025395e89d32ea | [
"MIT"
] | null | null | null | tests/test_faulty.py | ashwoods/gst-c-crash | 44f4fbae488d5e5e9432f4546f025395e89d32ea | [
"MIT"
] | null | null | null | tests/test_faulty.py | ashwoods/gst-c-crash | 44f4fbae488d5e5e9432f4546f025395e89d32ea | [
"MIT"
] | null | null | null | import pytest
import asyncio
| 22.1 | 67 | 0.723982 |
bf11fb52afa6b07f495dc21febd5bd3689f7d684 | 4,462 | py | Python | music_exercises/accidentals.py | d53dave/music-exercises-python | 0d6eb3614e5d707b58372f6c498d4939ffdf7df2 | [
"MIT"
] | null | null | null | music_exercises/accidentals.py | d53dave/music-exercises-python | 0d6eb3614e5d707b58372f6c498d4939ffdf7df2 | [
"MIT"
] | null | null | null | music_exercises/accidentals.py | d53dave/music-exercises-python | 0d6eb3614e5d707b58372f6c498d4939ffdf7df2 | [
"MIT"
] | null | null | null | import statistics
import random
import time
from typing import List, Tuple, Dict
from time import monotonic
from blessings import Terminal
from . import Note
_ACCIDENTALS: Dict[str, Dict] = {
'sharps': {
Note('C'): [],
Note('G'): [Note('F#')],
Note('D'): [Note('F#'), Note('C#')],
... | 31.422535 | 134 | 0.445092 |
bf12955f535f4b651c9049389b39fbacce9037d4 | 4,926 | py | Python | api/server.py | myrithok/James | 394b0ca80a27d90e95172de7e595e5451e0a5452 | [
"MIT"
] | null | null | null | api/server.py | myrithok/James | 394b0ca80a27d90e95172de7e595e5451e0a5452 | [
"MIT"
] | 82 | 2021-02-24T03:48:31.000Z | 2021-04-01T02:45:29.000Z | api/server.py | myrithok/James | 394b0ca80a27d90e95172de7e595e5451e0a5452 | [
"MIT"
] | null | null | null | # Library imports
from flask import Flask, request, make_response, Response
from flask_cors import CORS
import json
import os
import sys
# Add James to path
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
# Project imports
from api.jamesClasses import inputCorpus
from api.jamesConfig import cfg
from api.jam... | 43.982143 | 95 | 0.607592 |
bf14174f34338acb3aedabe4d7996c932e330c66 | 7,160 | py | Python | main.py | henryshunt/psn-logger | 1f20e7bd06beb208a03ca6c78e930dc0b080a125 | [
"MIT"
] | null | null | null | main.py | henryshunt/psn-logger | 1f20e7bd06beb208a03ca6c78e930dc0b080a125 | [
"MIT"
] | null | null | null | main.py | henryshunt/psn-logger | 1f20e7bd06beb208a03ca6c78e930dc0b080a125 | [
"MIT"
] | 1 | 2020-05-07T16:53:32.000Z | 2020-05-07T16:53:32.000Z | import json
import os
from datetime import datetime
import sys
import queue
import threading
import smtplib
import ssl
import daemon
import paho.mqtt.client as mqtt
import pymysql
import config
import helpers
broker = None
alarm_analysis_queue = queue.Queue()
is_processing_alarms = False
def... | 38.494624 | 93 | 0.570251 |
bf1431e0eddc1dba33cd09f534b1618b5fdcd42d | 2,165 | py | Python | toolsaurus/database/video_similarities/backend_python.py | notoraptor/pysaurus | 3bf5fe8c15e0e0e580e5edaea05b4a1298641367 | [
"MIT"
] | null | null | null | toolsaurus/database/video_similarities/backend_python.py | notoraptor/pysaurus | 3bf5fe8c15e0e0e580e5edaea05b4a1298641367 | [
"MIT"
] | 4 | 2021-08-13T14:03:02.000Z | 2022-03-05T16:02:45.000Z | toolsaurus/database/video_similarities/backend_python.py | notoraptor/pysaurus | 3bf5fe8c15e0e0e580e5edaea05b4a1298641367 | [
"MIT"
] | null | null | null | from typing import List
from pysaurus.core import notifications
from pysaurus.core.constants import VIDEO_BATCH_SIZE
from pysaurus.core.notifier import Notifier
from pysaurus.core.profiling import Profiler
from pysaurus.database.miniature_tools.miniature import Miniature
from pysaurus.database.video_similarities.backe... | 32.313433 | 87 | 0.605543 |
bf14d310d87c1568715948cdf7f49141627c1bb8 | 1,460 | py | Python | tests/test_hypothesis.py | bcbernardo/hyp2rem | 39afab9bafff8f3b128848f5e9adfd98cc272f80 | [
"MIT"
] | 1 | 2021-04-06T08:53:37.000Z | 2021-04-06T08:53:37.000Z | tests/test_hypothesis.py | bcbernardo/hyp2rem | 39afab9bafff8f3b128848f5e9adfd98cc272f80 | [
"MIT"
] | null | null | null | tests/test_hypothesis.py | bcbernardo/hyp2rem | 39afab9bafff8f3b128848f5e9adfd98cc272f80 | [
"MIT"
] | null | null | null | # Copyright 2020 The Hyp2Rem Authors
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
"""Test Hypothes.is connection logic.
This module provides tests cases for Hypothes.is API interfaces in hyp2rem
package.
"""
impor... | 28.076923 | 82 | 0.70274 |
bf170b2fe6a42b9493aa833524bdec258412e672 | 13,925 | py | Python | neighapp/views.py | erhic/NeighbourHood- | 8d64116aa65b04b8372be164ee7c22aff2cdbf7c | [
"MIT"
] | 2 | 2022-03-30T20:06:06.000Z | 2022-03-30T20:06:29.000Z | neighapp/views.py | erhic/NeighbourHood- | 8d64116aa65b04b8372be164ee7c22aff2cdbf7c | [
"MIT"
] | null | null | null | neighapp/views.py | erhic/NeighbourHood- | 8d64116aa65b04b8372be164ee7c22aff2cdbf7c | [
"MIT"
] | 1 | 2022-03-29T08:56:26.000Z | 2022-03-29T08:56:26.000Z | from os import name
from django.shortcuts import render,redirect
# Create your views here.
# from django.contrib.auth.forms import UserCreationForm
from django.contrib import messages
from .forms import UserRegisterForm,UserUpdateForm,ProfileUpdateForm
from django.contrib.auth.decorators import login_required
# from... | 36.45288 | 230 | 0.630736 |
bf177089627f5ddc4e51c39b1edceeffd57fa2df | 448 | py | Python | user/models.py | yangfeiffei/Dsystem | 8c4b677151d8a9777c265b0a8744c068d122e780 | [
"MIT"
] | null | null | null | user/models.py | yangfeiffei/Dsystem | 8c4b677151d8a9777c265b0a8744c068d122e780 | [
"MIT"
] | null | null | null | user/models.py | yangfeiffei/Dsystem | 8c4b677151d8a9777c265b0a8744c068d122e780 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import Permission, User
# Create your models here.
| 14.451613 | 57 | 0.620536 |
bf17dd3164a5ecdd6964e9c8beb0d2a5dac56847 | 8,386 | py | Python | tests/main_test.py | viggyfresh/prom | a918476dab1dbadced61fc088cdc36fed1685d0a | [
"MIT"
] | null | null | null | tests/main_test.py | viggyfresh/prom | a918476dab1dbadced61fc088cdc36fed1685d0a | [
"MIT"
] | null | null | null | tests/main_test.py | viggyfresh/prom | a918476dab1dbadced61fc088cdc36fed1685d0a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, division, print_function, absolute_import
import os
from prom import query
from prom.model import Orm
import prom
from captain.client import Captain
from . import BaseTestCase as BTC, testdata
from prom.cli.dump import get_orm_classes, get_table_map, g... | 31.885932 | 100 | 0.487837 |
bf19f569bca74eea28a9528004fac46e3c1ee79c | 15,636 | py | Python | pydictoolkit/plot/plotter.py | ilyasst/pydictoolkit | 27b83647105bee64225086c21ab5a1f4bb5cf935 | [
"MIT"
] | 7 | 2020-02-14T10:48:55.000Z | 2022-01-20T05:50:36.000Z | pydictoolkit/plot/plotter.py | ilyasst/pydictoolkit | 27b83647105bee64225086c21ab5a1f4bb5cf935 | [
"MIT"
] | 1 | 2019-10-27T03:38:42.000Z | 2019-10-27T03:38:42.000Z | pydictoolkit/plot/plotter.py | ilyasst/pydictoolkit | 27b83647105bee64225086c21ab5a1f4bb5cf935 | [
"MIT"
] | 4 | 2020-07-07T15:58:25.000Z | 2021-09-16T18:19:54.000Z | import matplotlib.pyplot as plt
import matplotlib
from matplotlib import animation
import seaborn as sns
import numpy as np
import cmocean
import os
from mpl_toolkits.axes_grid1 import AxesGrid
from mpl_toolkits.axes_grid1 import make_axes_locatable
import scipy
import scipy.ndimage
from scipy.stats import norm
import ... | 42.956044 | 216 | 0.575851 |
bf1bc3b976e8f06a9301d90ff36fcbbeff7628e4 | 230 | py | Python | src/sage/version.py | yzpopulation/sage | d2dc2f80b5a8e039701e292653e25366e3e5ec1e | [
"BSL-1.0"
] | null | null | null | src/sage/version.py | yzpopulation/sage | d2dc2f80b5a8e039701e292653e25366e3e5ec1e | [
"BSL-1.0"
] | null | null | null | src/sage/version.py | yzpopulation/sage | d2dc2f80b5a8e039701e292653e25366e3e5ec1e | [
"BSL-1.0"
] | null | null | null | # Sage version information for Python scripts
# This file is auto-generated by the sage-update-version script, do not edit!
version = '9.5.beta2'
date = '2021-09-26'
banner = 'SageMath version 9.5.beta2, Release Date: 2021-09-26'
| 38.333333 | 77 | 0.743478 |
bf1c51f2907d8d63c297130c67bb840347aae2e4 | 456 | py | Python | src/postgres/migrations/0008_fix_user_id_group.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 47 | 2015-12-19T10:23:11.000Z | 2018-06-13T08:07:33.000Z | src/postgres/migrations/0008_fix_user_id_group.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 473 | 2018-12-01T13:01:48.000Z | 2022-03-30T07:10:42.000Z | src/postgres/migrations/0008_fix_user_id_group.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 91 | 2018-07-26T02:38:59.000Z | 2022-01-16T02:38:31.000Z | from django.db import migrations
ALTER_GROUP_USER_ID = """
ALTER TABLE "users_user_groups" alter COLUMN "user_id"
SET DATA TYPE bigint;
"""
| 20.727273 | 63 | 0.622807 |
bf1c9599a424608600110263d2e23b1761467296 | 747 | py | Python | python.py | weijie88/test | d2f0c4ff4ca88fa1ef6518ba2b1f040216142125 | [
"Apache-2.0"
] | null | null | null | python.py | weijie88/test | d2f0c4ff4ca88fa1ef6518ba2b1f040216142125 | [
"Apache-2.0"
] | null | null | null | python.py | weijie88/test | d2f0c4ff4ca88fa1ef6518ba2b1f040216142125 | [
"Apache-2.0"
] | null | null | null |
# class Cat(Resource):
# def get(self):
# return {'data':'get'}
#
# def post(self):
# return {'data': 'post'}
#
# def put(self):
# return {'data': 'put'}
#
# def delete(self):
# return {'data': 'delete'}
from pip._vendor.distlib.resources import Resource
print("ss... | 17.785714 | 54 | 0.568942 |
bf1e61d18f39fcbb3b2236f4d5d6b17d108ac0be | 2,337 | py | Python | export_onnx_group_norm.py | lachinov/brats2019 | a0085ed7d202da0800836164f0240cdb801390e1 | [
"MIT"
] | 42 | 2019-12-12T21:10:55.000Z | 2022-03-05T14:15:07.000Z | export_onnx_group_norm.py | lachinov/brats2019 | a0085ed7d202da0800836164f0240cdb801390e1 | [
"MIT"
] | 1 | 2020-03-02T16:51:08.000Z | 2020-03-05T08:01:26.000Z | export_onnx_group_norm.py | lachinov/brats2019 | a0085ed7d202da0800836164f0240cdb801390e1 | [
"MIT"
] | 10 | 2019-12-13T14:56:52.000Z | 2022-03-21T10:55:47.000Z | import argparse
import torch.onnx
import os
from collections import OrderedDict
from torch.onnx.symbolic_registry import register_op
from torch.onnx.symbolic_helper import parse_args
from model import UNet
parser = argparse.ArgumentParser(description="PyTorch SegTHOR")
parser.add_argument("--name", default="t... | 45.823529 | 156 | 0.640137 |
bf1f0ace8e9816d79a7fe6bd0d63ba7a018cf0d9 | 2,443 | py | Python | Zoo/neural_network_sense/predator.py | Tanmay-Kumar-Sinha/Evolution-Simulation | 1740c32320de7f8eab2780075f1161781eb520d1 | [
"MIT"
] | 7 | 2019-10-21T13:40:28.000Z | 2021-04-07T01:36:15.000Z | Zoo/neural_network_sense/predator.py | Tanmay-Kumar-Sinha/Evolution-Simulation | 1740c32320de7f8eab2780075f1161781eb520d1 | [
"MIT"
] | 13 | 2020-03-22T15:36:36.000Z | 2020-06-03T19:41:18.000Z | Zoo/neural_network_sense/predator.py | Tanmay-Kumar-Sinha/Evolution-Simulation | 1740c32320de7f8eab2780075f1161781eb520d1 | [
"MIT"
] | 4 | 2019-10-25T12:14:06.000Z | 2020-05-30T15:32:53.000Z | from creature import *
from nn_model import model_simple_predator
| 35.926471 | 121 | 0.624233 |
bf1f86150d634b31aff1bba3adb47440396687b0 | 6,824 | py | Python | libcloud/extra/drivers/google.py | Scalr/libcloud | 942fe4e98a75e1797b610f6e7bf0d9b310b74ffb | [
"Apache-2.0"
] | null | null | null | libcloud/extra/drivers/google.py | Scalr/libcloud | 942fe4e98a75e1797b610f6e7bf0d9b310b74ffb | [
"Apache-2.0"
] | 11 | 2017-01-29T08:59:21.000Z | 2018-07-02T09:17:47.000Z | libcloud/extra/drivers/google.py | Scalr/libcloud | 942fe4e98a75e1797b610f6e7bf0d9b310b74ffb | [
"Apache-2.0"
] | 4 | 2016-04-04T08:01:48.000Z | 2018-06-06T08:04:36.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 39.906433 | 107 | 0.622509 |
bf1fdc92430ec1c52e24728aa94c50eb9d04f14f | 11,473 | py | Python | projects/models.py | nuwainfo/treeio | f57bf9114d9774c11468a1b0e44614b04631beb1 | [
"MIT"
] | null | null | null | projects/models.py | nuwainfo/treeio | f57bf9114d9774c11468a1b0e44614b04631beb1 | [
"MIT"
] | null | null | null | projects/models.py | nuwainfo/treeio | f57bf9114d9774c11468a1b0e44614b04631beb1 | [
"MIT"
] | null | null | null | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
Project management models
"""
from django.db import models
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from treeio.core.models import Object, User
from... | 32.59375 | 96 | 0.589384 |
bf20b2641a1b11444ae0fd4623b65b55a1f7d7dc | 97 | py | Python | pandapower/shortcircuit/__init__.py | yougnen/pandapower | d206bd91e68dd03675f7fe8ddee141621ef437fc | [
"BSD-3-Clause"
] | 104 | 2017-02-21T17:13:51.000Z | 2022-03-21T13:52:27.000Z | pandapower/shortcircuit/__init__.py | lvzhibai/pandapower | 24ed3056558887cc89f67d15b5527523990ae9a1 | [
"BSD-3-Clause"
] | 126 | 2017-02-15T17:09:08.000Z | 2018-07-16T13:25:15.000Z | pandapower/shortcircuit/__init__.py | lvzhibai/pandapower | 24ed3056558887cc89f67d15b5527523990ae9a1 | [
"BSD-3-Clause"
] | 57 | 2017-03-08T13:49:32.000Z | 2022-02-28T10:36:55.000Z | from pandapower.shortcircuit.calc_sc import calc_sc
from pandapower.shortcircuit.toolbox import * | 48.5 | 51 | 0.876289 |
bf23cde279b2d75722f2dc833342dcd5e5acda22 | 3,256 | py | Python | virtool/files/db.py | ColeVoelpel/virtool | 859c8d2516f07343bde47f3bae0247dedd76e6c4 | [
"MIT"
] | 1 | 2019-08-23T00:19:00.000Z | 2019-08-23T00:19:00.000Z | virtool/files/db.py | ColeVoelpel/virtool | 859c8d2516f07343bde47f3bae0247dedd76e6c4 | [
"MIT"
] | null | null | null | virtool/files/db.py | ColeVoelpel/virtool | 859c8d2516f07343bde47f3bae0247dedd76e6c4 | [
"MIT"
] | null | null | null | import logging
from typing import Union
import arrow
import virtool.db.core
import virtool.db.utils
import virtool.files.utils
import virtool.utils
logger = logging.getLogger(__name__)
PROJECTION = [
"_id",
"name",
"size",
"user",
"uploaded_at",
"type",
"ready",
"reserved"
]
| 25.4375 | 110 | 0.652027 |
bf249fd11071a06f662508adbf18b549785d5952 | 1,257 | py | Python | test/test_simulation.py | andrea-simonetto/qiskit | e2c8fff0f57f8b54d99028f3f116404b0c6e7ff8 | [
"Apache-2.0"
] | 2,660 | 2018-12-15T15:15:07.000Z | 2022-03-31T08:46:26.000Z | test/test_simulation.py | andrea-simonetto/qiskit | e2c8fff0f57f8b54d99028f3f116404b0c6e7ff8 | [
"Apache-2.0"
] | 900 | 2018-12-13T12:16:19.000Z | 2022-03-31T21:15:56.000Z | test/test_simulation.py | andrea-simonetto/qiskit | e2c8fff0f57f8b54d99028f3f116404b0c6e7ff8 | [
"Apache-2.0"
] | 803 | 2018-12-19T16:48:00.000Z | 2022-03-29T19:51:14.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018.
#
# 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 modif... | 32.230769 | 77 | 0.654733 |
bf2556d0aaf293829c998a062b55220bfa74d30c | 2,452 | py | Python | tipfyrecipes/ln.py | zhaohongw2015/tipfyrecipes | 519f8cb35faa20b47bd171f8535fe7dfec783b5b | [
"Apache-2.0"
] | null | null | null | tipfyrecipes/ln.py | zhaohongw2015/tipfyrecipes | 519f8cb35faa20b47bd171f8535fe7dfec783b5b | [
"Apache-2.0"
] | null | null | null | tipfyrecipes/ln.py | zhaohongw2015/tipfyrecipes | 519f8cb35faa20b47bd171f8535fe7dfec783b5b | [
"Apache-2.0"
] | null | null | null | # Carlo Pires <carlopires@gmail.com>
# Seg 14 Mar 2011 21:46:55 BRT
import logging, os, zc.buildout
| 24.767677 | 93 | 0.709217 |
bf263358cca6a5023f37c9389d03052cb032d44a | 5,338 | py | Python | tests/test.py | Marselliy/tf-aug | 478a632e1822722a74397a169b0b63bd0c5692e7 | [
"MIT"
] | 1 | 2019-01-11T15:36:24.000Z | 2019-01-11T15:36:24.000Z | tests/test.py | Marselliy/tf-aug | 478a632e1822722a74397a169b0b63bd0c5692e7 | [
"MIT"
] | null | null | null | tests/test.py | Marselliy/tf-aug | 478a632e1822722a74397a169b0b63bd0c5692e7 | [
"MIT"
] | null | null | null | import sys
import os
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'src'))
import tensorflow as tf
from tf_imgaug.sequential import Sequential
from tf_imgaug.augments import *
import unittest
if __name__ == '__main__':
unittest.main()
| 34.662338 | 110 | 0.540277 |
bf267ef227df31d203243d28260021f92d64f332 | 7,595 | py | Python | sdk/python/pulumi_gcp/storage/bucket.py | stack72/pulumi-gcp | e63e4ed3129fe8e64e4869f4839ba2b20f57cb57 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/storage/bucket.py | stack72/pulumi-gcp | e63e4ed3129fe8e64e4869f4839ba2b20f57cb57 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/storage/bucket.py | stack72/pulumi-gcp | e63e4ed3129fe8e64e4869f4839ba2b20f57cb57 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from .. import utilities, tables
| 45.753012 | 293 | 0.684398 |
bf27e0f1858e4df264021c6a3442bc4dc223d68e | 1,525 | py | Python | Shiva Sketch/main.py | arunvemana/Turtle-Animations | 4282db806bc5ac36aa7caec6dc808ac366606c1e | [
"MIT"
] | null | null | null | Shiva Sketch/main.py | arunvemana/Turtle-Animations | 4282db806bc5ac36aa7caec6dc808ac366606c1e | [
"MIT"
] | null | null | null | Shiva Sketch/main.py | arunvemana/Turtle-Animations | 4282db806bc5ac36aa7caec6dc808ac366606c1e | [
"MIT"
] | null | null | null | import cv2
import turtle
import numpy as np
from matplotlib import pyplot as plt
image = 'shiva.jpg'
im = cv2.imread(image,0)
th3 = outline()
plt.imshow(th3)
plt.axis('off')
plt.tight_layout()
# plt.show()
WIDTH = im.shape[1]
HEIGHT = im.shape[0]
print(WIDTH, HEIGHT)
CUTOFF_LEN = ((WIDTH + HEIGHT)/2)/60 #60 th... | 22.426471 | 162 | 0.602623 |
bf282f3d61cb206f6f8adc350169e75ae766a911 | 2,858 | py | Python | news/views.py | Hardik-Mittal/Robotics_Club_Website | 0b32c3ca7142d145f5a18adedda3e97ea510aec4 | [
"MIT"
] | null | null | null | news/views.py | Hardik-Mittal/Robotics_Club_Website | 0b32c3ca7142d145f5a18adedda3e97ea510aec4 | [
"MIT"
] | null | null | null | news/views.py | Hardik-Mittal/Robotics_Club_Website | 0b32c3ca7142d145f5a18adedda3e97ea510aec4 | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect,HttpResponse
from django.contrib.auth.decorators import login_required
from django.urls import reverse
from .forms import NewsForm
from .models import News
from django.contrib import messages
from RoboClub.decorators import has_role_head_or_coordinator
from django.template.l... | 33.623529 | 88 | 0.690693 |
bf28b42af842ae874f2f47e2a2cdd4fd4aed65fc | 933 | py | Python | ui.py | Hidanko/Caxeiro-Viajante | 5ec1b9395ce90f501604c91d997a8fca06d380c5 | [
"MIT"
] | null | null | null | ui.py | Hidanko/Caxeiro-Viajante | 5ec1b9395ce90f501604c91d997a8fca06d380c5 | [
"MIT"
] | 1 | 2020-10-13T01:35:31.000Z | 2020-10-13T01:35:31.000Z | ui.py | Hidanko/Caxeiro-Viajante | 5ec1b9395ce90f501604c91d997a8fca06d380c5 | [
"MIT"
] | null | null | null | import tkinter as tk
root = tk.Tk()
root.title("Traveller")
root.geometry("320x180")
app = Application(master=root)
app.mainloop() | 31.1 | 74 | 0.630225 |
bf2b083d99a818810a967b22d57454219570c7fb | 6,896 | py | Python | negar/countriesWithTheirCapital.py | sys113/negar | ae76bcac876376a97a5c58042716b1e65596666c | [
"MIT"
] | 23 | 2019-11-30T14:27:31.000Z | 2022-03-17T13:05:02.000Z | negar/countriesWithTheirCapital.py | sys113/negar | ae76bcac876376a97a5c58042716b1e65596666c | [
"MIT"
] | 1 | 2020-05-05T10:23:23.000Z | 2020-11-27T18:09:18.000Z | negar/countriesWithTheirCapital.py | sys113/negar | ae76bcac876376a97a5c58042716b1e65596666c | [
"MIT"
] | 5 | 2019-12-01T07:10:42.000Z | 2020-02-11T21:31:38.000Z | countries = {
"kabul": "afghanistan",
"tirana": "albania",
"alger": "algeria",
"fagatogo": "american samoa",
"andorra la vella": "andorra",
"luanda": "angola",
"the valley": "anguilla",
"null": "united states minor outlying islands",
"saint john's": "antigua and barbuda",
"buenos... | 29.344681 | 52 | 0.569751 |
bf2be868e876ff1379b422722d254d7d9dbed87e | 2,096 | py | Python | parse_posts.py | artyemk/GolosProject | 72488efafc5fb14f2b86d83cf8cb1b402247832e | [
"Apache-2.0"
] | 2 | 2018-02-22T11:31:57.000Z | 2018-02-26T17:49:39.000Z | parse_posts.py | artyemk/GolosProject | 72488efafc5fb14f2b86d83cf8cb1b402247832e | [
"Apache-2.0"
] | null | null | null | parse_posts.py | artyemk/GolosProject | 72488efafc5fb14f2b86d83cf8cb1b402247832e | [
"Apache-2.0"
] | null | null | null | from websocket import WebSocket
from pymongo import MongoClient
import json
import re
#preventing eval mistakes
true = True
false = False
null = None
#connecting to db for posts and blockchain websocket
db = MongoClient().golos
ws = WebSocket()
ws.connect('wss://api.golos.cf')
print('Sending for 100')
#Sending quer... | 27.946667 | 105 | 0.545802 |
bf2d0b810d534428fc2c9c6b2a3d085fe051ff9e | 2,943 | py | Python | Array/Search for Items in an Array/Valid Mountain Array/by_iteration_one-pass_scan.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 32 | 2020-01-05T13:37:16.000Z | 2022-03-26T07:27:09.000Z | Array/Search for Items in an Array/Valid Mountain Array/by_iteration_one-pass_scan.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | null | null | null | Array/Search for Items in an Array/Valid Mountain Array/by_iteration_one-pass_scan.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 8 | 2020-06-18T16:17:27.000Z | 2022-03-15T23:58:18.000Z | '''
Description:
Given an array A of integers, return true if and only if it is a valid mountain array.
Recall that A is a mountain array if and only if:
A.length >= 3
There exists some i with 0 < i < A.length - 1 such that:
A[0] < A[1] < ... A[i-1] < A[i]
A[i] > A[i+1] > ... > A[A.length - 1]
Example 1:
Input... | 23.173228 | 255 | 0.507985 |
bf2e53e4fc686c4fa157c9f1d49a64a1d32b4721 | 1,088 | py | Python | eventz/immutable_sequence.py | danballance/eventz | b30ec56ffb6e3c6d6ad4b023f30f8f2da56ca175 | [
"MIT"
] | 1 | 2021-05-20T09:52:25.000Z | 2021-05-20T09:52:25.000Z | eventz/immutable_sequence.py | Eventz-Framework/eventz | b30ec56ffb6e3c6d6ad4b023f30f8f2da56ca175 | [
"MIT"
] | null | null | null | eventz/immutable_sequence.py | Eventz-Framework/eventz | b30ec56ffb6e3c6d6ad4b023f30f8f2da56ca175 | [
"MIT"
] | null | null | null | from typing import TypeVar, Generic, Iterable, Tuple
T = TypeVar('T')
| 29.405405 | 71 | 0.606618 |
bf2e74a2a897165ded28a97e4585351dba8ae533 | 5,581 | py | Python | sensoring/scripts/ball_detector.py | Cavalletta98/Behavioral-Architecture-with-Real-Simulation | ffd488badfe0344e09a769e8a54dd9dfeb2c44ea | [
"Apache-2.0"
] | 1 | 2021-03-27T15:35:24.000Z | 2021-03-27T15:35:24.000Z | sensoring/scripts/ball_detector.py | Cavalletta98/Behavioral-Architecture-with-Real-Simulation | ffd488badfe0344e09a769e8a54dd9dfeb2c44ea | [
"Apache-2.0"
] | null | null | null | sensoring/scripts/ball_detector.py | Cavalletta98/Behavioral-Architecture-with-Real-Simulation | ffd488badfe0344e09a769e8a54dd9dfeb2c44ea | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
ROS component that implement a ball detector
"""
# Import of libraries
import sys
import time
import numpy as np
from scipy.ndimage import filters
import imutils
import cv2
import roslib
import rospy
from sensor_msgs.msg import CompressedImage
from sensoring.srv import DetectImage,Dete... | 26.831731 | 127 | 0.573374 |
bf2ef3f67dfe9b3a6db2f8fef2c3a6c13c87130f | 1,326 | py | Python | module/logger.py | Xetera/IreneBot | e768bb3a0d2517ecb00d50da89d66ac0dd1498d0 | [
"MIT"
] | 1 | 2021-10-02T16:05:11.000Z | 2021-10-02T16:05:11.000Z | module/logger.py | Xetera/IreneBot | e768bb3a0d2517ecb00d50da89d66ac0dd1498d0 | [
"MIT"
] | null | null | null | module/logger.py | Xetera/IreneBot | e768bb3a0d2517ecb00d50da89d66ac0dd1498d0 | [
"MIT"
] | null | null | null | import logging
import datetime
from concurrent.futures import ThreadPoolExecutor
thread_pool = ThreadPoolExecutor()
| 33.15 | 103 | 0.692308 |
bf322eb3e03ba3347e71f0375bad9573edae27cc | 2,334 | py | Python | n3rgy-consumer-data.py | n3rgy/consumer-data | 2288f166b9fde029d1ba990c22cf5225573539b4 | [
"Apache-2.0"
] | 10 | 2020-07-08T07:23:11.000Z | 2022-03-30T08:38:28.000Z | n3rgy-consumer-data.py | n3rgy/consumer-data | 2288f166b9fde029d1ba990c22cf5225573539b4 | [
"Apache-2.0"
] | null | null | null | n3rgy-consumer-data.py | n3rgy/consumer-data | 2288f166b9fde029d1ba990c22cf5225573539b4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2020 by Matthew Roderick, n3rgy data ltd.
# All rights reserved.
#
# Sample script to interact with https://data.n3rgy.com service
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTI... | 25.096774 | 205 | 0.655527 |
bf326516f33fdb3c903e61dbd5cdde802e2ccc9b | 846 | py | Python | data/user.py | zr4x/pythonTests | ec5d6913a418a0f168dff85b82c1b824356b6cfa | [
"Apache-2.0"
] | null | null | null | data/user.py | zr4x/pythonTests | ec5d6913a418a0f168dff85b82c1b824356b6cfa | [
"Apache-2.0"
] | null | null | null | data/user.py | zr4x/pythonTests | ec5d6913a418a0f168dff85b82c1b824356b6cfa | [
"Apache-2.0"
] | null | null | null | from model.user_form import UserForm
import random
import string
# def random_string(prefix, maxlen):
# symbols = string.ascii_letters + string.digits + " " * 10
# return prefix + "".join([random.choice(symbols) for i in range(random.randrange(maxlen))])
#
#
# testdata =[
# UserForm(firstname=random_strin... | 36.782609 | 99 | 0.664303 |
bf332ca52efbc3a922edeac2391ae93e9ab25cbc | 918 | py | Python | project/tests/test_senders.py | vpplatonov/flask_part | ada2efedec00802ceea990830fd080d00f5ac9c1 | [
"MIT"
] | null | null | null | project/tests/test_senders.py | vpplatonov/flask_part | ada2efedec00802ceea990830fd080d00f5ac9c1 | [
"MIT"
] | null | null | null | project/tests/test_senders.py | vpplatonov/flask_part | ada2efedec00802ceea990830fd080d00f5ac9c1 | [
"MIT"
] | null | null | null | # project/tests/test_users.py
import json
from project.tests.base import BaseTestCase
from project import create_app
app = create_app()
| 32.785714 | 76 | 0.608932 |
bf338f7f2358fff05ea5ef053292621bd199e51a | 3,305 | py | Python | asf_tools/hand/prepare.py | jhkennedy/asf-tools | f218cf80b98c4eb0e6f66e53244a15e198d49012 | [
"BSD-3-Clause"
] | 2 | 2021-06-17T13:25:15.000Z | 2021-12-01T08:19:05.000Z | asf_tools/hand/prepare.py | jhkennedy/asf-tools | f218cf80b98c4eb0e6f66e53244a15e198d49012 | [
"BSD-3-Clause"
] | 23 | 2020-11-25T00:45:57.000Z | 2022-03-17T22:05:58.000Z | asf_tools/hand/prepare.py | ASFHyP3/GIS-tools | 435a544bd6f3f4953679e5d891c0e454f7bdd471 | [
"BSD-3-Clause"
] | 4 | 2021-05-10T06:03:44.000Z | 2021-10-08T19:48:31.000Z | """Prepare a Height Above Nearest Drainage (HAND) virtual raster (VRT) covering a given geometry"""
from pathlib import Path
from tempfile import NamedTemporaryFile
from typing import Union
from osgeo import gdal, ogr
from rasterio.enums import Resampling
from shapely.geometry import shape
from shapely.geometry.base i... | 44.066667 | 120 | 0.714675 |
bf34235540b48d242a0cfca365427c14034ba700 | 3,547 | py | Python | app/gwells/test_survey_render.py | cvarjao/gwells | cb47ec1d0c31b6f1586843e491f7cb5f1b98d61a | [
"Apache-2.0"
] | 1 | 2020-01-29T22:42:40.000Z | 2020-01-29T22:42:40.000Z | app/gwells/test_survey_render.py | matthewhall78/gwells | cb47ec1d0c31b6f1586843e491f7cb5f1b98d61a | [
"Apache-2.0"
] | 1 | 2018-05-02T05:28:33.000Z | 2018-05-09T15:58:07.000Z | app/gwells/test_survey_render.py | matthewhall78/gwells | cb47ec1d0c31b6f1586843e491f7cb5f1b98d61a | [
"Apache-2.0"
] | 1 | 2018-05-02T23:56:48.000Z | 2018-05-02T23:56:48.000Z | from django.test import TestCase
from django.core.urlresolvers import reverse
from http import HTTPStatus
from django.contrib.auth.models import Group
| 39.411111 | 93 | 0.700874 |
bf3472ddecfe8edb0b99c4e413213b4b0d1af43b | 828 | py | Python | old python/zipf_writer.py | quasarbright/quasarbright.github.io | 942710adf4a2531d033023a6f750efeddf3e9050 | [
"MIT"
] | 1 | 2021-01-23T13:50:34.000Z | 2021-01-23T13:50:34.000Z | old python/zipf_writer.py | quasarbright/quasarbright.github.io | 942710adf4a2531d033023a6f750efeddf3e9050 | [
"MIT"
] | 40 | 2018-02-19T19:37:24.000Z | 2022-03-25T18:34:22.000Z | old python/zipf_writer.py | quasarbright/quasarbright.github.io | 942710adf4a2531d033023a6f750efeddf3e9050 | [
"MIT"
] | 1 | 2018-12-07T03:07:21.000Z | 2018-12-07T03:07:21.000Z | from random import randint
chars = 'abcdefghijklmnopqrstuvwxyz '
max_iterations = 100000
current_iterations = 1
with open('words.csv','w') as f:
f.write("words\n")
while current_iterations <= max_iterations:
f.write(random_word())
if current_iterations < max_iterations:
f.write('\n... | 25.090909 | 50 | 0.605072 |
bf385df9fa1247da58cebb3fc9861710c1e75299 | 1,579 | py | Python | src/cogite/completion.py | Polyconseil/cogite | dae4729dd3013f9a9a77961f6d1ab8dd26eec63f | [
"BSD-3-Clause"
] | 4 | 2021-05-11T14:55:15.000Z | 2022-01-07T14:23:09.000Z | src/cogite/completion.py | Polyconseil/cogite | dae4729dd3013f9a9a77961f6d1ab8dd26eec63f | [
"BSD-3-Clause"
] | null | null | null | src/cogite/completion.py | Polyconseil/cogite | dae4729dd3013f9a9a77961f6d1ab8dd26eec63f | [
"BSD-3-Clause"
] | null | null | null | import re
from typing import List
import prompt_toolkit
import prompt_toolkit.completion
from cogite import models
USER_FORMATTER = "{login} ({name})"
USER_REGEXP = re.compile(r" *(?P<login>[^\(]+?) \([^\)]*?\)")
| 32.22449 | 101 | 0.599113 |
bf386e6a782e7d97acf267e355b925215268f799 | 4,112 | py | Python | porespy/dns/__funcs__.py | hfathian/porespy | 8747e675ba8e6410d8448492c70f6911e0eb816a | [
"MIT"
] | 3 | 2020-09-02T20:02:55.000Z | 2021-07-09T03:50:49.000Z | porespy/dns/__funcs__.py | hfathian/porespy | 8747e675ba8e6410d8448492c70f6911e0eb816a | [
"MIT"
] | null | null | null | porespy/dns/__funcs__.py | hfathian/porespy | 8747e675ba8e6410d8448492c70f6911e0eb816a | [
"MIT"
] | null | null | null | import numpy as np
import openpnm as op
from porespy.filters import trim_nonpercolating_paths
import collections
def tortuosity(im, axis, return_im=False, **kwargs):
r"""
Calculates tortuosity of given image in specified direction
Parameters
----------
im : ND-image
The binary image to an... | 39.538462 | 83 | 0.621109 |
bf39449f7bb6f21acf2c725916d13d254078c931 | 3,411 | py | Python | tests/decision_tree_test.py | asross/decision_trees | 8cbdc7a90474abbeddcfccdaadea0e67d67aec86 | [
"Apache-2.0"
] | 1 | 2021-09-18T08:42:05.000Z | 2021-09-18T08:42:05.000Z | tests/decision_tree_test.py | asross/decision_trees | 8cbdc7a90474abbeddcfccdaadea0e67d67aec86 | [
"Apache-2.0"
] | null | null | null | tests/decision_tree_test.py | asross/decision_trees | 8cbdc7a90474abbeddcfccdaadea0e67d67aec86 | [
"Apache-2.0"
] | null | null | null | import unittest
import numpy
from oo_trees.dataset import *
from oo_trees.decision_tree import *
from oo_trees.attribute import *
| 46.094595 | 147 | 0.513339 |
bf3a9693958abe1a899a3fc0653c35e3da531dd4 | 901 | py | Python | workflows/diagnostics/fv3net/diagnostics/prognostic_run/emulation/query.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | 1 | 2021-12-14T23:43:35.000Z | 2021-12-14T23:43:35.000Z | workflows/diagnostics/fv3net/diagnostics/prognostic_run/emulation/query.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | 195 | 2021-09-16T05:47:18.000Z | 2022-03-31T22:03:15.000Z | workflows/diagnostics/fv3net/diagnostics/prognostic_run/emulation/query.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | null | null | null | import wandb
from dataclasses import dataclass
| 25.027778 | 77 | 0.599334 |
bf3c8cdb9f688a301c2bae5b827735c51f5820ae | 15,526 | py | Python | bin/busers.py | ddierschow/bamca | 11b42a1348f22816ca8cc714e7619127af2bcf21 | [
"MIT"
] | 1 | 2019-06-05T21:13:20.000Z | 2019-06-05T21:13:20.000Z | bin/busers.py | ddierschow/bamca | 11b42a1348f22816ca8cc714e7619127af2bcf21 | [
"MIT"
] | 3 | 2017-04-26T21:15:01.000Z | 2017-04-29T08:19:33.000Z | bin/busers.py | ddierschow/bamca | 11b42a1348f22816ca8cc714e7619127af2bcf21 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
from sprint import sprint as print
import string
import uuid
import basics
import config
import useful
# ------ user editor
# ------ login
# ------ logout
# ------ signup
def create(pif):
# os.environ['PYTHON_EGG_CACHE'] = '/var/tmp'
user_id = pif.form.get_str('user_id... | 37.776156 | 120 | 0.628816 |
170bb4eaeeac53dd43d40e3d448c3de33bba6519 | 219 | py | Python | self_finance/front_end/routes/reference.py | MaksimDan/self-finance | 788fe067e6814eacde65ec2b9c7122826a61a89b | [
"CNRI-Python",
"Condor-1.1",
"Naumen",
"Xnet",
"X11",
"MS-PL"
] | null | null | null | self_finance/front_end/routes/reference.py | MaksimDan/self-finance | 788fe067e6814eacde65ec2b9c7122826a61a89b | [
"CNRI-Python",
"Condor-1.1",
"Naumen",
"Xnet",
"X11",
"MS-PL"
] | null | null | null | self_finance/front_end/routes/reference.py | MaksimDan/self-finance | 788fe067e6814eacde65ec2b9c7122826a61a89b | [
"CNRI-Python",
"Condor-1.1",
"Naumen",
"Xnet",
"X11",
"MS-PL"
] | null | null | null | from flask import render_template
from self_finance.front_end import app
| 16.846154 | 44 | 0.767123 |
170d1e755079223aa85454344429845bca8ebd51 | 464 | py | Python | bfgame/components/shield.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bfgame/components/shield.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bfgame/components/shield.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from core.components import Component, listing
| 29 | 71 | 0.734914 |
170e4ce72e70f258bdf691e476a876b779e8fc45 | 121 | py | Python | cfn_review_bot/error.py | biochimia/cfn-review-bot | 1c8a84b51f7c398c21725cb888a9ab694ddfbb56 | [
"Apache-2.0"
] | 1 | 2019-04-04T12:09:16.000Z | 2019-04-04T12:09:16.000Z | cfn_review_bot/error.py | biochimia/cfn-review-bot | 1c8a84b51f7c398c21725cb888a9ab694ddfbb56 | [
"Apache-2.0"
] | null | null | null | cfn_review_bot/error.py | biochimia/cfn-review-bot | 1c8a84b51f7c398c21725cb888a9ab694ddfbb56 | [
"Apache-2.0"
] | null | null | null | '''
Defines `Error`, the base class for all exceptions generated in this package.
'''
| 15.125 | 77 | 0.702479 |
170f51c5c54b98034a61be6beaec2ab109d2ab9b | 2,432 | py | Python | load_data.py | sanidhyamangal/riceleaf_disease_classification | be6c72636662c42024ab8223b830a04d38483c00 | [
"MIT"
] | 1 | 2019-12-26T15:40:20.000Z | 2019-12-26T15:40:20.000Z | load_data.py | sanidhyamangal/riceleaf_disease_classification | be6c72636662c42024ab8223b830a04d38483c00 | [
"MIT"
] | null | null | null | load_data.py | sanidhyamangal/riceleaf_disease_classification | be6c72636662c42024ab8223b830a04d38483c00 | [
"MIT"
] | null | null | null | import tensorflow as tf # for tf libs
import pathlib # for giving path of the images
# a closs to wrap dataset functions
| 37.415385 | 83 | 0.656661 |
170f63002d26246c22694d7076b51e43ca8e9813 | 3,816 | py | Python | src/game.py | tommaso1311/sNNake | 1bd6b285dd7de4872363970fa73ebd6a31e298e1 | [
"Unlicense"
] | null | null | null | src/game.py | tommaso1311/sNNake | 1bd6b285dd7de4872363970fa73ebd6a31e298e1 | [
"Unlicense"
] | null | null | null | src/game.py | tommaso1311/sNNake | 1bd6b285dd7de4872363970fa73ebd6a31e298e1 | [
"Unlicense"
] | 1 | 2020-01-29T09:31:07.000Z | 2020-01-29T09:31:07.000Z | import snake
import food
import pygame
import numpy as np
| 23.701863 | 88 | 0.693396 |
1710773f04777efe1d18f2730f8f0016750de02c | 12,281 | py | Python | code/processing/prefix_metrics.py | msaveski/toxic_conversation_structure | d5fdff18c29d82768bf244428f625ebaaf87c3ca | [
"MIT"
] | 8 | 2021-07-02T07:22:10.000Z | 2022-01-18T06:34:37.000Z | code/processing/prefix_metrics.py | msaveski/toxic_conversation_structure | d5fdff18c29d82768bf244428f625ebaaf87c3ca | [
"MIT"
] | null | null | null | code/processing/prefix_metrics.py | msaveski/toxic_conversation_structure | d5fdff18c29d82768bf244428f625ebaaf87c3ca | [
"MIT"
] | null | null | null |
import gzip
import click
import warnings
import json
import ujson
import pickle
import numpy as np
from tqdm import tqdm
from ciso8601 import parse_datetime
from joblib import Parallel, delayed
from _config import Config
from utils import json_paths_iter, sanitize_numpy_types
# metrics methods
from tree_metrics imp... | 29.736077 | 82 | 0.644654 |
17121677aa57618192acf47db39a5e720b0e6f5e | 1,111 | py | Python | src/pylendingclub/wrapper/resource.py | bbarney213/PyLendingClub-Wrapper | 7f2ef823a56bc87b7f88abf86498805c2c9ce3d3 | [
"BSD-3-Clause"
] | 2 | 2018-06-06T20:04:04.000Z | 2018-06-13T12:17:37.000Z | src/pylendingclub/wrapper/resource.py | bbarney213/PyLendingClub | 7f2ef823a56bc87b7f88abf86498805c2c9ce3d3 | [
"BSD-3-Clause"
] | 4 | 2018-10-18T13:59:14.000Z | 2018-10-23T16:08:51.000Z | src/pylendingclub/wrapper/resource.py | bbarney213/PyLendingClub | 7f2ef823a56bc87b7f88abf86498805c2c9ce3d3 | [
"BSD-3-Clause"
] | null | null | null | from .base import Base
from .request import GetRequest
from .request import PostRequest
| 32.676471 | 99 | 0.669667 |
1712e3348db6488fa4c988be9b8716d6bc159d8b | 2,324 | py | Python | tests/parse/test_frequency.py | CHRUdeLille/scout | 0f70bec32e078d1825ebf20237f4a4979585dffb | [
"BSD-3-Clause"
] | 1 | 2019-08-17T21:20:04.000Z | 2019-08-17T21:20:04.000Z | tests/parse/test_frequency.py | tapaswenipathak/scout | c9b3ec14f5105abe6066337110145a263320b4c5 | [
"BSD-3-Clause"
] | null | null | null | tests/parse/test_frequency.py | tapaswenipathak/scout | c9b3ec14f5105abe6066337110145a263320b4c5 | [
"BSD-3-Clause"
] | null | null | null | from scout.parse.variant.frequency import (parse_frequency, parse_frequencies,
parse_sv_frequencies)
| 35.753846 | 93 | 0.70525 |
17139a4291d606f8fa3c7cb98eff8753ef3e31ef | 1,244 | py | Python | setup.py | pfleischerHU/snowshu | 8008a588b00a0ed8cb28c96c8032c4a8be479b5d | [
"Apache-2.0"
] | null | null | null | setup.py | pfleischerHU/snowshu | 8008a588b00a0ed8cb28c96c8032c4a8be479b5d | [
"Apache-2.0"
] | null | null | null | setup.py | pfleischerHU/snowshu | 8008a588b00a0ed8cb28c96c8032c4a8be479b5d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from setuptools import find_packages, setup
VERSION = '0.0.3'
PYTHON_REQUIRES = '3.8'
packagedata = {
'include_package_data': True,
'name': "snowshu",
'version': VERSION,
'author': "Health Union Data Team",
'author_email': 'data@health-union.com',
'url': 'https://snowsh... | 35.542857 | 107 | 0.660772 |
17151eb54c1bafb8afef6c18b4366ed70dd23fa7 | 3,975 | py | Python | chmoder.py | exeCODEable/CTFware | 8f5542538f97b48ada30e4319fb0bfd670c3ad42 | [
"BSD-3-Clause"
] | 1 | 2021-12-31T02:46:56.000Z | 2021-12-31T02:46:56.000Z | chmoder.py | exeCODEable/CTFware | 8f5542538f97b48ada30e4319fb0bfd670c3ad42 | [
"BSD-3-Clause"
] | null | null | null | chmoder.py | exeCODEable/CTFware | 8f5542538f97b48ada30e4319fb0bfd670c3ad42 | [
"BSD-3-Clause"
] | 1 | 2021-12-31T02:47:01.000Z | 2021-12-31T02:47:01.000Z | """
-------------
| CTF Ware |
------------
| CHMODER |
-----------
"""
import main
import Error_Handler
from time import sleep
# ---- Defining Functions ----
# The Title : CHMODER
# The CHMOD Options Function
# Creating the Visuals of the permissions chosen
#-- Internal Loo... | 23.52071 | 74 | 0.486289 |
1717458e20e9cc4db4d35021225344a7fe7edb8c | 377 | py | Python | Commands/Command.py | densikat/PyRobotSim | 724418c6537fd5428e706fc3b7807c5b128ea677 | [
"MIT"
] | null | null | null | Commands/Command.py | densikat/PyRobotSim | 724418c6537fd5428e706fc3b7807c5b128ea677 | [
"MIT"
] | null | null | null | Commands/Command.py | densikat/PyRobotSim | 724418c6537fd5428e706fc3b7807c5b128ea677 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
| 17.136364 | 48 | 0.671088 |
1717e4926140d450c78226c2ec66f4d5b302b50a | 1,061 | py | Python | ivy/test/afterinit1.py | b1f6c1c4/cfg-enum | 1a08071bde87f578ceaf834004c01b593db9bce8 | [
"BSD-3-Clause"
] | 113 | 2019-05-09T15:37:47.000Z | 2022-03-14T04:02:01.000Z | ivy/test/afterinit1.py | b1f6c1c4/cfg-enum | 1a08071bde87f578ceaf834004c01b593db9bce8 | [
"BSD-3-Clause"
] | 58 | 2019-09-03T15:42:29.000Z | 2021-01-15T02:20:29.000Z | ivy/test/afterinit1.py | b1f6c1c4/cfg-enum | 1a08071bde87f578ceaf834004c01b593db9bce8 | [
"BSD-3-Clause"
] | 40 | 2016-01-02T19:13:18.000Z | 2018-10-27T11:38:00.000Z |
from ivy import ivy_module as im
from ivy.ivy_compiler import ivy_from_string
from ivy.tk_ui import new_ui
from ivy import ivy_utils as iu
prog = """#lang ivy1.6
type t
individual x(X:t) : t
object foo(me:t) = {
after init {
x(me) := me;
assert false
}
}
isolate iso_foo(me:t) = foo(me) wit... | 22.104167 | 86 | 0.629595 |
1718001e0904bfefe359d48d6c35beb0656e1e1f | 15,463 | py | Python | pysnmp-with-texts/Fore-J2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/Fore-J2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/Fore-J2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Fore-J2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Fore-J2-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:17:14 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 126.745902 | 1,048 | 0.757292 |
171899d901e000937a6eacc7f613ecfc9050f471 | 603 | py | Python | api/snippets/textSnippet.py | kc611/learn-hub | ffb944d0f2cbdbc3d2836a45a6bab3400860ac91 | [
"MIT"
] | 5 | 2021-06-09T12:46:52.000Z | 2022-01-12T06:37:45.000Z | api/snippets/textSnippet.py | kc611/learn-hub | ffb944d0f2cbdbc3d2836a45a6bab3400860ac91 | [
"MIT"
] | null | null | null | api/snippets/textSnippet.py | kc611/learn-hub | ffb944d0f2cbdbc3d2836a45a6bab3400860ac91 | [
"MIT"
] | 2 | 2021-09-06T15:11:16.000Z | 2021-12-07T04:44:24.000Z | from api.snippet import NonConsoleSnippet
from api.colors import print_error
| 25.125 | 66 | 0.565506 |
17195d7a3c4f297277705fee26d57efe2d026230 | 87 | py | Python | 2020-11-02/meio.py | pufe/programa | 7f79566597446e9e39222e6c15fa636c3dd472bb | [
"MIT"
] | 2 | 2020-12-12T00:02:40.000Z | 2021-04-21T19:49:59.000Z | 2020-11-02/meio.py | pufe/programa | 7f79566597446e9e39222e6c15fa636c3dd472bb | [
"MIT"
] | null | null | null | 2020-11-02/meio.py | pufe/programa | 7f79566597446e9e39222e6c15fa636c3dd472bb | [
"MIT"
] | null | null | null | n = int(input())
lado = 2
for i in range(n):
lado = 2*lado-1
print(lado*lado)
| 14.5 | 20 | 0.563218 |
171aae65649ea479605b15c671f29b278f6647e9 | 11,112 | py | Python | training_inheritance.py | GreenSpir1t/PinPong_CS-GO_Stars | fa60895997fddbc8f5c48ec1375a32f3cd63799d | [
"CC0-1.0"
] | null | null | null | training_inheritance.py | GreenSpir1t/PinPong_CS-GO_Stars | fa60895997fddbc8f5c48ec1375a32f3cd63799d | [
"CC0-1.0"
] | null | null | null | training_inheritance.py | GreenSpir1t/PinPong_CS-GO_Stars | fa60895997fddbc8f5c48ec1375a32f3cd63799d | [
"CC0-1.0"
] | null | null | null | from pygame import *
from time import sleep
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import *
app = QApplication([])
widget1 = QWidget()
button1 = QPushButton("")
button1.resize(100, 60)
label1 = QLabel("! PinPong, ")
label1.resize(50, 50)
line1 = QVBoxLayout()
line1.addWidget(label1)
line1.addWi... | 27.437037 | 130 | 0.567135 |
171b4ae07d335531a98d9379371ef3979162b807 | 615 | py | Python | medium/er-wei-shu-zu-zhong-de-cha-zhao-lcof/er-wei-shu-zu-zhong-de-cha-zhao-lcof.py | yujiecong/LeetCode-learning | 900c26d9283a0560f6784f2fa129b153ca060d50 | [
"MIT"
] | null | null | null | medium/er-wei-shu-zu-zhong-de-cha-zhao-lcof/er-wei-shu-zu-zhong-de-cha-zhao-lcof.py | yujiecong/LeetCode-learning | 900c26d9283a0560f6784f2fa129b153ca060d50 | [
"MIT"
] | null | null | null | medium/er-wei-shu-zu-zhong-de-cha-zhao-lcof/er-wei-shu-zu-zhong-de-cha-zhao-lcof.py | yujiecong/LeetCode-learning | 900c26d9283a0560f6784f2fa129b153ca060d50 | [
"MIT"
] | null | null | null |
print(Solution().findNumberIn2DArray([[-1,3]],-1)) | 25.625 | 63 | 0.452033 |
171c8d0c46932ca43ba61a04ccd9e11eefc55791 | 6,756 | py | Python | importio2/commands/csv_to_json.py | import-io/import-io-api-python | 5c838a357742233e714b2ccfd19d25c18531cfa3 | [
"Apache-2.0"
] | 1 | 2021-08-18T03:27:40.000Z | 2021-08-18T03:27:40.000Z | importio2/commands/csv_to_json.py | import-io/import-io-api-python | 5c838a357742233e714b2ccfd19d25c18531cfa3 | [
"Apache-2.0"
] | null | null | null | importio2/commands/csv_to_json.py | import-io/import-io-api-python | 5c838a357742233e714b2ccfd19d25c18531cfa3 | [
"Apache-2.0"
] | 2 | 2021-09-13T14:28:50.000Z | 2021-09-27T17:56:21.000Z | #
# Copyright 2017 Import.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.955056 | 113 | 0.587922 |
171c95fe6b2a2b9656b1142ebd3fc04727a32d57 | 3,281 | py | Python | examples/gridworld.py | abadithela/NFM2021_Static_Test_Synthesis | 2e7ad9c08b6b79706ea5124ee7fa7d3b224cf64a | [
"MIT"
] | null | null | null | examples/gridworld.py | abadithela/NFM2021_Static_Test_Synthesis | 2e7ad9c08b6b79706ea5124ee7fa7d3b224cf64a | [
"MIT"
] | null | null | null | examples/gridworld.py | abadithela/NFM2021_Static_Test_Synthesis | 2e7ad9c08b6b79706ea5124ee7fa7d3b224cf64a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 22 08:32:59 2020
@author: apurvabadithela
"""
# Generates plots for large number of examples:
# Use: restrict_transitions_complex
import networkx as nx
import time
import random
import numpy as np
import matplotlib.pyplot as plt
import sys
sys.path.... | 33.141414 | 126 | 0.644316 |
171ff42a9fa0a25e1ca9661249eab2f04882396b | 6,438 | py | Python | bite/transformers.py | jgosmann/bite | 9794d9ba8f2e4a52b1ec7d27d61b1dd2ba872650 | [
"MIT"
] | null | null | null | bite/transformers.py | jgosmann/bite | 9794d9ba8f2e4a52b1ec7d27d61b1dd2ba872650 | [
"MIT"
] | 6 | 2022-01-30T15:22:02.000Z | 2022-01-30T15:42:42.000Z | bite/transformers.py | jgosmann/bite-parser | ec5177d90dcce0be8880c48a85317872c7d97f10 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Callable, Generic, Iterable, Tuple, TypeVar
from bite.io import ParserBuffer
from bite.parsers import ParsedBaseNode, ParsedNode, Parser
T = TypeVar("T", covariant=True)
VIn = TypeVar("VIn", covariant=True)
VOut = TypeVar("VOut", covariant=True)
__all__ = [
... | 27.395745 | 87 | 0.595837 |
1720f0bd32cce8fd3476851d53b391a8cbb5bca4 | 70 | py | Python | blitzdb/fields/integer.py | marcinguy/blitzdb3 | 8b8bca02b205d7ff33d3902e5abb166e10a7b624 | [
"MIT"
] | 252 | 2015-01-02T13:05:12.000Z | 2021-12-29T13:36:47.000Z | blitzdb/fields/integer.py | epatters/blitzdb | 4b459e0bcde9e1f6224dd4e3bea74194586864b0 | [
"MIT"
] | 33 | 2015-01-09T20:05:10.000Z | 2019-11-08T15:48:34.000Z | blitzdb/fields/integer.py | epatters/blitzdb | 4b459e0bcde9e1f6224dd4e3bea74194586864b0 | [
"MIT"
] | 39 | 2015-01-20T01:15:04.000Z | 2022-03-26T01:01:15.000Z | from .base import BaseField
| 11.666667 | 30 | 0.757143 |
1720fd8f423a510879911107c35092f8972bb5c6 | 2,419 | py | Python | src/crypto_dom/bybt/futures/liquidation.py | maxima-us/crypto-dom | d0c21638a96dfd03778f98f98e002c6be114717c | [
"MIT"
] | null | null | null | src/crypto_dom/bybt/futures/liquidation.py | maxima-us/crypto-dom | d0c21638a96dfd03778f98f98e002c6be114717c | [
"MIT"
] | 2 | 2021-01-15T15:37:21.000Z | 2021-01-25T10:10:52.000Z | src/crypto_dom/bybt/futures/liquidation.py | maxima-us/crypto-dom | d0c21638a96dfd03778f98f98e002c6be114717c | [
"MIT"
] | 1 | 2021-01-15T13:51:06.000Z | 2021-01-15T13:51:06.000Z | import typing
from decimal import Decimal
import pydantic
import stackprinter
stackprinter.set_excepthook(style="darkbg2")
from crypto_dom.bybt.definitions import SYMBOL, EXCHANGE
# ============================================================
# Liquidation Chart
# ===================================================... | 23.485437 | 129 | 0.567177 |
17228e1c64f4eaf31b5d7c6cd86af2b08d098a71 | 534 | py | Python | garlic_pear/path.py | mtao/garlic_pear | 207762df8997fcca67dc4ef4d1a7ddca28b1d4fb | [
"MIT"
] | null | null | null | garlic_pear/path.py | mtao/garlic_pear | 207762df8997fcca67dc4ef4d1a7ddca28b1d4fb | [
"MIT"
] | null | null | null | garlic_pear/path.py | mtao/garlic_pear | 207762df8997fcca67dc4ef4d1a7ddca28b1d4fb | [
"MIT"
] | null | null | null |
import pathlib
# a file
| 16.181818 | 46 | 0.599251 |
1726dabbaae33e69a23c0054743b5000a9c0c87f | 3,168 | py | Python | bak/SLSTM.py | rnbwdsh/VisRNN_ICLR_2016_Text | d87290cd4a71dda5ab68574b68fedbec9b6314ff | [
"MIT"
] | 12 | 2018-04-06T04:27:43.000Z | 2021-11-13T13:27:26.000Z | bak/SLSTM.py | rnbwdsh/VisRNN_ICLR_2016_Text | d87290cd4a71dda5ab68574b68fedbec9b6314ff | [
"MIT"
] | null | null | null | bak/SLSTM.py | rnbwdsh/VisRNN_ICLR_2016_Text | d87290cd4a71dda5ab68574b68fedbec9b6314ff | [
"MIT"
] | 5 | 2018-04-12T14:15:58.000Z | 2020-04-08T04:50:41.000Z | # Thanks to https://discuss.pytorch.org/t/implementation-of-multiplicative-lstm/2328/9
import torch
import torch.nn as nn
import torch.nn.functional as F
import pdb | 40.615385 | 103 | 0.613952 |
17274e554735111f7b40dfbebb44ca1f4cb0d34b | 120 | py | Python | endpoints/routers/__init__.py | tszan/project_skeleton | df794e123727c45aab42af2d0cd3e597abd3bd9f | [
"Unlicense"
] | 2 | 2022-02-22T20:41:26.000Z | 2022-02-25T16:26:03.000Z | endpoints/routers/__init__.py | tszan/project_skeleton | df794e123727c45aab42af2d0cd3e597abd3bd9f | [
"Unlicense"
] | 1 | 2022-01-27T16:05:31.000Z | 2022-01-27T16:05:31.000Z | endpoints/routers/__init__.py | tszan/project_skeleton | df794e123727c45aab42af2d0cd3e597abd3bd9f | [
"Unlicense"
] | null | null | null |
from flask_restful import Resource | 20 | 42 | 0.683333 |
172863b8c6fb4301cd532c088771ce322a15926f | 2,326 | py | Python | ophiuchus/coordinates/core.py | adrn/ophiuchus | fe7e937bf421d506ec252165f044d514f571667b | [
"MIT"
] | 1 | 2015-09-25T10:12:52.000Z | 2015-09-25T10:12:52.000Z | ophiuchus/coordinates/core.py | adrn/ophiuchus | fe7e937bf421d506ec252165f044d514f571667b | [
"MIT"
] | null | null | null | ophiuchus/coordinates/core.py | adrn/ophiuchus | fe7e937bf421d506ec252165f044d514f571667b | [
"MIT"
] | null | null | null | # coding: utf-8
""" Astropy coordinate class for the Ophiuchus coordinate system """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Third-party
import numpy as np
from astropy.coordinates import frame_transform_graph
from astropy.utils.data import get_pkg_data_filen... | 35.242424 | 88 | 0.717111 |
17286817e8f2c4ec6931433f113b6f15705189e2 | 9,263 | py | Python | aifo_simulation/java-code/projects/aifo/plots/aifo_evaluation/pFabric/web_search_workload_w_sr/analyze.py | AlmondDust/Assignment3-Final-AIFO | b006b2090a7b597fde7f92e9d9fbf204bc3c993e | [
"Apache-2.0"
] | 21 | 2021-05-26T11:58:50.000Z | 2022-03-29T12:46:28.000Z | aifo_simulation/java-code/projects/aifo/plots/aifo_evaluation/pFabric/web_search_workload_w_sr/analyze.py | AlmondDust/Assignment3-Final-AIFO | b006b2090a7b597fde7f92e9d9fbf204bc3c993e | [
"Apache-2.0"
] | 1 | 2021-12-08T03:43:44.000Z | 2021-12-08T03:43:44.000Z | aifo_simulation/java-code/projects/aifo/plots/aifo_evaluation/pFabric/web_search_workload_w_sr/analyze.py | AlmondDust/Assignment3-Final-AIFO | b006b2090a7b597fde7f92e9d9fbf204bc3c993e | [
"Apache-2.0"
] | 4 | 2021-09-25T20:10:49.000Z | 2022-03-14T06:39:26.000Z | #!/usr/bin/python
# This python scripts extracts the data from the logs that we want to plot and outputs it in a format that gnuplot can
# later on represent.
# Theoretical plot number of combinations
#!/usr/bin/python
import math
if __name__ == '__main__':
######################################################... | 45.856436 | 145 | 0.506423 |
17296d23bdab0895411c8c842c2631c32b6b18ec | 4,277 | py | Python | tools/util/clone_project.py | highfestiva/life | b05b592502d72980ab55e13e84330b74a966f377 | [
"BSD-3-Clause"
] | 9 | 2019-09-03T18:33:31.000Z | 2022-02-04T04:00:02.000Z | tools/util/clone_project.py | highfestiva/life | b05b592502d72980ab55e13e84330b74a966f377 | [
"BSD-3-Clause"
] | null | null | null | tools/util/clone_project.py | highfestiva/life | b05b592502d72980ab55e13e84330b74a966f377 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import glob
import os
import shutil
import subprocess
import uuid
def renameFiles(tooldir, dadir, fromnames, toname):
"Recursively replace file names and contents."
tooldir = os.path.join('..', tooldir)
os.chdir(dadir)
for fromname in fromnames:
fromspaced = "".join([x if x.islower() else ... | 35.641667 | 151 | 0.658172 |
172b241913b365d208bc5bfb0789e6967a944886 | 2,896 | py | Python | official/nlp/transformer/sched_sample/sched_sampler.py | king821221/models | 539354e603cbf4aee278b4c8836bc75e9cbec480 | [
"Apache-2.0"
] | null | null | null | official/nlp/transformer/sched_sample/sched_sampler.py | king821221/models | 539354e603cbf4aee278b4c8836bc75e9cbec480 | [
"Apache-2.0"
] | null | null | null | official/nlp/transformer/sched_sample/sched_sampler.py | king821221/models | 539354e603cbf4aee278b4c8836bc75e9cbec480 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
def create_sched_sample_prob_thr_fn(params):
prob_thr_fn_k = params['prob_thr_fn']
if prob_thr_fn_k == 'inverse_sigmoid':
k = params['inverse_sigmoid_k']
return InverseSigmoidDecay(k)
elif prob_thr_fn_k == 'linear':
k = params['linear_k']
c = params['linear_c... | 33.287356 | 85 | 0.643301 |
172bc9f557a06aee37f2101ba56cde08ff814d34 | 10,729 | py | Python | src/scheduler.py | scify/DemocracIT-Backend-Scheduler | 747c8a66b8090d7604e4916bb70908a7ef318d70 | [
"Apache-2.0"
] | 1 | 2015-09-30T13:49:49.000Z | 2015-09-30T13:49:49.000Z | src/scheduler.py | scify/DemocracIT-Backend-Scheduler | 747c8a66b8090d7604e4916bb70908a7ef318d70 | [
"Apache-2.0"
] | null | null | null | src/scheduler.py | scify/DemocracIT-Backend-Scheduler | 747c8a66b8090d7604e4916bb70908a7ef318d70 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from datetime import datetime
import subprocess
import os
import re
import importlib
import requests
import yaml
import json
from psql_dbaccess import PSQLDBAccess
from dit_logger import DITLogger
__author__ = 'George K. <gkiom@scify.org>'
CLASS_LABEL = 'class'
PACKAGE_LABEL ... | 36.369492 | 116 | 0.610215 |
172cdd4c3999fc12c41e17ed27eab3aabc17c907 | 645 | py | Python | scripts/send_html_get_request.py | JoanDM/macos-mouse-and-keyboard-automator | 9b337c18ebea42e82e3427e7e1d71a37221ba4ca | [
"MIT"
] | null | null | null | scripts/send_html_get_request.py | JoanDM/macos-mouse-and-keyboard-automator | 9b337c18ebea42e82e3427e7e1d71a37221ba4ca | [
"MIT"
] | null | null | null | scripts/send_html_get_request.py | JoanDM/macos-mouse-and-keyboard-automator | 9b337c18ebea42e82e3427e7e1d71a37221ba4ca | [
"MIT"
] | null | null | null | import json
from automator_class import Automator
# fetch('https://jsonplaceholder.typicode.com/posts/1')
# .then(res => res.json())
# .then(console.log)
if __name__ == "__main__":
url = "https://jsonplaceholder.typicode.com/posts/1"
automator = Automator()
automator.start_html_session()
res_sta... | 28.043478 | 86 | 0.731783 |
172d5970a8d91dd1e98cd0f9f5dd5c96d9c2bc64 | 1,213 | py | Python | tests/utils.py | reasoned-ai/norm | 5e45d5917ce8745c9a757a0c6b5e689ea0cac19f | [
"Apache-2.0"
] | 8 | 2019-07-22T08:57:20.000Z | 2021-03-26T13:51:02.000Z | tests/utils.py | xumiao/norm | 5e45d5917ce8745c9a757a0c6b5e689ea0cac19f | [
"Apache-2.0"
] | null | null | null | tests/utils.py | xumiao/norm | 5e45d5917ce8745c9a757a0c6b5e689ea0cac19f | [
"Apache-2.0"
] | 1 | 2019-11-16T13:37:35.000Z | 2019-11-16T13:37:35.000Z | import unittest
import hashids
import time
import os
hashid = hashids.Hashids()
__all__ = ['user_tester', 'NormTestCase']
os.environ['NORM_DATA_STORAGE_ROOT'] = 'data'
os.environ['NORM_DB_PATH'] = 'norm/db/norm.db'
from norm.config import session
| 27.568182 | 88 | 0.645507 |
172f0332724e6f0ce0a4a6923ea034ffc23d8da0 | 1,169 | py | Python | tests/test_scope.py | MrCoft/twocode | 741620a2abab003edbabb60533c54a2d9bc55b7e | [
"MIT"
] | null | null | null | tests/test_scope.py | MrCoft/twocode | 741620a2abab003edbabb60533c54a2d9bc55b7e | [
"MIT"
] | 20 | 2020-05-25T18:38:47.000Z | 2020-06-12T23:14:32.000Z | tests/test_scope.py | MrCoft/twocode | 741620a2abab003edbabb60533c54a2d9bc55b7e | [
"MIT"
] | null | null | null | """
import a
import a.b
import a.B (and is the cross thing)
import a.*
import a.b as c
from a import b, c
import a, b
from _ import *
"""
# objects see their own vars
# function args are seen ((x)->x)(2)
# import bogus
# errors
# bogus -> NameError
"""
del list[index]
del x
del dict[key]
delete o... | 15.381579 | 64 | 0.63302 |
172f2a1baf3395a2c72b733c72b11f654a231ee3 | 1,703 | py | Python | stormpath/cache/cache.py | denibertovic/stormpath-sdk-python | e594a1bb48de3fa8eff26558bf4f72bb056e9d00 | [
"Apache-2.0"
] | null | null | null | stormpath/cache/cache.py | denibertovic/stormpath-sdk-python | e594a1bb48de3fa8eff26558bf4f72bb056e9d00 | [
"Apache-2.0"
] | null | null | null | stormpath/cache/cache.py | denibertovic/stormpath-sdk-python | e594a1bb48de3fa8eff26558bf4f72bb056e9d00 | [
"Apache-2.0"
] | null | null | null | """Cache abstractions."""
from .entry import CacheEntry
from .memory_store import MemoryStore
from .stats import CacheStats
| 26.2 | 77 | 0.588961 |
1732b3c237a9939a05fce7305cf7b8eaf1d26f28 | 1,346 | py | Python | api/migrations/versions/7bce3314f2d8_chg_assignment_test_output_types.py | jepst/Anubis | 45f08b8057e295fcf5a3bf25b1947337444dca84 | [
"MIT"
] | 87 | 2021-11-08T10:58:26.000Z | 2022-03-31T19:02:47.000Z | api/migrations/versions/7bce3314f2d8_chg_assignment_test_output_types.py | jepst/Anubis | 45f08b8057e295fcf5a3bf25b1947337444dca84 | [
"MIT"
] | 114 | 2021-06-27T08:37:43.000Z | 2021-10-24T00:51:01.000Z | api/migrations/versions/7bce3314f2d8_chg_assignment_test_output_types.py | jepst/Anubis | 45f08b8057e295fcf5a3bf25b1947337444dca84 | [
"MIT"
] | 15 | 2021-06-27T07:26:51.000Z | 2021-10-06T18:42:39.000Z | """CHG assignment test output types
Revision ID: 7bce3314f2d8
Revises: 28971042fc9c
Create Date: 2022-01-15 19:53:48.734288
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = "7bce3314f2d8"
down_revision = "28971042fc9c"
branch... | 29.26087 | 83 | 0.679792 |
17340fa5119cbc28f3ecadf4ee0be462a9b2f0eb | 639 | py | Python | dev/circuitpython/examples/htu31d_simpletest.py | scripsi/picodeebee | 0ec77e92f09fa8711705623482e57a5e0b702696 | [
"MIT"
] | null | null | null | dev/circuitpython/examples/htu31d_simpletest.py | scripsi/picodeebee | 0ec77e92f09fa8711705623482e57a5e0b702696 | [
"MIT"
] | null | null | null | dev/circuitpython/examples/htu31d_simpletest.py | scripsi/picodeebee | 0ec77e92f09fa8711705623482e57a5e0b702696 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: Copyright (c) 2020 ladyada for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import board
import adafruit_htu31d
i2c = board.I2C() # uses board.SCL and board.SDA
htu = adafruit_htu31d.HTU31D(i2c)
print("Found HTU31D with serial number", hex(htu.serial_number))
... | 26.625 | 77 | 0.699531 |
1736e503fbe98d974f596115e972e0f7a6d0c236 | 1,389 | py | Python | infiltration.py | samaranin/flask_infiltration | 1888880e02bf6fda43500d04cfdf770f3362b6c8 | [
"Apache-2.0"
] | null | null | null | infiltration.py | samaranin/flask_infiltration | 1888880e02bf6fda43500d04cfdf770f3362b6c8 | [
"Apache-2.0"
] | null | null | null | infiltration.py | samaranin/flask_infiltration | 1888880e02bf6fda43500d04cfdf770f3362b6c8 | [
"Apache-2.0"
] | null | null | null | import numpy as np
k_i = np.array([0.20, 0.22, 0.78, 0.80,
0.30, 0.32, 0.96, 1.00,
1.20, 1.43, 1.80, 1.88,
0.40, 0.50, 3.24, 3.50,
0.38, 0.43, 2.24, 4.90,
0.40, 0.44, 1.22, 4.00,
0.39, 0.44, 0.96, 1.80,
0.39... | 23.15 | 75 | 0.454284 |
17375fd8b142f9ccf303a3449381e22b0e607b0c | 2,148 | py | Python | cotk/scripts/resources.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 117 | 2019-03-14T15:06:42.000Z | 2022-02-28T07:06:34.000Z | cotk/scripts/resources.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 149 | 2019-03-12T09:43:21.000Z | 2020-08-24T02:56:34.000Z | cotk/scripts/resources.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 51 | 2019-03-14T15:12:48.000Z | 2021-08-09T03:37:48.000Z | '''
A command library help user upload their results to dashboard.
'''
#!/usr/bin/env python
import argparse
from ..file_utils import get_resource_file_path, get_resource_list
from . import cli_constant as cli
def entry(args):
'''Entrance of show resources path and whether resource is cached or not'''
resource_nam... | 38.357143 | 99 | 0.710428 |
1739123aad0bd85f9beea60a5ddacbd848ecc7f0 | 7,588 | py | Python | backend/py/vcf_parser.py | alexxxnf/VirusMutationsAI | c06d2506ab8fe8e20d1d10b1c201ad2355c9e7ba | [
"Apache-2.0"
] | null | null | null | backend/py/vcf_parser.py | alexxxnf/VirusMutationsAI | c06d2506ab8fe8e20d1d10b1c201ad2355c9e7ba | [
"Apache-2.0"
] | null | null | null | backend/py/vcf_parser.py | alexxxnf/VirusMutationsAI | c06d2506ab8fe8e20d1d10b1c201ad2355c9e7ba | [
"Apache-2.0"
] | null | null | null | from Bio.Data.IUPACData import protein_letters_3to1_extended
import os
import pandas as pd
import re
import sys
# Note: the 'logging' module does not work with unit tests for some reason, replaced to 'print' for now
# logging.basicConfig(level=logging.DEBUG)
COL__INFO = 'INFO'
def eprint(*a):
"""Print message ... | 48.641026 | 152 | 0.630206 |
173d2c1a196b3356c316191694e00a8b97e7d638 | 1,550 | py | Python | 1-Programming Basics/FunctionPractice.py | allysonvasquez/Python-Basics | 28b8e144fc2aa85f0c11e8c95a6014d4a53163b6 | [
"MIT"
] | 1 | 2021-01-04T19:15:49.000Z | 2021-01-04T19:15:49.000Z | 1-Programming Basics/FunctionPractice.py | allysonvasquez/Python-Basics | 28b8e144fc2aa85f0c11e8c95a6014d4a53163b6 | [
"MIT"
] | null | null | null | 1-Programming Basics/FunctionPractice.py | allysonvasquez/Python-Basics | 28b8e144fc2aa85f0c11e8c95a6014d4a53163b6 | [
"MIT"
] | null | null | null | # author: Allyson Vasquez
# version: May.14.2020
# Practice using functions & lists
# https://www.w3resource.com/python-exercises/python-functions-exercises.php
# Find the max of three numbers
# Sum all numbers in a list
# Calculate the factorial of a number
# Check if a number is in a given range
# Calculate num... | 20.945946 | 76 | 0.567097 |
173e56fa1a009f1a1e6afa1424bcf787a3c52f6e | 4,369 | py | Python | pytorch/examine_results.py | XinyiYS/CollaborativeFairFederatedLearning | 1372f74230b366a41243f809ce0fc15586cd40fe | [
"MIT"
] | 25 | 2020-07-29T03:46:12.000Z | 2022-03-23T07:15:53.000Z | pytorch/examine_results.py | lingjuanlv/CollaborativeFairFederatedLearning | 1372f74230b366a41243f809ce0fc15586cd40fe | [
"MIT"
] | null | null | null | pytorch/examine_results.py | lingjuanlv/CollaborativeFairFederatedLearning | 1372f74230b366a41243f809ce0fc15586cd40fe | [
"MIT"
] | 7 | 2020-09-15T19:06:27.000Z | 2022-02-22T06:51:52.000Z | import os
import shutil
import json
import pandas as pd
import ast
import numpy as np
from utils.read_convergence import plot_convergence, parse, get_cffl_best
fairness_keys = [
'standalone_vs_fedavg_mean',
'standalone_vs_rrdssgd_mean',
'standalone_vs_final_mean',
]
if __name__ == '__main__':
"""
Give... | 36.408333 | 132 | 0.707256 |
17401f44ffa85c8f2bef202911cfdebfa4a6f490 | 3,635 | py | Python | getHiveCounters.py | Jimvin/UsefulHadoopScripts | cf5570cb44f91cce522070d57c0c5fd3cea0dd1d | [
"Apache-2.0"
] | null | null | null | getHiveCounters.py | Jimvin/UsefulHadoopScripts | cf5570cb44f91cce522070d57c0c5fd3cea0dd1d | [
"Apache-2.0"
] | null | null | null | getHiveCounters.py | Jimvin/UsefulHadoopScripts | cf5570cb44f91cce522070d57c0c5fd3cea0dd1d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys
import requests
import json
import kerberos
"""
Queries the YARN Job History Server (JHS) for a given jobId and returns the Hive counters
Works with unauthenticated and SPNEGO (Kerberos) authenticated API endpoints
"""
__author__ = "Jim Halfpenny"
__copyright__ = "Copyright 2016, J... | 34.951923 | 100 | 0.710867 |
17413695b385180e1c213696f5fde142687adead | 421 | py | Python | ProjectEuler_plus/euler_006.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_006.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_006.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
t = int(input().strip())
for a0 in range(t):
n = int(input().strip())
# http://oeis.org/search?q=1%2C9%2C36%2C100%2C225&language=english&go=Search
square_of_sum = (n ** 2 * (n + 1) ** 2) / 4
# http://oeis.org/search?q=1%2C5%2C14%2C30%2C55&sort=&language=english&go=Sea... | 32.384615 | 84 | 0.612827 |
17413ce0327d6187b1ebd22c87cbb922a5a339fa | 1,015 | py | Python | yx_motor/authenticate.py | Jesse-Clarkayx/yx_motor | 17d1bbda5c1faff7e41cad2bb7b675e591de9df0 | [
"Apache-2.0"
] | null | null | null | yx_motor/authenticate.py | Jesse-Clarkayx/yx_motor | 17d1bbda5c1faff7e41cad2bb7b675e591de9df0 | [
"Apache-2.0"
] | 3 | 2020-08-12T18:09:56.000Z | 2021-09-28T01:26:39.000Z | yx_motor/authenticate.py | yx-dev/yx_motor | 17d1bbda5c1faff7e41cad2bb7b675e591de9df0 | [
"Apache-2.0"
] | 1 | 2020-04-01T23:10:51.000Z | 2020-04-01T23:10:51.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: 04_authenticate.ipynb (unless otherwise specified).
__all__ = ['Authenticate']
# Cell
import requests
from .api import API
| 31.71875 | 95 | 0.666995 |
17422a65cf12e103357c4e5779750d72d2d4e266 | 555 | py | Python | src/inception/__init__.py | jercytryn/inception | f7489cccdd308b5bb2d6ea04588dc67113e995b5 | [
"MIT"
] | 6 | 2015-06-02T02:41:12.000Z | 2021-08-16T11:15:58.000Z | src/inception/__init__.py | jercytryn/inception | f7489cccdd308b5bb2d6ea04588dc67113e995b5 | [
"MIT"
] | 2 | 2015-05-20T08:13:07.000Z | 2015-05-20T08:13:07.000Z | src/inception/__init__.py | jercytryn/inception | f7489cccdd308b5bb2d6ea04588dc67113e995b5 | [
"MIT"
] | 2 | 2015-09-11T02:03:11.000Z | 2016-07-05T21:13:56.000Z | """
Inception api for semi-automaed 2D object insertion into indoor scenery
>>> import inception
>>> inception.magic_insert('http://my/awesome/foreground.jpg', '/Users/mrayder/background.png', (30, 40, 300, 500))
"""
# expose the top level api methods up the very top level of the package
# e.g. so that can just do
#... | 32.647059 | 115 | 0.751351 |
1742fd852681e7df28a89293e73c161b1860f72c | 4,510 | py | Python | mallet/CFNetwork/NSURLRequest.py | bartoszj/Mallet | 0645b08c7eaea4b2f2769a0ca0d84fa8f0332357 | [
"MIT"
] | 16 | 2015-09-07T00:34:49.000Z | 2021-11-12T05:54:01.000Z | mallet/CFNetwork/NSURLRequest.py | bartoszj/Mallet | 0645b08c7eaea4b2f2769a0ca0d84fa8f0332357 | [
"MIT"
] | null | null | null | mallet/CFNetwork/NSURLRequest.py | bartoszj/Mallet | 0645b08c7eaea4b2f2769a0ca0d84fa8f0332357 | [
"MIT"
] | 2 | 2017-05-21T16:39:00.000Z | 2017-06-11T13:09:07.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2014 Bartosz Janda
#
# 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 w... | 38.220339 | 114 | 0.745676 |
1744c36fd87896459f5aae203462b2ab19754593 | 4,941 | py | Python | ngspy/Promotor.py | manuSrep/ngspy | fe5882f011ba801bfb225953a8233cb24b8baa50 | [
"BSD-2-Clause"
] | null | null | null | ngspy/Promotor.py | manuSrep/ngspy | fe5882f011ba801bfb225953a8233cb24b8baa50 | [
"BSD-2-Clause"
] | null | null | null | ngspy/Promotor.py | manuSrep/ngspy | fe5882f011ba801bfb225953a8233cb24b8baa50 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf8 -*-
"""
Functions and classes for handling next generation sequencing data.
:author: Manuel Tuschen
:license: FreeBSD
License
----------
Copyright (c) 2016, Manuel Tuschen
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are per... | 36.873134 | 100 | 0.651083 |
17470da554b4b9b3c1e3997c94655e7deba40ef3 | 1,973 | py | Python | slicedimage/backends/_s3.py | ttung/slicedimage | eb8e1d3899628db66cffed1370f2a7e6dd729c4f | [
"MIT"
] | 6 | 2018-05-07T02:06:47.000Z | 2021-05-19T02:01:03.000Z | slicedimage/backends/_s3.py | ttung/slicedimage | eb8e1d3899628db66cffed1370f2a7e6dd729c4f | [
"MIT"
] | 115 | 2018-05-02T20:46:08.000Z | 2020-05-26T06:41:32.000Z | slicedimage/backends/_s3.py | ttung/slicedimage | eb8e1d3899628db66cffed1370f2a7e6dd729c4f | [
"MIT"
] | 4 | 2018-08-23T14:07:23.000Z | 2019-10-29T16:54:36.000Z | import urllib.parse
from io import BytesIO
from pathlib import PurePosixPath
import boto3
from botocore import UNSIGNED
from botocore.config import Config
from ._base import Backend, verify_checksum
RETRY_STATUS_CODES = frozenset({500, 502, 503, 504})
| 31.31746 | 93 | 0.671566 |
17472cf9caa62b3cdd1bdf20c9c6e3128c93d5c8 | 46,366 | py | Python | revdbc/revdbc.py | emundo/revdbc | 58069f9b4d7acf3a20eb1e29f50c58b8a4557d55 | [
"Apache-2.0"
] | 3 | 2021-01-24T18:36:09.000Z | 2021-03-22T14:38:51.000Z | revdbc/revdbc.py | emundo/revdbc | 58069f9b4d7acf3a20eb1e29f50c58b8a4557d55 | [
"Apache-2.0"
] | null | null | null | revdbc/revdbc.py | emundo/revdbc | 58069f9b4d7acf3a20eb1e29f50c58b8a4557d55 | [
"Apache-2.0"
] | null | null | null | from enum import Enum, auto
import logging
import os
import re
from typing import cast, Dict, List, NamedTuple, Optional, Set, Tuple, Union
import warnings
import cantools
import cantools.subparsers.dump
import numpy as np
from scipy.spatial.distance import minkowski
import sklearn
from sklearn import cluster
from skl... | 36.479937 | 110 | 0.651749 |
17473a106f867e736a3ebc582dbe38dae38efe6a | 30 | py | Python | server/data_access/__init__.py | jdayton3/Geney | a1278d3945b1ee6d7303506d7297035b57897523 | [
"Apache-2.0"
] | 2 | 2018-01-02T03:40:46.000Z | 2018-03-16T05:56:47.000Z | server/data_access/__init__.py | jdayton3/Geney | a1278d3945b1ee6d7303506d7297035b57897523 | [
"Apache-2.0"
] | 19 | 2017-12-05T20:27:35.000Z | 2019-07-01T19:51:57.000Z | server/data_access/__init__.py | jdayton3/Geney | a1278d3945b1ee6d7303506d7297035b57897523 | [
"Apache-2.0"
] | 4 | 2018-01-03T04:01:40.000Z | 2019-07-19T17:04:43.000Z | from .GeneyJob import GeneyJob | 30 | 30 | 0.866667 |
1747e8690dd8cef9c8d8647e658f78571da3a54a | 5,395 | py | Python | postprocessing/classify_phase.py | JoshMend/prebotc-graph-model | 4002e51ab965be366b30c2a6d900ac288fa41245 | [
"BSD-3-Clause"
] | null | null | null | postprocessing/classify_phase.py | JoshMend/prebotc-graph-model | 4002e51ab965be366b30c2a6d900ac288fa41245 | [
"BSD-3-Clause"
] | null | null | null | postprocessing/classify_phase.py | JoshMend/prebotc-graph-model | 4002e51ab965be366b30c2a6d900ac288fa41245 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
def fit_MRF_pseudolikelihood(adj_exc,adj_inh,y):
'''
Fit a Markov random field using maximum pseudolikelihood estimation,
also known as logistic regression. The conditional probabilities
follow
y_i ~ Logistic(B[0] + B[1] A1_{ij} y_j + A1[2] X_{ij} (1-y_j)
+ B[... | 33.09816 | 97 | 0.638184 |