hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9f10cc17acd62c179ea44373769b26c8bb3baa94 | 9,231 | py | Python | train.py | qigtang/ssd.pytorch | f39c59f08c0688bae162639f7c82b9566d51f9df | [
"MIT"
] | null | null | null | train.py | qigtang/ssd.pytorch | f39c59f08c0688bae162639f7c82b9566d51f9df | [
"MIT"
] | null | null | null | train.py | qigtang/ssd.pytorch | f39c59f08c0688bae162639f7c82b9566d51f9df | [
"MIT"
] | null | null | null | from data import *
from utils.augmentations import SSDAugmentation
from layers.modules import MultiBoxLoss
from ssd import build_ssd
import os
import sys
import time
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.optim as optim
import torch.backends.cudnn as cudnn
import torch.nn.in... | 35.367816 | 92 | 0.596793 |
ba821648338a9b1da3958da5f4e2067eec275992 | 2,540 | py | Python | ginza/tag_map.py | polm/ginza | b868823f793057ac3976fa343fd9bd14ebe1c75e | [
"MIT"
] | 1 | 2020-04-08T04:45:20.000Z | 2020-04-08T04:45:20.000Z | ginza/tag_map.py | joreyolo/ginza | b868823f793057ac3976fa343fd9bd14ebe1c75e | [
"MIT"
] | null | null | null | ginza/tag_map.py | joreyolo/ginza | b868823f793057ac3976fa343fd9bd14ebe1c75e | [
"MIT"
] | null | null | null | # encoding: utf8
from __future__ import unicode_literals
from spacy.symbols import POS, PUNCT, INTJ, X, ADJ, AUX, ADP, PART, CCONJ, SCONJ, NOUN
from spacy.symbols import SPACE, SYM, PRON, VERB, ADV, PROPN, NUM, DET
TAG_MAP = {
# Universal Dependencies Mapping
# (private repository)
# https://github.com/m... | 32.151899 | 117 | 0.572047 |
3f3a352d4fdb283b1eb9a76f28c8f0b3b11ff62a | 615,817 | py | Python | docassemble_base/docassemble/base/parse.py | Partnervine/docassemble | 05a154d4788ada27ad220a0d95456b0b0a26c46b | [
"MIT"
] | null | null | null | docassemble_base/docassemble/base/parse.py | Partnervine/docassemble | 05a154d4788ada27ad220a0d95456b0b0a26c46b | [
"MIT"
] | null | null | null | docassemble_base/docassemble/base/parse.py | Partnervine/docassemble | 05a154d4788ada27ad220a0d95456b0b0a26c46b | [
"MIT"
] | null | null | null | import mimetypes
import traceback
import re
from jinja2.runtime import StrictUndefined, UndefinedError
from jinja2.exceptions import TemplateError
from jinja2.environment import Environment
from jinja2.environment import Template as JinjaTemplate
from jinja2 import meta as jinja2meta
from jinja2.lexer import Token
from... | 65.172717 | 2,221 | 0.538663 |
01da6c48b603a747e724394760e48018649ccd5a | 823 | py | Python | meiduo_mall/manage.py | shenhaiyu0923/meiduo_project | 0ba91533294c5bb6f8ca54f93eabdff007a3560f | [
"MIT"
] | 4 | 2021-04-30T05:45:32.000Z | 2021-04-30T05:56:03.000Z | meiduo_mall/manage.py | shenhaiyu0923/meiduo_project | 0ba91533294c5bb6f8ca54f93eabdff007a3560f | [
"MIT"
] | null | null | null | meiduo_mall/manage.py | shenhaiyu0923/meiduo_project | 0ba91533294c5bb6f8ca54f93eabdff007a3560f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meiduo_mall.settings.dev")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure t... | 35.782609 | 79 | 0.648846 |
c6f66cabd411594ef2112b6b2bff31855d4c5ca0 | 1,755 | py | Python | server/src/police_lineups/controllers/lineups/queries.py | vabalcar/police-lineups | 9c4a17d58e973d6db6e442bd9d5f4313ad4d51b7 | [
"MIT"
] | null | null | null | server/src/police_lineups/controllers/lineups/queries.py | vabalcar/police-lineups | 9c4a17d58e973d6db6e442bd9d5f4313ad4d51b7 | [
"MIT"
] | 2 | 2021-09-24T11:43:58.000Z | 2021-09-24T12:00:21.000Z | server/src/police_lineups/controllers/lineups/queries.py | vabalcar/police-lineups | 9c4a17d58e973d6db6e442bd9d5f4313ad4d51b7 | [
"MIT"
] | null | null | null | from typing import List
from swagger_server.models import Lineup, Person
from police_lineups.controllers.utils.responses import Responses
from police_lineups.db import DbLineup, DbLineupPerson, DbPerson, DbUser
from police_lineups.singletons import Context
from .utils import owner_auth_guard
def get_lineups():
... | 33.75 | 104 | 0.71567 |
cd4aa44c97e6f28ebc73dee7a5d8e39402669e51 | 14,316 | py | Python | pyfo/utils/core.py | bradleygramhansen/pyfo | 559678080f27e7d9f3f194a0c28e9e8bfe71a7f3 | [
"MIT"
] | 3 | 2018-06-11T09:16:13.000Z | 2019-03-08T05:22:43.000Z | pyfo/utils/core.py | bradleygramhansen/pyfo | 559678080f27e7d9f3f194a0c28e9e8bfe71a7f3 | [
"MIT"
] | null | null | null | pyfo/utils/core.py | bradleygramhansen/pyfo | 559678080f27e7d9f3f194a0c28e9e8bfe71a7f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Author: Bradley Gram-Hansen
Time created: 10:02
Date created: 10/11/2017
License: MIT
'''
import torch
import numpy as np
import torch.distributions as dists
from torch.distributions import constraints, biject_to
try:
import networkx as _nx
except ModuleNotFoun... | 38.796748 | 228 | 0.644873 |
d564eb8478e4a7a274690bf29d71055ec6de75ab | 565 | py | Python | Solucion_taller_selevtivos/ejercicio14.py | ItsZeus03/Algoritmos-y-Programaciaon | caeddc442f76e4a4b428d668a6730c8096b38ae0 | [
"MIT"
] | null | null | null | Solucion_taller_selevtivos/ejercicio14.py | ItsZeus03/Algoritmos-y-Programaciaon | caeddc442f76e4a4b428d668a6730c8096b38ae0 | [
"MIT"
] | null | null | null | Solucion_taller_selevtivos/ejercicio14.py | ItsZeus03/Algoritmos-y-Programaciaon | caeddc442f76e4a4b428d668a6730c8096b38ae0 | [
"MIT"
] | null | null | null | """
entradas
lectura_antigua-->float-->lan
lectura_actual-->float-->lac
salida
pago-->float-->pa
"""
fa=input("Ingrese los klivatios consumidos en el mes pasado y el actual (mespasado mesactual) ")
(lan,lac)=fa.split(" ")
lan=float(lan)
lac=float(lac)
kv=lac-lan
if(kv>=0 and kv<=100):
pa=kv*4600
print("Total a paga... | 23.541667 | 96 | 0.658407 |
c4f1b5398efacc33eea11303718a89d623a7edfc | 11,295 | py | Python | lib/JumpScale/sal/openvswitch/VXNet/utils.py | Jumpscale/jumpscale_core8 | f80ac9b1ab99b833ee7adb17700dcf4ef35f3734 | [
"Apache-2.0"
] | 8 | 2016-04-14T14:04:57.000Z | 2020-06-09T00:24:34.000Z | lib/JumpScale/sal/openvswitch/VXNet/utils.py | Jumpscale/jumpscale_core8 | f80ac9b1ab99b833ee7adb17700dcf4ef35f3734 | [
"Apache-2.0"
] | 418 | 2016-01-25T10:30:00.000Z | 2021-09-08T12:29:13.000Z | lib/JumpScale/sal/openvswitch/VXNet/utils.py | Jumpscale/jumpscale_core8 | f80ac9b1ab99b833ee7adb17700dcf4ef35f3734 | [
"Apache-2.0"
] | 9 | 2016-04-21T07:21:17.000Z | 2022-01-24T10:35:54.000Z | __author__ = 'delandtj'
from JumpScale import j
import os
import os.path
import subprocess
import sys
import time
command_name = sys.argv[0]
vsctl = "/usr/bin/ovs-vsctl"
ofctl = "/usr/bin/ovs-ofctl"
ip = "/sbin/ip"
ethtool = "/sbin/ethtool"
PHYSMTU = 2000
# TODO : errorhandling
def send_to_syslog(msg):
pass
... | 34.753846 | 112 | 0.612749 |
bcd0263f00274b0f10e9c41b45040b999796b429 | 2,730 | py | Python | smqtk_classifier/interfaces/classify_image_supervised.py | bardkw/SMQTK-Classifier | 68022a0be089ace123d20c1c080fb84e103a50da | [
"BSD-3-Clause"
] | 1 | 2021-04-09T20:52:55.000Z | 2021-04-09T20:52:55.000Z | smqtk_classifier/interfaces/classify_image_supervised.py | bardkw/SMQTK-Classifier | 68022a0be089ace123d20c1c080fb84e103a50da | [
"BSD-3-Clause"
] | 14 | 2021-04-06T14:22:34.000Z | 2022-02-23T15:12:55.000Z | smqtk_classifier/interfaces/classify_image_supervised.py | bardkw/SMQTK-Classifier | 68022a0be089ace123d20c1c080fb84e103a50da | [
"BSD-3-Clause"
] | 3 | 2021-04-02T20:35:41.000Z | 2021-11-09T20:13:46.000Z | import abc
from typing import Mapping, Hashable
from .classify_image import ClassifyImage, IMAGE_ITER_T
from smqtk_classifier.exceptions import ExistingModelError
class ClassifyImageSupervised(ClassifyImage):
"""
Class of classifiers that are trainable via supervised training, i.e. are
given specific Ima... | 36.891892 | 79 | 0.645421 |
d2526c0b411ca1179907990347ed5a3b9487c292 | 19,972 | py | Python | utility/entity/character.py | DrLarck/DragonBotZ | eab773d6e55f7f5f325828fe249800193120abaf | [
"MIT"
] | 3 | 2020-05-01T07:38:38.000Z | 2020-06-02T12:03:40.000Z | utility/entity/character.py | DrLarck/DragonBotZ | eab773d6e55f7f5f325828fe249800193120abaf | [
"MIT"
] | 19 | 2020-11-01T22:15:57.000Z | 2021-09-08T15:28:30.000Z | utility/entity/character.py | DrLarck/DragonBotZ | eab773d6e55f7f5f325828fe249800193120abaf | [
"MIT"
] | 1 | 2021-03-05T04:51:21.000Z | 2021-03-05T04:51:21.000Z | """
Character object
--
Author : Drlarck
Last update : 1/11/20 by DrLarck
"""
import asyncio
# util
from utility.graphic.embed import CustomEmbed
from utility.graphic.icon import GameIcon
from utility.graphic.color import GameColor
from utility.entity.ability import Ability
class Character:
def __init__(sel... | 26.558511 | 102 | 0.553775 |
4bcc2351ed984ebbc31c6c94f0486411722de37b | 3,630 | py | Python | redis_client.py | jinserk/pytorch-redis | 0b0bfabc9241f941bc39a2e695943b5ebd6b4fcb | [
"MIT"
] | 4 | 2020-04-27T00:47:35.000Z | 2021-04-12T07:52:20.000Z | redis_client.py | jinserk/pytorch-redis | 0b0bfabc9241f941bc39a2e695943b5ebd6b4fcb | [
"MIT"
] | null | null | null | redis_client.py | jinserk/pytorch-redis | 0b0bfabc9241f941bc39a2e695943b5ebd6b4fcb | [
"MIT"
] | 1 | 2020-04-26T17:51:12.000Z | 2020-04-26T17:51:12.000Z | import sys
import io
import redis
import torch
from tqdm.auto import tqdm
ver = sys.version_info
if ver >= (3, 8):
PICKLE_VERSION = 5
else:
PICKLE_VERSION = 4
CXN = redis.ConnectionPool(host='localhost', port=6379, db=0)
class RedisListObject:
def __init__(self, name):
self.name = name
d... | 30.25 | 107 | 0.570799 |
40b9f37281ab453ec80fdbfb793fdeb4eb4fa22c | 385 | py | Python | squid/squid/wsgi.py | DjangoNYC/squid | e9776df722d6c4d8e43738c053c610475f73f0db | [
"MIT"
] | null | null | null | squid/squid/wsgi.py | DjangoNYC/squid | e9776df722d6c4d8e43738c053c610475f73f0db | [
"MIT"
] | null | null | null | squid/squid/wsgi.py | DjangoNYC/squid | e9776df722d6c4d8e43738c053c610475f73f0db | [
"MIT"
] | null | null | null | """
WSGI config for squid project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "squid.settings")
from django.core.wsgi ... | 25.666667 | 78 | 0.787013 |
db52ca4f3f3c18c1766ac7c1d8ba45ca69e7c21b | 504 | py | Python | custom_components/samsungtv_custom/samsungctl_080b/upnp/UPNP_Device/instance_singleton.py | AdamOttvar/ha-samsungtv-custom | da6bf9349d1e33bf143a115b4f2a3754d6754472 | [
"Apache-2.0"
] | 117 | 2019-10-08T05:39:44.000Z | 2022-01-31T15:43:08.000Z | custom_components/samsungtv_custom/samsungctl_080b/upnp/UPNP_Device/instance_singleton.py | AdamOttvar/ha-samsungtv-custom | da6bf9349d1e33bf143a115b4f2a3754d6754472 | [
"Apache-2.0"
] | 76 | 2019-10-08T06:04:08.000Z | 2022-02-26T18:47:22.000Z | custom_components/samsungtv_custom/samsungctl_080b/upnp/UPNP_Device/instance_singleton.py | AdamOttvar/ha-samsungtv-custom | da6bf9349d1e33bf143a115b4f2a3754d6754472 | [
"Apache-2.0"
] | 59 | 2019-10-08T06:32:37.000Z | 2022-03-14T23:14:07.000Z | # -*- coding: utf-8 -*-
class InstanceSingleton(type):
_objects = {}
def __call__(cls, id, *args, **kwargs):
if id not in InstanceSingleton._objects:
InstanceSingleton._objects[id] = (
super(InstanceSingleton, cls).__call__(id, *args, **kwargs)
)
else:... | 25.2 | 75 | 0.543651 |
9a507658b9e6ee9a2fe51fc1c8bc6f45cd44fa28 | 813 | py | Python | reddit/processing/features.py | yusueliu/reddit | e598a7ba783fa0b67063355e61c2017a5e58a6f5 | [
"MIT"
] | null | null | null | reddit/processing/features.py | yusueliu/reddit | e598a7ba783fa0b67063355e61c2017a5e58a6f5 | [
"MIT"
] | null | null | null | reddit/processing/features.py | yusueliu/reddit | e598a7ba783fa0b67063355e61c2017a5e58a6f5 | [
"MIT"
] | null | null | null | import spacy
from sklearn.base import BaseEstimator, TransformerMixin
nlp = spacy.load('en_core_web_sm')
class TextTokenizer(BaseEstimator, TransformerMixin):
def __init__(self, variable=None, stopword_exceptions=None):
self.variable = variable
if stopword_exceptions:
nlp.Defaults.stop_... | 32.52 | 83 | 0.661747 |
acad58b07a967d64f187f382f9f5da23a6ebd327 | 7,663 | py | Python | webexteamssdk/docs/conf.py | Steeve135/WebexBot | 6188ca2cfccd8885c5c2e492f17a6e935dee416e | [
"MIT"
] | null | null | null | webexteamssdk/docs/conf.py | Steeve135/WebexBot | 6188ca2cfccd8885c5c2e492f17a6e935dee416e | [
"MIT"
] | 4 | 2020-03-24T16:20:45.000Z | 2021-06-01T22:56:24.000Z | webexteamssdk/docs/conf.py | Steeve135/WebexBot | 6188ca2cfccd8885c5c2e492f17a6e935dee416e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
from webexteamssdk._version import get_versions
project = u'webexteamssdk'
copyright = u'Copyright (c) 2016-2018 Cisco and/or its affiliates.'
author = u'Chris Lunsford'
version = get_versions()['version']
release = get_versio... | 26.424138 | 80 | 0.693984 |
47dce01e1c6fa7a4a3e9f5d7456def5096257256 | 20,915 | py | Python | tests/python/test_ast_refactor.py | Aaronoooooo/taichi | 4ed04254f1cbf6f99628e2ee32464f821837c5ff | [
"MIT"
] | 1 | 2021-11-25T11:05:27.000Z | 2021-11-25T11:05:27.000Z | tests/python/test_ast_refactor.py | kuangzihan/taichi | 5d1122ff126893dc1f2fd3950eddb1600711c137 | [
"MIT"
] | null | null | null | tests/python/test_ast_refactor.py | kuangzihan/taichi | 5d1122ff126893dc1f2fd3950eddb1600711c137 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import taichi as ti
from taichi import approx
@ti.test()
def test_binop():
@ti.kernel
def foo(x: ti.i32, y: ti.i32, a: ti.template()):
a[0] = x + y
a[1] = x - y
a[2] = x * y
a[3] = ti.ti_float(x) / y
a[4] = x // y
a[5] = x % y
... | 21.126263 | 75 | 0.448721 |
ae3b6fd7e45b1a0443006038ba007fe4226472e0 | 2,770 | py | Python | doc/scripts/simplify_cmake_depsgraph.py | tiferrei/astrobee | a9aa0a7e9a7dd5a28c264acfd06ccde18103190a | [
"Apache-2.0"
] | 629 | 2017-08-31T23:09:00.000Z | 2022-03-30T11:55:40.000Z | doc/scripts/simplify_cmake_depsgraph.py | tiferrei/astrobee | a9aa0a7e9a7dd5a28c264acfd06ccde18103190a | [
"Apache-2.0"
] | 269 | 2018-05-05T12:31:16.000Z | 2022-03-30T22:04:11.000Z | doc/scripts/simplify_cmake_depsgraph.py | tiferrei/astrobee | a9aa0a7e9a7dd5a28c264acfd06ccde18103190a | [
"Apache-2.0"
] | 248 | 2017-08-31T23:20:56.000Z | 2022-03-30T22:29:16.000Z | #!/usr/bin/python3
#
# Simplify a cmake generated dependency graph.
#
# Cmake has the capability to generate executable/librairies dependency graph.
# However, the generated graphs are unreadable because every library file is
# represented as a unique node. This script groups the libraries files by
# package name.
# T... | 32.97619 | 84 | 0.627798 |
9da61494bf7a3757ff2974ede68b4309cc6adbde | 1,849 | py | Python | src/urls.py | orlowdev/aite | 6fcb02211d9fcb6be84de99deebc2aabe8075f61 | [
"Apache-2.0"
] | 1 | 2021-04-13T15:44:05.000Z | 2021-04-13T15:44:05.000Z | src/urls.py | orlowdev/aite | 6fcb02211d9fcb6be84de99deebc2aabe8075f61 | [
"Apache-2.0"
] | null | null | null | src/urls.py | orlowdev/aite | 6fcb02211d9fcb6be84de99deebc2aabe8075f61 | [
"Apache-2.0"
] | null | null | null | """src URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based ... | 39.340426 | 98 | 0.718767 |
18848600e1b67b67f6ce985da532897e614de92e | 1,622 | py | Python | uber_agent/city.py | hotpxl/uber-agent | 70729f9b09a17336af3a8bc6f51e0b27b10e3fc3 | [
"MIT"
] | null | null | null | uber_agent/city.py | hotpxl/uber-agent | 70729f9b09a17336af3a8bc6f51e0b27b10e3fc3 | [
"MIT"
] | null | null | null | uber_agent/city.py | hotpxl/uber-agent | 70729f9b09a17336af3a8bc6f51e0b27b10e3fc3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pickle
import math
import random
class City():
def __init__(self, locations, travel_times, fare_estimates, coordinates):
self._locations = locations
self._travel_times = travel_times
self._fare_estimates = fare_estimates
self._co... | 27.491525 | 77 | 0.610358 |
4386c6d34a371af0d7fd77faa363f547f2c35884 | 935 | py | Python | py/codeforces/883E.py | shhuan/algorithms | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | [
"MIT"
] | null | null | null | py/codeforces/883E.py | shhuan/algorithms | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | [
"MIT"
] | null | null | null | py/codeforces/883E.py | shhuan/algorithms | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | [
"MIT"
] | 1 | 2022-03-09T04:52:55.000Z | 2022-03-09T04:52:55.000Z | # -*- coding: utf-8 -*-
import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
"""
created by shhuan at 2017/10/22 17:36
"""
N = int(input())
W = input()
M = int(input())
words = set()
for i in range(M):
words.add(input())
revealed = set(W) - {'*'}
idx ... | 15.583333 | 46 | 0.522995 |
668df73ebc1e3b3bdeeba0ba60594ce79d63373b | 7,766 | py | Python | docs/conf.py | psreddy85/mlops_wafer | c3c2ac00ee55bf90956b25d4bd2054de6afa8287 | [
"MIT"
] | null | null | null | docs/conf.py | psreddy85/mlops_wafer | c3c2ac00ee55bf90956b25d4bd2054de6afa8287 | [
"MIT"
] | null | null | null | docs/conf.py | psreddy85/mlops_wafer | c3c2ac00ee55bf90956b25d4bd2054de6afa8287 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# MLOps_Wafer documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values ha... | 31.697959 | 80 | 0.707185 |
bd2afbe0d87a261631e10f6ea0924928d49f20d4 | 37 | py | Python | .history/chapter01/python_03_list_20201124211540.py | KustomApe/nerdape | aef6fb2d1f8c364b26d91bf8570b4487a24de69a | [
"MIT"
] | null | null | null | .history/chapter01/python_03_list_20201124211540.py | KustomApe/nerdape | aef6fb2d1f8c364b26d91bf8570b4487a24de69a | [
"MIT"
] | null | null | null | .history/chapter01/python_03_list_20201124211540.py | KustomApe/nerdape | aef6fb2d1f8c364b26d91bf8570b4487a24de69a | [
"MIT"
] | null | null | null | """[リストについて]
リストの構文とリストの使い方について
"""
| 7.4 | 18 | 0.675676 |
01ddd92c72ffd60c0d5e6ba79af60629466754c9 | 1,979 | py | Python | test/sst/7.1.0/goblin_singlestream1-trace.py | tactcomplabs/gc64-hmcsim | 79bf4ffae74dc52bb605adb3e0e1eb84649f9624 | [
"BSD-2-Clause"
] | 10 | 2018-02-26T02:39:36.000Z | 2020-10-20T14:55:56.000Z | test/sst/7.1.0/goblin_singlestream1-trace.py | tactcomplabs/gc64-hmcsim | 79bf4ffae74dc52bb605adb3e0e1eb84649f9624 | [
"BSD-2-Clause"
] | 5 | 2017-09-07T11:41:35.000Z | 2020-10-12T14:35:39.000Z | test/sst/6.1.0/goblin_singlestream1-trace.py | tactcomplabs/gc64-hmcsim | 79bf4ffae74dc52bb605adb3e0e1eb84649f9624 | [
"BSD-2-Clause"
] | 4 | 2017-09-07T06:03:43.000Z | 2021-09-10T13:44:19.000Z | import sst
# Define SST core options
sst.setProgramOption("timebase", "1ps")
sst.setProgramOption("stopAtCycle", "0 ns")
# Define the simulation components
comp_cpu = sst.Component("cpu", "miranda.BaseCPU")
comp_cpu.addParams({
"verbose" : 0,
"generator" : "miranda.SingleStreamGenerator",
"generatorParams.verbose"... | 30.921875 | 109 | 0.688732 |
fefca61b9687f183494d5e9db51d39bf34cb5bdb | 5,009 | py | Python | samples/fcd_create_vdisk_from_snapshot.py | whchoi98/whchoi_pyvmomi-community-samples | 4bc90d0780267d9c14382ae72b50ef3475a96e46 | [
"Apache-2.0"
] | null | null | null | samples/fcd_create_vdisk_from_snapshot.py | whchoi98/whchoi_pyvmomi-community-samples | 4bc90d0780267d9c14382ae72b50ef3475a96e46 | [
"Apache-2.0"
] | null | null | null | samples/fcd_create_vdisk_from_snapshot.py | whchoi98/whchoi_pyvmomi-community-samples | 4bc90d0780267d9c14382ae72b50ef3475a96e46 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: carceneaux@thinksis.com
# Website: http://arsano.ninja
#
# Note: Example code For testing purposes only
#
# This code has been released under the terms of the Apache-2.0 license
# http://opensou... | 32.738562 | 77 | 0.558994 |
33b681373543e2fe5d697beb91667b32e6e8320b | 510 | py | Python | plotly/validators/heatmap/colorbar/_tickmode.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/heatmap/colorbar/_tickmode.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/heatmap/colorbar/_tickmode.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name='tickmode', parent_name='heatmap.colorbar', **kwargs
):
super(TickmodeValidator, self).__init__(
plotly_name=plotly_name,
pare... | 28.333333 | 78 | 0.609804 |
91d2bafb054360811b97406c3179dffde9cdd7f6 | 555 | py | Python | ordenacao/quicksort.py | GustavoCunhaLacerda/algoritmos-python | 6799ab02bce3971728ce3503b48e8fda339c7b7c | [
"MIT"
] | 1 | 2020-09-19T04:42:29.000Z | 2020-09-19T04:42:29.000Z | ordenacao/quicksort.py | GustavoCunhaLacerda/AlgoritmosPython | 6799ab02bce3971728ce3503b48e8fda339c7b7c | [
"MIT"
] | null | null | null | ordenacao/quicksort.py | GustavoCunhaLacerda/AlgoritmosPython | 6799ab02bce3971728ce3503b48e8fda339c7b7c | [
"MIT"
] | null | null | null | def quick_sort(list, start=0, end=None):
if end is None:
end = len(list)-1
if start < end:
pivot = partition(list, start, end)
quick_sort(list, start, pivot-1)
quick_sort(list, pivot+1, end)
def partition(list, start, end):
pivot = list[end]
smaller = start
for ... | 26.428571 | 69 | 0.583784 |
7817b8f6b2688dfaad857c114446d1dcf5d1b5fc | 39,232 | py | Python | sdk/python/pulumi_aws/ec2/eip.py | aamir-locus/pulumi-aws | 3e234b050129bde35d8e072a88bd608562f02142 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/ec2/eip.py | aamir-locus/pulumi-aws | 3e234b050129bde35d8e072a88bd608562f02142 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/ec2/eip.py | aamir-locus/pulumi-aws | 3e234b050129bde35d8e072a88bd608562f02142 | [
"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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 42.970427 | 292 | 0.643811 |
bdc874f10fe3f84ce85e218a408890c53bd42e18 | 4,133 | py | Python | course_retrieval/course_retrieval.py | neelkapadia/WolfPal | 5a5b2b37285acc56338383b90c39ea3ac755fed3 | [
"MIT"
] | 1 | 2018-03-25T17:32:07.000Z | 2018-03-25T17:32:07.000Z | course_retrieval/course_retrieval.py | neelkapadia/WolfPal | 5a5b2b37285acc56338383b90c39ea3ac755fed3 | [
"MIT"
] | 14 | 2018-04-02T00:32:10.000Z | 2018-04-25T20:15:16.000Z | course_retrieval/course_retrieval.py | neelkapadia/WolfPal | 5a5b2b37285acc56338383b90c39ea3ac755fed3 | [
"MIT"
] | 3 | 2018-04-25T20:04:02.000Z | 2018-06-27T00:47:14.000Z | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from bs4 import BeautifulSoup
import requests
from pymongo import MongoClient
import json
import script_db
import pickle
# def get_credentials():
# pkl_file = open('.cred.pkl', 'rb')
# data = pickle.load(pkl_file)
# ... | 23.350282 | 118 | 0.701669 |
3048e1d24fa8803198fe729ea2defb299803ef1e | 8,155 | py | Python | docs/conf.py | ashish2py/django-postman | 1cd1ce446912fbd179594f1ed1b535d74e1f891f | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | ashish2py/django-postman | 1cd1ce446912fbd179594f1ed1b535d74e1f891f | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | ashish2py/django-postman | 1cd1ce446912fbd179594f1ed1b535d74e1f891f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 31.980392 | 80 | 0.717964 |
3c7f175bca1ae3b29c32bc4e309ecb19aaf7134a | 2,766 | py | Python | demo/tensorflow/nn_tensorboard.py | zhengxin2016/corpus | c33574cf195bfe4aa57def95349f6baa4cd8200c | [
"Apache-2.0"
] | null | null | null | demo/tensorflow/nn_tensorboard.py | zhengxin2016/corpus | c33574cf195bfe4aa57def95349f6baa4cd8200c | [
"Apache-2.0"
] | null | null | null | demo/tensorflow/nn_tensorboard.py | zhengxin2016/corpus | c33574cf195bfe4aa57def95349f6baa4cd8200c | [
"Apache-2.0"
] | 1 | 2018-07-04T05:38:09.000Z | 2018-07-04T05:38:09.000Z | #!/usr/bin/env python3
import os, sys
import tensorflow as tf
import numpy as np
#os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1' #all info
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' #warning, error
#os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' #error
def add_layer(inputs, in_size, out_size, activation_function=None):
with tf... | 31.431818 | 70 | 0.661605 |
cbe7ef700346235eadb1ca0e379ade3421f45b33 | 7,543 | py | Python | examples/dmri_group_connectivity_mrtrix.py | dPys/nipype | 75030b29297808e7c9a9e91b411b685154dff60b | [
"Apache-2.0"
] | 1 | 2020-02-24T15:44:50.000Z | 2020-02-24T15:44:50.000Z | examples/dmri_group_connectivity_mrtrix.py | dPys/nipype | 75030b29297808e7c9a9e91b411b685154dff60b | [
"Apache-2.0"
] | null | null | null | examples/dmri_group_connectivity_mrtrix.py | dPys/nipype | 75030b29297808e7c9a9e91b411b685154dff60b | [
"Apache-2.0"
] | null | null | null | """
==================================================
dMRI: Group connectivity - MRtrix, FSL, FreeSurfer
==================================================
Introduction
============
This script, dmri_group_connectivity_mrtrix.py, runs group-based connectivity analysis using
the dmri.mrtrix.connectivity_mapping Nipyp... | 40.772973 | 143 | 0.750497 |
5a9dbb3f70b5cf6cc5984c74e08a0aa42f6e26d6 | 650 | py | Python | sandbox/lib/jumpscale/Jumpscale/servers/gedis_websocket/GedisWebsocketFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | sandbox/lib/jumpscale/Jumpscale/servers/gedis_websocket/GedisWebsocketFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | sandbox/lib/jumpscale/Jumpscale/servers/gedis_websocket/GedisWebsocketFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | import socket
from Jumpscale import j
from .GedisWebsocketServer import GedisWebsocketServer
JSConfigClient = j.baseclasses.object_config_collection
class GedisWebsocketFactory(JSConfigClient):
__jslocation__ = "j.servers.gedis_websocket"
_CHILDCLASS = GedisWebsocketServer
def _init(self, **kwargs):
... | 25 | 66 | 0.7 |
54cdc6416ab2b295c3bee8ad2be0912c7318ef0f | 239 | py | Python | frappe/core/doctype/patch_log/test_patch_log.py | oryxsolutions/frappe | d193ea22d17ca40d57432040a8afad72287d9e23 | [
"MIT"
] | null | null | null | frappe/core/doctype/patch_log/test_patch_log.py | oryxsolutions/frappe | d193ea22d17ca40d57432040a8afad72287d9e23 | [
"MIT"
] | null | null | null | frappe/core/doctype/patch_log/test_patch_log.py | oryxsolutions/frappe | d193ea22d17ca40d57432040a8afad72287d9e23 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import unittest
# test_records = frappe.get_test_records('Patch Log')
class TestPatchLog(unittest.TestCase):
pass
| 21.727273 | 68 | 0.736402 |
473eae16743c94d7aeab444891b5853e47a1f072 | 7,627 | py | Python | cr-errands.py | bryant81/cr-statics | bde0cd75ed3cb2dd03eb8eca3d585ba92f0155fc | [
"MIT"
] | null | null | null | cr-errands.py | bryant81/cr-statics | bde0cd75ed3cb2dd03eb8eca3d585ba92f0155fc | [
"MIT"
] | 1 | 2018-01-30T06:32:17.000Z | 2018-01-30T08:53:38.000Z | cr-errands.py | bryant81/cr-statics | bde0cd75ed3cb2dd03eb8eca3d585ba92f0155fc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#encoding=utf-8
import sys
import login_client
import argparse
import xlrd, xlwt
from pyecharts import Pie, Page
rd_departments_list = ['嵌入部', '系统部', '软件部', '项目管理部', '硬件部', '结构部', '测试部', '研发中心']
cities = ("阿坝","阿拉善","阿里","安康","安庆","鞍山","安顺","安阳","澳门","北京","白银",
"保定","宝鸡","保山","包头",... | 39.112821 | 147 | 0.5748 |
c615a44852de414106dd329a0287a1b581f395dd | 1,486 | py | Python | signac/core/json.py | Carreau/signac | 7086d8981c926703a023654d1c59bbedcfae6298 | [
"BSD-3-Clause"
] | 1 | 2020-12-28T18:00:24.000Z | 2020-12-28T18:00:24.000Z | signac/core/json.py | Carreau/signac | 7086d8981c926703a023654d1c59bbedcfae6298 | [
"BSD-3-Clause"
] | 81 | 2020-12-28T20:23:57.000Z | 2022-03-01T06:03:40.000Z | signac/core/json.py | admdev8/signac | d639e682ca7ebaff781d68621a2d86cc26de04b9 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018 The Regents of the University of Michigan
# All rights reserved.
# This software is licensed under the BSD 3-Clause License.
"""Wrapper around json parsing library."""
import logging
from json import load, loads, JSONEncoder
from json.decoder import JSONDecodeError
from typing import Any, Dict, Opt... | 32.304348 | 80 | 0.674966 |
20c0e9cb6a2271abe5d5eaf76fd28f36518fa5b9 | 55,089 | py | Python | mathchem/mathchem.py | Pshemysuaf/mathchem-package | e084a838fc836325872f37e3f638a0e13fd368f8 | [
"MIT"
] | null | null | null | mathchem/mathchem.py | Pshemysuaf/mathchem-package | e084a838fc836325872f37e3f638a0e13fd368f8 | [
"MIT"
] | null | null | null | mathchem/mathchem.py | Pshemysuaf/mathchem-package | e084a838fc836325872f37e3f638a0e13fd368f8 | [
"MIT"
] | null | null | null | import numpy as np
class Mol():
r"""
Molecule.
"""
__g6_string = ''
# Adjacency matrix
__A = []
# Incidence matrix
__B = []
# Laplacian matrix
__L = []
# Normalized laplacian matrix
__NL = []
# Signless laplacian matrix
__Q = []
# Distance matrix
__D = [... | 33.186145 | 121 | 0.560802 |
6365b052af1cd0b1cbf4a3b7f82e8915ae433561 | 511 | py | Python | url.py | tekonrust/urlshortener | d5696a1209c06047af2e301bbaea019a0490d6bf | [
"Unlicense"
] | 1 | 2021-01-28T06:48:31.000Z | 2021-01-28T06:48:31.000Z | url.py | tekonrust/urlshortener | d5696a1209c06047af2e301bbaea019a0490d6bf | [
"Unlicense"
] | null | null | null | url.py | tekonrust/urlshortener | d5696a1209c06047af2e301bbaea019a0490d6bf | [
"Unlicense"
] | null | null | null | def LongOrShort():
mode= input("ENTER 'S' TO SHORTEN OR 'E' TO EXPAND :-")
if mode.upper() =='S' :
import pyshorteners
p = pyshorteners.Shortener()
url=input("enter url to be shortened : ")
chota=(p.tinyurl.short(url))
print("shortened url :-",chota)
if mode.upper() ... | 31.9375 | 60 | 0.581213 |
dcfc3040efec4059e86e486a60fd9cb69740de30 | 6,426 | py | Python | ironic/drivers/modules/ovhapi/ovh_base.py | yanndegat/ironic | 8857ec76443dea7778bb9c0d66568304e52495e5 | [
"Apache-2.0"
] | null | null | null | ironic/drivers/modules/ovhapi/ovh_base.py | yanndegat/ironic | 8857ec76443dea7778bb9c0d66568304e52495e5 | [
"Apache-2.0"
] | null | null | null | ironic/drivers/modules/ovhapi/ovh_base.py | yanndegat/ironic | 8857ec76443dea7778bb9c0d66568304e52495e5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, OVH SAS.
#
# 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,... | 34 | 78 | 0.606287 |
8f63695b93046d2daef41b7cddd0d6ba197a17da | 3,222 | py | Python | node.py | succa/adversarial-ml-text-classification | 1efce8e198c2825dea2f50148e83864a1b6a6fd1 | [
"MIT"
] | null | null | null | node.py | succa/adversarial-ml-text-classification | 1efce8e198c2825dea2f50148e83864a1b6a6fd1 | [
"MIT"
] | null | null | null | node.py | succa/adversarial-ml-text-classification | 1efce8e198c2825dea2f50148e83864a1b6a6fd1 | [
"MIT"
] | null | null | null | from data_utils import extract_features
from paraphrase import perturb_text
import numpy as np
import spacy
import math
import random
nlp = spacy.load('en_core_web_lg')
# Node class
class Node:
def __init__(self,
text,
root=None,
grad_guide=None,
... | 34.645161 | 101 | 0.534451 |
c7a90f6d271819078412c0703ab1e301f1f33794 | 322 | py | Python | aqua_guard/config/docs.py | pooja586/aqua_guard | 4968b5006a8187f72d1d1394251d140d94c2b74f | [
"MIT"
] | null | null | null | aqua_guard/config/docs.py | pooja586/aqua_guard | 4968b5006a8187f72d1d1394251d140d94c2b74f | [
"MIT"
] | null | null | null | aqua_guard/config/docs.py | pooja586/aqua_guard | 4968b5006a8187f72d1d1394251d140d94c2b74f | [
"MIT"
] | null | null | null | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/aqua_guard"
# docs_base_url = "https://[org_name].github.io/aqua_guard"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "Aqua Guard... | 26.833333 | 68 | 0.726708 |
053374f211fcf0a93af4ec15538cf54e6beaacd2 | 3,362 | py | Python | scripts/generate_config.py | AgileCloudLab/single-threaded-rlnc-benchmark | 914c18cf408d62f7294f796f386e98740d6fc83d | [
"MIT"
] | null | null | null | scripts/generate_config.py | AgileCloudLab/single-threaded-rlnc-benchmark | 914c18cf408d62f7294f796f386e98740d6fc83d | [
"MIT"
] | null | null | null | scripts/generate_config.py | AgileCloudLab/single-threaded-rlnc-benchmark | 914c18cf408d62f7294f796f386e98740d6fc83d | [
"MIT"
] | null | null | null | import sys
one_kb = 1024
one_mb = 1024 * one_kb
one_gb = 1024 * one_mb
def generate_file_name(data_size, data_unit, iterations, finite_field, threads, generation_sizes, file_format):
# TODO: Update to new formating
name = '{!s}_{!s}_{!s}_{!s}_{!s}_{!s}.{!s}'.format(data_size, data_unit, iterations, finite_fi... | 30.288288 | 172 | 0.651398 |
896f59715a6a512763f9c3a86132ea45168c9157 | 2,227 | py | Python | lambda/lambda_function.py | rafty/Tool_DeleteCloudWatchStreams | a322f99dff5341dcd4e09f10bc1ff372a6ee8bb3 | [
"Apache-2.0"
] | null | null | null | lambda/lambda_function.py | rafty/Tool_DeleteCloudWatchStreams | a322f99dff5341dcd4e09f10bc1ff372a6ee8bb3 | [
"Apache-2.0"
] | null | null | null | lambda/lambda_function.py | rafty/Tool_DeleteCloudWatchStreams | a322f99dff5341dcd4e09f10bc1ff372a6ee8bb3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import datetime
import logging
import boto3
logger = logging.getLogger()
logger.setLevel(level=logging.INFO)
logs = boto3.client('logs')
def delete_stream(log_stream_name, log_group_name):
logger.info('delete_stream: {}'.format(log_stream_name))
logs.delete_log_stream(logGro... | 30.930556 | 74 | 0.668163 |
82d7dad39a157081c29ea65df03b70ba04caac5e | 2,677 | py | Python | docs/conf.py | noahkw/acmetk | 4bf6202babbfa1cf91801a8f1bd3ae3a02737799 | [
"MIT"
] | 3 | 2021-03-15T11:25:22.000Z | 2021-04-01T09:05:07.000Z | docs/conf.py | noahkw/acmetk | 4bf6202babbfa1cf91801a8f1bd3ae3a02737799 | [
"MIT"
] | 60 | 2021-03-16T13:28:56.000Z | 2021-04-03T14:07:31.000Z | docs/conf.py | noahkw/acmetk | 4bf6202babbfa1cf91801a8f1bd3ae3a02737799 | [
"MIT"
] | 1 | 2021-03-15T11:25:05.000Z | 2021-03-15T11:25:05.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 34.766234 | 79 | 0.650355 |
d45a9fa6099adddbf89fceabad24be3fddfeaf03 | 4,141 | py | Python | MIDI Remote Scripts/pushbase/select_playing_clip_component.py | aarkwright/ableton_devices | fe5df3bbd64ccbc136bba722ba1e131a02969798 | [
"MIT"
] | null | null | null | MIDI Remote Scripts/pushbase/select_playing_clip_component.py | aarkwright/ableton_devices | fe5df3bbd64ccbc136bba722ba1e131a02969798 | [
"MIT"
] | null | null | null | MIDI Remote Scripts/pushbase/select_playing_clip_component.py | aarkwright/ableton_devices | fe5df3bbd64ccbc136bba722ba1e131a02969798 | [
"MIT"
] | null | null | null | # uncompyle6 version 3.3.5
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
# Embedded file name: c:\Jenkins\live\output\win_64_static\Release\python-bundle\MIDI Remote Scripts\pushbase\select_playing_clip_component.py
# Compiled at: 2018-11-30 1... | 44.053191 | 179 | 0.725429 |
8f7cf23993a8603c1740a080c60588dbf81f24ca | 22,008 | py | Python | qa/rpc-tests/replace-by-fee.py | kazucoin/kazusilver | fc81623ed5fd5f9f9fd9ce85139201ece6a2332e | [
"MIT"
] | 1 | 2019-06-02T17:21:08.000Z | 2019-06-02T17:21:08.000Z | qa/rpc-tests/replace-by-fee.py | kazucoin/kazusilver | fc81623ed5fd5f9f9fd9ce85139201ece6a2332e | [
"MIT"
] | null | null | null | qa/rpc-tests/replace-by-fee.py | kazucoin/kazusilver | fc81623ed5fd5f9f9fd9ce85139201ece6a2332e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test replace by fee code
#
from test_framework.test_framework import KazuSilverTestFramework
from te... | 37.238579 | 105 | 0.601145 |
e8fe83bd571027b047b469e8a4ecfcce78e64de0 | 201 | py | Python | labsys/auth/__init__.py | gems-uff/labsys | b8990d7ef6377b6d34f66c277684af1ef94bd5c3 | [
"MIT"
] | 1 | 2017-05-04T17:32:17.000Z | 2017-05-04T17:32:17.000Z | labsys/auth/__init__.py | gems-uff/labsys | b8990d7ef6377b6d34f66c277684af1ef94bd5c3 | [
"MIT"
] | 19 | 2017-06-05T22:52:45.000Z | 2018-06-02T18:17:26.000Z | labsys/auth/__init__.py | gems-uff/labsys | b8990d7ef6377b6d34f66c277684af1ef94bd5c3 | [
"MIT"
] | null | null | null | from flask import Blueprint
from .models import Permission
blueprint = Blueprint('auth', __name__)
@blueprint.app_context_processor
def inject_permissions():
return dict(Permission=Permission)
| 18.272727 | 39 | 0.800995 |
9d6f0988f77643aac9c4eb6613c281c28d9e50fc | 7,950 | py | Python | tests/py_dss_interface/test_loadshapes.py | davilamds/py_dss_interface | a447c97787aeac962381db88dd622ccb235eef4b | [
"MIT"
] | 8 | 2020-08-15T12:56:03.000Z | 2022-01-04T15:51:14.000Z | tests/py_dss_interface/test_loadshapes.py | eniovianna/py_dss_interface | db1c5ee2ae04d525bfd77ecd9ff41028da6ac31a | [
"MIT"
] | 24 | 2021-04-24T18:33:19.000Z | 2021-11-13T14:59:54.000Z | tests/py_dss_interface/test_loadshapes.py | eniovianna/py_dss_interface | db1c5ee2ae04d525bfd77ecd9ff41028da6ac31a | [
"MIT"
] | 7 | 2020-08-15T12:56:04.000Z | 2021-10-04T16:14:30.000Z | # -*- coding: utf-8 -*-
# @Time : 7/30/2021 02:01 PM
# @Author : Rodolfo Londero
# @Email : rodolfpl@gmail.com
# @File : test_loadshapes.py
# @Software: PyCharm
import pytest
class TestLoadShapes13Bus:
@pytest.fixture(autouse=True)
def _request(self, solve_snap_13bus):
self.dss = solve_snap... | 35.810811 | 109 | 0.592704 |
b7625931fb1ae04b472a0c7f8b6435b8b6756b6a | 11,460 | py | Python | test/python/algorithms/test_phase_estimator.py | Drinion/qiskit-terra | c73c2bfe98a436b04afb77d8e39f59e02a8ff1ac | [
"Apache-2.0"
] | 1 | 2021-10-05T11:56:53.000Z | 2021-10-05T11:56:53.000Z | test/python/algorithms/test_phase_estimator.py | Drinion/qiskit-terra | c73c2bfe98a436b04afb77d8e39f59e02a8ff1ac | [
"Apache-2.0"
] | 24 | 2021-01-27T08:20:27.000Z | 2021-07-06T09:42:28.000Z | test/python/algorithms/test_phase_estimator.py | Drinion/qiskit-terra | c73c2bfe98a436b04afb77d8e39f59e02a8ff1ac | [
"Apache-2.0"
] | 4 | 2021-10-05T12:07:27.000Z | 2022-01-28T18:37:28.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 44.941176 | 97 | 0.644154 |
40e440287ec31f09f3ae90a99de3a69ffbdacc67 | 536 | py | Python | sentimentAnalyzer/util/FetchTweets.py | myneuronews/analyzer | 43e9474a45f6bdb861b8a6dbc965c3f9a418f1bf | [
"MIT"
] | 2 | 2020-07-22T15:37:47.000Z | 2021-04-06T03:37:15.000Z | sentimentAnalyzer/util/FetchTweets.py | myneuronews/analyzer | 43e9474a45f6bdb861b8a6dbc965c3f9a418f1bf | [
"MIT"
] | 1 | 2019-05-10T15:35:43.000Z | 2021-12-19T09:19:44.000Z | sentimentAnalyzer/util/FetchTweets.py | Amrindersingh1/Twitter-Sentiment-Analyzer | 43e9474a45f6bdb861b8a6dbc965c3f9a418f1bf | [
"MIT"
] | null | null | null | import tweepy
consumer_key = ""
consumer_secret = ""
access_token = ""
access_token_secret = ""
class FetchData():
def getTwitterData(self, tag):
try:
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
... | 19.851852 | 76 | 0.613806 |
cecfb71e9f304578c208fa1decd583c60bc9a23e | 465 | py | Python | security/tests/test_models.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | security/tests/test_models.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | security/tests/test_models.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.test import TestCase, Client
# TODO: Write tests for security models
class SecurityModelTests(TestCase):
def setUp(self):
self.client = Client()
User = get_user_model()
self.user = User.objects.create_user(username='FredFlintstone', email='aaron@xnovax.... | 42.272727 | 118 | 0.778495 |
9ff4101ab0c31c9ccfe448b0a7c10624d8b61434 | 10,866 | py | Python | tests/test_template.py | slicelife/shpkpr | 2fd8874f2b7dc44de309fb6466f7320fa8e0b3a5 | [
"MIT"
] | 17 | 2015-11-17T17:12:29.000Z | 2021-12-14T15:30:43.000Z | tests/test_template.py | slicelife/shpkpr | 2fd8874f2b7dc44de309fb6466f7320fa8e0b3a5 | [
"MIT"
] | 86 | 2015-11-18T15:59:52.000Z | 2020-10-01T10:19:36.000Z | tests/test_template.py | slicelife/shpkpr | 2fd8874f2b7dc44de309fb6466f7320fa8e0b3a5 | [
"MIT"
] | 2 | 2017-11-14T14:10:05.000Z | 2020-04-07T19:46:41.000Z | # third-party imports
import pytest
# local imports
from shpkpr.template import InvalidJSONError
from shpkpr.template import MissingTemplateError
from shpkpr.template import UndefinedError
from shpkpr.template import load_values_from_environment
from shpkpr.template import render_json_template
from shpkpr.template_fil... | 36.709459 | 103 | 0.716731 |
36e3cfcde64df8f2cd9fd9f672706ac16b906d47 | 15,043 | py | Python | afk-q-babyai/babyai/utils/wrapper.py | IouJenLiu/AFK | db2b47bb3a5614b61766114b87f143e4a61a4a8d | [
"MIT"
] | 1 | 2022-03-12T03:10:29.000Z | 2022-03-12T03:10:29.000Z | afk-q-babyai/babyai/utils/wrapper.py | IouJenLiu/AFK | db2b47bb3a5614b61766114b87f143e4a61a4a8d | [
"MIT"
] | null | null | null | afk-q-babyai/babyai/utils/wrapper.py | IouJenLiu/AFK | db2b47bb3a5614b61766114b87f143e4a61a4a8d | [
"MIT"
] | null | null | null |
from gym import RewardWrapper
import gym
import numpy as np
from ..info_seeking.knowledge_graph import KG
import random
class TransformReward(gym.Wrapper):
def __init__(self, env):
super(TransformReward, self).__init__(env)
self.count = 0
def step(self, action):
self.count += 1
... | 35.902148 | 148 | 0.56385 |
27b6d11a29c6def4e0fed4e69122760a340d7ec9 | 4,799 | py | Python | scripts/python/meta/tasks/proteomics/001_data_preparation.py | AaronBlare/dnam | 4d97c879cb24447eee0852eaf48fc5b3ef8e159b | [
"MIT"
] | null | null | null | scripts/python/meta/tasks/proteomics/001_data_preparation.py | AaronBlare/dnam | 4d97c879cb24447eee0852eaf48fc5b3ef8e159b | [
"MIT"
] | null | null | null | scripts/python/meta/tasks/proteomics/001_data_preparation.py | AaronBlare/dnam | 4d97c879cb24447eee0852eaf48fc5b3ef8e159b | [
"MIT"
] | null | null | null | import pandas as pd
from scripts.python.pheno.datasets.filter import filter_pheno, get_passed_fields
from scripts.python.pheno.datasets.features import get_column_name, get_default_statuses_ids, get_status_dict, get_default_statuses, get_sex_dict
from scripts.python.preprocessing.serialization.routines.pheno_betas_chec... | 44.435185 | 145 | 0.695562 |
7b9fef049c3b11477096b36c50ecd18d053b9054 | 1,487 | py | Python | setup.py | lilwebsite/bigwebsite-public | 4178f3cfb0d5575907fef0916c04c975687a48a5 | [
"MIT"
] | 1 | 2019-05-09T13:23:43.000Z | 2019-05-09T13:23:43.000Z | setup.py | lilwebsite/bigwebsite-public | 4178f3cfb0d5575907fef0916c04c975687a48a5 | [
"MIT"
] | null | null | null | setup.py | lilwebsite/bigwebsite-public | 4178f3cfb0d5575907fef0916c04c975687a48a5 | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
requires = [
'passlib',
'bcrypt',
'pyramid',
'pyramid_jinja2',
'pyramid_tm',
'SQLAlchemy',
'transaction',
'zope.sqlalchemy',
'zope.interface',
'waitress',
'gevent',
'gunicorn',
'Pil... | 22.19403 | 199 | 0.675857 |
3ee7b43ffb373d0c20082d7b251228b6d0e26484 | 2,909 | py | Python | models/object_detection/pytorch/maskrcnn/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/box_head/box_head.py | Pandinosaurus/models-intelai | 60f5712d79a363bdb7624e3116a66a4f1a7fe208 | [
"Apache-2.0"
] | 357 | 2019-01-23T23:54:30.000Z | 2022-03-31T05:32:25.000Z | models/object_detection/pytorch/maskrcnn/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/box_head/box_head.py | Pandinosaurus/models-intelai | 60f5712d79a363bdb7624e3116a66a4f1a7fe208 | [
"Apache-2.0"
] | 65 | 2019-02-06T15:35:35.000Z | 2022-03-25T09:56:48.000Z | models/object_detection/pytorch/maskrcnn/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/box_head/box_head.py | Pandinosaurus/models-intelai | 60f5712d79a363bdb7624e3116a66a4f1a7fe208 | [
"Apache-2.0"
] | 164 | 2019-02-06T15:05:57.000Z | 2022-03-31T11:48:14.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
from torch import nn
from .roi_box_feature_extractors import make_roi_box_feature_extractor
from .roi_box_predictors import make_roi_box_predictor
from .inference import make_roi_box_post_processor
from .loss import make_roi_box_loss_... | 38.786667 | 96 | 0.673771 |
348be9f78d0fb3e33122f6112552792f6f2adf78 | 1,899 | py | Python | tests/test_init.py | openefsa/asreview | aec14fcad0532a3989befe577ceb369a9dbba243 | [
"Apache-2.0"
] | null | null | null | tests/test_init.py | openefsa/asreview | aec14fcad0532a3989befe577ceb369a9dbba243 | [
"Apache-2.0"
] | 1 | 2020-04-16T09:01:40.000Z | 2020-04-16T09:01:40.000Z | tests/test_init.py | openefsa/asreview | aec14fcad0532a3989befe577ceb369a9dbba243 | [
"Apache-2.0"
] | 1 | 2020-03-04T12:16:53.000Z | 2020-03-04T12:16:53.000Z | from pathlib import Path
import numpy as np
from asreview.review.factory import get_reviewer
from asreview.data import ASReviewData
data_fp = Path("tests", "demo_data", "generic_labels.csv")
def test_init_seed():
base_start_idx = None
n_test = 4
seeds = np.random.randint(0, 2**63, 5)
for _ in rang... | 31.65 | 78 | 0.644023 |
244b4be9184e340f7b1a2b9411b2f5eb202b066d | 3,762 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/inspur/sm/plugins/modules/edit_ad_group.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/inspur/sm/plugins/modules/edit_ad_group.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/inspur/sm/plugins/modules/edit_ad_group.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding:utf-8 -*-
# Copyright (C) 2020 Inspur Inc. All Rights Reserved.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
module: edit_ad_... | 25.591837 | 107 | 0.611909 |
cd0379251e4f9d33859ac89dba5b176ee45808ed | 3,845 | py | Python | telegrambot/handlers/dispatcher.py | StudentiUniMi/backend | 7915de730b273ef36f1adca10b1c3cacff820faa | [
"MIT"
] | 5 | 2021-08-09T20:37:28.000Z | 2022-03-08T12:25:49.000Z | telegrambot/handlers/dispatcher.py | StudentiUniMi/backend | 7915de730b273ef36f1adca10b1c3cacff820faa | [
"MIT"
] | 4 | 2021-08-14T12:36:44.000Z | 2021-12-12T01:25:08.000Z | telegrambot/handlers/dispatcher.py | StudentiUniMi/backend | 7915de730b273ef36f1adca10b1c3cacff820faa | [
"MIT"
] | 2 | 2021-08-09T19:57:16.000Z | 2021-08-11T20:19:30.000Z | import logging as logg
from telegram import Update
from telegram.ext import (
MessageHandler,
Filters,
CommandHandler,
ChatMemberHandler,
CallbackQueryHandler,
Updater,
ChatJoinRequestHandler
)
from telegrambot.handlers import messages, members, moderation, errors, memes
LOG = logg.getLo... | 31.008065 | 80 | 0.706112 |
e9d63a9caabec7b8383885025a20cef0ffad3c58 | 7,076 | py | Python | python/http_client/v1/polyaxon_sdk/models/v1_event_video.py | polyaxon/polyaxon-client | d3cafc87428f3a55f12aac8ffe93dc0e1776f379 | [
"Apache-2.0"
] | 13 | 2017-11-22T21:45:15.000Z | 2021-03-09T16:35:03.000Z | python/http_client/v1/polyaxon_sdk/models/v1_event_video.py | polyaxon/polyaxon-client | d3cafc87428f3a55f12aac8ffe93dc0e1776f379 | [
"Apache-2.0"
] | 38 | 2017-12-18T15:42:26.000Z | 2020-07-01T18:09:15.000Z | python/http_client/v1/polyaxon_sdk/models/v1_event_video.py | polyaxon/polyaxon-client | d3cafc87428f3a55f12aac8ffe93dc0e1776f379 | [
"Apache-2.0"
] | 20 | 2017-12-11T12:48:53.000Z | 2021-12-03T07:11:43.000Z | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 27.533074 | 140 | 0.588327 |
7560e61c111f934562d8f781ebdf194f7d83637e | 12,912 | py | Python | draw_card/handles/prts_handle.py | NumberSir/nonebot_plugin_gamedraw | bc7a90703ec02d866e587453a92f1109c00bfab6 | [
"MIT"
] | null | null | null | draw_card/handles/prts_handle.py | NumberSir/nonebot_plugin_gamedraw | bc7a90703ec02d866e587453a92f1109c00bfab6 | [
"MIT"
] | null | null | null | draw_card/handles/prts_handle.py | NumberSir/nonebot_plugin_gamedraw | bc7a90703ec02d866e587453a92f1109c00bfab6 | [
"MIT"
] | null | null | null | import random
import re
from datetime import datetime
from typing import List, Optional, Tuple
from urllib.parse import unquote
import dateparser
from PIL import ImageDraw
from lxml import etree
from nonebot.adapters.onebot.v11 import Message, MessageSegment
from nonebot.log import logger
from pydantic impo... | 41.252396 | 186 | 0.498141 |
50e7d3fde8fef22733a8646340ab3a5176c68503 | 7,610 | py | Python | autogluon/utils/tabular/ml/models/knn/knn_utils.py | NunoEdgarGFlowHub/autogluon | 714894698495ef4352706d3c4250823ad4a43ead | [
"Apache-2.0"
] | 1 | 2020-08-20T08:30:15.000Z | 2020-08-20T08:30:15.000Z | autogluon/utils/tabular/ml/models/knn/knn_utils.py | NunoEdgarGFlowHub/autogluon | 714894698495ef4352706d3c4250823ad4a43ead | [
"Apache-2.0"
] | null | null | null | autogluon/utils/tabular/ml/models/knn/knn_utils.py | NunoEdgarGFlowHub/autogluon | 714894698495ef4352706d3c4250823ad4a43ead | [
"Apache-2.0"
] | null | null | null | import numpy as np
from pandas import DataFrame
from scipy.stats import mode
from sklearn.utils.extmath import weighted_mode
from .....try_import import try_import_faiss
import logging
logger = logging.getLogger(__name__)
# Rather than try to import non-public sklearn internals, we implement our own weighting func... | 36.411483 | 107 | 0.620368 |
a4fccbb108b086a5c3150578f474d018c8ea63d8 | 5,129 | py | Python | amazon-ec2/ec2-approved-regions/lambda/index.py | awslabs/aws-lambda-security-controls | c2e64889bc48e68d78664e4741e685c2812f6bbb | [
"MIT-0"
] | 46 | 2018-10-06T20:07:34.000Z | 2021-11-08T10:25:48.000Z | amazon-ec2/ec2-approved-regions/lambda/index.py | awslabs/aws-lambda-security-controls | c2e64889bc48e68d78664e4741e685c2812f6bbb | [
"MIT-0"
] | 1 | 2020-03-05T08:09:51.000Z | 2020-03-05T08:09:51.000Z | amazon-ec2/ec2-approved-regions/lambda/index.py | awslabs/aws-lambda-security-controls | c2e64889bc48e68d78664e4741e685c2812f6bbb | [
"MIT-0"
] | 32 | 2018-10-15T22:47:01.000Z | 2021-11-24T14:10:49.000Z | """
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy... | 38.856061 | 97 | 0.6783 |
5939114fd04db953a79fa6f63f2dc246c6172c86 | 1,791 | py | Python | setup.py | hjmjohnson/ITKShape | 87faabfee47b17c6355baa2637616c7c7bacf217 | [
"Apache-2.0"
] | 3 | 2021-04-18T03:57:44.000Z | 2022-03-28T19:47:06.000Z | setup.py | hjmjohnson/ITKShape | 87faabfee47b17c6355baa2637616c7c7bacf217 | [
"Apache-2.0"
] | 11 | 2021-03-08T13:24:38.000Z | 2021-03-19T20:20:34.000Z | setup.py | hjmjohnson/ITKShape | 87faabfee47b17c6355baa2637616c7c7bacf217 | [
"Apache-2.0"
] | 1 | 2021-12-17T19:16:34.000Z | 2021-12-17T19:16:34.000Z | # -*- coding: utf-8 -*-
from os import sys
try:
from skbuild import setup
except ImportError:
print('scikit-build is required to build from source.', file=sys.stderr)
print('Please run:', file=sys.stderr)
print('', file=sys.stderr)
print(' python -m pip install scikit-build')
sys.exit(1)
setu... | 36.55102 | 155 | 0.634841 |
d2d5859a664b19dc7783dd5fa31a21d116e7480e | 310 | py | Python | p1.py | eztwokey/laba6 | 06a9db939d592b257175dd693d204f1dda972d14 | [
"MIT"
] | null | null | null | p1.py | eztwokey/laba6 | 06a9db939d592b257175dd693d204f1dda972d14 | [
"MIT"
] | null | null | null | p1.py | eztwokey/laba6 | 06a9db939d592b257175dd693d204f1dda972d14 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
if __name__ == '__main__':
A = list(map(int, input().split()))
if len(A) != 10:
print("Неверный размер списка", file=sys.stderr)
exit(1)
s = 0
for item in A:
if abs(item) < 5:
s += item
print(s) | 20.666667 | 56 | 0.509677 |
782f774a25562daf707ae90b9a7ee4cbe1c43381 | 8,742 | py | Python | python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py | jacobtomlinson/cuxfilter | 0b88a6b609d993b8d11629763c35dfb2b2581927 | [
"Apache-2.0"
] | null | null | null | python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py | jacobtomlinson/cuxfilter | 0b88a6b609d993b8d11629763c35dfb2b2581927 | [
"Apache-2.0"
] | null | null | null | python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py | jacobtomlinson/cuxfilter | 0b88a6b609d993b8d11629763c35dfb2b2581927 | [
"Apache-2.0"
] | null | null | null | from typing import Tuple
from ..core_chart import BaseChart
from ....layouts import chart_view
class BaseStackedLine(BaseChart):
"""
No datatiles support in non_data_tiles plot charts
If dataset size is greater than a few thousand points,
scatter geos can crash the browser tabs, and is o... | 28.756579 | 78 | 0.469229 |
905a51ab6d5cd1dba178657af16b4bbef74f0399 | 52,445 | py | Python | venv/Lib/site-packages/matplotlib/__init__.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/matplotlib/__init__.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/matplotlib/__init__.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | """
An object-oriented plotting library.
A procedural interface is provided by the companion pyplot module,
which may be imported directly, e.g.::
import matplotlib.pyplot as plt
or using ipython::
ipython
at your terminal, followed by::
In [1]: %matplotlib
In [2]: import matplotlib... | 36.094288 | 81 | 0.608256 |
f52aaf184804047ec2df5b7e73354adcabe7f807 | 44,921 | py | Python | crossenv/__init__.py | xhochy/crossenv | 56ddd69bf0c81d0c494bc1ecc502eec784e0e50f | [
"MIT"
] | null | null | null | crossenv/__init__.py | xhochy/crossenv | 56ddd69bf0c81d0c494bc1ecc502eec784e0e50f | [
"MIT"
] | null | null | null | crossenv/__init__.py | xhochy/crossenv | 56ddd69bf0c81d0c494bc1ecc502eec784e0e50f | [
"MIT"
] | null | null | null | import venv
import os
import sysconfig
import glob
import sys
import shutil
from textwrap import dedent
import subprocess
import logging
import importlib
import types
from configparser import ConfigParser
import random
import shlex
import platform
import pprint
import re
from .utils import F
from . import utils
__ver... | 42.458412 | 93 | 0.583046 |
83431e6fd30e1f50a5c51e21bd56b46e1fad95cb | 10,747 | py | Python | doc/sphinxext/autosummary/generate.py | thorstenkranz/eegpy | 0f9461456999874abbb774896ca832eb27740a9d | [
"BSD-2-Clause-FreeBSD"
] | 10 | 2015-05-12T10:42:51.000Z | 2021-07-20T02:08:03.000Z | doc/sphinxext/autosummary/generate.py | thomastweets/PyMVPA | a9c05acd7569639bb636aed3c22a13b21559ca02 | [
"MIT"
] | 2 | 2015-11-19T11:36:30.000Z | 2018-03-21T05:00:09.000Z | doc/sphinxext/autosummary/generate.py | thomastweets/PyMVPA | a9c05acd7569639bb636aed3c22a13b21559ca02 | [
"MIT"
] | 2 | 2016-09-21T22:41:34.000Z | 2019-01-28T13:55:19.000Z | # -*- coding: utf-8 -*-
"""
sphinx.ext.autosummary.generate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Usable as a library or script to generate automatic RST source files for
items referred to in autosummary:: directives.
Each generated RST file contains a single auto*:: directive which
extracts the doc... | 34.335463 | 80 | 0.546757 |
654c44fb6dfeb35bcdf8b2fca71b6ae82c08c48c | 11,068 | py | Python | testing/test_browser.py | digitronik/widgetastic.core | f60bf150b8126cf5f7ce9aa81e10abdb380261ad | [
"Apache-2.0"
] | null | null | null | testing/test_browser.py | digitronik/widgetastic.core | f60bf150b8126cf5f7ce9aa81e10abdb380261ad | [
"Apache-2.0"
] | 2 | 2020-09-02T08:58:30.000Z | 2020-09-02T11:55:39.000Z | testing/test_browser.py | digitronik/widgetastic.core | f60bf150b8126cf5f7ce9aa81e10abdb380261ad | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import tempfile
from datetime import datetime
from pathlib import Path
import pytest
from widgetastic.browser import BrowserParentWrapper
from widgetastic.browser import WebElement
from widgetastic.exceptions import LocatorNotImplemented
from widgetastic.exceptions import NoSuchElementExceptio... | 30.240437 | 100 | 0.704825 |
30a1e0aa5664658562f4e7a10de0514f14875f83 | 4,346 | py | Python | serialization/annotate.py | BookLaugh/serialization | a3ff87aa2cd5b3322daee7ebee1e025783438b46 | [
"MIT"
] | 12 | 2016-03-01T15:04:08.000Z | 2020-11-23T14:49:32.000Z | serialization/annotate.py | BookLaugh/serialization | a3ff87aa2cd5b3322daee7ebee1e025783438b46 | [
"MIT"
] | 1 | 2020-11-23T15:31:24.000Z | 2020-11-23T19:46:50.000Z | serialization/annotate.py | BookLaugh/serialization | a3ff87aa2cd5b3322daee7ebee1e025783438b46 | [
"MIT"
] | 2 | 2020-11-23T14:45:38.000Z | 2020-11-23T17:03:48.000Z | # F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version... | 36.521008 | 76 | 0.664289 |
0c0d63be32a4257fa129d779096909a016b30efb | 3,471 | py | Python | rgb_to_pointcloud.py | wassimea/rgbd_pointcloud | 5b27ca1b28b545668cf29e0a93783ffa66d93335 | [
"MIT"
] | null | null | null | rgb_to_pointcloud.py | wassimea/rgbd_pointcloud | 5b27ca1b28b545668cf29e0a93783ffa66d93335 | [
"MIT"
] | null | null | null | rgb_to_pointcloud.py | wassimea/rgbd_pointcloud | 5b27ca1b28b545668cf29e0a93783ffa66d93335 | [
"MIT"
] | null | null | null | from utils_camera import *
import os
import math
import cv2
import numpy as np
import pyrealsense2 as rs
def colorize_depthmap(img_depth):
## colorize depth map for easy visualization
img_depth_normalized = cv2.normalize(img_depth.astype(np.float32), None, 0.0, 1.0, cv2.NORM_MINMAX) # convert to normalized ... | 28.68595 | 142 | 0.723423 |
081f99291a27e826b09f5bfc6df65577ffb91666 | 8,034 | py | Python | scan/test/fetch/link_finders/test_data/test_find_implicit_links.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/link_finders/test_data/test_find_implicit_links.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/link_finders/test_data/test_find_implicit_links.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 26.959732 | 79 | 0.55539 |
966747ef62dd478919880e67dc5e76896574a6e9 | 4,893 | py | Python | noxfile.py | supriome/furo | 2be6a9b7843fadb32a34605ec2337074eb623fc1 | [
"MIT"
] | null | null | null | noxfile.py | supriome/furo | 2be6a9b7843fadb32a34605ec2337074eb623fc1 | [
"MIT"
] | null | null | null | noxfile.py | supriome/furo | 2be6a9b7843fadb32a34605ec2337074eb623fc1 | [
"MIT"
] | null | null | null | """Development automation
"""
import datetime
import glob
import os
import tempfile
import nox
PACKAGE_NAME = "iluvatar"
nox.options.sessions = ["lint", "test"]
#
# Helpers
#
def _install_this_project_with_flit(session, *, extras=None, editable=False):
session.install("flit")
args = []
if extras:
... | 29.835366 | 99 | 0.633967 |
9374e1f74d269d4a23b59718ced33eaba52ad14c | 3,919 | py | Python | envs/doom/action_space.py | Zhehui-Huang/scalable_agent | 505909ad9f2d3e9bce8bb9201e05e780002428df | [
"Apache-2.0"
] | null | null | null | envs/doom/action_space.py | Zhehui-Huang/scalable_agent | 505909ad9f2d3e9bce8bb9201e05e780002428df | [
"Apache-2.0"
] | null | null | null | envs/doom/action_space.py | Zhehui-Huang/scalable_agent | 505909ad9f2d3e9bce8bb9201e05e780002428df | [
"Apache-2.0"
] | null | null | null | import gym
from gym.spaces import Discrete, Box
from algorithms.spaces.discretized import Discretized
def key_to_action_basic(key):
from pynput.keyboard import Key
table = {Key.left: 0, Key.right: 1, Key.up: 2, Key.down: 3}
return table.get(key, None)
def doom_action_space_basic():
"""
TURN_LEF... | 28.194245 | 117 | 0.61776 |
8e83e4b04d07b9d3c21c925fd61db823f0c08191 | 2,151 | py | Python | gallery/models.py | mary-wan/PhotoBay | 1fbfb88e168d40ed5d8e901d0a766041b7a72ae3 | [
"Unlicense"
] | 1 | 2022-01-17T13:27:02.000Z | 2022-01-17T13:27:02.000Z | gallery/models.py | mary-wan/PhotoBay | 1fbfb88e168d40ed5d8e901d0a766041b7a72ae3 | [
"Unlicense"
] | null | null | null | gallery/models.py | mary-wan/PhotoBay | 1fbfb88e168d40ed5d8e901d0a766041b7a72ae3 | [
"Unlicense"
] | null | null | null | from django.db import models
class Location(models.Model):
name = models.CharField(max_length=100)
def save_location(self):
self.save()
def delete_location(self):
self.delete()
@classmethod
def all_locations(cls):
locations = Location.objects.all()
return ... | 26.555556 | 125 | 0.651325 |
f1bd98d3171a4b6f2d0bb79e9d9c09e5df10a18c | 5,190 | py | Python | thermo/__init__.py | tedhyu/thermo | 1966c7cba5a603984b49f22c97ff00a144d90812 | [
"MIT"
] | 1 | 2021-03-05T23:39:47.000Z | 2021-03-05T23:39:47.000Z | thermo/__init__.py | tedhyu/thermo | 1966c7cba5a603984b49f22c97ff00a144d90812 | [
"MIT"
] | 1 | 2021-12-17T21:28:17.000Z | 2021-12-17T21:28:17.000Z | thermo/__init__.py | tedhyu/thermo | 1966c7cba5a603984b49f22c97ff00a144d90812 | [
"MIT"
] | 1 | 2022-01-18T16:14:59.000Z | 2022-01-18T16:14:59.000Z | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, 2017 Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to... | 32.4375 | 86 | 0.787669 |
b50916b69ad6312c335ba382dff65bf62d6b6f40 | 21,884 | py | Python | sec_groups/classgrps.py | toonsegers/sec_groups | 32541f8e365b8ed280133c5f88aafb09c5eb2790 | [
"MIT"
] | 3 | 2021-07-21T10:15:46.000Z | 2022-01-06T02:12:05.000Z | sec_groups/classgrps.py | toonsegers/sec_groups | 32541f8e365b8ed280133c5f88aafb09c5eb2790 | [
"MIT"
] | null | null | null | sec_groups/classgrps.py | toonsegers/sec_groups | 32541f8e365b8ed280133c5f88aafb09c5eb2790 | [
"MIT"
] | null | null | null | """Form class groups.
#TODO: add references to literature.
"""
import logging
from math import floor, sqrt, log, log2
from sec_groups.tools.secgcd import (
extended_euclid_xgcd,
secure_gcd,
secure_xgcd,
secure_binary_xgcd,
secure_division,
)
from sec_groups.tools.bitlen import bit_... | 27.151365 | 111 | 0.483961 |
87d5a13d433b07db4fa4546b305b4f8eba62dd4a | 7,212 | py | Python | audio_visual/train.py | Chilydream/deep_avsr | 17c9833145e108333932d0c7e0a9391d20dc16f9 | [
"MIT"
] | null | null | null | audio_visual/train.py | Chilydream/deep_avsr | 17c9833145e108333932d0c7e0a9391d20dc16f9 | [
"MIT"
] | null | null | null | audio_visual/train.py | Chilydream/deep_avsr | 17c9833145e108333932d0c7e0a9391d20dc16f9 | [
"MIT"
] | 1 | 2022-01-27T07:11:13.000Z | 2022-01-27T07:11:13.000Z | """
Author: Smeet Shah
Copyright (c) 2020 Smeet Shah
File part of 'deep_avsr' GitHub repository available at -
https://github.com/lordmartian/deep_avsr
"""
import torch
import torch.optim as optim
import torch.nn as nn
from torch.utils.data import DataLoader, random_split
import numpy as np
import matplotlib
import ma... | 44.795031 | 143 | 0.660566 |
b86bf12f27189c74a1d1b457b3db16d21ef4ccb0 | 11,957 | py | Python | ephypype/pipelines/fif_to_inv_sol.py | annapasca/ephypype | 6dbacdd6913234a28b690b401862ff062accecc7 | [
"BSD-3-Clause"
] | 18 | 2018-04-18T12:14:52.000Z | 2022-02-25T19:31:44.000Z | ephypype/pipelines/fif_to_inv_sol.py | annapasca/ephypype | 6dbacdd6913234a28b690b401862ff062accecc7 | [
"BSD-3-Clause"
] | 106 | 2017-12-09T13:34:30.000Z | 2022-03-12T01:02:17.000Z | ephypype/pipelines/fif_to_inv_sol.py | annapasca/ephypype | 6dbacdd6913234a28b690b401862ff062accecc7 | [
"BSD-3-Clause"
] | 13 | 2017-05-28T20:38:56.000Z | 2022-03-06T15:58:02.000Z | """
Inverse Solution Pipeline
"""
# Author: Annalisa Pascarella <a.pascarella@iac.cnr.it>
import nipype.pipeline.engine as pe
from nipype.interfaces.utility import IdentityInterface
from ..interfaces.mne.LF_computation import LFComputation
from ..interfaces.mne.Inverse_solution import NoiseCovariance
from ..interfac... | 40.670068 | 92 | 0.60935 |
d9fa357c209c49bc536c956b8bb6e94c5a3ea2a3 | 5,300 | py | Python | my-src/my_env.py | w121211/rlpyt | 9d603a8cbed5bd581c49a4163e342be9708e7bd2 | [
"MIT"
] | null | null | null | my-src/my_env.py | w121211/rlpyt | 9d603a8cbed5bd581c49a4163e342be9708e7bd2 | [
"MIT"
] | null | null | null | my-src/my_env.py | w121211/rlpyt | 9d603a8cbed5bd581c49a4163e342be9708e7bd2 | [
"MIT"
] | null | null | null | import os
from collections import namedtuple
import numpy as np
import torch
import torch.nn.functional as F
import atari_py
import cv2
from rlpyt.envs.base import Env, EnvStep
from rlpyt.spaces.int_box import IntBox
from rlpyt.spaces.float_box import FloatBox
from rlpyt.spaces.composite import Composite
from rlpyt.u... | 29.608939 | 85 | 0.577358 |
58640879da77cc68dd52bd6463f5312daa7f2b72 | 11,253 | py | Python | frameworks/cocos2d-x/build/android-build.py | pedrohenriquerls/cocos2d_ruby_binding | 52d929ddcd8e4b7f613c98d73477133952b8a7b0 | [
"MIT"
] | 20 | 2015-01-23T09:03:56.000Z | 2021-08-28T17:19:38.000Z | frameworks/cocos2d-x/build/android-build.py | pedrohenriquerls/cocos2d_ruby_binding | 52d929ddcd8e4b7f613c98d73477133952b8a7b0 | [
"MIT"
] | 3 | 2015-03-31T06:13:40.000Z | 2017-10-04T12:30:29.000Z | frameworks/cocos2d-x/build/android-build.py | pedrohenriquerls/cocos2d_ruby_binding | 52d929ddcd8e4b7f613c98d73477133952b8a7b0 | [
"MIT"
] | 16 | 2015-06-08T04:10:12.000Z | 2021-08-28T17:19:38.000Z | #!/usr/bin/python
# android-build.py
# Build android
import sys
import os, os.path
import shutil
from optparse import OptionParser
CPP_SAMPLES = ['cpp-empty-test', 'cpp-tests', 'game-controller-test']
LUA_SAMPLES = ['lua-empty-test', 'lua-tests', 'lua-game-controller-test']
ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES
cl... | 40.189286 | 200 | 0.660713 |
d81ccc7be06a2f9efba718df0b7f3f9ec8518198 | 19,622 | py | Python | implementations/dscgan/dscgan.py | lidotcircle/PyTorch-GAN | dcb95a05701f28a3b73ada35da4b8e7e72975642 | [
"MIT"
] | null | null | null | implementations/dscgan/dscgan.py | lidotcircle/PyTorch-GAN | dcb95a05701f28a3b73ada35da4b8e7e72975642 | [
"MIT"
] | null | null | null | implementations/dscgan/dscgan.py | lidotcircle/PyTorch-GAN | dcb95a05701f28a3b73ada35da4b8e7e72975642 | [
"MIT"
] | null | null | null | import argparse
import os, sys
import numpy as np
import itertools
import datetime
import time
import signal
import torchvision.transforms as transforms
from torchvision.transforms.functional import InterpolationMode
from torchvision.utils import save_image, make_grid
from torch.utils.data import DataLoader
from tor... | 47.168269 | 141 | 0.663184 |
c414ed5cf409a028adfd79fd29fff24a2361ead3 | 1,080 | py | Python | database/database.py | kurtesy/ibm_phone_book | 53b87b6224f73eae7430bba0bed4763197bd9dc0 | [
"MIT"
] | null | null | null | database/database.py | kurtesy/ibm_phone_book | 53b87b6224f73eae7430bba0bed4763197bd9dc0 | [
"MIT"
] | null | null | null | database/database.py | kurtesy/ibm_phone_book | 53b87b6224f73eae7430bba0bed4763197bd9dc0 | [
"MIT"
] | null | null | null | import os
from config.dev import db, meta, session, Base, DB_NAME
from data_model.phone_book_model import PhoneBook
# Data to initialize database with
TEST_DATA = [
{"_id": 1, "sur_name": "Patel", "first_name": "Nishant", "phone_number": 1234567890, "address": "Hyderabad"},
{"_id": 2, "sur_name": "abc",... | 37.241379 | 114 | 0.643519 |
efd658e64aefbef24cd9917769c3726292074199 | 320 | py | Python | source/python/Fibonacci.py | JoHyukJun/algorithm-analysis | 3eda22ce0eeb52490702206d73c04cff1eb3e72d | [
"Apache-2.0"
] | null | null | null | source/python/Fibonacci.py | JoHyukJun/algorithm-analysis | 3eda22ce0eeb52490702206d73c04cff1eb3e72d | [
"Apache-2.0"
] | null | null | null | source/python/Fibonacci.py | JoHyukJun/algorithm-analysis | 3eda22ce0eeb52490702206d73c04cff1eb3e72d | [
"Apache-2.0"
] | null | null | null | '''
main.py
Created by JO HYUK JUN on 2021
Copyright © 2021 JO HYUK JUN. All rights reserved.
'''
import sys
n = int(sys.stdin.readline())
arr = [0 for _ in range(n + 1)]
arr[0] = 0
if n < 1:
print(0)
arr[1] = 1
for i in range(2, n + 1):
arr[i] = arr[i - 1] + arr[i - 2]
print(arr[n]) | 11.851852 | 54 | 0.5375 |
6e5ff50268172c5ad17bacb169b78c3429d47adf | 74 | py | Python | aiopg/sa/utils.py | arssher/aiopg | ed69a066608ac4788b2bc8a0cdd03690f22adb3a | [
"BSD-2-Clause"
] | 1,307 | 2015-01-06T15:52:21.000Z | 2022-03-25T16:04:53.000Z | aiopg/sa/utils.py | arssher/aiopg | ed69a066608ac4788b2bc8a0cdd03690f22adb3a | [
"BSD-2-Clause"
] | 765 | 2015-01-11T10:17:57.000Z | 2022-01-29T13:04:30.000Z | aiopg/sa/utils.py | arssher/aiopg | ed69a066608ac4788b2bc8a0cdd03690f22adb3a | [
"BSD-2-Clause"
] | 194 | 2015-02-20T09:29:30.000Z | 2022-03-03T19:49:19.000Z | import sqlalchemy
SQLALCHEMY_VERSION = sqlalchemy.__version__.split(".")
| 18.5 | 54 | 0.810811 |
c12f4e5ce07891d645671de7f9d5eb1e358271cc | 5,894 | py | Python | google/cloud/gsuiteaddons/v1/google-cloud-workspace-add-ons-v1-py/google/cloud/workspace_add_ons_v1/services/g_suite_add_ons/pagers.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/gsuiteaddons/v1/google-cloud-workspace-add-ons-v1-py/google/cloud/workspace_add_ons_v1/services/g_suite_add_ons/pagers.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/gsuiteaddons/v1/google-cloud-workspace-add-ons-v1-py/google/cloud/workspace_add_ons_v1/services/g_suite_add_ons/pagers.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 41.801418 | 95 | 0.685443 |
8a40acd4ddaeef48f8ce9e810da753a133fe18c9 | 4,278 | py | Python | sdk/python/pulumi_alicloud/cdn/get_real_time_log_deliveries.py | pulumi/pulumi-alicloud | 9c34d84b4588a7c885c6bec1f03b5016e5a41683 | [
"ECL-2.0",
"Apache-2.0"
] | 42 | 2019-03-18T06:34:37.000Z | 2022-03-24T07:08:57.000Z | sdk/python/pulumi_alicloud/cdn/get_real_time_log_deliveries.py | pulumi/pulumi-alicloud | 9c34d84b4588a7c885c6bec1f03b5016e5a41683 | [
"ECL-2.0",
"Apache-2.0"
] | 152 | 2019-04-15T21:03:44.000Z | 2022-03-29T18:00:57.000Z | sdk/python/pulumi_alicloud/cdn/get_real_time_log_deliveries.py | pulumi/pulumi-alicloud | 9c34d84b4588a7c885c6bec1f03b5016e5a41683 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2020-08-26T17:30:07.000Z | 2021-07-05T01:37:45.000Z | # 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 34.780488 | 164 | 0.665498 |
4ccb5f9361c46989c3350698964b0d63e42a4d49 | 15,020 | py | Python | src/8/xor_mlp_td.py | foxtrotmike/dissecting-reinforcement-learning | bee294f41e8a4c152d5dd8730eb2e268a46e6f92 | [
"MIT"
] | null | null | null | src/8/xor_mlp_td.py | foxtrotmike/dissecting-reinforcement-learning | bee294f41e8a4c152d5dd8730eb2e268a46e6f92 | [
"MIT"
] | null | null | null | src/8/xor_mlp_td.py | foxtrotmike/dissecting-reinforcement-learning | bee294f41e8a4c152d5dd8730eb2e268a46e6f92 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#MIT License
#Copyright (c) 2017 Massimiliano Patacchiola
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#t... | 45.932722 | 139 | 0.563981 |
ee20f70c1b2edb508a4480e802a1a38ed721a53b | 9,038 | py | Python | yambopy/integration_tests/itest_si_bse.py | QU-XIAO/yambopy | ff65a4f90c1bfefe642ebc61e490efe781709ff9 | [
"BSD-3-Clause"
] | 21 | 2016-04-07T20:53:29.000Z | 2021-05-14T08:06:02.000Z | yambopy/integration_tests/itest_si_bse.py | alexmoratalla/yambopy | 8ec0e1e18868ccaadb3eab36c55e6a47021e257d | [
"BSD-3-Clause"
] | 22 | 2016-06-14T22:29:47.000Z | 2021-09-16T15:36:26.000Z | yambopy/integration_tests/itest_si_bse.py | alexmoratalla/yambopy | 8ec0e1e18868ccaadb3eab36c55e6a47021e257d | [
"BSD-3-Clause"
] | 15 | 2016-06-14T18:40:57.000Z | 2021-08-07T13:17:43.000Z | #
# Author: Henrique Pereira Coutada Miranda
# Tests for yambopy
# Si
#
from __future__ import print_function
import matplotlib
import unittest
import sys
import os
import shutil
import argparse
import subprocess
import filecmp
import shutil as sh
import yambopy
from yambopy import *
from qepy import *
reference_dir =... | 35.167315 | 103 | 0.590175 |
d6dc233f813319057836bf1c618cd720e3f231b7 | 1,150 | py | Python | bin/setup_transactionlogs.py | jacquayj/sheepdog | 6d6d98a17cab9bcc8881079ced9065036c757eee | [
"Apache-2.0"
] | null | null | null | bin/setup_transactionlogs.py | jacquayj/sheepdog | 6d6d98a17cab9bcc8881079ced9065036c757eee | [
"Apache-2.0"
] | null | null | null | bin/setup_transactionlogs.py | jacquayj/sheepdog | 6d6d98a17cab9bcc8881079ced9065036c757eee | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Script to set up report database
"""
import argparse
from sqlalchemy import create_engine
from gdcdatamodel.models.submission import Base
def setup(host, user, password, database):
engine = create_engine(
"postgres://{user}:{password}@{host}/{database}".format(
user=... | 25 | 88 | 0.623478 |
f48b79b25ecf50d954e4c146d713955ec98a605b | 5,686 | py | Python | tests/server_test.py | strophy/thumbor_dash | 54b2ae14b5e8f60a811a7328ff51524f6dc71b1a | [
"MIT"
] | 2 | 2021-09-17T13:17:09.000Z | 2021-10-03T14:00:00.000Z | tests/server_test.py | strophy/thumbor_dash | 54b2ae14b5e8f60a811a7328ff51524f6dc71b1a | [
"MIT"
] | 1 | 2022-01-24T01:05:00.000Z | 2022-02-09T00:35:30.000Z | tests/server_test.py | strophy/thumbor_dash | 54b2ae14b5e8f60a811a7328ff51524f6dc71b1a | [
"MIT"
] | 2 | 2021-09-17T13:17:12.000Z | 2021-09-22T13:21:57.000Z |
from unittest import TestCase
import mock
from preggy import expect
import thumbor_dash.server
from tests.fixtures.custom_error_handler import ErrorHandler as CustomErrorHandler
from thumbor_dash.app import ThumborDashServiceApp
from thumbor.config import Config
from thumbor_dash.server import (
configure_log,
... | 38.161074 | 139 | 0.690468 |
008388e29098a4509cc43b4924630892547a7eb1 | 708 | py | Python | system/migrations/0002_auto_20180601_2250.py | 17621368758/tranpathPY | 01cf371c260275811e3750de116fa5b95718bafe | [
"MIT"
] | 1 | 2020-06-05T16:01:21.000Z | 2020-06-05T16:01:21.000Z | system/migrations/0002_auto_20180601_2250.py | 17621368758/tranpathPY | 01cf371c260275811e3750de116fa5b95718bafe | [
"MIT"
] | 4 | 2020-02-11T23:27:37.000Z | 2021-12-13T19:52:11.000Z | system/migrations/0002_auto_20180601_2250.py | 17621368758/tranpathPY | 01cf371c260275811e3750de116fa5b95718bafe | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2018-06-01 22:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('system', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='excel_import_file_fields_name',
name='co... | 29.5 | 119 | 0.615819 |
1d1760600d63e2b9f4229cb928e584b4ca353cd7 | 2,017 | py | Python | dos/inference.py | unhochoi/dos | 39969a8761fdfc216f95587e6542b9a3ccbc0f45 | [
"Apache-2.0"
] | 1 | 2021-11-20T10:53:32.000Z | 2021-11-20T10:53:32.000Z | dos/inference.py | unhochoi/dos | 39969a8761fdfc216f95587e6542b9a3ccbc0f45 | [
"Apache-2.0"
] | null | null | null | dos/inference.py | unhochoi/dos | 39969a8761fdfc216f95587e6542b9a3ccbc0f45 | [
"Apache-2.0"
] | 1 | 2022-01-04T05:02:31.000Z | 2022-01-04T05:02:31.000Z | # Dense Or Sparse : inference
# Load python packages
# 1. Basic data processing packages
import numpy as np
import pickle
# 2. Machine learning packages
from sklearn.preprocessing import MinMaxScaler
# 3. Deep learning package
import tensorflow as tf
# 4. Other Packages
import argparse
# Setting Argument
parser = arg... | 28.814286 | 83 | 0.736738 |
53298b4f533b85b0a688419045355c9c5a688fa2 | 6,799 | py | Python | data/p3BR/R2/benchmark/startQiskit274.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit274.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit274.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=57
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from... | 31.331797 | 140 | 0.636123 |
797b5256f945c28fd586b612a1fa3d6f2a7d0beb | 3,991 | py | Python | alipay/aop/api/request/AlipayEbppInvoiceTitleBatchqueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayEbppInvoiceTitleBatchqueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayEbppInvoiceTitleBatchqueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayEbppInvoiceTitleBatchqueryModel import AlipayEbppInvoiceTitleBatchqueryModel
class AlipayEbppInvoiceTitleBatchqueryRequest(obj... | 27.524138 | 148 | 0.646455 |
898b09dd479a6c3be0ced74c9bdc4d24f2ba0f63 | 362 | py | Python | tests/test_mapped_sequence_declaration.py | lcopey/SimpleTable | 61f4ca0a62b5c562e751a12fc83dfeacb47897f4 | [
"MIT"
] | null | null | null | tests/test_mapped_sequence_declaration.py | lcopey/SimpleTable | 61f4ca0a62b5c562e751a12fc83dfeacb47897f4 | [
"MIT"
] | null | null | null | tests/test_mapped_sequence_declaration.py | lcopey/SimpleTable | 61f4ca0a62b5c562e751a12fc83dfeacb47897f4 | [
"MIT"
] | null | null | null | import unittest
from table import MappedSequence
class TestMappedSequence(unittest.TestCase):
def test_init(self):
self.assertIsNotNone(MappedSequence(values=(0, 1, 2), keys=['a', 'b', 'c']))
self.assertIsNotNone(MappedSequence(values=(0, 1, 2)))
self.assertRaises(AssertionError, MappedSeq... | 36.2 | 92 | 0.685083 |
a1ef78c62ae6a67f63180d6c6f63ff61ed6480b5 | 5,349 | py | Python | compareSampleSets.py | bsaintjo/mesa | 64e2e969c765845ea6259350483008a6400d1bfa | [
"MIT"
] | null | null | null | compareSampleSets.py | bsaintjo/mesa | 64e2e969c765845ea6259350483008a6400d1bfa | [
"MIT"
] | null | null | null | compareSampleSets.py | bsaintjo/mesa | 64e2e969c765845ea6259350483008a6400d1bfa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
########################################################################
# File: compareSampleSets.py
# executable:
# Purpose:
#
#
# Author: Cameron M. Soulette
# History: cms 01/08/2020 Created
#
########################################################################
######... | 31.280702 | 157 | 0.529632 |
3d4c3fbbe1bc462bc7133f3c7c96e805357123c9 | 362 | py | Python | usage-advanced.py | kinimesi/dash-cytoscape | ce05beab9330e686b1c279be2a675a78e4f87ae7 | [
"MIT"
] | 432 | 2018-10-29T19:57:48.000Z | 2022-03-31T21:34:48.000Z | usage-advanced.py | kinimesi/dash-cytoscape | ce05beab9330e686b1c279be2a675a78e4f87ae7 | [
"MIT"
] | 126 | 2018-10-29T20:00:10.000Z | 2022-03-31T04:01:14.000Z | usage-advanced.py | kinimesi/dash-cytoscape | ce05beab9330e686b1c279be2a675a78e4f87ae7 | [
"MIT"
] | 107 | 2018-12-16T08:13:28.000Z | 2022-03-31T04:35:18.000Z | import dash
from demos.editor.callbacks import assign_callbacks
from demos.editor.layout import layout as cytoscape_layout
app = dash.Dash(__name__)
server = app.server
app.scripts.config.serve_locally = True
app.css.config.serve_locally = True
app.layout = cytoscape_layout
assign_callbacks(app)
if __name__ == '... | 19.052632 | 58 | 0.792818 |
585b77be105d5b558282744f0f88da332c903162 | 17,549 | py | Python | geopandas/tests/test_pandas_methods.py | raybellwaves/geopandas | 7997837abdad0e312818a3f11027a2df9b685840 | [
"BSD-3-Clause"
] | 2 | 2021-10-05T13:43:59.000Z | 2022-02-27T14:37:17.000Z | geopandas/tests/test_pandas_methods.py | raybellwaves/geopandas | 7997837abdad0e312818a3f11027a2df9b685840 | [
"BSD-3-Clause"
] | 2 | 2021-07-09T00:47:43.000Z | 2021-07-09T00:49:53.000Z | geopandas/tests/test_pandas_methods.py | Zeroto521/geopandas | 592abf7f596ef4cf9b78c2706f69e83d8005821f | [
"BSD-3-Clause"
] | 2 | 2021-09-09T14:38:36.000Z | 2021-10-05T13:44:00.000Z | import os
import numpy as np
from numpy.testing import assert_array_equal
import pandas as pd
import shapely
from shapely.geometry import Point, GeometryCollection
import geopandas
from geopandas import GeoDataFrame, GeoSeries
import geopandas._compat as compat
from geopandas.array import from_shapely
from geopanda... | 29.998291 | 88 | 0.653769 |
43af19a12518ad21cdb7cc8255d8bba8b05aa1e7 | 91 | py | Python | surfice.app/Contents/Resources/script/startup_track.py | ningfei/surf-ice | 11a978d922f53abd02c0aa1b6896443f7f1af9e1 | [
"BSD-2-Clause"
] | null | null | null | surfice.app/Contents/Resources/script/startup_track.py | ningfei/surf-ice | 11a978d922f53abd02c0aa1b6896443f7f1af9e1 | [
"BSD-2-Clause"
] | null | null | null | surfice.app/Contents/Resources/script/startup_track.py | ningfei/surf-ice | 11a978d922f53abd02c0aa1b6896443f7f1af9e1 | [
"BSD-2-Clause"
] | null | null | null | import gl
gl.resetdefaults()
gl.trackload('stroke.trk.gz');
gl.trackprefs(15, 3, 0.5);
| 18.2 | 31 | 0.681319 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.