hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7fcf8c04bfee9a81a78aefffecb7fb16cd7ee1e5 | 19,028 | py | Python | suiko/createDiff.py | nakamura196/tei | 7aa62bc0603bbff03f96a3dbaad82d8feb6126ba | [
"Apache-2.0"
] | null | null | null | suiko/createDiff.py | nakamura196/tei | 7aa62bc0603bbff03f96a3dbaad82d8feb6126ba | [
"Apache-2.0"
] | null | null | null | suiko/createDiff.py | nakamura196/tei | 7aa62bc0603bbff03f96a3dbaad82d8feb6126ba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import difflib
import xml.etree.ElementTree as ET
tmp_path = "data/template.xml"
prefix = ".//{http://www.tei-c.org/ns/1.0}"
xml = ".//{http://www.w3.org/XML/1998/namespace}"
tree = ET.parse(tmp_path)
ET.register_namespace('', "http://www.tei-c.org/ns/1.0")
root = tree.getroot()
body = root... | 184.737864 | 11,603 | 0.947393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50,656 | 0.968566 |
7fd026487b4ed720e388b3ddeb8812e59526c4f0 | 6,342 | py | Python | tests/python/pants_test/pants_run_integration_test.py | WamBamBoozle/pants | 98cadfa1a5d337146903eb66548cfe955f2627b3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/pants_run_integration_test.py | WamBamBoozle/pants | 98cadfa1a5d337146903eb66548cfe955f2627b3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/pants_run_integration_test.py | WamBamBoozle/pants | 98cadfa1a5d337146903eb66548cfe955f2627b3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import sub... | 41.45098 | 99 | 0.677231 | 5,642 | 0.889625 | 0 | 0 | 319 | 0.0503 | 0 | 0 | 2,235 | 0.352412 |
7fd3371311cc6675c8548300ec8d2acf6af4b1ea | 2,036 | py | Python | ireporterApp/migrations/0001_initial.py | George-Okumu/IReporter-Django | 5962984ce0069cdf048dbf91686377568a7cf55b | [
"MIT"
] | null | null | null | ireporterApp/migrations/0001_initial.py | George-Okumu/IReporter-Django | 5962984ce0069cdf048dbf91686377568a7cf55b | [
"MIT"
] | 1 | 2021-10-06T20:15:11.000Z | 2021-10-06T20:15:11.000Z | ireporterApp/migrations/0001_initial.py | George-Okumu/IReporter-Django | 5962984ce0069cdf048dbf91686377568a7cf55b | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-13 16:04
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import ireporterApp.models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_... | 45.244444 | 147 | 0.623281 | 1,850 | 0.908644 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.134578 |
7fd3a16afbbba984f178b48eb62fc0be86afc9a5 | 1,090 | py | Python | ethronsoft/gcspypi/parsers/list.py | JuergenSimon/gcspypi | 80ac843e6702161915db45949c470d749aaabfda | [
"BSD-2-Clause"
] | null | null | null | ethronsoft/gcspypi/parsers/list.py | JuergenSimon/gcspypi | 80ac843e6702161915db45949c470d749aaabfda | [
"BSD-2-Clause"
] | null | null | null | ethronsoft/gcspypi/parsers/list.py | JuergenSimon/gcspypi | 80ac843e6702161915db45949c470d749aaabfda | [
"BSD-2-Clause"
] | null | null | null | from ethronsoft.gcspypi.package.package_manager import PackageManager
from ethronsoft.gcspypi.utilities.console import Console
from ethronsoft.gcspypi.parsers.commons import init_repository
def handle_(config, data):
with Console(verbose=config.get("verbose", False), exit_on_error=True) as c:
repo = init_r... | 49.545455 | 108 | 0.665138 | 501 | 0.459633 | 0 | 0 | 0 | 0 | 0 | 0 | 224 | 0.205505 |
7fd55e4cd2783cbb99a566e8a1ee6ac0b5a0d931 | 18,880 | py | Python | library/oci_dhcp_options.py | slmjy/oci-ansible-modules | 4713699064f4244b4554b5b2f97b5e5443fa2d6e | [
"Apache-2.0"
] | 106 | 2018-06-29T16:38:56.000Z | 2022-02-16T16:38:56.000Z | library/oci_dhcp_options.py | slmjy/oci-ansible-modules | 4713699064f4244b4554b5b2f97b5e5443fa2d6e | [
"Apache-2.0"
] | 122 | 2018-09-11T12:49:39.000Z | 2021-05-01T04:54:22.000Z | library/oci_dhcp_options.py | slmjy/oci-ansible-modules | 4713699064f4244b4554b5b2f97b5e5443fa2d6e | [
"Apache-2.0"
] | 78 | 2018-07-04T05:48:54.000Z | 2022-03-09T06:33:12.000Z | #!/usr/bin/python
# Copyright (c) 2017, 2018, 2019, Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TX... | 39.251559 | 117 | 0.610911 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10,867 | 0.575583 |
7fd5f598f64deef95bef0002d5fa94fb5341e2f5 | 4,066 | py | Python | canistream.py | otakucode/canistream | 42682b05eeaf98d6bd13125508c871a5cc5cb885 | [
"MIT"
] | null | null | null | canistream.py | otakucode/canistream | 42682b05eeaf98d6bd13125508c871a5cc5cb885 | [
"MIT"
] | null | null | null | canistream.py | otakucode/canistream | 42682b05eeaf98d6bd13125508c871a5cc5cb885 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
__author__ = 'otakucode'
import argparse
import sys
from urllib import parse
from bs4 import BeautifulSoup
import requests
def get_title(search_type, search_title):
search_encoded = parse.quote(search_title)
page = requests.get('http://www.canistream.it/search/{0}/{1}'.format(search_t... | 37.302752 | 146 | 0.599361 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,357 | 0.333743 |
7fd64d5d9687aeafd41778f375063551f567e46f | 67 | py | Python | homeassistant/components/hardware/const.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/hardware/const.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/hardware/const.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Constants for the Hardware integration."""
DOMAIN = "hardware"
| 16.75 | 45 | 0.716418 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.820896 |
7fd65ccdc6806c6f41c85d9bb13f95232c26ec00 | 2,646 | py | Python | packages/_debug_app/app.py | shellyln/red-agate | 71847872caded631b4783f3baaf5a3e2a0b495a0 | [
"0BSD"
] | 14 | 2017-12-03T15:57:17.000Z | 2021-07-11T12:57:24.000Z | packages/_debug_app/app.py | shellyln/red-agate | 71847872caded631b4783f3baaf5a3e2a0b495a0 | [
"0BSD"
] | 10 | 2020-02-25T08:20:38.000Z | 2020-09-03T22:00:18.000Z | packages/_debug_app/app.py | shellyln/red-agate | 71847872caded631b4783f3baaf5a3e2a0b495a0 | [
"0BSD"
] | 4 | 2018-03-30T16:09:44.000Z | 2022-01-03T19:26:16.000Z | #!/usr/bin/env python3
import json
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../red-agate/')
# pylint: disable=import-error, wrong-import-position
from redagate_lambda import call, LambdaInternalErrorException
# pylint: enable=import-error, wrong-import-position
if __name__... | 37.8 | 116 | 0.620937 | 0 | 0 | 0 | 0 | 1,736 | 0.656085 | 0 | 0 | 963 | 0.363946 |
7fd69c3d5f382287835cb80d361531b2ea2f11db | 1,290 | py | Python | cmsplugin_cascade/migrations/0009_cascadepage.py | teklager/djangocms-cascade | adc461f7054c6c0f88bc732aefd03b157df2f514 | [
"MIT"
] | 139 | 2015-01-08T22:27:06.000Z | 2021-08-19T03:36:58.000Z | cmsplugin_cascade/migrations/0009_cascadepage.py | teklager/djangocms-cascade | adc461f7054c6c0f88bc732aefd03b157df2f514 | [
"MIT"
] | 286 | 2015-01-02T14:15:14.000Z | 2022-03-22T11:00:12.000Z | cmsplugin_cascade/migrations/0009_cascadepage.py | teklager/djangocms-cascade | adc461f7054c6c0f88bc732aefd03b157df2f514 | [
"MIT"
] | 91 | 2015-01-16T15:06:23.000Z | 2022-03-23T23:36:54.000Z | from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cms', '0013_urlconfrevision'),
('cmsplugin_cascade', '0008_sortableinlinecascadeelement'),
]
operations = [
migrations.CreateModel(
name... | 44.482759 | 199 | 0.628682 | 1,213 | 0.94031 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.310853 |
7fd7f3a7ab836b1162a754535f994bd325636a89 | 1,679 | py | Python | es_import_poet.py | ly3too/chinese-poetry | 47362e5b7bf3976c986765eb8eb9b82e771e0771 | [
"MIT"
] | null | null | null | es_import_poet.py | ly3too/chinese-poetry | 47362e5b7bf3976c986765eb8eb9b82e771e0771 | [
"MIT"
] | null | null | null | es_import_poet.py | ly3too/chinese-poetry | 47362e5b7bf3976c986765eb8eb9b82e771e0771 | [
"MIT"
] | 1 | 2020-11-27T06:49:33.000Z | 2020-11-27T06:49:33.000Z | from elasticsearch_dsl import *
import os
from glob import glob
import json
import re
from . import to_zh_cn
class Poet(Document):
dynasty = Text()
author = Text()
title = Text(analyzer='jieba_index', search_analyzer='jieba_search')
paragraphs = Text(analyzer='jieba_index', search_analyzer='jieba_sear... | 27.080645 | 77 | 0.561048 | 618 | 0.368076 | 0 | 0 | 0 | 0 | 0 | 0 | 318 | 0.189398 |
7fd89c7d4555eeef4b73bc37f963bc2cf833445b | 5,785 | py | Python | pyenvgui/gui/components/_version_management.py | ulacioh/pyenv-gui | 03c3b102d78b474f103f7e828533a684f3e87ff6 | [
"BSD-3-Clause"
] | 2 | 2020-05-18T04:37:37.000Z | 2020-06-01T03:33:48.000Z | pyenvgui/gui/components/_version_management.py | ulacioh/pyenv-manager | 03c3b102d78b474f103f7e828533a684f3e87ff6 | [
"BSD-3-Clause"
] | null | null | null | pyenvgui/gui/components/_version_management.py | ulacioh/pyenv-manager | 03c3b102d78b474f103f7e828533a684f3e87ff6 | [
"BSD-3-Clause"
] | null | null | null | from threading import Thread
import tkinter as tk
from tkinter import ttk, messagebox
from . import pyenv
from ._custom_widgets import Treeview
class VersionManagementFrame(ttk.Frame):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Installed versions options
s... | 33.247126 | 94 | 0.498876 | 5,636 | 0.974244 | 0 | 0 | 0 | 0 | 0 | 0 | 700 | 0.121003 |
7fd923442eb40472eb4d67dc3ec8b44e90f1f18e | 636 | py | Python | Week11/765.py | bobsingh149/LeetCode | 293ed4931960bf5b9a3d5c4331ba4dfddccfcd55 | [
"MIT"
] | 101 | 2021-02-26T14:32:37.000Z | 2022-03-16T18:46:37.000Z | Week11/765.py | bobsingh149/LeetCode | 293ed4931960bf5b9a3d5c4331ba4dfddccfcd55 | [
"MIT"
] | null | null | null | Week11/765.py | bobsingh149/LeetCode | 293ed4931960bf5b9a3d5c4331ba4dfddccfcd55 | [
"MIT"
] | 30 | 2021-03-09T05:16:48.000Z | 2022-03-16T21:16:33.000Z | class Solution:
def minSwapsCouples(self, row: List[int]) -> int:
parent=[i for i in range(len(row))]
for i in range(1,len(row),2):
parent[i]-=1
def findpath(u,parent):
if parent[u]!=u:
parent[u]=findpath(parent[u],parent)
... | 33.473684 | 96 | 0.496855 | 626 | 0.984277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7fda7ecbf9da0226a54341ecb40e210f62c31957 | 1,951 | py | Python | proj/python/Test/dictStock.py | jumib/BlackTensor | d66a4fb5289dbe86104900072284e4a881f55645 | [
"MIT"
] | null | null | null | proj/python/Test/dictStock.py | jumib/BlackTensor | d66a4fb5289dbe86104900072284e4a881f55645 | [
"MIT"
] | null | null | null | proj/python/Test/dictStock.py | jumib/BlackTensor | d66a4fb5289dbe86104900072284e4a881f55645 | [
"MIT"
] | null | null | null | import requests
# host = 'localhost:8080'
# path = '/member/changeAppId'
# payload = {'UserId' : userId }
# r = requests.get('localhost:8080/member/changeAppId', params=payload)
# import requests
# import json
#
# # GET
# res = requests.get('http://localhost:8080/member/changeAppId')
# print(str(res.status_code) + " ... | 26.364865 | 123 | 0.538186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,899 | 0.955712 |
7fdaa5ddf18fe9267f5687f8511f00b862b0cdb0 | 1,549 | py | Python | screen_scan.py | vjeranc/puzpirobot | 3d6d0014cbd3092add56295aa463e3b31b750733 | [
"MIT"
] | null | null | null | screen_scan.py | vjeranc/puzpirobot | 3d6d0014cbd3092add56295aa463e3b31b750733 | [
"MIT"
] | null | null | null | screen_scan.py | vjeranc/puzpirobot | 3d6d0014cbd3092add56295aa463e3b31b750733 | [
"MIT"
] | null | null | null | from PIL import ImageGrab, Image
import cv2 as cv
import numpy as np
import match.template_matching as tm
import match.bilging as b
from mss import mss
def grab_screen():
img_src = ImageGrab.grab()
return cv.cvtColor(np.array(img_src.convert('RGB')), cv.COLOR_RGB2BGR)
class ScreenGrabber(object):
def gr... | 32.270833 | 140 | 0.615881 | 512 | 0.330536 | 0 | 0 | 0 | 0 | 0 | 0 | 385 | 0.248547 |
7fdaeb9d10001a9b68a81dc49605856be1d46461 | 1,917 | py | Python | simulacoes/queue-sim/src/eventoSaidaFilaZero.py | paulosell/ADS29009 | a85bc0fe19993e3e6624c2605a362605b67c2311 | [
"MIT"
] | null | null | null | simulacoes/queue-sim/src/eventoSaidaFilaZero.py | paulosell/ADS29009 | a85bc0fe19993e3e6624c2605a362605b67c2311 | [
"MIT"
] | null | null | null | simulacoes/queue-sim/src/eventoSaidaFilaZero.py | paulosell/ADS29009 | a85bc0fe19993e3e6624c2605a362605b67c2311 | [
"MIT"
] | null | null | null | from src.event import Event
from src.rng import prng
from src.eventoChegadaFilaUm import EventoChegadaFilaUm
from src.eventoChegadaFilaDois import EventoChegadaFilaDois
class EventoSaidaFilaZero(Event):
def __init__(self,t,i):
super().__init__(t,i)
def processEvent(self, simulador):
... | 38.34 | 111 | 0.586333 | 1,516 | 0.790819 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.10746 |
7fdbabe114f7c62834574d41bba0f9f62e53ca0f | 242 | py | Python | examples/camera/simple.py | Hikki12/remio | 17942bffe3c0619d3435b1a12399b116d4c800e3 | [
"Apache-2.0"
] | null | null | null | examples/camera/simple.py | Hikki12/remio | 17942bffe3c0619d3435b1a12399b116d4c800e3 | [
"Apache-2.0"
] | null | null | null | examples/camera/simple.py | Hikki12/remio | 17942bffe3c0619d3435b1a12399b116d4c800e3 | [
"Apache-2.0"
] | null | null | null | """Single simple camera example."""
import time
from remio import Camera
# Initialize Single Camera device
camera = Camera(name="webcam", src=0, size=[400, 400])
camera.start()
while True:
print("Doing some tasks...")
time.sleep(2) | 20.166667 | 54 | 0.698347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.400826 |
7fdecf5212432030558339550547b97267095dde | 1,481 | py | Python | write_cluster_wrappers.py | jrbourbeau/cr-composition | e9efb4b713492aaf544b5dd8bb67280d4f108056 | [
"MIT"
] | null | null | null | write_cluster_wrappers.py | jrbourbeau/cr-composition | e9efb4b713492aaf544b5dd8bb67280d4f108056 | [
"MIT"
] | 7 | 2017-08-29T16:20:04.000Z | 2018-06-12T16:58:36.000Z | write_cluster_wrappers.py | jrbourbeau/cr-composition | e9efb4b713492aaf544b5dd8bb67280d4f108056 | [
"MIT"
] | 1 | 2018-04-03T20:56:40.000Z | 2018-04-03T20:56:40.000Z | #!/usr/bin/env python
from __future__ import print_function
import os
import stat
import comptools as comp
here = os.path.abspath(os.path.dirname(__file__))
wrapper_path = os.path.join(here, 'wrapper.sh')
wrapper_virtualenv_path = os.path.join(here, 'wrapper_virtualenv.sh')
wrapper = """#!/bin/bash -e
eval `/cvmfs/... | 27.425926 | 78 | 0.673194 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.237677 |
7fdf5c3be33fa3dac4e441a667a56bd88641def7 | 3,899 | py | Python | labml_nn/gan/dcgan/__init__.py | BioGeek/annotated_deep_learning_paper_implementations | e2516cc3063cdfdf11cda05f22a10082297aa33e | [
"MIT"
] | 1 | 2021-09-17T18:16:17.000Z | 2021-09-17T18:16:17.000Z | labml_nn/gan/dcgan/__init__.py | BioGeek/annotated_deep_learning_paper_implementations | e2516cc3063cdfdf11cda05f22a10082297aa33e | [
"MIT"
] | null | null | null | labml_nn/gan/dcgan/__init__.py | BioGeek/annotated_deep_learning_paper_implementations | e2516cc3063cdfdf11cda05f22a10082297aa33e | [
"MIT"
] | null | null | null | """
---
title: Deep Convolutional Generative Adversarial Networks (DCGAN)
summary: A simple PyTorch implementation/tutorial of Deep Convolutional Generative Adversarial Networks (DCGAN).
---
# Deep Convolutional Generative Adversarial Networks (DCGAN)
This is a [PyTorch](https://pytorch.org) implementation of paper
[... | 32.22314 | 137 | 0.606566 | 2,224 | 0.570403 | 0 | 0 | 0 | 0 | 0 | 0 | 1,501 | 0.384971 |
7fdfdb7709a1fc9542844590029ad949b49fd04c | 2,846 | py | Python | src/flexible_models/flexible_GPT2.py | AlexDuvalinho/AITextGenerator | 02b96e40612209b5f7599674f9cd0e867f74fc59 | [
"MIT"
] | 36 | 2021-01-13T03:33:49.000Z | 2022-03-31T00:37:16.000Z | src/flexible_models/flexible_GPT2.py | bytjn1416124/AITextGenerator | 01ff72ebf373018d0d708cdd2018229fd386f73b | [
"MIT"
] | 5 | 2021-03-08T15:51:30.000Z | 2021-08-16T11:56:56.000Z | src/flexible_models/flexible_GPT2.py | bytjn1416124/AITextGenerator | 01ff72ebf373018d0d708cdd2018229fd386f73b | [
"MIT"
] | 16 | 2021-02-20T05:04:47.000Z | 2022-03-22T01:56:27.000Z | from .flexible_model import FlexibleModel
from src.utils import GPT2_BLOCK_SIZE
import torch
from src.flexible_models.GPT2_lm_segment_model import GPT2LMSegmentModel
class FlexibleGPT2(FlexibleModel):
"""
A FlexibleGPT2 model is simply the combination of a huggingface gpt2 transformers model and
a decoding strate... | 35.575 | 112 | 0.757554 | 2,676 | 0.940267 | 0 | 0 | 0 | 0 | 0 | 0 | 996 | 0.349965 |
7fe0f727107b9ce99344df8215be2fd9b8d15fef | 2,091 | py | Python | measurements-plot/udp-plots.py | HaoruiPeng/latencymeasurement | 82a9c5300a7cedd72885780f542982bf76ae49b2 | [
"MIT"
] | null | null | null | measurements-plot/udp-plots.py | HaoruiPeng/latencymeasurement | 82a9c5300a7cedd72885780f542982bf76ae49b2 | [
"MIT"
] | null | null | null | measurements-plot/udp-plots.py | HaoruiPeng/latencymeasurement | 82a9c5300a7cedd72885780f542982bf76ae49b2 | [
"MIT"
] | null | null | null | import os
import sys
import pandas as pd
import numpy as np
import scipy.stats as st
import matplotlib.pyplot as plt
def read_udp(file_path):
with open(file_path, "r") as f:
data_dict = {'send':{}, 'rec':{}}
data = pd.read_csv(file_path, sep=",", engine='python', error_bad_lines=False, skiprows=1)
... | 34.85 | 98 | 0.574845 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 431 | 0.206121 |
7fe161bbdcf3de8bdcf00c6ffb06a6b7c300dcdc | 10,236 | py | Python | nitorch/core/pyutils.py | wyli/nitorch | 3ecd18944cf45fb9193c4c6ffc32953c4d1c71ac | [
"MIT"
] | 1 | 2021-04-09T21:24:47.000Z | 2021-04-09T21:24:47.000Z | nitorch/core/pyutils.py | wyli/nitorch | 3ecd18944cf45fb9193c4c6ffc32953c4d1c71ac | [
"MIT"
] | null | null | null | nitorch/core/pyutils.py | wyli/nitorch | 3ecd18944cf45fb9193c4c6ffc32953c4d1c71ac | [
"MIT"
] | null | null | null | """Python utilities."""
import os
import functools
from types import GeneratorType as generator
import warnings
from collections import Counter
def file_mod(s, nam='', prefix='', suffix='', odir='', ext=''):
"""Modify a file path.
Parameters
----------
s : str
File path.
nam : str, defaul... | 24.965854 | 79 | 0.554807 | 0 | 0 | 3,356 | 0.327862 | 0 | 0 | 0 | 0 | 5,086 | 0.496874 |
7fe32cec9f3243b49d74a552788df1a4f5765a18 | 2,895 | py | Python | danceschool/prerequisites/handlers.py | benjwrdill/django-danceschool | 9ecb2754502e62d0f49aa23d08ca6de6cae3c99a | [
"BSD-3-Clause"
] | 1 | 2019-02-04T02:11:32.000Z | 2019-02-04T02:11:32.000Z | danceschool/prerequisites/handlers.py | benjwrdill/django-danceschool | 9ecb2754502e62d0f49aa23d08ca6de6cae3c99a | [
"BSD-3-Clause"
] | 2 | 2019-03-26T22:37:49.000Z | 2019-12-02T15:39:35.000Z | danceschool/prerequisites/handlers.py | benjwrdill/django-danceschool | 9ecb2754502e62d0f49aa23d08ca6de6cae3c99a | [
"BSD-3-Clause"
] | 1 | 2019-03-19T22:49:01.000Z | 2019-03-19T22:49:01.000Z | from django.dispatch import receiver
from django.contrib import messages
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from danceschool.core.signals import check_student_inf... | 38.6 | 172 | 0.646287 | 0 | 0 | 0 | 0 | 2,342 | 0.808981 | 0 | 0 | 744 | 0.256995 |
7fe3c41b5d4495299339fa6ac09fd4c855492415 | 1,577 | py | Python | b9_tools.py | eoinnoble/b9-indifference | a8b7f3c2268af162d5269a8ce7180be717bfb3fb | [
"Unlicense"
] | 9 | 2017-11-13T20:31:04.000Z | 2021-11-08T12:30:48.000Z | b9_tools.py | eoinnoble/b9-indifference | a8b7f3c2268af162d5269a8ce7180be717bfb3fb | [
"Unlicense"
] | 1 | 2021-11-30T20:24:26.000Z | 2021-11-30T20:24:26.000Z | b9_tools.py | eoinnoble/b9-indifference | a8b7f3c2268af162d5269a8ce7180be717bfb3fb | [
"Unlicense"
] | 1 | 2017-12-17T09:04:25.000Z | 2017-12-17T09:04:25.000Z | import re
from collections.abc import MutableMapping
from typing import Dict, List
import markovify
import nltk
class RangeDict(MutableMapping):
"""Enables a dictionary whose keys are ranges."""
def __init__(self, iterable: Dict):
if not isinstance(iterable, dict):
raise TypeError("You m... | 27.666667 | 97 | 0.639822 | 1,458 | 0.92454 | 0 | 0 | 0 | 0 | 0 | 0 | 404 | 0.256183 |
7fe457572d531fc0f3ed15941394935cc6786462 | 3,907 | py | Python | live_visualisation.py | duyanh-y4n/DJITelloPy | 3bfda900a7dc523be4effe21e0e3b83126576750 | [
"MIT"
] | null | null | null | live_visualisation.py | duyanh-y4n/DJITelloPy | 3bfda900a7dc523be4effe21e0e3b83126576750 | [
"MIT"
] | null | null | null | live_visualisation.py | duyanh-y4n/DJITelloPy | 3bfda900a7dc523be4effe21e0e3b83126576750 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# File : live_visualisation.py
# Author : Duy Anh Pham <[email protected]>
# Date : 10.04.2020
# Last Modified By: Duy Anh Pham <[email protected]>
from djitellopy.realtime_plot.RealtimePlotter import *
import redis
import nu... | 35.198198 | 81 | 0.652931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 801 | 0.205017 |
7fe5f97f042b7d291cc4c77318e4cda78c4dbfcc | 1,187 | py | Python | app/cli.py | dev-johnlopez/Assignably | 056960556dd75dfce064970887f37a44a8c66aec | [
"MIT"
] | 1 | 2021-06-09T02:19:18.000Z | 2021-06-09T02:19:18.000Z | app/cli.py | dev-johnlopez/Assignably | 056960556dd75dfce064970887f37a44a8c66aec | [
"MIT"
] | 1 | 2021-06-01T23:45:06.000Z | 2021-06-01T23:45:06.000Z | app/cli.py | dev-johnlopez/assignably | 056960556dd75dfce064970887f37a44a8c66aec | [
"MIT"
] | null | null | null | import os
import click
from app import app
from flask.cli import with_appcontext
from app.auth.models import Role
def register(app):
@app.cli.group()
def translate():
"""Translation and localization commands."""
pass
@translate.command()
@click.argument('lang')
def init(lang):
... | 25.255319 | 83 | 0.566133 | 0 | 0 | 0 | 0 | 1,026 | 0.864364 | 0 | 0 | 448 | 0.377422 |
7fe64ab21ba37642fb9fd48c4a4ae360552314de | 2,918 | py | Python | autobasedoc/tableofcontents.py | NuCOS/autobasedoc | 54135199b966847d822e772f435ddeb0a942fb42 | [
"BSD-3-Clause"
] | 3 | 2017-06-20T06:33:05.000Z | 2021-02-26T19:54:01.000Z | autobasedoc/tableofcontents.py | skidzo/autobasedoc | 54135199b966847d822e772f435ddeb0a942fb42 | [
"BSD-3-Clause"
] | null | null | null | autobasedoc/tableofcontents.py | skidzo/autobasedoc | 54135199b966847d822e772f435ddeb0a942fb42 | [
"BSD-3-Clause"
] | 4 | 2017-09-27T09:18:54.000Z | 2019-07-02T23:58:06.000Z | """
tableofcontents
===============
.. module:: tableofcontents
:platform: Unix, Windows
:synopsis: a tableofcontents that breaks not to the next frame but to the next page
.. moduleauthor:: Johannes Eckstein
"""
from reportlab import rl_config
from reportlab.platypus import Table, Paragraph, PageBreak
from re... | 37.896104 | 123 | 0.614119 | 2,520 | 0.863605 | 0 | 0 | 0 | 0 | 0 | 0 | 633 | 0.216929 |
7fe7a7ef4cedcf3d41ec5da04172536952412a93 | 570 | py | Python | conans/test/model/username_test.py | jbaruch/conan | 263722b5284828c49774ffe18d314b24ee11e178 | [
"MIT"
] | null | null | null | conans/test/model/username_test.py | jbaruch/conan | 263722b5284828c49774ffe18d314b24ee11e178 | [
"MIT"
] | null | null | null | conans/test/model/username_test.py | jbaruch/conan | 263722b5284828c49774ffe18d314b24ee11e178 | [
"MIT"
] | 1 | 2021-03-03T17:15:46.000Z | 2021-03-03T17:15:46.000Z | import unittest
from conans.errors import ConanException
from conans.model.username import Username
class UsernameTest(unittest.TestCase):
def username_test(self):
Username("userwith-hypens")
self.assertRaises(ConanException, Username, "")
self.assertRaises(ConanException, Username, "A"*... | 28.5 | 59 | 0.684211 | 467 | 0.819298 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.078947 |
7fe7fde051fa8a3d76d968e9a6574579dd014181 | 152 | py | Python | exercises/01_Primeiros Passos/exe_08.py | MariaTrindade/CursoPython | 2c60dd670747db08011d9dd33e3bbfd5795b06e8 | [
"Apache-2.0"
] | 1 | 2021-05-11T18:30:17.000Z | 2021-05-11T18:30:17.000Z | exercises/01_Primeiros Passos/exe_08.py | MariaTrindade/CursoPython | 2c60dd670747db08011d9dd33e3bbfd5795b06e8 | [
"Apache-2.0"
] | null | null | null | exercises/01_Primeiros Passos/exe_08.py | MariaTrindade/CursoPython | 2c60dd670747db08011d9dd33e3bbfd5795b06e8 | [
"Apache-2.0"
] | null | null | null | """
Faça um Programa que peça a temperatura em graus Fahrenheit, transforme e mostre
a temperatura em graus Celsius.
C = (5 * (F-32) / 9)
"""
| 9.5 | 80 | 0.651316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.941558 |
7febb7dfbccc110592c6373855dc121877f1f2c7 | 1,641 | py | Python | throwaway/viz_nav_policy.py | sfpd/rlreloaded | 650c64ec22ad45996c8c577d85b1a4f20aa1c692 | [
"MIT"
] | null | null | null | throwaway/viz_nav_policy.py | sfpd/rlreloaded | 650c64ec22ad45996c8c577d85b1a4f20aa1c692 | [
"MIT"
] | null | null | null | throwaway/viz_nav_policy.py | sfpd/rlreloaded | 650c64ec22ad45996c8c577d85b1a4f20aa1c692 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from control4.algs.save_load_utils import load_agent_and_mdp
from control4.core.rollout import rollout
from tabulate import tabulate
import numpy as np
import pygame
from control3.pygameviewer import PygameViewer, pygame
from collections import namedtuple
from copy import deepcopy
path = []
if _... | 28.293103 | 87 | 0.624619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.078001 |
7fec3044100d2f06c27146cd462ed08cea1a54d2 | 201 | py | Python | utils/compilers/ConnectionCompiler/token.py | pranaOS-bot/pranaOS-1 | ddb8086d103d004f84744641624e74fc7ec0984e | [
"BSD-2-Clause"
] | 5 | 2021-10-06T13:47:26.000Z | 2022-03-24T10:42:06.000Z | utils/compilers/ConnectionCompiler/token.py | evilbat831/brutalOS | 85920a6a95d564320a245a2e48ffc7cdf64ede84 | [
"BSD-2-Clause"
] | null | null | null | utils/compilers/ConnectionCompiler/token.py | evilbat831/brutalOS | 85920a6a95d564320a245a2e48ffc7cdf64ede84 | [
"BSD-2-Clause"
] | 1 | 2021-10-18T12:48:16.000Z | 2021-10-18T12:48:16.000Z |
class Token:
def __init__(self, type=None, value=None):
self.type = type
self.value = value
def __str__(self):
return "Token({0}, {1})".format(self.type, self.value) | 20.1 | 62 | 0.587065 | 199 | 0.99005 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.084577 |
7fec6177c282fa0ff0c92470b63745ee8ad16c40 | 1,772 | py | Python | echopype/echodata/convention/attrs.py | b-reyes/echopype | bc8afa190fa2ca4fab5944bac83cd4b20f7abcf6 | [
"Apache-2.0"
] | null | null | null | echopype/echodata/convention/attrs.py | b-reyes/echopype | bc8afa190fa2ca4fab5944bac83cd4b20f7abcf6 | [
"Apache-2.0"
] | 2 | 2019-02-20T16:47:51.000Z | 2021-04-20T20:20:32.000Z | echopype/echodata/convention/attrs.py | b-reyes/echopype | bc8afa190fa2ca4fab5944bac83cd4b20f7abcf6 | [
"Apache-2.0"
] | 2 | 2019-02-20T16:41:56.000Z | 2021-08-05T04:33:07.000Z | """
Define convention-based global, coordinate and variable attributes
in one place for consistent reuse
"""
DEFAULT_BEAM_COORD_ATTRS = {
"frequency": {
"long_name": "Transducer frequency",
"standard_name": "sound_frequency",
"units": "Hz",
"valid_min": 0.0,
},
"ping_time": ... | 26.848485 | 75 | 0.550226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,060 | 0.598194 |
7fecb02664281603ef197605d74e5b00e842bde4 | 2,072 | py | Python | tf_tests.py | MadsJensen/agency_connectivity | b45adbc133573de1ebdcff0edb17e43f1691c577 | [
"BSD-3-Clause"
] | null | null | null | tf_tests.py | MadsJensen/agency_connectivity | b45adbc133573de1ebdcff0edb17e43f1691c577 | [
"BSD-3-Clause"
] | null | null | null | tf_tests.py | MadsJensen/agency_connectivity | b45adbc133573de1ebdcff0edb17e43f1691c577 | [
"BSD-3-Clause"
] | null | null | null | import mne
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
import seaborn as sns
from tf_analysis import single_trial_tf
plt.ion()
data_folder = "/home/mje/Projects/agency_connectivity/data/"
epochs = mne.read_epochs(data_folder + "P2_ds_bp_ica-epo.fif")
# single trial morlet tests
frequ... | 32.888889 | 77 | 0.670849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.123552 |
7fee0ec8e03805400ba3a871766b2ab0228dc4a4 | 17,645 | py | Python | data/smth.py | roeiherz/AG2Video | a4eb439d7147c91237ddd50ec305add8e1537360 | [
"MIT"
] | 22 | 2020-07-01T07:11:15.000Z | 2022-02-17T13:26:16.000Z | data/smth.py | roeiherz/AG2Video | a4eb439d7147c91237ddd50ec305add8e1537360 | [
"MIT"
] | 5 | 2021-06-16T02:35:14.000Z | 2022-03-12T01:00:27.000Z | data/smth.py | roeiherz/AG2Video | a4eb439d7147c91237ddd50ec305add8e1537360 | [
"MIT"
] | 2 | 2021-08-04T05:22:58.000Z | 2021-12-11T02:15:57.000Z | import json
import os
import pickle as pkl
import random
import math
import numpy as np
import pandas as pd
import torch
from torch.utils.data import Dataset
import torchvision.transforms as T
import torch.nn.functional as F
from PIL import Image
from data.SomethingElse.config import action_to_number_of_instances, acti... | 45.127877 | 124 | 0.607708 | 16,369 | 0.927685 | 0 | 0 | 0 | 0 | 0 | 0 | 5,245 | 0.297251 |
7feeefa1c9cfdfdf846929d05b2027d327b3a9e6 | 60 | py | Python | user_login.py | pieddro/football | d5a021da26a2252dcece752c51818f03d1d3db46 | [
"Apache-2.0"
] | null | null | null | user_login.py | pieddro/football | d5a021da26a2252dcece752c51818f03d1d3db46 | [
"Apache-2.0"
] | null | null | null | user_login.py | pieddro/football | d5a021da26a2252dcece752c51818f03d1d3db46 | [
"Apache-2.0"
] | null | null | null | Meine neuer Code..
Neue Codezeile ....
Tst stash zum 2. mal | 20 | 20 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7fef83c18d0039ec789a2a57075be970bd25f765 | 1,195 | py | Python | refstack/api/controllers/__init__.py | jovial/refstack | b6f9f8611bc3752acbf0c4275453285e80be85dc | [
"Apache-2.0"
] | null | null | null | refstack/api/controllers/__init__.py | jovial/refstack | b6f9f8611bc3752acbf0c4275453285e80be85dc | [
"Apache-2.0"
] | null | null | null | refstack/api/controllers/__init__.py | jovial/refstack | b6f9f8611bc3752acbf0c4275453285e80be85dc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Mirantis, 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 requir... | 32.297297 | 78 | 0.646862 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 803 | 0.671967 |
7ff0e77d9b3db005d3ce70f0c9f81c5bbde228f8 | 4,808 | py | Python | main.py | superwaiwjia/lowRankForSeer | 86041e0a39e1ef2718e8133eb65a63c05d9a441c | [
"MIT"
] | 2 | 2021-11-18T07:01:40.000Z | 2021-11-18T07:01:49.000Z | main.py | superwaiwjia/lowRankForSeer | 86041e0a39e1ef2718e8133eb65a63c05d9a441c | [
"MIT"
] | null | null | null | main.py | superwaiwjia/lowRankForSeer | 86041e0a39e1ef2718e8133eb65a63c05d9a441c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
import pickle
import sys, os, re, subprocess, math
reload(sys)
sys.setdefaultencoding("utf-8")
from os.path import abspath, dirname, join
whereami = abspath(dirname(__file__))
sys.path.append(whereami)
from sklearn.metrics import roc_auc_score
import pandas as pd
import numpy as np
... | 38.464 | 258 | 0.66015 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 952 | 0.198003 |
7ff1b8e6fdd883cf61f529bf469c18df4b7174fc | 166 | py | Python | django_gotolong/bhav/apps.py | ParikhKadam/gotolong | 839beb8aa37055a2078eaa289b8ae05b62e8905e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 15 | 2019-12-06T16:19:45.000Z | 2021-08-20T13:22:22.000Z | django_gotolong/bhav/apps.py | ParikhKadam/gotolong | 839beb8aa37055a2078eaa289b8ae05b62e8905e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 14 | 2020-12-08T10:45:05.000Z | 2021-09-21T17:23:45.000Z | django_gotolong/bhav/apps.py | ParikhKadam/gotolong | 839beb8aa37055a2078eaa289b8ae05b62e8905e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 9 | 2020-01-01T03:04:29.000Z | 2021-04-18T08:42:30.000Z | from django.apps import AppConfig
from django_gotolong.bhav.views import start
class BhavConfig(AppConfig):
name = 'bhav'
def ready(self):
start()
| 16.6 | 44 | 0.704819 | 84 | 0.506024 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.036145 |
7ff2225b3cf1350521968e39323aa03d96333bb2 | 2,130 | py | Python | tethysext/atcore/services/paginate.py | Aquaveo/tethysext-atcore | 7a83ccea24fdbbe806f12154f938554dd6c8015f | [
"BSD-3-Clause"
] | 3 | 2020-11-05T23:50:47.000Z | 2021-02-26T21:43:29.000Z | tethysext/atcore/services/paginate.py | Aquaveo/tethysext-atcore | 7a83ccea24fdbbe806f12154f938554dd6c8015f | [
"BSD-3-Clause"
] | 7 | 2020-10-29T16:53:49.000Z | 2021-05-07T19:46:47.000Z | tethysext/atcore/services/paginate.py | Aquaveo/tethysext-atcore | 7a83ccea24fdbbe806f12154f938554dd6c8015f | [
"BSD-3-Clause"
] | null | null | null | """
********************************************************************************
* Name: pagintate.py
* Author: nswain
* Created On: April 17, 2018
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""
def paginate(objects, results_per_page, page, resul... | 39.444444 | 98 | 0.620188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,029 | 0.483099 |
7ff4886052822174f0f2c10e163f3567d0699ee7 | 133 | py | Python | geotweet/tests/integration/twitter/__init__.py | meyersj/geotweet | 1a6b55f98adf34d1b91f172d9187d599616412d9 | [
"MIT"
] | 6 | 2016-03-26T19:29:25.000Z | 2020-07-12T02:18:22.000Z | geotweet/tests/integration/twitter/__init__.py | meyersj/geotweet | 1a6b55f98adf34d1b91f172d9187d599616412d9 | [
"MIT"
] | null | null | null | geotweet/tests/integration/twitter/__init__.py | meyersj/geotweet | 1a6b55f98adf34d1b91f172d9187d599616412d9 | [
"MIT"
] | 1 | 2020-01-06T01:25:05.000Z | 2020-01-06T01:25:05.000Z | import os
from os.path import dirname
import sys
ROOT = dirname(dirname(dirname(os.path.abspath(__file__))))
sys.path.append(ROOT)
| 16.625 | 59 | 0.774436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7ff4ceaf754a9a8a176cc343441eb5563e96bf86 | 1,996 | py | Python | main.py | nerdmanPc/arvore-b | f993028f0c8971cff4e4434967c8f9b44a5cc265 | [
"MIT"
] | null | null | null | main.py | nerdmanPc/arvore-b | f993028f0c8971cff4e4434967c8f9b44a5cc265 | [
"MIT"
] | null | null | null | main.py | nerdmanPc/arvore-b | f993028f0c8971cff4e4434967c8f9b44a5cc265 | [
"MIT"
] | null | null | null | # Primeiro Trabalho Pratico de EDAII (UFBA)
# Desenvolvido em dupla:
# Laila Pereira Mota Santos e Pedro Antonhyonih Silva Costa
# Versão Python 3.8.10
#
# OBSERVACAO IMPORTANTE:
# A CONSTANTE GRAUMINIMO ESTA NO ARQUIVO node.py
import os
from struct import Struct
from typing import Optional, Tuple
from enum import Enu... | 25.265823 | 65 | 0.698397 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 551 | 0.275914 |
7ff5855819bc7ea53013b0091b066cc505d14375 | 6,134 | py | Python | hcat/backends/spatial_embedding.py | buswinka/hcat | dcfd855904ba51f6e1fa6c9ddc775b3364695e3e | [
"MIT"
] | 4 | 2021-10-14T19:22:57.000Z | 2022-03-29T09:37:43.000Z | hcat/backends/spatial_embedding.py | buswinka/hcat | dcfd855904ba51f6e1fa6c9ddc775b3364695e3e | [
"MIT"
] | null | null | null | hcat/backends/spatial_embedding.py | buswinka/hcat | dcfd855904ba51f6e1fa6c9ddc775b3364695e3e | [
"MIT"
] | null | null | null | import torch
import hcat.lib.functional
from hcat.lib.functional import IntensityCellReject
from hcat.backends.backend import Backend
from hcat.models.r_unet import embed_model as RUnet
from hcat.train.transforms import median_filter, erosion
import hcat.lib.utils
from hcat.lib.utils import graceful_exit
import os.pat... | 34.077778 | 111 | 0.626997 | 5,760 | 0.939028 | 0 | 0 | 2,561 | 0.417509 | 0 | 0 | 2,284 | 0.372351 |
7ff58669b09c24b09a4ab1de5e76c0c33e23118d | 6,656 | py | Python | mortar_rdb/tests/test_utility.py | Mortar/mortar_rdb | 576628a299f94ef60324244777766a620556592b | [
"MIT"
] | 1 | 2017-03-24T15:20:40.000Z | 2017-03-24T15:20:40.000Z | mortar_rdb/tests/test_utility.py | Mortar/mortar_rdb | 576628a299f94ef60324244777766a620556592b | [
"MIT"
] | 3 | 2015-12-01T20:06:30.000Z | 2018-02-02T07:05:21.000Z | mortar_rdb/tests/test_utility.py | Mortar/mortar_rdb | 576628a299f94ef60324244777766a620556592b | [
"MIT"
] | 1 | 2019-03-01T08:37:48.000Z | 2019-03-01T08:37:48.000Z | from mortar_rdb import register_session, get_session
from mortar_rdb.interfaces import ISession
from testfixtures.components import TestComponents
from sqlalchemy.exc import OperationalError
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.session import Session
from sqlalchemy.schema import ... | 32.154589 | 70 | 0.587891 | 6,007 | 0.902494 | 0 | 0 | 0 | 0 | 0 | 0 | 923 | 0.138672 |
7ff6757eb76e6c391780f0171055dc2c8c0944f0 | 2,637 | py | Python | magic_driver_control/scripts/driver_controller.py | flamma7/adv_robotics | da9150de28a5464ee6af1d0859312f4858a6b3d2 | [
"Apache-2.0"
] | null | null | null | magic_driver_control/scripts/driver_controller.py | flamma7/adv_robotics | da9150de28a5464ee6af1d0859312f4858a6b3d2 | [
"Apache-2.0"
] | null | null | null | magic_driver_control/scripts/driver_controller.py | flamma7/adv_robotics | da9150de28a5464ee6af1d0859312f4858a6b3d2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
This node talks directly to the pololu driver
It takes in PID control effort and maps it to commands for the pololu driver
"""
from __future__ import division
import rospy
from std_msgs.msg import Float64, Int8MultiArray
DRIVE_PUB_INDEX = 0
YAW_PUB_INDEX = 1
SIDE_IR_THRESH = 10
FRONT_IR_T... | 28.663043 | 91 | 0.615851 | 2,127 | 0.806598 | 0 | 0 | 0 | 0 | 0 | 0 | 557 | 0.211225 |
7ff703d79b5264be25b5282ef47dd791ebb22441 | 4,025 | py | Python | GageRnR/application.py | tobyndax/GageRnR | 2dadafe6cd76a963068b7cbbd732f5f8e02d36fb | [
"MIT"
] | null | null | null | GageRnR/application.py | tobyndax/GageRnR | 2dadafe6cd76a963068b7cbbd732f5f8e02d36fb | [
"MIT"
] | null | null | null | GageRnR/application.py | tobyndax/GageRnR | 2dadafe6cd76a963068b7cbbd732f5f8e02d36fb | [
"MIT"
] | null | null | null | """GageRnR.
The input data should be structured
in a 3d array n[i,j,k] where
i = operator, j = part, k = measurement
Stored to file this data would look:
m1 m2 m3
3.29; 3.41; 3.64 # p1 | o1
2.44; 2.32; 2.42 # p2
3.08; 3.25; 3.07 # p1 | o2
2.53; 1.78; 2.32 # p2
3.04; 2.89; 2.85 # p1 | o3
1.62; 1.87; 2.04 # ... | 29.166667 | 101 | 0.610683 | 2,141 | 0.531925 | 0 | 0 | 0 | 0 | 0 | 0 | 1,546 | 0.384099 |
7ff97680a496e4eac114964f67955913e58ace45 | 4,536 | py | Python | final/options.py | annahung31/Advance_MM_homeworks | f6b2d600220442a73d25d478d08898ee796457b6 | [
"MIT"
] | null | null | null | final/options.py | annahung31/Advance_MM_homeworks | f6b2d600220442a73d25d478d08898ee796457b6 | [
"MIT"
] | null | null | null | final/options.py | annahung31/Advance_MM_homeworks | f6b2d600220442a73d25d478d08898ee796457b6 | [
"MIT"
] | null | null | null | import numpy as np
import os
import glob
import torch
import argparse
def parse_args(script):
parser = argparse.ArgumentParser(description= 'few-shot script %s' %(script))
parser.add_argument('--task', default='fsl', help='fsl/cdfsl-single/cdfsl-multi')
parser.add_argument('--dataset', default='miniImagenet', he... | 52.744186 | 153 | 0.698633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,614 | 0.35582 |
7ffbe9ba3d0ccc12492d20e36da26c44617c81e1 | 6,322 | py | Python | tests/test_pt.py | atti84it/ebook-reader-dict | 6a23b633bb06af7f9ea9d54c837cd78d627a7eb7 | [
"MIT"
] | 83 | 2020-05-21T12:25:07.000Z | 2022-03-25T23:26:42.000Z | tests/test_pt.py | atti84it/ebook-reader-dict | 6a23b633bb06af7f9ea9d54c837cd78d627a7eb7 | [
"MIT"
] | 1,015 | 2020-04-18T12:21:25.000Z | 2022-03-31T16:38:53.000Z | tests/test_pt.py | atti84it/ebook-reader-dict | 6a23b633bb06af7f9ea9d54c837cd78d627a7eb7 | [
"MIT"
] | 16 | 2020-11-05T22:49:31.000Z | 2022-03-31T08:14:05.000Z | import pytest
from wikidict.render import parse_word
from wikidict.utils import process_templates
@pytest.mark.parametrize(
"word, pronunciations, gender, etymology, definitions",
[
("ababalhar", [], "", ["De baba."], ["<i>(popular)</i> babar; conspurcar"]),
(
"alguém",
... | 35.122222 | 146 | 0.440683 | 0 | 0 | 0 | 0 | 6,302 | 0.983612 | 0 | 0 | 3,524 | 0.550023 |
7ffcca638b4a383642444cb66e73358214905bc8 | 10,792 | py | Python | rebalancer.py | papercheck/lndg | 8a0a5c9b2b53dfa2bf790feedac4bc903b4ff5ca | [
"MIT"
] | null | null | null | rebalancer.py | papercheck/lndg | 8a0a5c9b2b53dfa2bf790feedac4bc903b4ff5ca | [
"MIT"
] | null | null | null | rebalancer.py | papercheck/lndg | 8a0a5c9b2b53dfa2bf790feedac4bc903b4ff5ca | [
"MIT"
] | null | null | null | import django, json, datetime
from django.conf import settings
from django.db.models import Sum
from pathlib import Path
from datetime import datetime, timedelta
from gui.lnd_deps import lightning_pb2 as ln
from gui.lnd_deps import lightning_pb2_grpc as lnrpc
from gui.lnd_deps import router_pb2 as lnr
from gui.lnd_deps... | 58.972678 | 351 | 0.615456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,455 | 0.134822 |
7ffe3a2a54d20351ed2bd85d6e6203ef3341cc49 | 5,112 | py | Python | pale/fields/base.py | Loudr/pale | dc002ee6032c856551143af222ff8f71ed9853fe | [
"MIT"
] | 13 | 2015-06-18T02:35:31.000Z | 2019-03-15T14:39:28.000Z | pale/fields/base.py | Loudr/pale | dc002ee6032c856551143af222ff8f71ed9853fe | [
"MIT"
] | 34 | 2015-05-18T17:13:16.000Z | 2021-03-25T21:40:42.000Z | pale/fields/base.py | Loudr/pale | dc002ee6032c856551143af222ff8f71ed9853fe | [
"MIT"
] | 3 | 2016-06-08T01:05:47.000Z | 2020-02-04T17:50:17.000Z | # -*- coding: utf-8 -*-
import logging
import types
from collections import Iterable
class BaseField(object):
"""The base class for all Fields and Arguments.
Field objects are used by Resources to define the data they return.
They include a name, a type, a short description, and a long
description. O... | 32.35443 | 78 | 0.600352 | 5,020 | 0.982003 | 0 | 0 | 0 | 0 | 0 | 0 | 2,364 | 0.462441 |
7ffeda80306a79591e192335e97b6bc94abc7f4b | 160 | py | Python | DublinBusTest/forms.py | Eimg851/DublinBusApp_ResearchPracticum | 41b2c559dc4608705fd1348480ce729c645d6d5a | [
"BSD-2-Clause"
] | null | null | null | DublinBusTest/forms.py | Eimg851/DublinBusApp_ResearchPracticum | 41b2c559dc4608705fd1348480ce729c645d6d5a | [
"BSD-2-Clause"
] | null | null | null | DublinBusTest/forms.py | Eimg851/DublinBusApp_ResearchPracticum | 41b2c559dc4608705fd1348480ce729c645d6d5a | [
"BSD-2-Clause"
] | 1 | 2020-06-20T09:53:15.000Z | 2020-06-20T09:53:15.000Z | from django import forms
from .models import *
class routeForm(forms.ModelForm):
class Meta:
model = Routes
fields = ('route_short_name',)
| 20 | 38 | 0.66875 | 111 | 0.69375 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.1125 |
3d006479e663873fb437875d9ddb0f2fa1dee350 | 9,802 | py | Python | tests/automated/test_aws_automated.py | hrichardlee/meadowrun | 77a182505209a4d185f111cbd5aa62a46038728a | [
"MIT"
] | null | null | null | tests/automated/test_aws_automated.py | hrichardlee/meadowrun | 77a182505209a4d185f111cbd5aa62a46038728a | [
"MIT"
] | null | null | null | tests/automated/test_aws_automated.py | hrichardlee/meadowrun | 77a182505209a4d185f111cbd5aa62a46038728a | [
"MIT"
] | null | null | null | """
These tests require an AWS account to be set up, but don't require any manual
intervention beyond some initial setup. Also, these tests create instances (which cost
money!). Either `meadowrun-manage install` needs to be set up, or `meadowrun-manage
clean` needs to be run periodically
"""
import asyncio
import date... | 31.517685 | 110 | 0.652724 | 6,906 | 0.70455 | 0 | 0 | 1,275 | 0.130075 | 2,967 | 0.302693 | 1,142 | 0.116507 |
3d0113714f49189583df2b472f9f7bb1b7d3193b | 117 | py | Python | aficionado/defaults.py | SamuelHornsey/aficionado | 27654028ede3d719b091dd61f5c8d252f631a316 | [
"MIT"
] | 1 | 2019-11-27T21:58:10.000Z | 2019-11-27T21:58:10.000Z | aficionado/defaults.py | SamuelHornsey/aficionado | 27654028ede3d719b091dd61f5c8d252f631a316 | [
"MIT"
] | null | null | null | aficionado/defaults.py | SamuelHornsey/aficionado | 27654028ede3d719b091dd61f5c8d252f631a316 | [
"MIT"
] | null | null | null | def not_found_handler():
return '404. Path not found'
def internal_error_handler():
return '500. Internal error' | 23.4 | 30 | 0.752137 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.358974 |
3d01213807fe34d6cbaa37ec89c61cfcc0e43948 | 11,536 | py | Python | apps/hosts/views.py | kaustubh-s1/EvalAI | 1884811e7759e0d095f7afb68188a7f010fa65dc | [
"BSD-3-Clause"
] | 1,470 | 2016-10-21T01:21:45.000Z | 2022-03-30T14:08:29.000Z | apps/hosts/views.py | kaustubh-s1/EvalAI | 1884811e7759e0d095f7afb68188a7f010fa65dc | [
"BSD-3-Clause"
] | 2,594 | 2016-11-02T03:36:01.000Z | 2022-03-31T15:30:04.000Z | apps/hosts/views.py | kaustubh-s1/EvalAI | 1884811e7759e0d095f7afb68188a7f010fa65dc | [
"BSD-3-Clause"
] | 865 | 2016-11-09T17:46:32.000Z | 2022-03-30T13:06:52.000Z | from django.contrib.auth.models import User
from rest_framework import permissions, status
from rest_framework.decorators import (
api_view,
authentication_classes,
permission_classes,
throttle_classes,
)
from rest_framework.response import Response
from rest_framework_expiring_authtoken.authentication... | 37.093248 | 78 | 0.684466 | 0 | 0 | 0 | 0 | 10,561 | 0.915482 | 0 | 0 | 970 | 0.084085 |
3d019cb8d3804b67e4c6cc481ba0582e56b8a8a0 | 2,207 | py | Python | trace_for_guess/rescale.py | wtraylor/trace21ka_for_lpjguess | 184f8e213504fdad975eab40cf335bc47810669f | [
"MIT"
] | null | null | null | trace_for_guess/rescale.py | wtraylor/trace21ka_for_lpjguess | 184f8e213504fdad975eab40cf335bc47810669f | [
"MIT"
] | null | null | null | trace_for_guess/rescale.py | wtraylor/trace21ka_for_lpjguess | 184f8e213504fdad975eab40cf335bc47810669f | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Wolfgang Traylor <[email protected]>
#
# SPDX-License-Identifier: MIT
import os
import shutil
import subprocess
from termcolor import cprint
from trace_for_guess.skip import skip
def rescale_file(in_file, out_file, template_file, alg):
"""Regrid a NetCDF file using ... | 36.783333 | 132 | 0.622565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,220 | 0.551288 |
3d03e7e9418a784fa6ae34ca818d4e877cfbf8bb | 6,545 | py | Python | loldib/getratings/models/NA/na_khazix/na_khazix_top.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_khazix/na_khazix_top.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_khazix/na_khazix_top.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | from getratings.models.ratings import Ratings
class NA_Khazix_Top_Aatrox(Ratings):
pass
class NA_Khazix_Top_Ahri(Ratings):
pass
class NA_Khazix_Top_Akali(Ratings):
pass
class NA_Khazix_Top_Alistar(Ratings):
pass
class NA_Khazix_Top_Amumu(Ratings):
pass
class NA_Khazix_Top_Anivia(Ratings):
... | 15.695444 | 46 | 0.766692 | 5,944 | 0.908174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3d05562ae792843c99e988fb6a4b5372987caff9 | 616 | py | Python | setup.py | KloudTrader/libkloudtrader | 015e2779f80ba2de93be9fa6fd751412a9d5f492 | [
"Apache-2.0"
] | 11 | 2019-01-16T16:10:09.000Z | 2021-03-02T00:59:17.000Z | setup.py | KloudTrader/kloudtrader | 015e2779f80ba2de93be9fa6fd751412a9d5f492 | [
"Apache-2.0"
] | 425 | 2019-07-10T06:59:49.000Z | 2021-01-12T05:32:14.000Z | setup.py | KloudTrader/kloudtrader | 015e2779f80ba2de93be9fa6fd751412a9d5f492 | [
"Apache-2.0"
] | 6 | 2019-03-15T16:25:06.000Z | 2021-05-03T10:02:13.000Z | from distutils.core import setup
setup(
name='libkloudtrader',
version='1.0.0',
author='KloudTrader',
author_email='[email protected]',
packages=['libkloudtrader'],
url='https://github.com/KloudTrader/kloudtrader',
license='LICENSE',
description="KloudTrader's in-house library that ... | 26.782609 | 126 | 0.644481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 309 | 0.501623 |
3d05d97057af36632d639c5d678cfee0618bd44e | 197 | py | Python | sdk/python/opencannabis/media/__init__.py | CookiesCo/OpenCannabis | a7bb1f71200c6b8f56c509df47039198f0c3bd4c | [
"MIT"
] | 2 | 2020-08-27T00:45:49.000Z | 2021-06-19T08:01:13.000Z | sdk/python/opencannabis/media/__init__.py | CookiesCo/OpenCannabis | a7bb1f71200c6b8f56c509df47039198f0c3bd4c | [
"MIT"
] | 67 | 2020-08-27T03:16:33.000Z | 2022-03-26T14:33:38.000Z | sdk/python/opencannabis/media/__init__.py | CookiesCo/OpenCannabis | a7bb1f71200c6b8f56c509df47039198f0c3bd4c | [
"MIT"
] | 1 | 2020-11-12T04:26:43.000Z | 2020-11-12T04:26:43.000Z | # ~*~ coding: utf-8 ~*~
__doc__ = """
`opencannabis.media`
---------------------------
Records and definitions that structure digital media and related assets.
"""
# `opencannabis.media`
| 16.416667 | 74 | 0.573604 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.923858 |
3d05dcf32ee27f2f4d2629e65ab5d7e2a5641f27 | 14,581 | py | Python | mlutils/losses.py | DSciLab/mlutils | 352af36f2b34218b6551254f641427b7bbdd0f31 | [
"MIT"
] | null | null | null | mlutils/losses.py | DSciLab/mlutils | 352af36f2b34218b6551254f641427b7bbdd0f31 | [
"MIT"
] | null | null | null | mlutils/losses.py | DSciLab/mlutils | 352af36f2b34218b6551254f641427b7bbdd0f31 | [
"MIT"
] | null | null | null | from typing import Callable, Optional, Union, Tuple, List
import torch
from torch import nn
from cfg import Opts
from torch import Tensor
from torch.nn import functional as F
from mlutils import LogitToPreds
EPS = 1.0e-8
__all__ = ['IOULoss', 'GDiceLoss', 'SoftDiceLoss',
'CrossEntropyLoss', 'BCELossWithL... | 36.002469 | 78 | 0.56992 | 9,599 | 0.658322 | 0 | 0 | 0 | 0 | 0 | 0 | 1,899 | 0.130238 |
3d06f699f338062bc96644c815234c6952e6bcf8 | 1,136 | py | Python | libary/yml_wrapper.py | NekoFanatic/kaiji | 7ae8e12d4e821e7d28d78034e1ec044ed75f9536 | [
"MIT"
] | null | null | null | libary/yml_wrapper.py | NekoFanatic/kaiji | 7ae8e12d4e821e7d28d78034e1ec044ed75f9536 | [
"MIT"
] | null | null | null | libary/yml_wrapper.py | NekoFanatic/kaiji | 7ae8e12d4e821e7d28d78034e1ec044ed75f9536 | [
"MIT"
] | null | null | null | from typing import Union
import yaml
class ConfigReader:
def __init__(self):
with open("config.yml", "r") as f:
data = yaml.safe_load(f)
self.data = data
def __getattr__(self, __name: str):
s = __name.split("_")
data = self.data
try:
for i in s... | 23.183673 | 52 | 0.49912 | 1,093 | 0.962148 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.082746 |
3d0821d054373cb00fdbdf718c2ebff667597c8c | 14,688 | py | Python | smoothfdr/easy.py | tansey/smoothfdr | c5b693d0a66e83c9387433b33c0eab481bd4a763 | [
"MIT"
] | 6 | 2016-02-26T23:08:57.000Z | 2018-09-13T16:14:47.000Z | smoothfdr/easy.py | tansey/smoothfdr | c5b693d0a66e83c9387433b33c0eab481bd4a763 | [
"MIT"
] | 2 | 2015-09-23T16:59:37.000Z | 2017-09-29T13:19:44.000Z | smoothfdr/easy.py | tansey/smoothfdr | c5b693d0a66e83c9387433b33c0eab481bd4a763 | [
"MIT"
] | 3 | 2017-07-04T12:25:32.000Z | 2021-04-16T00:10:33.000Z | # import itertools
# from functools import partial
# from scipy.stats import norm
# from scipy.sparse import csc_matrix, linalg as sla
# from scipy import sparse
# from scipy.optimize import minimize, minimize_scalar
# from collections import deque, namedtuple
import numpy as np
from networkx import Graph
from pygfl.so... | 41.027933 | 210 | 0.633715 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,731 | 0.254017 |
3d09d053089d2dfd866a874b9112340c6aa15645 | 438 | py | Python | code/2cams.py | ctm1098/umucv | ea6cce5d9cfece1e372e05eb9223ef6ddc17b438 | [
"BSD-3-Clause"
] | 12 | 2018-02-15T17:54:57.000Z | 2022-02-25T12:00:49.000Z | code/2cams.py | ctm1098/umucv | ea6cce5d9cfece1e372e05eb9223ef6ddc17b438 | [
"BSD-3-Clause"
] | 8 | 2019-03-06T18:53:43.000Z | 2022-03-18T10:04:40.000Z | code/2cams.py | ctm1098/umucv | ea6cce5d9cfece1e372e05eb9223ef6ddc17b438 | [
"BSD-3-Clause"
] | 22 | 2018-02-06T14:40:03.000Z | 2022-03-17T11:38:48.000Z | #!/usr/bin/env python
import numpy as np
import cv2 as cv
cap1 = cv.VideoCapture(0)
cap2 = cv.VideoCapture(1)
while(cv.waitKey(1) & 0xFF != 27):
ret, frame1 = cap1.read()
ret, frame2 = cap2.read()
cv.imshow('c1',frame1)
cv.imshow('c2',frame2)
gray1 = cv.cvtColor(frame1, cv.COLOR_RGB2GRAY)
... | 19.043478 | 50 | 0.652968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.082192 |
3d0a653d9351f079b350d765b5ef2da6e1ece3a5 | 1,109 | py | Python | Summary pie chart/Sum_Indonesia.py | pdeesawat/PSIT58_test_01 | 631946eacd82503e0697680f06290a4fe10f17f2 | [
"Apache-2.0"
] | null | null | null | Summary pie chart/Sum_Indonesia.py | pdeesawat/PSIT58_test_01 | 631946eacd82503e0697680f06290a4fe10f17f2 | [
"Apache-2.0"
] | null | null | null | Summary pie chart/Sum_Indonesia.py | pdeesawat/PSIT58_test_01 | 631946eacd82503e0697680f06290a4fe10f17f2 | [
"Apache-2.0"
] | null | null | null | import plotly.plotly as py
"""Get data from csv and split it"""
data = open('Real_Final_database_02.csv')
alldata = data.readlines()
listdata = []
for ix in alldata:
listdata.append(ix.strip().split(','))
"""Seperate data in each type of disaster."""
all_disaster = {'Drought':0, 'Flood':0, 'Storm':0, 'Epidemic':0... | 35.774194 | 107 | 0.658251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 477 | 0.430117 |
3d0b11a3dec857ffd6e51932557d206c66901849 | 2,515 | py | Python | python/draw_dog.py | event-driven-robotics/study-air-hockey | e933bcf85d77762dae7d468f314c7db6e71fba81 | [
"BSD-3-Clause"
] | null | null | null | python/draw_dog.py | event-driven-robotics/study-air-hockey | e933bcf85d77762dae7d468f314c7db6e71fba81 | [
"BSD-3-Clause"
] | null | null | null | python/draw_dog.py | event-driven-robotics/study-air-hockey | e933bcf85d77762dae7d468f314c7db6e71fba81 | [
"BSD-3-Clause"
] | 1 | 2021-07-29T15:09:37.000Z | 2021-07-29T15:09:37.000Z | import numpy as np
from matplotlib.patches import Ellipse
import matplotlib.pyplot as plt
import matplotlib
from matplotlib import cm
from scipy import signal
import matplotlib.image as mpimg
# matplotlib.use('Agg')
# define normalized 2D gaussian
def gaus2d(x, y, mx, my, sx, sy):
return 1. / (2. * np.pi * sx *... | 25.927835 | 111 | 0.652485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 689 | 0.273956 |
3d0b63ff899d9630d5763b8599ddc075bb3c108f | 620 | py | Python | PycharmProjects/PythonValidacao/consome_api.py | FeFSRibeiro/learning-python | 4f642aa7e1c6523f5209f83ece7e974bfb3ef24e | [
"Apache-2.0"
] | null | null | null | PycharmProjects/PythonValidacao/consome_api.py | FeFSRibeiro/learning-python | 4f642aa7e1c6523f5209f83ece7e974bfb3ef24e | [
"Apache-2.0"
] | null | null | null | PycharmProjects/PythonValidacao/consome_api.py | FeFSRibeiro/learning-python | 4f642aa7e1c6523f5209f83ece7e974bfb3ef24e | [
"Apache-2.0"
] | null | null | null | import requests
class BuscaEndereco:
def __init__(self,cep):
if self.valida_cep(str(cep)):
self.cep = str(cep)
else:
raise ValueError("CEP Inválido !!!")
def __str__(self):
return self.formata_cep()
def valida_cep(self,cep):
if len(self.cep ==... | 22.142857 | 66 | 0.540323 | 603 | 0.971014 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.098229 |
3d0b84039e886dcbf5a0882295390d0af7dd865b | 3,928 | py | Python | tools/convert_lightning2venot.py | ucl-exoplanets/TauREx_public | 28d47f829a2873cf15e3bfb0419b8bc4e5bc03dd | [
"CC-BY-4.0"
] | 18 | 2019-07-22T01:35:24.000Z | 2022-02-10T11:25:42.000Z | tools/convert_lightning2venot.py | ucl-exoplanets/TauREx_public | 28d47f829a2873cf15e3bfb0419b8bc4e5bc03dd | [
"CC-BY-4.0"
] | null | null | null | tools/convert_lightning2venot.py | ucl-exoplanets/TauREx_public | 28d47f829a2873cf15e3bfb0419b8bc4e5bc03dd | [
"CC-BY-4.0"
] | 1 | 2017-10-19T15:14:06.000Z | 2017-10-19T15:14:06.000Z | #! /usr/bin/python
#small script that shits out the venot file format equivalent for the lightening project
import numpy as np
import pylab as pl
import pyfits as pf
import glob, os, sys
AMU = 1.660538921e-27
KBOLTZ = 1.380648813e-23
G = 6.67384e-11
RSOL = 6.955e8
RJUP = 6.9911e7
#RJUP = 7.1492e7 # Jo's radius
MJ... | 26.90411 | 139 | 0.630855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,050 | 0.267312 |
3d0d5a4bdcb6949d58811e00ce041b7deeb69354 | 288 | py | Python | setup.py | NWeis97/ML_Ops_Project | cc4c65fec679b08675e76a24ad7e44de1b5df29a | [
"MIT"
] | null | null | null | setup.py | NWeis97/ML_Ops_Project | cc4c65fec679b08675e76a24ad7e44de1b5df29a | [
"MIT"
] | null | null | null | setup.py | NWeis97/ML_Ops_Project | cc4c65fec679b08675e76a24ad7e44de1b5df29a | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name="src",
packages=find_packages(),
version="0.1.0",
description="This project contains the final exercise of S1, "
+ "in which we will continue to build upon",
author="Nicolai Weisbjerg",
license="MIT",
)
| 24 | 66 | 0.677083 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.440972 |
3d0f1eb7e22b4173d6bb7ae45401f9b8d7518586 | 2,534 | py | Python | webapi.py | rhalkyard/gmdrec | d81f0c714d302f655660f15d1e62d2c3fbe40e33 | [
"BSD-3-Clause"
] | null | null | null | webapi.py | rhalkyard/gmdrec | d81f0c714d302f655660f15d1e62d2c3fbe40e33 | [
"BSD-3-Clause"
] | null | null | null | webapi.py | rhalkyard/gmdrec | d81f0c714d302f655660f15d1e62d2c3fbe40e33 | [
"BSD-3-Clause"
] | null | null | null | # Talking to the music player and sanitizing data.
import datetime
import requests
from requests.exceptions import Timeout
from unihandecode import Unihandecoder
from settings import server_url
def asciify(script, args):
if args.lang_code is None:
return Unihandecoder().decode(script)
return Unihand... | 36.724638 | 103 | 0.670876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 846 | 0.33386 |
3d10fbe580e5ebf53db4ece3b62cd88392386b54 | 7,239 | py | Python | puresnmp/aio/api/pythonic.py | badboybeyer/puresnmp | 2f2757e0d064f1017f86e0e07661ac8e3c9f2eca | [
"MIT"
] | null | null | null | puresnmp/aio/api/pythonic.py | badboybeyer/puresnmp | 2f2757e0d064f1017f86e0e07661ac8e3c9f2eca | [
"MIT"
] | null | null | null | puresnmp/aio/api/pythonic.py | badboybeyer/puresnmp | 2f2757e0d064f1017f86e0e07661ac8e3c9f2eca | [
"MIT"
] | null | null | null | """
This module contains the high-level functions to access the library with
asyncio. Care is taken to make this as pythonic as possible and hide as many
of the gory implementations as possible.
This module provides "syntactic sugar" around the lower-level, but almost
identical, module :py:mod:`puresnmp.aio.api.raw`. ... | 35.485294 | 135 | 0.668739 | 0 | 0 | 1,659 | 0.229175 | 0 | 0 | 5,693 | 0.786435 | 3,573 | 0.493576 |
3d11c0e83e935667e3b5fa635f505dab77f68c4f | 471 | py | Python | dataset_models/normalization/aroundZeroNormalizer.py | Zvezdin/blockchain-predictor | df6f939037471dd50b7b9c96673d89b04b646ef2 | [
"MIT"
] | 35 | 2017-10-25T17:10:35.000Z | 2022-03-20T18:12:06.000Z | dataset_models/normalization/aroundZeroNormalizer.py | Zvezdin/blockchain-predictor | df6f939037471dd50b7b9c96673d89b04b646ef2 | [
"MIT"
] | 2 | 2017-09-20T17:39:15.000Z | 2018-04-01T17:20:29.000Z | dataset_models/normalization/aroundZeroNormalizer.py | Zvezdin/blockchain-predictor | df6f939037471dd50b7b9c96673d89b04b646ef2 | [
"MIT"
] | 10 | 2017-12-01T13:47:04.000Z | 2021-12-16T06:53:17.000Z | import numpy as np
from .normalizer import Normalizer
class AroundZeroNormalizer(Normalizer):
def __init__(self, data):
self.minVal = np.min(data)
self.maxVal = np.max(data)
self.maxVal = max(abs(self.maxVal), abs(self.minVal))
def transform(self, data):
if self.maxVal == 0: #can't normalize if the whole ... | 23.55 | 68 | 0.694268 | 414 | 0.878981 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.095541 |
3d12eb10a495e1684e9f8cb66cfdd0b53f9884df | 1,160 | py | Python | viz/scripts/closest_over_time_with_shading.py | zhicongchen/histwords | 12fb83492fdccca795d266966a8b58c13f81c54c | [
"Apache-2.0"
] | 2 | 2022-01-05T10:32:56.000Z | 2022-02-14T16:45:59.000Z | viz/scripts/closest_over_time_with_shading.py | zhicongchen/histwords | 12fb83492fdccca795d266966a8b58c13f81c54c | [
"Apache-2.0"
] | null | null | null | viz/scripts/closest_over_time_with_shading.py | zhicongchen/histwords | 12fb83492fdccca795d266966a8b58c13f81c54c | [
"Apache-2.0"
] | null | null | null | import helpers
import sys
from representations.sequentialembedding import SequentialEmbedding
"""
Let's examine the closest neighbors for a word over time
"""
import collections
from sklearn.manifold import TSNE
import numpy as np
import matplotlib.pyplot as plt
WORDS = helpers.get_words()
if __name__ == "__main__"... | 28.292683 | 85 | 0.667241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.171552 |
3d1335d9fc99401818ca88efe979fffcb933a101 | 10,108 | py | Python | Products/LDAPUserFolder/interfaces.py | phgv/Products.LDAPUserFolder | eb9db778916f47a80b3df069a31d0a2100b26423 | [
"ZPL-2.1"
] | null | null | null | Products/LDAPUserFolder/interfaces.py | phgv/Products.LDAPUserFolder | eb9db778916f47a80b3df069a31d0a2100b26423 | [
"ZPL-2.1"
] | null | null | null | Products/LDAPUserFolder/interfaces.py | phgv/Products.LDAPUserFolder | eb9db778916f47a80b3df069a31d0a2100b26423 | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2000-2009 Jens Vagelpohl and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS S... | 38.580153 | 79 | 0.662347 | 9,309 | 0.920954 | 0 | 0 | 0 | 0 | 0 | 0 | 8,893 | 0.879798 |
3d162a8de2cf611aacdd649aadbeb0516127e28a | 461 | py | Python | arequests/exceptions.py | fhag/telegram2 | 65a685637b444e40ef47a17c2a3b83c2ddb81459 | [
"BSD-2-Clause"
] | null | null | null | arequests/exceptions.py | fhag/telegram2 | 65a685637b444e40ef47a17c2a3b83c2ddb81459 | [
"BSD-2-Clause"
] | null | null | null | arequests/exceptions.py | fhag/telegram2 | 65a685637b444e40ef47a17c2a3b83c2ddb81459 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Exceptions for Arequests
Created on Tue Nov 13 08:34:14 2018
@author: gfi
"""
class ArequestsError(Exception):
"""Basic exception for errors raised by Arequests"""
pass
class AuthorizationError(ArequestsError):
'''401 error new authentification required'''
pass
class Some... | 19.208333 | 56 | 0.694143 | 346 | 0.750542 | 0 | 0 | 0 | 0 | 0 | 0 | 246 | 0.533623 |
3d178f904fde1c17f64bf8f943648ae02b442d5e | 5,014 | py | Python | NASA/Python_codes/drivers/02_remove_outliers_n_jumps/01_intersect_remove_jumps_JFD/01_remove_jumps_JFD_intersect.py | HNoorazar/Kirti | fb7108dac1190774bd90a527aaa8a3cb405f127d | [
"MIT"
] | null | null | null | NASA/Python_codes/drivers/02_remove_outliers_n_jumps/01_intersect_remove_jumps_JFD/01_remove_jumps_JFD_intersect.py | HNoorazar/Kirti | fb7108dac1190774bd90a527aaa8a3cb405f127d | [
"MIT"
] | null | null | null | NASA/Python_codes/drivers/02_remove_outliers_n_jumps/01_intersect_remove_jumps_JFD/01_remove_jumps_JFD_intersect.py | HNoorazar/Kirti | fb7108dac1190774bd90a527aaa8a3cb405f127d | [
"MIT"
] | null | null | null | ####
#### Nov 16, 2021
####
"""
Regularize the EVI and NDVI of fields in individual years for training set creation.
"""
import csv
import numpy as np
import pandas as pd
from math import factorial
import scipy
import scipy.signal
import os, os.path
from datetime import date
import datetime
import time
import sys
s... | 31.936306 | 94 | 0.500798 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,343 | 0.467292 |
3d17f39c53c3cfba5e53d1120441f6ea46dbc0cf | 7,227 | py | Python | pyquante2/ints/one.py | Konjkov/pyquante2 | 4ca0c8c078cafb769d20a4624b9bd907a748b1a2 | [
"BSD-3-Clause"
] | null | null | null | pyquante2/ints/one.py | Konjkov/pyquante2 | 4ca0c8c078cafb769d20a4624b9bd907a748b1a2 | [
"BSD-3-Clause"
] | null | null | null | pyquante2/ints/one.py | Konjkov/pyquante2 | 4ca0c8c078cafb769d20a4624b9bd907a748b1a2 | [
"BSD-3-Clause"
] | null | null | null | """
One electron integrals.
"""
from numpy import pi,exp,floor,array,isclose
from math import factorial
from pyquante2.utils import binomial, fact2, Fgamma, norm2
# Notes:
# The versions S,T,V include the normalization constants
# The version overlap,kinetic,nuclear_attraction do not.
# This is so, for example, the k... | 28.908 | 123 | 0.530372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,007 | 0.416079 |
3d189022514ffa92e24cccd1441a05b0577b4e2e | 2,169 | py | Python | tests/test_pyhive_runBCFTools_VC.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 3 | 2018-04-20T15:04:34.000Z | 2022-03-30T06:36:02.000Z | tests/test_pyhive_runBCFTools_VC.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 7 | 2019-06-06T09:22:20.000Z | 2021-11-23T17:41:52.000Z | tests/test_pyhive_runBCFTools_VC.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 5 | 2017-11-02T11:17:35.000Z | 2021-12-11T19:34:09.000Z | import os
import subprocess
import glob
import pytest
# test_pyhive_runBCFTools_VC.py
def test_runBCFTools_VC(bcftools_folder, hive_dir, datadir, clean_tmp):
"""
Test function to run BCFTools mpileup|call on a BAM file
"""
bam_file = "{0}/exampleBAM.bam".format(datadir)
reference = "{0}/exampleFA... | 38.052632 | 106 | 0.599355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 921 | 0.42462 |
3d192b649d8b6388f0dcd7b9e46896429e77993c | 2,497 | py | Python | src/sentry/api/endpoints/organization_projects.py | seukjung/sentry-custom | c5f6bb2019aef3caff7f3e2b619f7a70f2b9b963 | [
"BSD-3-Clause"
] | 1 | 2021-01-13T15:40:03.000Z | 2021-01-13T15:40:03.000Z | src/sentry/api/endpoints/organization_projects.py | fotinakis/sentry | c5cfa5c5e47475bf5ef41e702548c2dfc7bb8a7c | [
"BSD-3-Clause"
] | 8 | 2019-12-28T23:49:55.000Z | 2022-03-02T04:34:18.000Z | src/sentry/api/endpoints/organization_projects.py | fotinakis/sentry | c5cfa5c5e47475bf5ef41e702548c2dfc7bb8a7c | [
"BSD-3-Clause"
] | 1 | 2017-04-08T04:09:18.000Z | 2017-04-08T04:09:18.000Z | from __future__ import absolute_import
import six
from rest_framework.response import Response
from sentry.api.base import DocSection
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.serializers import serialize
from sentry.models import Project, Team
from sentry.utils.apidocs import sc... | 35.169014 | 87 | 0.60793 | 1,951 | 0.781338 | 0 | 0 | 2,040 | 0.81698 | 0 | 0 | 536 | 0.214658 |
3d19367388f755b58d5ae7968cf859f7a856e8cf | 3,708 | py | Python | account/models.py | Vicynet/kwiktalk | 198efdd5965cc0cd3ee8dcf5e469d9022330ec25 | [
"bzip2-1.0.6"
] | null | null | null | account/models.py | Vicynet/kwiktalk | 198efdd5965cc0cd3ee8dcf5e469d9022330ec25 | [
"bzip2-1.0.6"
] | null | null | null | account/models.py | Vicynet/kwiktalk | 198efdd5965cc0cd3ee8dcf5e469d9022330ec25 | [
"bzip2-1.0.6"
] | null | null | null | from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
from django.shortcuts import render
from cloudinary.models import CloudinaryField
from .utils import get_random_code
from django.template.defaultfilters import slugify
from django.contrib.auth import get_user_model... | 35.653846 | 94 | 0.682848 | 3,188 | 0.859763 | 0 | 0 | 0 | 0 | 0 | 0 | 296 | 0.079827 |
3d1a374772b07f26b88bbef32d5d37abe99122f6 | 6,708 | py | Python | senta/data/field_reader/generate_label_field_reader.py | zgzwelldone/Senta | e01986dd17217bed82023c81d06588d63e0e19c7 | [
"Apache-2.0"
] | null | null | null | senta/data/field_reader/generate_label_field_reader.py | zgzwelldone/Senta | e01986dd17217bed82023c81d06588d63e0e19c7 | [
"Apache-2.0"
] | null | null | null | senta/data/field_reader/generate_label_field_reader.py | zgzwelldone/Senta | e01986dd17217bed82023c81d06588d63e0e19c7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*
"""
:py:class:`GenerateLabelFieldReader`
"""
import numpy as np
from senta.common.register import RegisterSet
from senta.common.rule import DataShape, FieldLength, InstanceName
from senta.data.field_reader.base_field_reader import BaseFieldReader
from senta.data.util_helper import generate_pad_... | 42.455696 | 125 | 0.595707 | 6,500 | 0.933908 | 0 | 0 | 6,535 | 0.938937 | 0 | 0 | 1,213 | 0.174282 |
3d1af19d66ed56a399f8f9e67b61d733395f81e4 | 1,270 | py | Python | algorithm/python/alphabet_board_path.py | cocoa-maemae/leetcode | b7724b4d10387797167b18ec36d77e7418a6d85a | [
"MIT"
] | 1 | 2021-09-29T11:22:02.000Z | 2021-09-29T11:22:02.000Z | algorithm/python/alphabet_board_path.py | cocoa-maemae/leetcode | b7724b4d10387797167b18ec36d77e7418a6d85a | [
"MIT"
] | null | null | null | algorithm/python/alphabet_board_path.py | cocoa-maemae/leetcode | b7724b4d10387797167b18ec36d77e7418a6d85a | [
"MIT"
] | null | null | null | class Solution:
def alphabetBoardPath(self, target):
"""
Time Complexity: O(N)
Space Complexity: O(N)
"""
m = {c: [i // 5, i % 5] for i, c in enumerate("abcdefghijklmnopqrstuvwxyz")}
x0, y0 = 0, 0
res = []
for c in target:
x, y = m[c]
... | 23.090909 | 84 | 0.451969 | 660 | 0.519685 | 491 | 0.386614 | 0 | 0 | 0 | 0 | 172 | 0.135433 |
3d1b05e27dcbcf9ee33da727db0c1fba95fb1a61 | 20,881 | py | Python | src/virtual-wan/azext_vwan/custom.py | michimune/azure-cli-extensions | 697e2c674e5c0825d44c72d714542fe01331e107 | [
"MIT"
] | 1 | 2022-03-22T15:02:32.000Z | 2022-03-22T15:02:32.000Z | src/virtual-wan/azext_vwan/custom.py | michimune/azure-cli-extensions | 697e2c674e5c0825d44c72d714542fe01331e107 | [
"MIT"
] | 1 | 2021-02-10T22:04:59.000Z | 2021-02-10T22:04:59.000Z | src/virtual-wan/azext_vwan/custom.py | michimune/azure-cli-extensions | 697e2c674e5c0825d44c72d714542fe01331e107 | [
"MIT"
] | 1 | 2021-06-03T19:31:10.000Z | 2021-06-03T19:31:10.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 44.239407 | 118 | 0.696135 | 429 | 0.020545 | 0 | 0 | 0 | 0 | 0 | 0 | 2,288 | 0.109573 |
3d1b0b413997d06798ff0dafc9e1b1d24a206754 | 720 | py | Python | aiogram/contrib/middlewares/environment.py | muhammedfurkan/aiogram | 692c1340b4dda556da640e5f9ea2200848c06840 | [
"MIT"
] | null | null | null | aiogram/contrib/middlewares/environment.py | muhammedfurkan/aiogram | 692c1340b4dda556da640e5f9ea2200848c06840 | [
"MIT"
] | 4 | 2020-11-04T15:55:55.000Z | 2020-11-08T21:36:02.000Z | aiogram/contrib/middlewares/environment.py | muhammedfurkan/aiogram | 692c1340b4dda556da640e5f9ea2200848c06840 | [
"MIT"
] | null | null | null | import asyncio
from aiogram.dispatcher.middlewares import BaseMiddleware
class EnvironmentMiddleware(BaseMiddleware):
def __init__(self, context=None):
super(EnvironmentMiddleware, self).__init__()
if context is None:
context = {}
self.context = context
def update_data(s... | 28.8 | 71 | 0.6375 | 643 | 0.893056 | 0 | 0 | 0 | 0 | 173 | 0.240278 | 21 | 0.029167 |
3d1b7856aab4b6896a8bd50f1e84b7518ab5535b | 21 | py | Python | custom_components/ztm/__init__.py | peetereczek/ztm | 1fd4870720dca16863d085759a360f1ebdd9ab1f | [
"MIT"
] | 4 | 2020-02-23T08:08:12.000Z | 2021-06-26T15:46:27.000Z | custom_components/ztm/__init__.py | peetereczek/ztm | 1fd4870720dca16863d085759a360f1ebdd9ab1f | [
"MIT"
] | 15 | 2020-01-30T09:54:58.000Z | 2022-02-02T11:13:32.000Z | custom_components/ztm/__init__.py | peetereczek/ztm | 1fd4870720dca16863d085759a360f1ebdd9ab1f | [
"MIT"
] | 1 | 2022-01-17T08:51:34.000Z | 2022-01-17T08:51:34.000Z | """
module init
""" | 7 | 12 | 0.47619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 1 |
3d1bc451ecce134829f141f42c2d16c8641046f1 | 899 | py | Python | Aula37/Controller/squad_controller.py | PabloSchumacher/TrabalhosPython | 828edd35eb40442629211bc9f1477f75fb025d74 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | Aula37/Controller/squad_controller.py | PabloSchumacher/TrabalhosPython | 828edd35eb40442629211bc9f1477f75fb025d74 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | Aula37/Controller/squad_controller.py | PabloSchumacher/TrabalhosPython | 828edd35eb40442629211bc9f1477f75fb025d74 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | from Dao.squad_dao import SquadDao
from Model.squad import *
from Controller.backend_controller import BackendController
from Controller.frontend_controller import FrontendController
from Controller.sgbd_controller import SgbdController
class SquadController:
dao = SquadDao()
be = BackendController()
fro =... | 29.966667 | 67 | 0.716352 | 660 | 0.734149 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3d1cffcdcc57d52b339c43b36508e37229c2109b | 1,065 | py | Python | airbyte-integrations/connectors/source-square/source_square/utils.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 6,215 | 2020-09-21T13:45:56.000Z | 2022-03-31T21:21:45.000Z | airbyte-integrations/connectors/source-square/source_square/utils.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 8,448 | 2020-09-21T00:43:50.000Z | 2022-03-31T23:56:06.000Z | airbyte-integrations/connectors/source-square/source_square/utils.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 1,251 | 2020-09-20T05:48:47.000Z | 2022-03-31T10:41:29.000Z | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
from typing import Union
def separate_by_count(total_length: int, part_count: int) -> (int, int):
"""
Calculates parts needed to separate count by part_count value
For example: separate_by_count(total_length=196582, part_count=10000) returns (1... | 29.583333 | 118 | 0.697653 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 360 | 0.338028 |
3d1f0309843d138ae38f266195c03b7a4fc0d461 | 678 | py | Python | packages/awrams/utils/templates.py | kaamilah/awra_cms | bbbb85ad8864e2c835926439acc1e6dabb137a97 | [
"NetCDF"
] | 20 | 2016-12-01T03:13:50.000Z | 2021-12-02T23:43:38.000Z | packages/awrams/utils/templates.py | kaamilah/awra_cms | bbbb85ad8864e2c835926439acc1e6dabb137a97 | [
"NetCDF"
] | 2 | 2018-02-05T03:42:11.000Z | 2018-04-27T05:49:44.000Z | packages/awrams/utils/templates.py | kaamilah/awra_cms | bbbb85ad8864e2c835926439acc1e6dabb137a97 | [
"NetCDF"
] | 22 | 2016-12-13T19:57:43.000Z | 2021-12-08T02:52:19.000Z |
def transform_file(infile,outfile,templates):
with open(infile,'r') as fh:
indata = fh.read()
lines = indata.split('\n')
outlines = []
for line in lines:
if '//ATL_BEGIN' in line:
start = line.find('//ATL_BEGIN')
spacing = line[:start]
s... | 28.25 | 46 | 0.482301 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.067847 |
3d1ff7cb54534895504bf777de713d7de280d59d | 19,218 | py | Python | hypermapper/plot_pareto.py | adelejjeh/hypermapper | 02bd83b5b1d3feb9907cf1187864ded66ba2c539 | [
"MIT"
] | null | null | null | hypermapper/plot_pareto.py | adelejjeh/hypermapper | 02bd83b5b1d3feb9907cf1187864ded66ba2c539 | [
"MIT"
] | null | null | null | hypermapper/plot_pareto.py | adelejjeh/hypermapper | 02bd83b5b1d3feb9907cf1187864ded66ba2c539 | [
"MIT"
] | null | null | null | """
Plots design space exploration results.
"""
import json
from collections import OrderedDict, defaultdict
import matplotlib
from jsonschema import Draft4Validator
from pkg_resources import resource_stream
matplotlib.use("agg") # noqa
import matplotlib.pyplot as plt
from matplotlib.legend_handler import HandlerLin... | 39.220408 | 271 | 0.57774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,148 | 0.267874 |
3d200274ebad98aa4c72c04b9e6aca07e97be031 | 1,872 | py | Python | foodshering/authapp/forms.py | malfin/silvehanger | c71a936a0c59c5a6fb909861cf2197b72782642d | [
"Apache-2.0"
] | null | null | null | foodshering/authapp/forms.py | malfin/silvehanger | c71a936a0c59c5a6fb909861cf2197b72782642d | [
"Apache-2.0"
] | null | null | null | foodshering/authapp/forms.py | malfin/silvehanger | c71a936a0c59c5a6fb909861cf2197b72782642d | [
"Apache-2.0"
] | null | null | null | from django import forms
from django.contrib.auth.forms import AuthenticationForm, UserCreationForm, PasswordChangeForm, UserChangeForm
from authapp.models import UserProfile, Status
class LoginForm(AuthenticationForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
for na... | 31.2 | 110 | 0.608974 | 1,681 | 0.895578 | 0 | 0 | 0 | 0 | 0 | 0 | 249 | 0.132658 |
3d220060f34001abd4191e581365ad915971f136 | 340 | py | Python | devices/parser/serializers.py | City-of-Helsinki/hel-data-pipe | e473237cd00a54a791337ac611e99556dc37ea35 | [
"MIT"
] | 1 | 2021-02-25T14:21:41.000Z | 2021-02-25T14:21:41.000Z | devices/parser/serializers.py | City-of-Helsinki/hel-data-pipe | e473237cd00a54a791337ac611e99556dc37ea35 | [
"MIT"
] | 9 | 2020-11-23T11:56:56.000Z | 2021-02-25T12:20:05.000Z | devices/parser/serializers.py | City-of-Helsinki/hel-data-pipe | e473237cd00a54a791337ac611e99556dc37ea35 | [
"MIT"
] | 1 | 2021-07-25T12:16:53.000Z | 2021-07-25T12:16:53.000Z | from rest_framework import serializers
from .models import Device, SensorType
class SensorTypeSerializer(serializers.ModelSerializer):
class Meta:
model = SensorType
fields = "__all__"
class DeviceSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Device
... | 21.25 | 63 | 0.723529 | 255 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.052941 |
3d224cb8121fbd91cf794debf39fda90674c7943 | 82 | py | Python | technews/__init__.py | WisChang005/technews_watcher | 454ef30bab7731c629f0e3b577ce340c48a6cbe7 | [
"MIT"
] | 1 | 2019-03-31T15:34:10.000Z | 2019-03-31T15:34:10.000Z | technews/__init__.py | WisChang005/technews_watcher | 454ef30bab7731c629f0e3b577ce340c48a6cbe7 | [
"MIT"
] | null | null | null | technews/__init__.py | WisChang005/technews_watcher | 454ef30bab7731c629f0e3b577ce340c48a6cbe7 | [
"MIT"
] | null | null | null | from .technews_helper import TechNews
from .mail_helper import EmailContentHelper
| 27.333333 | 43 | 0.878049 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3d2303695d686e9f8b4033b5136f35315cde3220 | 696 | py | Python | core/migrations/0002_auto_20191102_1734.py | manulangat1/djcommerce | 2cd92631479ef949e0f05a255f2f50feca728802 | [
"MIT"
] | 1 | 2020-02-08T16:29:41.000Z | 2020-02-08T16:29:41.000Z | core/migrations/0002_auto_20191102_1734.py | manulangat1/djcommerce | 2cd92631479ef949e0f05a255f2f50feca728802 | [
"MIT"
] | 15 | 2020-05-04T13:22:32.000Z | 2022-03-12T00:27:28.000Z | core/migrations/0002_auto_20191102_1734.py | manulangat1/djcommerce | 2cd92631479ef949e0f05a255f2f50feca728802 | [
"MIT"
] | 1 | 2020-10-17T08:54:31.000Z | 2020-10-17T08:54:31.000Z | # Generated by Django 2.2.6 on 2019-11-02 17:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='item',
name='category',
field=... | 29 | 140 | 0.556034 | 603 | 0.866379 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.247126 |
3d25c2e6e29e6e78df3ddd62294d2447deebe52c | 28 | py | Python | aoc_tools/__init__.py | dannyboywoop/AOC_Tools | b47374ae465c5772d7b4c09f40eb6e69d68cc144 | [
"MIT"
] | null | null | null | aoc_tools/__init__.py | dannyboywoop/AOC_Tools | b47374ae465c5772d7b4c09f40eb6e69d68cc144 | [
"MIT"
] | null | null | null | aoc_tools/__init__.py | dannyboywoop/AOC_Tools | b47374ae465c5772d7b4c09f40eb6e69d68cc144 | [
"MIT"
] | null | null | null | from ._advent_timer import * | 28 | 28 | 0.821429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3d2603c4df2972be551558b1de82be8e153176f4 | 915 | py | Python | stamper/migrations/0004_auto_20161208_1658.py | uploadcare/stump | 8070ff42f01972fa86b4a2eaba580dad65482ef2 | [
"MIT"
] | null | null | null | stamper/migrations/0004_auto_20161208_1658.py | uploadcare/stump | 8070ff42f01972fa86b4a2eaba580dad65482ef2 | [
"MIT"
] | null | null | null | stamper/migrations/0004_auto_20161208_1658.py | uploadcare/stump | 8070ff42f01972fa86b4a2eaba580dad65482ef2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-12-08 16:58
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('stamper', '0003_auto_20161122_1253'),
... | 30.5 | 123 | 0.64153 | 704 | 0.769399 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.197814 |
3d26af74dac8b1e4a7a1fd6ba44e20f27a15ed52 | 7,493 | py | Python | lemon.py | lab-sigma/learning-to-rationalize | 05678fdf67661651c39c7d754541b239cb1577eb | [
"MIT"
] | null | null | null | lemon.py | lab-sigma/learning-to-rationalize | 05678fdf67661651c39c7d754541b239cb1577eb | [
"MIT"
] | 1 | 2022-02-02T02:27:59.000Z | 2022-02-02T02:28:51.000Z | lemon.py | lab-sigma/learning-to-rationalize | 05678fdf67661651c39c7d754541b239cb1577eb | [
"MIT"
] | null | null | null | import argparse,time,os,pickle
import matplotlib.pyplot as plt
import numpy as np
from player import *
plt.switch_backend('agg')
np.set_printoptions(precision=2)
class lemon:
def __init__(self, std, num_sellers, num_actions, unit, minx):
self.std = std
self.unit = unit
self.num_sellers = num_sellers
self.nu... | 31.091286 | 119 | 0.68237 | 3,238 | 0.432137 | 0 | 0 | 0 | 0 | 0 | 0 | 1,360 | 0.181503 |
3d26e189eb8a7096fbff4e3b70771b2698d8bd96 | 1,910 | py | Python | src/osaction.py | ivan-georgiev/urlmonitor | 1280127a1d8c52dcbcd871bba55abaf23a1ca3ce | [
"MIT"
] | null | null | null | src/osaction.py | ivan-georgiev/urlmonitor | 1280127a1d8c52dcbcd871bba55abaf23a1ca3ce | [
"MIT"
] | null | null | null | src/osaction.py | ivan-georgiev/urlmonitor | 1280127a1d8c52dcbcd871bba55abaf23a1ca3ce | [
"MIT"
] | null | null | null | # pylint: disable=too-many-arguments
"""
Observer implemtation doing OS command
"""
from base.iobserver import IObserver
import subprocess
import logging
import os
import sys
logging.basicConfig(
format='%(asctime)s %(levelname)s:%(name)s: %(message)s',
level=os.environ.get('LOGLEVEL', 'INFO').upper(),
d... | 28.088235 | 104 | 0.587958 | 1,504 | 0.787435 | 0 | 0 | 62 | 0.032461 | 0 | 0 | 534 | 0.279581 |
3d297440ee04e65ec5e37779068515dbbf97d948 | 1,407 | py | Python | CellProfiler/tests/modules/test_opening.py | aidotse/Team-rahma.ai | 66857731e1ca2472e0783e37ba472b55a7ac9cd4 | [
"MIT"
] | null | null | null | CellProfiler/tests/modules/test_opening.py | aidotse/Team-rahma.ai | 66857731e1ca2472e0783e37ba472b55a7ac9cd4 | [
"MIT"
] | null | null | null | CellProfiler/tests/modules/test_opening.py | aidotse/Team-rahma.ai | 66857731e1ca2472e0783e37ba472b55a7ac9cd4 | [
"MIT"
] | null | null | null | import numpy
import numpy.testing
import skimage.morphology
import cellprofiler.modules.opening
instance = cellprofiler.modules.opening.Opening()
def test_run(image, module, image_set, workspace):
module.x_name.value = "example"
module.y_name.value = "opening"
if image.dimensions == 3 or image.multich... | 25.581818 | 69 | 0.68941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.072495 |
3d29b2ee51f536c799b3a2e3518fab0b83469961 | 26 | py | Python | pug-bot/apitoken.py | stevenktruong/pug-bot | 315c21363eebb51d67d5b5c9fa9326cd8bcb2b54 | [
"MIT"
] | 17 | 2018-06-27T03:49:03.000Z | 2021-04-13T07:32:43.000Z | pug-bot/apitoken.py | stevenktruong/pug-bot | 315c21363eebb51d67d5b5c9fa9326cd8bcb2b54 | [
"MIT"
] | 3 | 2020-03-26T06:49:10.000Z | 2020-04-23T07:20:41.000Z | pug-bot/apitoken.py | stevenktruong/pug-bot | 315c21363eebb51d67d5b5c9fa9326cd8bcb2b54 | [
"MIT"
] | 14 | 2018-06-27T03:49:06.000Z | 2021-10-07T23:28:44.000Z | TOKEN = "YOUR_TOKEN_HERE"
| 13 | 25 | 0.769231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.653846 |
3d2a32296fc0285fa514d89f51675b89a2c96e0a | 52,972 | py | Python | proxy/web/app_web.py | 5GCity/5GCity-infrastructure-abstraction | a743666cdd760bbbf511825600f313b2b88477d8 | [
"Apache-2.0"
] | null | null | null | proxy/web/app_web.py | 5GCity/5GCity-infrastructure-abstraction | a743666cdd760bbbf511825600f313b2b88477d8 | [
"Apache-2.0"
] | null | null | null | proxy/web/app_web.py | 5GCity/5GCity-infrastructure-abstraction | a743666cdd760bbbf511825600f313b2b88477d8 | [
"Apache-2.0"
] | 1 | 2021-11-27T11:16:04.000Z | 2021-11-27T11:16:04.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2017-2022 Univertity of Bristol - High Performance Networks Group
# 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.a... | 36.633472 | 79 | 0.564883 | 4,902 | 0.092529 | 0 | 0 | 36,360 | 0.686323 | 0 | 0 | 13,809 | 0.260655 |
3d2a3406b2c7fae09635aa25e074ee185903e975 | 6,179 | py | Python | openstates/importers/tests/test_base_importer.py | washabstract/openstates-core | ea69564f1f56fe4a80181b0aa715731bbc47e3f5 | [
"MIT"
] | null | null | null | openstates/importers/tests/test_base_importer.py | washabstract/openstates-core | ea69564f1f56fe4a80181b0aa715731bbc47e3f5 | [
"MIT"
] | null | null | null | openstates/importers/tests/test_base_importer.py | washabstract/openstates-core | ea69564f1f56fe4a80181b0aa715731bbc47e3f5 | [
"MIT"
] | null | null | null | import os
import json
import shutil
import tempfile
import datetime
import pytest
from unittest import mock
from openstates.data.models import (
Bill,
Jurisdiction,
Division,
LegislativeSession,
Organization,
Person,
)
from openstates.scrape import Bill as ScrapeBill
from openstates.importers.ba... | 31.365482 | 93 | 0.674057 | 52 | 0.008416 | 0 | 0 | 3,086 | 0.499434 | 0 | 0 | 1,735 | 0.28079 |
3d2ab40e18ce8de7c837398746d70bdad833cca8 | 3,777 | py | Python | cloudml-template/template/trainer/metadata.py | VanessaDo/cloudml-samples | ae6cd718e583944beef9d8a90db12091ac399432 | [
"Apache-2.0"
] | 3 | 2019-03-29T08:06:35.000Z | 2019-04-12T13:19:18.000Z | cloudml-template/template/trainer/metadata.py | VanessaDo/cloudml-samples | ae6cd718e583944beef9d8a90db12091ac399432 | [
"Apache-2.0"
] | 23 | 2020-09-25T22:44:06.000Z | 2022-02-10T02:58:47.000Z | cloudml-template/template/trainer/metadata.py | VanessaDo/cloudml-samples | ae6cd718e583944beef9d8a90db12091ac399432 | [
"Apache-2.0"
] | 2 | 2019-10-12T19:21:06.000Z | 2019-10-13T17:38:30.000Z | #!/usr/bin/env python
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 46.62963 | 111 | 0.734975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,901 | 0.76807 |
3d2b2116bab967ee3e89a4236cdda8c96cc22676 | 14,678 | py | Python | tests/models/test_models_base.py | harmsm/epistasis | 741b25b3e28015aeeba8d4efc94af1e1d811cd63 | [
"Unlicense"
] | null | null | null | tests/models/test_models_base.py | harmsm/epistasis | 741b25b3e28015aeeba8d4efc94af1e1d811cd63 | [
"Unlicense"
] | null | null | null | tests/models/test_models_base.py | harmsm/epistasis | 741b25b3e28015aeeba8d4efc94af1e1d811cd63 | [
"Unlicense"
] | 2 | 2020-04-02T00:58:24.000Z | 2021-11-16T13:30:30.000Z |
import pytest
import gpmap
from epistasis import models
import numpy as np
import pandas as pd
import os
def test__genotypes_to_X(test_data):
# Make sure function catches bad genotype passes
d = test_data[0]
gpm = gpmap.GenotypePhenotypeMap(genotype=d["genotype"],
p... | 30.579167 | 79 | 0.60417 | 364 | 0.024799 | 0 | 0 | 203 | 0.01383 | 0 | 0 | 3,096 | 0.210928 |
3d2cc12e10450aab89581a6101a64a041375bd58 | 871 | py | Python | examples/write_spyview_meta.py | sourav-majumder/qtlab | 96b2a127b1df7b45622c90229bd5ef8a4083614e | [
"MIT"
] | null | null | null | examples/write_spyview_meta.py | sourav-majumder/qtlab | 96b2a127b1df7b45622c90229bd5ef8a4083614e | [
"MIT"
] | null | null | null | examples/write_spyview_meta.py | sourav-majumder/qtlab | 96b2a127b1df7b45622c90229bd5ef8a4083614e | [
"MIT"
] | null | null | null | # File name: spyview.py
#
# This example should be run with "execfile('spyview.py')"
from numpy import pi, linspace, sinc, sqrt
from lib.file_support.spyview import SpyView
x_vec = linspace(-2 * pi, 2 * pi, 100)
y_vec = linspace(-2 * pi, 2 * pi, 100)
qt.mstart()
data = qt.Data(name='testmeasurement')
# to make the... | 20.738095 | 63 | 0.640643 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.23651 |