hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
600de579e9f074f3a42976d366b7423013a654a6 | 5,270 | py | Python | exercise-09/programming_assignment/hopfield.py | AleRiccardi/technical-neural-network-course | bfcca623a9dc3f7f4c20e1efe39abe986cd8869e | [
"Apache-2.0"
] | null | null | null | exercise-09/programming_assignment/hopfield.py | AleRiccardi/technical-neural-network-course | bfcca623a9dc3f7f4c20e1efe39abe986cd8869e | [
"Apache-2.0"
] | null | null | null | exercise-09/programming_assignment/hopfield.py | AleRiccardi/technical-neural-network-course | bfcca623a9dc3f7f4c20e1efe39abe986cd8869e | [
"Apache-2.0"
] | null | null | null | import numpy as np
import random
letter_C = np.array([
[1, 1, 1, 1, 1],
[1, 0, 0, 0, 0],
[1, 0, 0, 0, 0],
[1, 0, 0, 0, 0],
[1, 1, 1, 1, 1],
])
noisy_C = np.array([
[1, 1, 1, 1, 1],
[0, 1, 0, 0, 1],
[1, 0, 0, 0, 0],
[1, 0, 0, 1, 0],
[1, 0, 1, 1, 1],
])
letter_I = np.array([
... | 27.164948 | 99 | 0.493548 |
600fae89534379bad1faa45aa725f0ecd7646d79 | 142 | py | Python | util/infoclient/test_infoclient.py | cdla/murfi2 | 45dba5eb90e7f573f01706a50e584265f0f8ffa7 | [
"Apache-2.0"
] | 7 | 2015-02-10T17:00:49.000Z | 2021-07-27T22:09:43.000Z | util/infoclient/test_infoclient.py | cdla/murfi2 | 45dba5eb90e7f573f01706a50e584265f0f8ffa7 | [
"Apache-2.0"
] | 11 | 2015-02-22T19:15:53.000Z | 2021-08-04T17:26:18.000Z | util/infoclient/test_infoclient.py | cdla/murfi2 | 45dba5eb90e7f573f01706a50e584265f0f8ffa7 | [
"Apache-2.0"
] | 8 | 2015-07-06T22:31:51.000Z | 2019-04-22T21:22:07.000Z |
from infoclientLib import InfoClient
ic = InfoClient('localhost', 15002, 'localhost', 15003)
ic.add('roi-weightedave', 'active')
ic.start()
| 20.285714 | 55 | 0.739437 |
60108a3d3357ef01dab42a6e413205a5ad651ed5 | 13,095 | py | Python | lrtc_lib/experiment_runners/experiment_runner.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 57 | 2020-11-18T15:13:06.000Z | 2022-03-28T22:33:26.000Z | lrtc_lib/experiment_runners/experiment_runner.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 5 | 2021-02-23T22:11:07.000Z | 2021-12-13T00:13:48.000Z | lrtc_lib/experiment_runners/experiment_runner.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 14 | 2021-02-10T08:55:27.000Z | 2022-02-23T22:37:54.000Z | # (c) Copyright IBM Corporation 2020.
# LICENSE: Apache License 2.0 (Apache-2.0)
# http://www.apache.org/licenses/LICENSE-2.0
import abc
import logging
import time
from collections import defaultdict
from typing import List
import numpy as np
from dataclasses import dataclass
logging.basicConfig(level=logging.INFO,... | 52.590361 | 136 | 0.72333 |
6011674256a1e396b16faca45277694f253b2c3f | 909 | py | Python | contrast/environment/data.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | contrast/environment/data.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | 2 | 2018-09-19T06:49:03.000Z | 2019-06-28T10:47:37.000Z | contrast/environment/data.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | try:
from tango import DeviceProxy, DevError
except ModuleNotFoundError:
pass
| 25.25 | 79 | 0.581958 |
60121c6217810f4a6299e69b2f99282f9e977749 | 1,504 | py | Python | game_2048/views.py | fung04/csrw_game | 9673fdd311583057d5bf756dec7b99959d961d0c | [
"MIT"
] | null | null | null | game_2048/views.py | fung04/csrw_game | 9673fdd311583057d5bf756dec7b99959d961d0c | [
"MIT"
] | null | null | null | game_2048/views.py | fung04/csrw_game | 9673fdd311583057d5bf756dec7b99959d961d0c | [
"MIT"
] | null | null | null | import json
from django.contrib.auth.models import User
from django.http import JsonResponse
from django.shortcuts import redirect, render
from .models import Game2048
# Create your views here.
# test_user
# 8!S#5RP!WVMACg
| 27.851852 | 84 | 0.672207 |
60125a0886f4a69344f97e125b44faf6103792e1 | 319 | py | Python | distdeepq/__init__.py | Silvicek/distributional-dqn | 41a9095393dd25b7375119b4af7d2c35ee3ec6cc | [
"MIT"
] | 131 | 2017-09-16T02:06:44.000Z | 2022-03-23T08:09:56.000Z | distdeepq/__init__.py | Silvicek/distributional-dqn | 41a9095393dd25b7375119b4af7d2c35ee3ec6cc | [
"MIT"
] | 6 | 2017-10-26T09:36:00.000Z | 2019-03-15T06:23:17.000Z | distdeepq/__init__.py | Silvicek/distributional-dqn | 41a9095393dd25b7375119b4af7d2c35ee3ec6cc | [
"MIT"
] | 29 | 2017-09-16T02:30:27.000Z | 2020-04-12T03:12:39.000Z | from distdeepq import models # noqa
from distdeepq.build_graph import build_act, build_train # noqa
from distdeepq.simple import learn, load, make_session # noqa
from distdeepq.replay_buffer import ReplayBuffer, PrioritizedReplayBuffer # noqa
from distdeepq.static import *
from distdeepq.plots import PlotMachine
| 39.875 | 81 | 0.827586 |
6012d662e5b654522d75f6dba733bb788998a6c0 | 812 | py | Python | python/10.Authentication-&-API-Keys.py | 17nikhil/codecademy | 58fbd652691c9df8139544965ebb0e9748142538 | [
"Apache-2.0"
] | null | null | null | python/10.Authentication-&-API-Keys.py | 17nikhil/codecademy | 58fbd652691c9df8139544965ebb0e9748142538 | [
"Apache-2.0"
] | null | null | null | python/10.Authentication-&-API-Keys.py | 17nikhil/codecademy | 58fbd652691c9df8139544965ebb0e9748142538 | [
"Apache-2.0"
] | 1 | 2018-10-03T14:36:31.000Z | 2018-10-03T14:36:31.000Z | # Authentication & API Keys
# Many APIs require an API key. Just as a real-world key allows you to access something, an API key grants you access to a particular API. Moreover, an API key identifies you to the API, which helps the API provider keep track of how their service is used and prevent unauthorized or maliciou... | 81.2 | 303 | 0.777094 |
601367658aacd910181efee0a2e8d64036a1544b | 111 | py | Python | plucker/__init__.py | takkaria/json-plucker | 6407dcc9a21d99d8f138128e9ee80c901a08c2e1 | [
"MIT"
] | null | null | null | plucker/__init__.py | takkaria/json-plucker | 6407dcc9a21d99d8f138128e9ee80c901a08c2e1 | [
"MIT"
] | 1 | 2021-03-09T20:57:15.000Z | 2021-03-09T20:57:15.000Z | plucker/__init__.py | takkaria/plucker-python | 6407dcc9a21d99d8f138128e9ee80c901a08c2e1 | [
"MIT"
] | null | null | null | from .plucker import pluck, Path
from .exceptions import PluckError
__all__ = ["pluck", "Path", "PluckError"]
| 22.2 | 41 | 0.738739 |
6013883d7068c2a00e5b4b40942f112984e3413c | 7,417 | py | Python | arviz/plots/pairplot.py | gimbo/arviz | c1df1847aa5170ad2810ae3d705d576d2643e3ec | [
"Apache-2.0"
] | null | null | null | arviz/plots/pairplot.py | gimbo/arviz | c1df1847aa5170ad2810ae3d705d576d2643e3ec | [
"Apache-2.0"
] | null | null | null | arviz/plots/pairplot.py | gimbo/arviz | c1df1847aa5170ad2810ae3d705d576d2643e3ec | [
"Apache-2.0"
] | null | null | null | """Plot a scatter or hexbin of sampled parameters."""
import warnings
import numpy as np
from ..data import convert_to_dataset, convert_to_inference_data
from .plot_utils import xarray_to_ndarray, get_coords, get_plotting_function
from ..utils import _var_names
def plot_pair(
data,
group="posterior",
var... | 33.40991 | 99 | 0.62559 |
60140da7c5e11ee07c450ac06ede300441a124ba | 542 | py | Python | cuestionario/formularios.py | LisandroCanteros/Grupo2_COM06_Info2021 | 86ad9e08db4e8935bf397b6e4db0b3d9d72cb320 | [
"MIT"
] | null | null | null | cuestionario/formularios.py | LisandroCanteros/Grupo2_COM06_Info2021 | 86ad9e08db4e8935bf397b6e4db0b3d9d72cb320 | [
"MIT"
] | null | null | null | cuestionario/formularios.py | LisandroCanteros/Grupo2_COM06_Info2021 | 86ad9e08db4e8935bf397b6e4db0b3d9d72cb320 | [
"MIT"
] | 1 | 2021-09-05T23:29:56.000Z | 2021-09-05T23:29:56.000Z | from django.forms import ModelForm
from .models import Cuestionario, Categoria
from preguntas.models import Pregunta, Respuesta
| 20.846154 | 48 | 0.673432 |
6015330e90658ef9cb434f3116ddc5c99e3f87e7 | 6,403 | py | Python | vitcloud/views.py | biocross/VITCloud | 9656bd489c6d05717bf529d0661e07da0cd2551a | [
"MIT"
] | 2 | 2016-10-09T09:16:39.000Z | 2017-12-30T10:04:24.000Z | vitcloud/views.py | biocross/VITCloud | 9656bd489c6d05717bf529d0661e07da0cd2551a | [
"MIT"
] | 1 | 2015-03-28T12:10:24.000Z | 2015-03-28T19:19:00.000Z | vitcloud/views.py | biocross/VITCloud | 9656bd489c6d05717bf529d0661e07da0cd2551a | [
"MIT"
] | null | null | null | from django.views.generic import View
from django.http import HttpResponse
import os, json, datetime
from django.shortcuts import redirect
from django.shortcuts import render_to_response
from vitcloud.models import File
from django.views.decorators.csrf import csrf_exempt
from listingapikeys import findResult
import sy... | 37.444444 | 215 | 0.629705 |
6015c9596e351a0acc5020ff9d107cce20445519 | 406 | py | Python | blurple/ui/base.py | jeremytiki/blurple.py | c8f65955539cc27be588a06592b1c81c03f59c37 | [
"MIT"
] | 4 | 2021-06-30T19:58:59.000Z | 2021-07-27T13:43:49.000Z | blurple/ui/base.py | jeremytiki/blurple.py | c8f65955539cc27be588a06592b1c81c03f59c37 | [
"MIT"
] | 2 | 2021-07-10T16:08:25.000Z | 2021-07-12T02:15:40.000Z | blurple/ui/base.py | jeremytiki/blurple.py | c8f65955539cc27be588a06592b1c81c03f59c37 | [
"MIT"
] | 3 | 2021-07-08T03:00:40.000Z | 2021-09-08T19:57:50.000Z | from abc import ABC
import discord
| 29 | 119 | 0.669951 |
601651a2b4d6d062db448e75989e40e985eb13df | 1,661 | py | Python | migrations/versions/e86dd3bc539c_change_admin_to_boolean.py | jonzxz/project-piscator | 588c8b1ac9355f9a82ac449fdbeaa1ef7eb441ef | [
"MIT"
] | null | null | null | migrations/versions/e86dd3bc539c_change_admin_to_boolean.py | jonzxz/project-piscator | 588c8b1ac9355f9a82ac449fdbeaa1ef7eb441ef | [
"MIT"
] | null | null | null | migrations/versions/e86dd3bc539c_change_admin_to_boolean.py | jonzxz/project-piscator | 588c8b1ac9355f9a82ac449fdbeaa1ef7eb441ef | [
"MIT"
] | 1 | 2021-02-18T03:08:21.000Z | 2021-02-18T03:08:21.000Z | """change admin to boolean
Revision ID: e86dd3bc539c
Revises: 6f63ef516cdc
Create Date: 2020-11-11 22:32:00.707936
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e86dd3bc539c'
down_revision = '6f63ef516cdc'
branch_labels = None
depends_on = None
| 38.627907 | 102 | 0.712222 |
601677ed1a2084da8bff806075ddd7b027330006 | 388 | py | Python | school/migrations/0010_alter_sala_unique_together.py | adrianomqsmts/django-escola | a69541bceb3f30bdd2e9f0f41aa9c2da6081a1d1 | [
"MIT"
] | null | null | null | school/migrations/0010_alter_sala_unique_together.py | adrianomqsmts/django-escola | a69541bceb3f30bdd2e9f0f41aa9c2da6081a1d1 | [
"MIT"
] | null | null | null | school/migrations/0010_alter_sala_unique_together.py | adrianomqsmts/django-escola | a69541bceb3f30bdd2e9f0f41aa9c2da6081a1d1 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-16 03:09
from django.db import migrations
| 21.555556 | 83 | 0.634021 |
6017b0c984f5c9581d7b67c9fd000d7881af64dd | 637 | py | Python | code_trunk/trainer/abc.py | chris4540/DD2430-ds-proj | b876efabe949392b27a7ebd4afb2be623174e287 | [
"MIT"
] | null | null | null | code_trunk/trainer/abc.py | chris4540/DD2430-ds-proj | b876efabe949392b27a7ebd4afb2be623174e287 | [
"MIT"
] | null | null | null | code_trunk/trainer/abc.py | chris4540/DD2430-ds-proj | b876efabe949392b27a7ebd4afb2be623174e287 | [
"MIT"
] | null | null | null | """
Abstract training class
"""
from abc import ABC as AbstractBaseClass
from abc import abstractmethod
| 19.30303 | 71 | 0.616954 |
601874835949dbb0ebb74e3019f720313e38011d | 2,763 | py | Python | quadpy/triangle/cools_haegemans.py | melvyniandrag/quadpy | ae28fc17351be8e76909033f03d71776c7ef8280 | [
"MIT"
] | 1 | 2019-01-02T19:04:42.000Z | 2019-01-02T19:04:42.000Z | quadpy/triangle/cools_haegemans.py | melvyniandrag/quadpy | ae28fc17351be8e76909033f03d71776c7ef8280 | [
"MIT"
] | null | null | null | quadpy/triangle/cools_haegemans.py | melvyniandrag/quadpy | ae28fc17351be8e76909033f03d71776c7ef8280 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
from mpmath import mp
from .helpers import untangle2
| 38.375 | 108 | 0.534202 |
601c017654bfba5b4012ac4932fefa02ad294c7b | 912 | py | Python | account/admin.py | RichardLeeH/invoce_sys | 42a6f5750f45b25e0d7282114ccb7f9f72ee1761 | [
"Apache-2.0"
] | null | null | null | account/admin.py | RichardLeeH/invoce_sys | 42a6f5750f45b25e0d7282114ccb7f9f72ee1761 | [
"Apache-2.0"
] | null | null | null | account/admin.py | RichardLeeH/invoce_sys | 42a6f5750f45b25e0d7282114ccb7f9f72ee1761 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from account.models import Profile
admin.site.site_header = 'invoce'
admin.s... | 24 | 71 | 0.718202 |
601c3263a4fb21497920c0fe4c9459fa3c4066b9 | 844 | py | Python | oops/#016exceptions.py | krishankansal/PythonPrograms | 6d4d989068195b8c8dd9d71cf4f920fef1177cf2 | [
"MIT"
] | null | null | null | oops/#016exceptions.py | krishankansal/PythonPrograms | 6d4d989068195b8c8dd9d71cf4f920fef1177cf2 | [
"MIT"
] | null | null | null | oops/#016exceptions.py | krishankansal/PythonPrograms | 6d4d989068195b8c8dd9d71cf4f920fef1177cf2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 18 08:40:11 2020
@author: krishan
"""
for val in (0, "hello", 50.0, 13):
print(f"Testing {val}:", funny_division3(val))
| 24.823529 | 55 | 0.609005 |
601c880be1287d7f4ecd5a8ee1ee870db121bb75 | 4,129 | py | Python | config/simclr_config.py | denn-s/SimCLR | e2239ac52464b1271c3b8ad1ec4eb26f3b73c7d4 | [
"MIT"
] | 5 | 2020-08-24T17:57:51.000Z | 2021-06-06T18:18:19.000Z | config/simclr_config.py | denn-s/SimCLR | e2239ac52464b1271c3b8ad1ec4eb26f3b73c7d4 | [
"MIT"
] | null | null | null | config/simclr_config.py | denn-s/SimCLR | e2239ac52464b1271c3b8ad1ec4eb26f3b73c7d4 | [
"MIT"
] | 1 | 2020-08-29T00:35:36.000Z | 2020-08-29T00:35:36.000Z | import os
from datetime import datetime
import torch
from dataclasses import dataclass
| 28.475862 | 113 | 0.601356 |
601cd7cd07ee2ea23d637edb23a7aada960db1af | 47,259 | py | Python | test/unit/common/middleware/s3api/test_obj.py | Priyanka-Askani/swift | 1ab691f63778008015b34ce004992844acee9968 | [
"Apache-2.0"
] | 1 | 2019-05-25T10:55:58.000Z | 2019-05-25T10:55:58.000Z | test/unit/common/middleware/s3api/test_obj.py | Priyanka-Askani/swift | 1ab691f63778008015b34ce004992844acee9968 | [
"Apache-2.0"
] | 12 | 2015-06-23T23:20:17.000Z | 2016-01-27T00:37:12.000Z | test/unit/common/middleware/s3api/test_obj.py | Priyanka-Askani/swift | 1ab691f63778008015b34ce004992844acee9968 | [
"Apache-2.0"
] | 5 | 2015-06-04T19:00:11.000Z | 2015-12-16T21:04:33.000Z | # Copyright (c) 2014 OpenStack Foundation
#
# 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 ... | 46.744807 | 79 | 0.578874 |
601e1228f0fc5110925548eceed16ee0fac450d1 | 3,654 | py | Python | pynyzo/pynyzo/keyutil.py | EggPool/pynyzo | 7f3b86f15caa51a975e6a428f4dff578a1f24bcb | [
"MIT"
] | 6 | 2019-02-09T02:46:18.000Z | 2021-03-29T04:15:15.000Z | pynyzo/pynyzo/keyutil.py | EggPool/pynyzo | 7f3b86f15caa51a975e6a428f4dff578a1f24bcb | [
"MIT"
] | 1 | 2020-05-17T18:29:20.000Z | 2020-05-18T08:31:33.000Z | pynyzo/pynyzo/keyutil.py | EggPool/pynyzo | 7f3b86f15caa51a975e6a428f4dff578a1f24bcb | [
"MIT"
] | 5 | 2019-02-09T02:46:19.000Z | 2021-01-08T06:49:50.000Z | """
Eddsa Ed25519 key handling
From
https://github.com/n-y-z-o/nyzoVerifier/blob/b73bc25ba3094abe3470ec070ce306885ad9a18f/src/main/java/co/nyzo/verifier/KeyUtil.java
plus
https://github.com/n-y-z-o/nyzoVerifier/blob/17509f03a7f530c0431ce85377db9b35688c078e/src/main/java/co/nyzo/verifier/util/SignatureUtil.java
"""
# ... | 38.463158 | 179 | 0.678982 |
601e563b0639154915d91614f293088729954120 | 6,729 | py | Python | mldftdat/scripts/train_gp.py | mir-group/CiderPress | bf2b3536e6bd7432645c18dce5a745d63bc9df59 | [
"MIT"
] | 10 | 2021-09-09T06:51:57.000Z | 2021-12-17T09:48:41.000Z | mldftdat/scripts/train_gp.py | mir-group/CiderPress | bf2b3536e6bd7432645c18dce5a745d63bc9df59 | [
"MIT"
] | null | null | null | mldftdat/scripts/train_gp.py | mir-group/CiderPress | bf2b3536e6bd7432645c18dce5a745d63bc9df59 | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
import os
import numpy as np
from joblib import dump
from mldftdat.workflow_utils import SAVE_ROOT
from mldftdat.models.gp import *
from mldftdat.data import load_descriptors, filter_descriptors
import yaml
if __name__ == '__main__':
main()
| 43.412903 | 141 | 0.622975 |
601f1b72f2f10dacace33b87801d53b05bfc4ed8 | 5,684 | py | Python | picoCTF-web/api/routes/admin.py | zaratec/picoCTF | b0a63f03625bb4657a8116f43bea26346ca6f010 | [
"MIT"
] | null | null | null | picoCTF-web/api/routes/admin.py | zaratec/picoCTF | b0a63f03625bb4657a8116f43bea26346ca6f010 | [
"MIT"
] | null | null | null | picoCTF-web/api/routes/admin.py | zaratec/picoCTF | b0a63f03625bb4657a8116f43bea26346ca6f010 | [
"MIT"
] | null | null | null | import api
import bson
from api.annotations import (
api_wrapper,
log_action,
require_admin,
require_login,
require_teacher
)
from api.common import WebError, WebSuccess
from flask import (
Blueprint,
Flask,
render_template,
request,
send_from_directory,
session
)
blueprint ... | 29.450777 | 106 | 0.714814 |
601f307a31ada0a1b790c747cfc5310721f08839 | 724 | py | Python | python code/influxdb_worker.py | thongnbui/MIDS_251_project | 8eee0f4569268e11c2d1d356024dbdc10f180b10 | [
"Apache-2.0"
] | null | null | null | python code/influxdb_worker.py | thongnbui/MIDS_251_project | 8eee0f4569268e11c2d1d356024dbdc10f180b10 | [
"Apache-2.0"
] | null | null | null | python code/influxdb_worker.py | thongnbui/MIDS_251_project | 8eee0f4569268e11c2d1d356024dbdc10f180b10 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import json
import argparse
from influxdb import InfluxDBClient
parser = argparse.ArgumentParser(description = 'pull data for softlayer queue' )
parser.add_argument( 'measurement' , help = 'measurement001' )
args = parser.parse_args()
client_influxdb = InfluxDBClient('50.23.117.76', '8086', 'crick... | 34.47619 | 149 | 0.705801 |
6021d213fcca1b9fd94f8cf2d534f74eefae66dc | 3,522 | py | Python | src/python/pants/backend/docker/lint/hadolint/subsystem.py | xyzst/pants | d6a357fe67ee7e8e1aefeae625e107f5609f1717 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/docker/lint/hadolint/subsystem.py | xyzst/pants | d6a357fe67ee7e8e1aefeae625e107f5609f1717 | [
"Apache-2.0"
] | 28 | 2021-12-27T15:53:46.000Z | 2022-03-23T11:01:42.000Z | src/python/pants/backend/docker/lint/hadolint/subsystem.py | riisi/pants | b33327389fab67c47b919710ea32f20ca284b1a6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from typing import cast
from pants.core.util_rules.config_files import ConfigFilesRequest
from pants.core.util_rules.external_tool import TemplatedExte... | 35.938776 | 122 | 0.615559 |
60226c7d97ac7aadd65011be5f070784ee3088d9 | 8,504 | py | Python | venv/lib/python3.9/site-packages/biorun/fetch.py | LucaCilibrasi/docker_viruclust | 88149c17fd4b94a54397d0cb4a9daece00122c49 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.9/site-packages/biorun/fetch.py | LucaCilibrasi/docker_viruclust | 88149c17fd4b94a54397d0cb4a9daece00122c49 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.9/site-packages/biorun/fetch.py | LucaCilibrasi/docker_viruclust | 88149c17fd4b94a54397d0cb4a9daece00122c49 | [
"Apache-2.0"
] | null | null | null | """
Handles functionality related to data storege.
"""
import sys, os, glob, re, gzip, json
from biorun import const, utils, objects, ncbi
from biorun.models import jsonrec
import biorun.libs.placlib as plac
# Module level logger.
logger = utils.logger
# A nicer error message on incorrect installation.
try:
from ... | 28.441472 | 94 | 0.61477 |
6022c4c8c548f73dbd95a825913c8b4639f2e4dc | 1,049 | py | Python | game/items/game_item.py | LaverdeS/Genetic_Algorithm_EGame | 89ff8c7870fa90768f4616cab6803227c8613396 | [
"MIT"
] | 2 | 2019-07-02T15:20:46.000Z | 2020-03-04T13:31:12.000Z | game/items/game_item.py | shivaa511/EGame | 6db10cb5cf7431093d2ab09a9e4049d6633fe792 | [
"MIT"
] | 2 | 2019-07-16T16:50:19.000Z | 2020-03-04T12:52:45.000Z | game/items/game_item.py | shivaa511/EGame | 6db10cb5cf7431093d2ab09a9e4049d6633fe792 | [
"MIT"
] | 8 | 2018-06-06T15:14:48.000Z | 2018-07-08T11:46:10.000Z | import numpy as np
from random import randint
from PyQt5.QtGui import QImage
from PyQt5.QtCore import QPointF
| 37.464286 | 77 | 0.611058 |
6022d662d09b473f63deec188827d3c36ba79479 | 6,750 | py | Python | source/deepsecurity/models/application_type_rights.py | felipecosta09/cloudone-workload-controltower-lifecycle | 7927c84d164058b034fc872701b5ee117641f4d1 | [
"Apache-2.0"
] | 1 | 2021-10-30T16:40:09.000Z | 2021-10-30T16:40:09.000Z | source/deepsecurity/models/application_type_rights.py | felipecosta09/cloudone-workload-controltower-lifecycle | 7927c84d164058b034fc872701b5ee117641f4d1 | [
"Apache-2.0"
] | 1 | 2021-07-28T20:19:03.000Z | 2021-07-28T20:19:03.000Z | source/deepsecurity/models/application_type_rights.py | felipecosta09/cloudone-workload-controltower-lifecycle | 7927c84d164058b034fc872701b5ee117641f4d1 | [
"Apache-2.0"
] | 1 | 2021-10-30T16:40:02.000Z | 2021-10-30T16:40:02.000Z | # coding: utf-8
"""
Trend Micro Deep Security API
Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's new RESTful API. Access system data and manage security configurations to automate your security workflows and integrate De... | 38.571429 | 311 | 0.663556 |
60254d5cf06d095bd8f90781b32cfb0d4a95c6e4 | 3,900 | py | Python | code-samples/aws_neptune.py | hardikvasa/database-journal | 7932b5a7fe909f8adb3a909183532b43d450da7b | [
"MIT"
] | 45 | 2019-06-07T07:12:09.000Z | 2022-03-20T19:58:53.000Z | code-samples/aws_neptune.py | hardikvasa/database-journal | 7932b5a7fe909f8adb3a909183532b43d450da7b | [
"MIT"
] | 1 | 2019-06-09T17:23:05.000Z | 2019-06-10T18:36:20.000Z | code-samples/aws_neptune.py | hardikvasa/database-journal | 7932b5a7fe909f8adb3a909183532b43d450da7b | [
"MIT"
] | 15 | 2019-06-07T07:12:12.000Z | 2022-01-02T01:09:53.000Z | from __future__ import print_function # Python 2/3 compatibility
from gremlin_python import statics
from gremlin_python.structure.graph import Graph
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.driver.driver_remote_connection import DriverR... | 57.352941 | 136 | 0.704615 |
6025b1cfb25bd8e7710a10ffd3f52c87c8e4a3b7 | 15,045 | py | Python | kits19cnn/io/preprocess_train.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | null | null | null | kits19cnn/io/preprocess_train.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | null | null | null | kits19cnn/io/preprocess_train.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | null | null | null | import os
from os.path import join, isdir
from pathlib import Path
from collections import defaultdict
from tqdm import tqdm
import nibabel as nib
import numpy as np
import json
from .resample import resample_patient
from .custom_augmentations import resize_data_and_seg, crop_to_bbox
def standardize_per_image(image):... | 43.482659 | 97 | 0.571685 |
6026a153525e13fa3c171bca805b17cf817349e3 | 1,558 | py | Python | setup.py | opywan/calm-dsl | 1d89436d039a39265a0ae806022be5b52e757ac0 | [
"Apache-2.0"
] | null | null | null | setup.py | opywan/calm-dsl | 1d89436d039a39265a0ae806022be5b52e757ac0 | [
"Apache-2.0"
] | null | null | null | setup.py | opywan/calm-dsl | 1d89436d039a39265a0ae806022be5b52e757ac0 | [
"Apache-2.0"
] | null | null | null | import sys
import setuptools
from setuptools.command.test import test as TestCommand
setuptools.setup(
name="calm.dsl",
version="0.9.0-alpha",
author="Nutanix",
author_email="nucalm@nutanix.com",
description="Calm DSL for blueprints",
long_description=read_file("README.md"),
long_descrip... | 28.327273 | 68 | 0.649551 |
6026e4bb115c40518d8be86f2973d4fb63be08f1 | 2,019 | py | Python | hanlp/pretrained/tok.py | chen88358323/HanLP | ee9066c3b7aad405dfe0ccffb7f66c59017169ae | [
"Apache-2.0"
] | 2 | 2022-03-23T08:50:39.000Z | 2022-03-23T08:50:48.000Z | hanlp/pretrained/tok.py | kingfan1998/HanLP | ee9066c3b7aad405dfe0ccffb7f66c59017169ae | [
"Apache-2.0"
] | null | null | null | hanlp/pretrained/tok.py | kingfan1998/HanLP | ee9066c3b7aad405dfe0ccffb7f66c59017169ae | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2019-12-28 21:12
from hanlp_common.constant import HANLP_URL
SIGHAN2005_PKU_CONVSEG = HANLP_URL + 'tok/sighan2005-pku-convseg_20200110_153722.zip'
'Conv model (:cite:`wang-xu-2017-convolutional`) trained on sighan2005 pku dataset.'
SIGHAN2005_MSR_CONVSEG = HANLP_URL + 't... | 67.3 | 146 | 0.788014 |
60285f227b486baa95c5fb739b65a5f1c6ce6e02 | 3,364 | py | Python | third_party/webrtc/src/chromium/src/tools/swarming_client/tests/logging_utils_test.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 8 | 2016-02-08T11:59:31.000Z | 2020-05-31T15:19:54.000Z | third_party/webrtc/src/chromium/src/tools/swarming_client/tests/logging_utils_test.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 1 | 2021-05-05T11:11:31.000Z | 2021-05-05T11:11:31.000Z | third_party/webrtc/src/chromium/src/tools/swarming_client/tests/logging_utils_test.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 7 | 2016-02-09T09:28:14.000Z | 2020-07-25T19:03:36.000Z | #!/usr/bin/env python
# Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0 that
# can be found in the LICENSE file.
import logging
import os
import subprocess
import sys
import tempfile
import shutil
import unittest
import re
THIS_FILE... | 28.508475 | 80 | 0.67063 |
6029de67c839bfcae337c354721a055f1b81107e | 2,452 | py | Python | model_selection.py | HrishikV/ineuron_inceome_prediction_internship | 4a97a7f29d80198f394fcfd880cc5250fe2a0d1e | [
"MIT"
] | null | null | null | model_selection.py | HrishikV/ineuron_inceome_prediction_internship | 4a97a7f29d80198f394fcfd880cc5250fe2a0d1e | [
"MIT"
] | null | null | null | model_selection.py | HrishikV/ineuron_inceome_prediction_internship | 4a97a7f29d80198f394fcfd880cc5250fe2a0d1e | [
"MIT"
] | null | null | null | from featur_selection import df,race,occupation,workclass,country
import pandas as pd
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import cross_val_score,KFold
from sklearn.linear_model import LogisticRegression
from imblearn.pipeline import Pipeline
from sklearn.compose import ColumnT... | 45.407407 | 240 | 0.722675 |
602aa7539d103136a63769ed24a86373824abc5f | 76 | py | Python | tests/apps/newlayout/tasks/init_data.py | blazelibs/blazeweb | b120a6a2e38c8b53da2b73443ff242e2d1438053 | [
"BSD-3-Clause"
] | null | null | null | tests/apps/newlayout/tasks/init_data.py | blazelibs/blazeweb | b120a6a2e38c8b53da2b73443ff242e2d1438053 | [
"BSD-3-Clause"
] | 6 | 2016-11-01T18:42:34.000Z | 2020-11-16T16:52:14.000Z | tests/apps/newlayout/tasks/init_data.py | blazelibs/blazeweb | b120a6a2e38c8b53da2b73443ff242e2d1438053 | [
"BSD-3-Clause"
] | 1 | 2020-01-22T18:20:46.000Z | 2020-01-22T18:20:46.000Z | from __future__ import print_function
| 12.666667 | 37 | 0.736842 |
602b781497fe10bfa361f38ffbff943242a02399 | 3,392 | py | Python | 2021/d8b_bits.py | apie/advent-of-code | c49abec01b044166a688ade40ebb1e642f0e5ce0 | [
"MIT"
] | 4 | 2018-12-04T23:33:46.000Z | 2021-12-07T17:33:27.000Z | 2021/d8b_bits.py | apie/advent-of-code | c49abec01b044166a688ade40ebb1e642f0e5ce0 | [
"MIT"
] | 17 | 2018-12-12T23:32:09.000Z | 2020-01-04T15:50:31.000Z | 2021/d8b_bits.py | apie/advent-of-code | c49abec01b044166a688ade40ebb1e642f0e5ce0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import pytest
import fileinput
from os.path import splitext, abspath
F_NAME = 'd8'
#implement day8 using bits
def find_ones(d):
'''count number of ones in binary number'''
ones = 0
while d > 0:
ones += d & 1
d >>= 1
return ones
# Assign each segment a 'wire'.
lut... | 26.294574 | 122 | 0.571934 |
602c28a9205e1c1670c905a216255ec8e326af0a | 8,931 | py | Python | frame_dataloader/spatial_dataloader.py | rizkiailham/two-stream-action-recognition-1 | 01221f668e62eb26e3593f4ecd3f257b6b6979ab | [
"Apache-2.0"
] | 67 | 2019-01-02T11:42:44.000Z | 2022-03-24T02:46:39.000Z | frame_dataloader/spatial_dataloader.py | rizkiailham/two-stream-action-recognition-1 | 01221f668e62eb26e3593f4ecd3f257b6b6979ab | [
"Apache-2.0"
] | 10 | 2019-02-06T17:12:23.000Z | 2021-11-10T08:05:27.000Z | frame_dataloader/spatial_dataloader.py | rizkiailham/two-stream-action-recognition-1 | 01221f668e62eb26e3593f4ecd3f257b6b6979ab | [
"Apache-2.0"
] | 25 | 2019-04-03T19:25:41.000Z | 2021-11-22T16:34:15.000Z | """
********************************
* Created by mohammed-alaa *
********************************
Spatial Dataloader implementing sequence api from keras (defines how to load a single item)
this loads batches of images for each iteration it returns [batch_size, height, width ,3] ndarrays
"""
import copy
import ran... | 42.127358 | 211 | 0.647744 |
602c64e6002e7e17025a13776dc2c4562e176aca | 1,593 | py | Python | dianhua/worker/crawler/china_mobile/hunan/base_request_param.py | Svolcano/python_exercise | a50e05891cc7f1fbb40ebcae324b09b6a14473d2 | [
"MIT"
] | 6 | 2015-07-09T08:47:08.000Z | 2020-05-16T10:47:31.000Z | dianhua/worker/crawler/china_mobile/hunan/base_request_param.py | Svolcano/python_exercise | a50e05891cc7f1fbb40ebcae324b09b6a14473d2 | [
"MIT"
] | 7 | 2019-03-27T04:13:12.000Z | 2022-03-02T14:54:56.000Z | dianhua/worker/crawler/china_mobile/hunan/base_request_param.py | Svolcano/python_exercise | a50e05891cc7f1fbb40ebcae324b09b6a14473d2 | [
"MIT"
] | 2 | 2019-06-21T06:46:28.000Z | 2019-12-23T09:31:09.000Z | # -*- coding:utf-8 -*-
"""
@version: v1.0
@author: xuelong.liu
@license: Apache Licence
@contact: xuelong.liu@yulore.com
@software: PyCharm
@file: base_request_param.py
@time: 12/21/16 6:48 PM
"""
| 49.78125 | 183 | 0.756434 |
602c73ce30543054207480d8bbb3a3dcd0069abc | 2,762 | py | Python | day02/puzzle2.py | jack-beach/AdventOfCode2019 | a8ac53eaf03cd7595deb2a9aa798a2d17c21c513 | [
"MIT"
] | null | null | null | day02/puzzle2.py | jack-beach/AdventOfCode2019 | a8ac53eaf03cd7595deb2a9aa798a2d17c21c513 | [
"MIT"
] | 1 | 2019-12-05T19:21:46.000Z | 2019-12-05T19:21:46.000Z | day02/puzzle2.py | jack-beach/AdventOfCode2019 | a8ac53eaf03cd7595deb2a9aa798a2d17c21c513 | [
"MIT"
] | 1 | 2019-12-05T18:05:54.000Z | 2019-12-05T18:05:54.000Z | # stdlib imports
import copy
# vendor imports
import click
# Execute cli function on main
if __name__ == "__main__":
main()
| 29.073684 | 77 | 0.542723 |
602d85326ffa11df7e1d924f6cb4bf41ac71b284 | 984 | py | Python | install.py | X-lab-3D/PANDORA | 02912a03022e814ff8e0ae8ec52f5075f0e2e381 | [
"Apache-2.0"
] | null | null | null | install.py | X-lab-3D/PANDORA | 02912a03022e814ff8e0ae8ec52f5075f0e2e381 | [
"Apache-2.0"
] | 1 | 2022-03-14T19:51:26.000Z | 2022-03-14T19:51:26.000Z | install.py | X-lab-3D/PANDORA | 02912a03022e814ff8e0ae8ec52f5075f0e2e381 | [
"Apache-2.0"
] | null | null | null | import os
dirs = [
'./PANDORA_files', './PANDORA_files/data', './PANDORA_files/data/csv_pkl_files',
'./PANDORA_files/data/csv_pkl_files/mhcseqs', './PANDORA_files/data/PDBs',
'./PANDORA_files/data/PDBs/pMHCI', './PANDORA_files/data/PDBs/pMHCII',
'./PANDORA_files/data/PDBs/Bad', './PANDO... | 35.142857 | 91 | 0.646341 |
602de82ea89f13dcd9f29b60fb46750634f30aed | 7,711 | py | Python | app/auth/views.py | MainaKamau92/apexselftaught | 9f9a3bd1ba23e57a12e173730917fb9bb7003707 | [
"MIT"
] | 4 | 2019-01-02T19:52:00.000Z | 2022-02-21T11:07:34.000Z | app/auth/views.py | MainaKamau92/apexselftaught | 9f9a3bd1ba23e57a12e173730917fb9bb7003707 | [
"MIT"
] | 2 | 2019-12-04T13:36:54.000Z | 2019-12-04T13:49:21.000Z | app/auth/views.py | MainaKamau92/apexselftaught | 9f9a3bd1ba23e57a12e173730917fb9bb7003707 | [
"MIT"
] | 1 | 2021-11-28T13:23:14.000Z | 2021-11-28T13:23:14.000Z | # app/auth/views.py
import os
from flask import flash, redirect, render_template, url_for, request
from flask_login import login_required, login_user, logout_user, current_user
from . import auth
from .forms import (LoginForm, RegistrationForm,
RequestResetForm, ResetPasswordForm)
from .. import db,... | 43.8125 | 99 | 0.664765 |
602e5a99d805700346d56a51e68cf804e5858e7b | 6,174 | py | Python | oslo_messaging/_drivers/zmq_driver/client/publishers/zmq_dealer_publisher.py | devendermishrajio/oslo.messaging | 9e5fb5697d3f7259f01e3416af0582090d20859a | [
"Apache-1.1"
] | 1 | 2021-02-17T15:30:45.000Z | 2021-02-17T15:30:45.000Z | oslo_messaging/_drivers/zmq_driver/client/publishers/zmq_dealer_publisher.py | devendermishrajio/oslo.messaging | 9e5fb5697d3f7259f01e3416af0582090d20859a | [
"Apache-1.1"
] | null | null | null | oslo_messaging/_drivers/zmq_driver/client/publishers/zmq_dealer_publisher.py | devendermishrajio/oslo.messaging | 9e5fb5697d3f7259f01e3416af0582090d20859a | [
"Apache-1.1"
] | 2 | 2015-11-03T03:21:55.000Z | 2015-12-01T08:56:14.000Z | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 34.49162 | 78 | 0.679462 |
602e5ff210d9605bb2e8229e3fbf0370c704bfb0 | 25,175 | py | Python | coba/environments/filters.py | mrucker/banditbenchmark | 0365291b3a0cf1d862d294e0386d0ccad3f360f1 | [
"BSD-3-Clause"
] | null | null | null | coba/environments/filters.py | mrucker/banditbenchmark | 0365291b3a0cf1d862d294e0386d0ccad3f360f1 | [
"BSD-3-Clause"
] | null | null | null | coba/environments/filters.py | mrucker/banditbenchmark | 0365291b3a0cf1d862d294e0386d0ccad3f360f1 | [
"BSD-3-Clause"
] | null | null | null | import pickle
import warnings
import collections.abc
from math import isnan
from statistics import mean, median, stdev, mode
from abc import abstractmethod, ABC
from numbers import Number
from collections import defaultdict
from itertools import islice, chain
from typing import Hashable, Optional, Sequence, Union, Ite... | 38.259878 | 130 | 0.623952 |
602f71483df50285674a0fe43ba737fee526a84e | 6,553 | py | Python | python/cuml/preprocessing/LabelEncoder.py | egoolish/cuml | 5320eff78890b3e9129e04e13437496c0424820d | [
"Apache-2.0"
] | 7 | 2019-02-26T10:41:09.000Z | 2020-06-17T06:08:57.000Z | python/cuml/preprocessing/LabelEncoder.py | danielhanchen/cuml | fab74ca94fdbc5b49281660ce32a48cfd3d66f46 | [
"Apache-2.0"
] | null | null | null | python/cuml/preprocessing/LabelEncoder.py | danielhanchen/cuml | fab74ca94fdbc5b49281660ce32a48cfd3d66f46 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2019, NVIDIA CORPORATION.
#
# 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 ... | 27.649789 | 78 | 0.574546 |
602fc03ac149fa50fb90ef1d0ffd3dc3832e7d14 | 5,054 | py | Python | cleaning.py | jhamrick/cogsci-proceedings-analysis | c3c8b0abd8b9ce639f6de0aea52aec46c2c8abca | [
"MIT"
] | null | null | null | cleaning.py | jhamrick/cogsci-proceedings-analysis | c3c8b0abd8b9ce639f6de0aea52aec46c2c8abca | [
"MIT"
] | null | null | null | cleaning.py | jhamrick/cogsci-proceedings-analysis | c3c8b0abd8b9ce639f6de0aea52aec46c2c8abca | [
"MIT"
] | 1 | 2020-05-11T10:38:38.000Z | 2020-05-11T10:38:38.000Z | import re
import difflib
import pandas as pd
import numpy as np
from nameparser import HumanName
from nameparser.config import CONSTANTS
CONSTANTS.titles.remove("gen")
CONSTANTS.titles.remove("prin")
if __name__ == "__main__":
import graph
papers = pd.read_csv("cogsci_proceedings_raw.csv")
papers['ty... | 34.616438 | 79 | 0.551049 |
602fe47995203be2cbe5445ca36c210c61dfb7a1 | 384 | py | Python | quem_foi_para_mar_core/migrations/0004_auto_20200811_1945.py | CamilaBodack/template-projeto-selecao | b0a0cf6070bf8abab626a17af5c315c82368b010 | [
"MIT"
] | 1 | 2020-09-01T23:04:07.000Z | 2020-09-01T23:04:07.000Z | quem_foi_para_mar_core/migrations/0004_auto_20200811_1945.py | CamilaBodack/template-projeto-selecao | b0a0cf6070bf8abab626a17af5c315c82368b010 | [
"MIT"
] | 4 | 2020-10-07T18:04:41.000Z | 2020-10-07T18:07:58.000Z | quem_foi_para_mar_core/migrations/0004_auto_20200811_1945.py | CamilaBodack/template-projeto-selecao | b0a0cf6070bf8abab626a17af5c315c82368b010 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-08-11 19:45
from django.db import migrations
| 20.210526 | 62 | 0.609375 |
6030d536392f2700f6b4fca762988c6115c81681 | 268 | py | Python | examples/tinytag/fuzz.py | MJ-SEO/py_fuzz | 789fbfea21bf644ba4d00554fe4141694b0a190a | [
"Apache-2.0"
] | null | null | null | examples/tinytag/fuzz.py | MJ-SEO/py_fuzz | 789fbfea21bf644ba4d00554fe4141694b0a190a | [
"Apache-2.0"
] | null | null | null | examples/tinytag/fuzz.py | MJ-SEO/py_fuzz | 789fbfea21bf644ba4d00554fe4141694b0a190a | [
"Apache-2.0"
] | null | null | null | from pythonfuzz.main import PythonFuzz
from tinytag import TinyTag
import io
if __name__ == '__main__':
fuzz()
| 14.105263 | 38 | 0.69403 |
6031aa22f48d39d2c1b21d711d722627277b7cfb | 96 | py | Python | venv/lib/python3.8/site-packages/requests/compat.py | GiulianaPola/select_repeats | 17a0d053d4f874e42cf654dd142168c2ec8fbd11 | [
"MIT"
] | 1 | 2022-02-22T04:49:18.000Z | 2022-02-22T04:49:18.000Z | venv/lib/python3.8/site-packages/requests/compat.py | GiulianaPola/select_repeats | 17a0d053d4f874e42cf654dd142168c2ec8fbd11 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/requests/compat.py | GiulianaPola/select_repeats | 17a0d053d4f874e42cf654dd142168c2ec8fbd11 | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/d1/fc/c7/6cbbdf9c58b6591d28ed792bbd7944946d3f56042698e822a2869787f6 | 96 | 96 | 0.895833 |
6031df65367df99733ce016cb9fcdddefa51c5dc | 3,951 | py | Python | examples/python-guide/cross_validation_example.py | StatMixedML/GPBoost | 786d8be61c5c28da0690e167af636a6d777bf9e1 | [
"Apache-2.0"
] | 2 | 2020-04-12T06:12:17.000Z | 2020-04-12T15:34:01.000Z | examples/python-guide/cross_validation_example.py | StatMixedML/GPBoost | 786d8be61c5c28da0690e167af636a6d777bf9e1 | [
"Apache-2.0"
] | null | null | null | examples/python-guide/cross_validation_example.py | StatMixedML/GPBoost | 786d8be61c5c28da0690e167af636a6d777bf9e1 | [
"Apache-2.0"
] | 1 | 2020-04-12T15:34:12.000Z | 2020-04-12T15:34:12.000Z | # coding: utf-8
# pylint: disable = invalid-name, C0111
import gpboost as gpb
import numpy as np
from sklearn.metrics import mean_squared_error
import matplotlib.pyplot as plt
plt.style.use('ggplot')
#--------------------Cross validation for tree-boosting without GP or random effects----------------
print('Simulating ... | 35.276786 | 100 | 0.665148 |
60321018f94dd63905027338dadab96fc7adf06f | 2,230 | py | Python | synapse/rest/synapse/client/unsubscribe.py | Florian-Sabonchi/synapse | c95b04bb0e719d3f5de1714b442f95a39c6e3634 | [
"Apache-2.0"
] | null | null | null | synapse/rest/synapse/client/unsubscribe.py | Florian-Sabonchi/synapse | c95b04bb0e719d3f5de1714b442f95a39c6e3634 | [
"Apache-2.0"
] | null | null | null | synapse/rest/synapse/client/unsubscribe.py | Florian-Sabonchi/synapse | c95b04bb0e719d3f5de1714b442f95a39c6e3634 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The Matrix.org Foundation C.I.C.
#
# 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 a... | 34.307692 | 80 | 0.689686 |
603213c5e7e394368a3f594930adb85245cbf3c3 | 4,859 | py | Python | pyhanabi/act_group.py | ravihammond/hanabi-convention-adaptation | 5dafa91742de8e8d5810e8213e0e2771818b2f54 | [
"MIT"
] | 1 | 2022-03-24T19:41:22.000Z | 2022-03-24T19:41:22.000Z | pyhanabi/act_group.py | ravihammond/hanabi-convention-adaptation | 5dafa91742de8e8d5810e8213e0e2771818b2f54 | [
"MIT"
] | null | null | null | pyhanabi/act_group.py | ravihammond/hanabi-convention-adaptation | 5dafa91742de8e8d5810e8213e0e2771818b2f54 | [
"MIT"
] | null | null | null | import set_path
import sys
import torch
set_path.append_sys_path()
import rela
import hanalearn
import utils
assert rela.__file__.endswith(".so")
assert hanalearn.__file__.endswith(".so")
| 31.967105 | 83 | 0.537148 |
603237057511914da74cfc53cec432cce1013ccc | 1,128 | py | Python | A_source_code/carbon/code/make_mask.py | vanHoek-dgnm/CARBON-DISC | 3ecd5f4efba5e032d43679ee977064d6b25154a9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | A_source_code/carbon/code/make_mask.py | vanHoek-dgnm/CARBON-DISC | 3ecd5f4efba5e032d43679ee977064d6b25154a9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | A_source_code/carbon/code/make_mask.py | vanHoek-dgnm/CARBON-DISC | 3ecd5f4efba5e032d43679ee977064d6b25154a9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ******************************************************
## Copyright 2019, PBL Netherlands Environmental Assessment Agency and Utrecht University.
## Reuse permitted under Gnu Public License, GPL v3.
# ******************************************************
from netCDF4 import Dataset
import numpy as np
import genera... | 31.333333 | 90 | 0.62766 |
6032a6052ffc5ac0129ff8a333fbe0b572cb530c | 7,309 | py | Python | Code/Dataset.py | gitFloyd/AAI-Project-2 | c6bb4d389248c3385e58a0c399343322a6dd887f | [
"MIT"
] | null | null | null | Code/Dataset.py | gitFloyd/AAI-Project-2 | c6bb4d389248c3385e58a0c399343322a6dd887f | [
"MIT"
] | null | null | null | Code/Dataset.py | gitFloyd/AAI-Project-2 | c6bb4d389248c3385e58a0c399343322a6dd887f | [
"MIT"
] | null | null | null | from io import TextIOWrapper
import math
from typing import TypeVar
import random
import os
from Settings import Settings
#pist = Pistachio(Dataset.LINUX_NL)
#
#for row in pist.Load()[0:10]:
# print(row)
| 24.363333 | 96 | 0.629498 |
60338466dc34f8421b1477264c6d62ca84ee2404 | 36,939 | py | Python | payments/models.py | wahuneke/django-stripe-payments | 5d4b26b025fc3fa75d3a0aeaafd67fb825325c94 | [
"BSD-3-Clause"
] | null | null | null | payments/models.py | wahuneke/django-stripe-payments | 5d4b26b025fc3fa75d3a0aeaafd67fb825325c94 | [
"BSD-3-Clause"
] | null | null | null | payments/models.py | wahuneke/django-stripe-payments | 5d4b26b025fc3fa75d3a0aeaafd67fb825325c94 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import decimal
import json
import traceback
from django.conf import settings
from django.core.mail import EmailMessage
from django.db import models
from django.utils import timezone
from django.template.loader import render_to_string
from django.contrib.sites.models import Site
import stripe
from js... | 37.654434 | 137 | 0.609491 |
6037477e26e980cdc81f047c4b3c12fc1cbcec38 | 2,321 | py | Python | mars/tensor/base/flip.py | tomzhang/mars-1 | 6f1d85e37eb1b383251314cb0ba13e06288af03d | [
"Apache-2.0"
] | 2 | 2019-03-29T04:11:10.000Z | 2020-07-08T10:19:54.000Z | mars/tensor/base/flip.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | mars/tensor/base/flip.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | 25.228261 | 81 | 0.561827 |
6037a51c2f59285acb270192ab5e41f437b7c589 | 1,876 | py | Python | tests/test_ops/test_upfirdn2d.py | imabackstabber/mmcv | b272c09b463f00fd7fdd455f7bd4a055f9995521 | [
"Apache-2.0"
] | null | null | null | tests/test_ops/test_upfirdn2d.py | imabackstabber/mmcv | b272c09b463f00fd7fdd455f7bd4a055f9995521 | [
"Apache-2.0"
] | null | null | null | tests/test_ops/test_upfirdn2d.py | imabackstabber/mmcv | b272c09b463f00fd7fdd455f7bd4a055f9995521 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import pytest
import torch
_USING_PARROTS = True
try:
from parrots.autograd import gradcheck
except ImportError:
from torch.autograd import gradcheck, gradgradcheck
_USING_PARROTS = False
| 31.79661 | 78 | 0.55597 |
6038e029f5aa9016bb06dc0180b3e06aac57209e | 852 | py | Python | dataset_creation/description_task2.py | rmorain/kirby | ef115dbaed4acd1b23c3e10ca3b496f05b9a2382 | [
"Apache-2.0"
] | 1 | 2021-08-30T11:46:20.000Z | 2021-08-30T11:46:20.000Z | dataset_creation/description_task2.py | rmorain/kirby | ef115dbaed4acd1b23c3e10ca3b496f05b9a2382 | [
"Apache-2.0"
] | 36 | 2020-11-18T20:19:33.000Z | 2021-08-03T23:31:12.000Z | dataset_creation/description_task2.py | rmorain/kirby | ef115dbaed4acd1b23c3e10ca3b496f05b9a2382 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from tqdm import tqdm
data_list = []
debug = False
num_choices = 4
tqdm.pandas(desc="Progress")
df = pd.read_pickle("data/augmented_datasets/pickle/label_description.pkl")
if debug:
df = df.iloc[:10]
df = df.progress_apply(get_questions, axis=1)
new_df = pd.DataFrame(data_list)
if not deb... | 24.342857 | 83 | 0.664319 |
603b2fa764ceaa795942b2f9977849ffd27b7101 | 2,776 | py | Python | scarab/commands/attach.py | gonzoua/scarab | b86474527b7b2ec30710ae79ea3f1cf5b7a93005 | [
"BSD-2-Clause"
] | 5 | 2018-09-01T01:42:43.000Z | 2019-01-04T21:32:55.000Z | scarab/commands/attach.py | gonzoua/scarab | b86474527b7b2ec30710ae79ea3f1cf5b7a93005 | [
"BSD-2-Clause"
] | 1 | 2019-09-18T17:06:11.000Z | 2019-11-29T18:35:08.000Z | scarab/commands/attach.py | gonzoua/scarab | b86474527b7b2ec30710ae79ea3f1cf5b7a93005 | [
"BSD-2-Clause"
] | null | null | null | # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
"""
'attach' command implementation'''
"""
from base64 import b64encode
import argparse
import magic
from ..bugzilla import BugzillaError
from ..context import bugzilla_instance
from .. import ui
from .base import Base
| 39.098592 | 98 | 0.617075 |
603b5710a40e621c6b937d72101edf1cadc2be7f | 5,089 | py | Python | test/test_airfoil.py | chabotsi/pygmsh | f2c26d9193c63efd9fa7676ea0860a18de7e8b52 | [
"MIT"
] | null | null | null | test/test_airfoil.py | chabotsi/pygmsh | f2c26d9193c63efd9fa7676ea0860a18de7e8b52 | [
"MIT"
] | null | null | null | test/test_airfoil.py | chabotsi/pygmsh | f2c26d9193c63efd9fa7676ea0860a18de7e8b52 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import numpy
import pygmsh
from helpers import compute_volume
if __name__ == '__main__':
import meshio
meshio.write('airfoil.vtu', *test())
| 31.608696 | 69 | 0.503046 |
603be24384736b5da4440432a56324e5b621091a | 260 | py | Python | examples/test_yield_8.py | MateuszG/django_auth | 4cda699c1b6516ffaa26329f545a674a7c849a16 | [
"MIT"
] | 2 | 2015-01-12T09:43:59.000Z | 2015-01-12T10:39:31.000Z | examples/test_yield_8.py | MateuszG/django_auth | 4cda699c1b6516ffaa26329f545a674a7c849a16 | [
"MIT"
] | null | null | null | examples/test_yield_8.py | MateuszG/django_auth | 4cda699c1b6516ffaa26329f545a674a7c849a16 | [
"MIT"
] | null | null | null | import pytest
| 18.571429 | 34 | 0.653846 |
603c4a28289b42faa48ea562130b7e8125179bd8 | 2,327 | py | Python | modules/google-earth-engine/docker/src/sepalinternal/gee.py | BuddyVolly/sepal | 6a2356a88940a36568b1d83ba3aeaae4283d5445 | [
"MIT"
] | 153 | 2015-10-23T09:00:08.000Z | 2022-03-19T03:24:04.000Z | modules/google-earth-engine/docker/src/sepalinternal/gee.py | BuddyVolly/sepal | 6a2356a88940a36568b1d83ba3aeaae4283d5445 | [
"MIT"
] | 165 | 2015-09-24T09:53:06.000Z | 2022-03-31T09:55:06.000Z | modules/google-earth-engine/docker/src/sepalinternal/gee.py | BuddyVolly/sepal | 6a2356a88940a36568b1d83ba3aeaae4283d5445 | [
"MIT"
] | 46 | 2016-07-10T10:40:09.000Z | 2021-11-14T01:07:33.000Z | import json
from threading import Semaphore
import ee
from flask import request
from google.auth import crypt
from google.oauth2 import service_account
from google.oauth2.credentials import Credentials
service_account_credentials = None
import logging
export_semaphore = Semaphore(5)
get_info_semaphore = Semaphore(2)... | 27.376471 | 74 | 0.685862 |
603d09d31004383c874fb82ce95f78dc229bb3dd | 481 | py | Python | micropython/007_boat_sink.py | mirontoli/tolle-rasp | 020638e86c167aedd7b556d8515a3adef70724af | [
"MIT"
] | 2 | 2021-06-29T17:18:09.000Z | 2022-01-25T08:29:59.000Z | micropython/007_boat_sink.py | mirontoli/tolle-rasp | 020638e86c167aedd7b556d8515a3adef70724af | [
"MIT"
] | null | null | null | micropython/007_boat_sink.py | mirontoli/tolle-rasp | 020638e86c167aedd7b556d8515a3adef70724af | [
"MIT"
] | null | null | null | #https://microbit-micropython.readthedocs.io/en/latest/tutorials/images.html#animation
from microbit import *
boat1 = Image("05050:05050:05050:99999:09990")
boat2 = Image("00000:05050:05050:05050:99999")
boat3 = Image("00000:00000:05050:05050:05050")
boat4 = Image("00000:00000:00000:05050:05050")
boat5 = Image("00000:0... | 48.1 | 86 | 0.765073 |
603d47f5b923ece6ffdc97d38998dad6e0f866c8 | 2,022 | py | Python | examples/api-samples/inc_samples/convert_callback.py | groupdocs-legacy-sdk/python | 80e5ef5a9a14ac4a7815c6cf933b5b2997381455 | [
"Apache-2.0"
] | null | null | null | examples/api-samples/inc_samples/convert_callback.py | groupdocs-legacy-sdk/python | 80e5ef5a9a14ac4a7815c6cf933b5b2997381455 | [
"Apache-2.0"
] | null | null | null | examples/api-samples/inc_samples/convert_callback.py | groupdocs-legacy-sdk/python | 80e5ef5a9a14ac4a7815c6cf933b5b2997381455 | [
"Apache-2.0"
] | null | null | null | import os
import json
import shutil
import time
from pyramid.renderers import render_to_response
from pyramid.response import Response
from groupdocs.ApiClient import ApiClient
from groupdocs.AsyncApi import AsyncApi
from groupdocs.StorageApi import StorageApi
from groupdocs.GroupDocsRequestSigner import GroupDocsReq... | 34.271186 | 68 | 0.62908 |
603e1db8585ef18d062d93564593d2084f744fc9 | 14,585 | py | Python | PyIK/src/litearm.py | AliShug/EvoArm | a5dea204914ee1e25867e4412e88d245329316f2 | [
"CC-BY-3.0"
] | 110 | 2017-01-13T17:19:18.000Z | 2022-02-20T06:50:03.000Z | PyIK/src/litearm.py | igcxl/EvoArm | a5dea204914ee1e25867e4412e88d245329316f2 | [
"CC-BY-3.0"
] | 1 | 2018-08-30T07:27:56.000Z | 2018-08-30T07:27:56.000Z | PyIK/src/litearm.py | igcxl/EvoArm | a5dea204914ee1e25867e4412e88d245329316f2 | [
"CC-BY-3.0"
] | 47 | 2017-03-10T20:34:01.000Z | 2021-11-18T03:44:06.000Z | from __future__ import print_function
import numpy as np
import struct
import solvers
import pid
from util import *
MOTORSPEED = 0.9
MOTORMARGIN = 1
MOTORSLOPE = 30
ERRORLIM = 5.0
def getServoElevator(self):
return 178.21 - degrees(self.shoulder_angle)
def getServoActuator(self):
return d... | 37.397436 | 98 | 0.58471 |
60416481c613049aa881c1d91f118e1ecab9fdbf | 1,194 | py | Python | create_augmented_versions.py | jakobabesser/piano_aug | 37f78c77465749c80d7aa91d9e804b89024eb278 | [
"MIT"
] | null | null | null | create_augmented_versions.py | jakobabesser/piano_aug | 37f78c77465749c80d7aa91d9e804b89024eb278 | [
"MIT"
] | null | null | null | create_augmented_versions.py | jakobabesser/piano_aug | 37f78c77465749c80d7aa91d9e804b89024eb278 | [
"MIT"
] | null | null | null | from pedalboard import Reverb, Compressor, Gain, LowpassFilter, Pedalboard
import soundfile as sf
if __name__ == '__main__':
# replace by path of unprocessed piano file if necessar
fn_wav_source = 'live_grand_piano.wav'
# augmentation settings using Pedalboard library
settings = {'rev-': [Reverb(roo... | 34.114286 | 74 | 0.61139 |
60422bea81360e85bf0b5cf68c083ffc23ea9d15 | 2,867 | py | Python | flux/migrations/versions/9ba67b798fa_add_request_system.py | siq/flux | ca7563deb9ebef14840bbf0cb7bab4d9478b2470 | [
"Linux-OpenIB"
] | null | null | null | flux/migrations/versions/9ba67b798fa_add_request_system.py | siq/flux | ca7563deb9ebef14840bbf0cb7bab4d9478b2470 | [
"Linux-OpenIB"
] | null | null | null | flux/migrations/versions/9ba67b798fa_add_request_system.py | siq/flux | ca7563deb9ebef14840bbf0cb7bab4d9478b2470 | [
"Linux-OpenIB"
] | null | null | null | """add_request_system
Revision: 9ba67b798fa
Revises: 31b92bf6506d
Created: 2013-07-23 02:49:09.342814
"""
revision = '9ba67b798fa'
down_revision = '31b92bf6506d'
from alembic import op
from spire.schema.fields import *
from spire.mesh import SurrogateType
from sqlalchemy import (Column, ForeignKey, ForeignKeyConstra... | 39.273973 | 87 | 0.659226 |
6043f0f0c5013421d3026505d50e50aa5fb67097 | 9,333 | py | Python | src/python/Vector2_TEST.py | clalancette/ign-math | 84eb1bfe470d00d335c048f102b56c49a15b56be | [
"ECL-2.0",
"Apache-2.0"
] | 43 | 2019-08-21T20:50:05.000Z | 2022-03-27T11:48:25.000Z | src/python/Vector2_TEST.py | clalancette/ign-math | 84eb1bfe470d00d335c048f102b56c49a15b56be | [
"ECL-2.0",
"Apache-2.0"
] | 277 | 2020-04-16T23:38:50.000Z | 2022-03-31T11:11:58.000Z | src/python/Vector2_TEST.py | clalancette/ign-math | 84eb1bfe470d00d335c048f102b56c49a15b56be | [
"ECL-2.0",
"Apache-2.0"
] | 48 | 2020-04-15T21:15:43.000Z | 2022-03-14T19:29:04.000Z | # Copyright (C) 2021 Open Source Robotics Foundation
#
# 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... | 29.165625 | 74 | 0.585985 |
604745505e3f84cc6af47e088784a1a28b715d2a | 1,418 | py | Python | fsspec/tests/test_mapping.py | sodre/filesystem_spec | 5fe51c5e85366b57a11ed66637a940970372ea4b | [
"BSD-3-Clause"
] | null | null | null | fsspec/tests/test_mapping.py | sodre/filesystem_spec | 5fe51c5e85366b57a11ed66637a940970372ea4b | [
"BSD-3-Clause"
] | null | null | null | fsspec/tests/test_mapping.py | sodre/filesystem_spec | 5fe51c5e85366b57a11ed66637a940970372ea4b | [
"BSD-3-Clause"
] | null | null | null | import os
import fsspec
from fsspec.implementations.memory import MemoryFileSystem
import pickle
import pytest
| 22.870968 | 76 | 0.612835 |
6047d157ca53f47cf0fb3523f60398cfb109d425 | 990 | py | Python | testedome/questions/quest_5.py | EderReisS/pythonChallenges | a880358c2cb4de0863f4b4cada36b3d439a8a018 | [
"MIT"
] | null | null | null | testedome/questions/quest_5.py | EderReisS/pythonChallenges | a880358c2cb4de0863f4b4cada36b3d439a8a018 | [
"MIT"
] | null | null | null | testedome/questions/quest_5.py | EderReisS/pythonChallenges | a880358c2cb4de0863f4b4cada36b3d439a8a018 | [
"MIT"
] | 1 | 2021-07-29T23:20:17.000Z | 2021-07-29T23:20:17.000Z | """
A
/ |
B C
'B, C'
"""
if __name__ == "__main__":
c = CategoryTree()
c.add_category('A', None)
c.add_category('B', 'A')
c.add_category('C', 'A')
print(','.join(c.get_children('A') or []))
print(','.join(c.get_children('E') or []))
| 22 | 51 | 0.559596 |
60484feb7046b3c272c1b83d25957af04879dd6e | 4,681 | py | Python | sppas/sppas/src/anndata/aio/__init__.py | mirfan899/MTTS | 3167b65f576abcc27a8767d24c274a04712bd948 | [
"MIT"
] | null | null | null | sppas/sppas/src/anndata/aio/__init__.py | mirfan899/MTTS | 3167b65f576abcc27a8767d24c274a04712bd948 | [
"MIT"
] | null | null | null | sppas/sppas/src/anndata/aio/__init__.py | mirfan899/MTTS | 3167b65f576abcc27a8767d24c274a04712bd948 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
..
---------------------------------------------------------------------
___ __ __ __ ___
/ | \ | \ | \ / the automatic
\__ |__/ |__/ |___| \__ annotation and
\ | | | | \ ... | 36.858268 | 216 | 0.554582 |
6049a1eccd8b14db6687d766205e1b913a98cd6d | 226 | py | Python | models/__init__.py | dapengchen123/hfsoftmax | 467bd90814abdf3e5ad8384e6e05749172b68ae6 | [
"MIT"
] | 1 | 2018-10-11T09:27:53.000Z | 2018-10-11T09:27:53.000Z | models/__init__.py | dapengchen123/hfsoftmax | 467bd90814abdf3e5ad8384e6e05749172b68ae6 | [
"MIT"
] | null | null | null | models/__init__.py | dapengchen123/hfsoftmax | 467bd90814abdf3e5ad8384e6e05749172b68ae6 | [
"MIT"
] | null | null | null | from .resnet import *
from .hynet import *
from .classifier import Classifier, HFClassifier, HNSWClassifier
from .ext_layers import ParameterClient
samplerClassifier = {
'hf': HFClassifier,
'hnsw': HNSWClassifier,
}
| 20.545455 | 64 | 0.756637 |
604a3acc24feaf58c41a047512c8f6cf4cc0bdd1 | 1,397 | py | Python | scripts/multiplayer/server.py | AgnirudraSil/tetris | 2a4f4c26190fc8b669f98c116af343f7f1ac51bf | [
"MIT"
] | 3 | 2022-01-11T06:11:08.000Z | 2022-03-10T09:34:42.000Z | scripts/multiplayer/server.py | agnirudrasil/tetris | 2a4f4c26190fc8b669f98c116af343f7f1ac51bf | [
"MIT"
] | null | null | null | scripts/multiplayer/server.py | agnirudrasil/tetris | 2a4f4c26190fc8b669f98c116af343f7f1ac51bf | [
"MIT"
] | null | null | null | import pickle
import socket
import _thread
from scripts.multiplayer import game, board, tetriminos
server = "192.168.29.144"
port = 5555
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.bind((server, port))
except socket.error as e:
print(e)
s.listen()
print("Waiting for connection")
connected ... | 18.878378 | 65 | 0.536149 |
604b01d7a386918b107512b8c4b02b4727b0197f | 2,311 | py | Python | AdventOfCode/2018/src/day-03/app.py | AustinTSchaffer/DailyProgrammer | b16d9babb298ac5e879c514f9c4646b99c6860a8 | [
"MIT"
] | 1 | 2020-07-28T17:07:35.000Z | 2020-07-28T17:07:35.000Z | AdventOfCode/2018/src/day-03/app.py | AustinTSchaffer/DailyProgrammer | b16d9babb298ac5e879c514f9c4646b99c6860a8 | [
"MIT"
] | 5 | 2021-04-06T18:25:29.000Z | 2021-04-10T15:13:28.000Z | AdventOfCode/2018/src/day-03/app.py | AustinTSchaffer/DailyProgrammer | b16d9babb298ac5e879c514f9c4646b99c6860a8 | [
"MIT"
] | null | null | null | import os
import re
from collections import defaultdict
CURRENT_DIR, _ = os.path.split(__file__)
DATA_FLIE = os.path.join(CURRENT_DIR, 'data.txt')
def part1(claims):
"""
This is basically a single-threaded collision detection method,
implemented in pure python. Computation complexity is obviously
not... | 32.097222 | 73 | 0.638685 |
604b36210d2f64d1a79dd2e280534e5bf39ec7cb | 4,737 | py | Python | facerec-master/py/facerec/distance.py | ArianeFire/HaniCam | 8a940486a613d680a0b556209a596cdf3eb71f53 | [
"MIT"
] | 776 | 2015-01-01T11:34:42.000Z | 2022-02-26T10:25:51.000Z | facerec-master/py/facerec/distance.py | ArianeFire/HaniCam | 8a940486a613d680a0b556209a596cdf3eb71f53 | [
"MIT"
] | 43 | 2015-03-17T07:48:38.000Z | 2019-08-21T05:16:36.000Z | facerec-master/py/facerec/distance.py | ArianeFire/HaniCam | 8a940486a613d680a0b556209a596cdf3eb71f53 | [
"MIT"
] | 479 | 2015-01-01T12:34:38.000Z | 2022-02-28T23:57:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) Philipp Wagner. All rights reserved.
# Licensed under the BSD license. See LICENSE file in the project root for full license information.
import numpy as np
| 33.595745 | 125 | 0.617479 |
604b9cab87abdc5ce52f2c470f0e9885781ed2dd | 7,162 | py | Python | pgyer_uploader.py | elina8013/android_demo | d8cef19d06a4f21f7cf2c277bbabba8cf10a8608 | [
"Apache-2.0"
] | 666 | 2015-03-18T02:09:34.000Z | 2021-08-25T06:24:27.000Z | pgyer_uploader.py | shanjiaxiang/android_demo | d1afa66c30ae5b3c09a39f4c36c61640615177bb | [
"Apache-2.0"
] | 7 | 2017-04-26T07:06:49.000Z | 2019-07-08T08:05:13.000Z | pgyer_uploader.py | shanjiaxiang/android_demo | d1afa66c30ae5b3c09a39f4c36c61640615177bb | [
"Apache-2.0"
] | 371 | 2015-03-18T02:09:33.000Z | 2021-09-10T02:41:05.000Z | #!/usr/bin/python
#coding=utf-8
import os
import requests
import time
import re
from datetime import datetime
import urllib2
import json
import mimetypes
import smtplib
from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
# configuration for pgyer
USER_KEY = "f605b7c782669... | 34.76699 | 154 | 0.604021 |
604c11d1662643b5e9e977b3126e196c0ca94747 | 1,944 | py | Python | edit/editpublisher.py | lokal-profil/isfdb_site | 0ce20d6347849926d4eda961ea9249c31519eea5 | [
"BSD-3-Clause"
] | null | null | null | edit/editpublisher.py | lokal-profil/isfdb_site | 0ce20d6347849926d4eda961ea9249c31519eea5 | [
"BSD-3-Clause"
] | null | null | null | edit/editpublisher.py | lokal-profil/isfdb_site | 0ce20d6347849926d4eda961ea9249c31519eea5 | [
"BSD-3-Clause"
] | null | null | null | #!_PYTHONLOC
#
# (C) COPYRIGHT 2004-2021 Al von Ruff and Ahasuerus
# ALL RIGHTS RESERVED
#
# The copyright notice above does not evidence any actual or
# intended publication of such source code.
#
# Version: $Revision$
# Date: $Date$
from isfdblib import *
from isfdblib_help import *
fr... | 28.173913 | 98 | 0.677469 |
604ecb6f7cdc9275682b21b948b61c6eab42174d | 2,988 | py | Python | src/dispatch/incident_cost/views.py | vj-codes/dispatch | f9354781956380cac290be02fb987eb50ddc1a5d | [
"Apache-2.0"
] | 1 | 2021-06-16T17:02:35.000Z | 2021-06-16T17:02:35.000Z | src/dispatch/incident_cost/views.py | dilbwagsingh/dispatch | ca7c9730dea64e196c6653321552d570dfdad069 | [
"Apache-2.0"
] | 10 | 2021-07-17T04:28:07.000Z | 2022-02-05T00:40:59.000Z | src/dispatch/incident_cost/views.py | dilbwagsingh/dispatch | ca7c9730dea64e196c6653321552d570dfdad069 | [
"Apache-2.0"
] | null | null | null | from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.orm import Session
from dispatch.database.core import get_db
from dispatch.database.service import common_parameters, search_filter_sort_paginate
from dispatch.auth.permissions import SensitiveProjectActionPermission, PermissionsDependency
from .mo... | 32.835165 | 100 | 0.749665 |
604ecfc2153a2b8f83182b3e8a28bd46fb2056eb | 8,479 | py | Python | tests/views/test_admin_committee_questions.py | Lunga001/pmg-cms-2 | 10cea3979711716817b0ba2a41987df73f2c7642 | [
"Apache-2.0"
] | 2 | 2019-06-11T20:46:43.000Z | 2020-08-27T22:50:32.000Z | tests/views/test_admin_committee_questions.py | Lunga001/pmg-cms-2 | 10cea3979711716817b0ba2a41987df73f2c7642 | [
"Apache-2.0"
] | 70 | 2017-05-26T14:04:06.000Z | 2021-06-30T10:21:58.000Z | tests/views/test_admin_committee_questions.py | OpenUpSA/pmg-cms-2 | ec5f259dae81674ac7a8cdb80f124a8b0f167780 | [
"Apache-2.0"
] | 4 | 2017-08-29T10:09:30.000Z | 2021-05-25T11:29:03.000Z | import os
from urllib.parse import urlparse, parse_qs
from builtins import str
from tests import PMGLiveServerTestCase
from pmg.models import db, Committee, CommitteeQuestion
from tests.fixtures import dbfixture, UserData, CommitteeData, MembershipData
from flask import escape
from io import BytesIO
| 45.342246 | 927 | 0.644416 |
604f0eeff04eca0db1f9e0f762b1e72dacff74c1 | 2,907 | py | Python | audioanalysis_demo/test_audio_analysis.py | tiaotiao/applets | c583a4405ed18c7d74bfba49884525c43d114398 | [
"MIT"
] | null | null | null | audioanalysis_demo/test_audio_analysis.py | tiaotiao/applets | c583a4405ed18c7d74bfba49884525c43d114398 | [
"MIT"
] | null | null | null | audioanalysis_demo/test_audio_analysis.py | tiaotiao/applets | c583a4405ed18c7d74bfba49884525c43d114398 | [
"MIT"
] | null | null | null |
import sys, wave
import AudioAnalysis
FILE_NAME = "snippet.wav"
if __name__ == "__main__":
main()
#testAudioAnalysis()
#testWavWrite()
| 23.827869 | 88 | 0.579635 |
60518bb19a47173a8268f88acf5e74e628053642 | 4,866 | py | Python | syloga/transform/evaluation.py | xaedes/python-symbolic-logic-to-gate | a0dc9be9e04290008cf709fac789d224ab8c14b0 | [
"MIT"
] | null | null | null | syloga/transform/evaluation.py | xaedes/python-symbolic-logic-to-gate | a0dc9be9e04290008cf709fac789d224ab8c14b0 | [
"MIT"
] | null | null | null | syloga/transform/evaluation.py | xaedes/python-symbolic-logic-to-gate | a0dc9be9e04290008cf709fac789d224ab8c14b0 | [
"MIT"
] | null | null | null |
from syloga.core.map_expression_args import map_expression_args
from syloga.utils.identity import identity
from syloga.ast.BooleanNot import BooleanNot
from syloga.ast.BooleanValue import BooleanValue
from syloga.ast.BooleanOr import BooleanOr
from syloga.ast.BooleanAnd import BooleanAnd
from syloga.ast.BooleanNand i... | 36.313433 | 102 | 0.621661 |
605202551fbb724a7df19cd7d70079bcc8b5e6d2 | 2,753 | py | Python | oscar/apps/customer/mixins.py | Idematica/django-oscar | 242a0654210d63ba75f798788916c8b2f7abb7fb | [
"BSD-3-Clause"
] | 1 | 2015-08-02T05:36:11.000Z | 2015-08-02T05:36:11.000Z | oscar/apps/customer/mixins.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/customer/mixins.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.contrib.auth import authenticate, login as auth_login
from django.contrib.sites.models import get_current_site
from django.db.models import get_model
from oscar.apps.customer.signals import user_registered
from oscar.core.loading import get_class
from oscar.core.compat impor... | 34.848101 | 79 | 0.670904 |
60522d3489fa0c5b3c558dbb7d715900c3bb9392 | 2,421 | py | Python | plot_integral.py | vfloeser/TumorDelivery | a48252c17b50397b1f51be21c0cf65ade87e9000 | [
"Apache-2.0"
] | null | null | null | plot_integral.py | vfloeser/TumorDelivery | a48252c17b50397b1f51be21c0cf65ade87e9000 | [
"Apache-2.0"
] | null | null | null | plot_integral.py | vfloeser/TumorDelivery | a48252c17b50397b1f51be21c0cf65ade87e9000 | [
"Apache-2.0"
] | null | null | null | from parameters import *
from library_time import *
from paths import *
import numpy as np
import pylab as plt
import matplotlib.pyplot as mplt
mplt.rc('text', usetex=True)
mplt.rcParams.update({'font.size': 16})
import logging, getopt, sys
import time
import os
#####################################################... | 33.164384 | 90 | 0.467575 |
605343dd026fb3e41372878d610c32ec85aeb812 | 1,196 | py | Python | tests/unit/combiner/Try.py | wangjeaf/CSSCheckStyle | d1b1ed89c61ca80d65f398ec4a07d73789197b04 | [
"BSD-3-Clause"
] | 21 | 2015-04-27T14:54:45.000Z | 2021-11-08T09:12:08.000Z | tests/unit/combiner/Try.py | wangjeaf/CSSCheckStyle | d1b1ed89c61ca80d65f398ec4a07d73789197b04 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/combiner/Try.py | wangjeaf/CSSCheckStyle | d1b1ed89c61ca80d65f398ec4a07d73789197b04 | [
"BSD-3-Clause"
] | 6 | 2015-03-02T08:08:59.000Z | 2016-03-16T14:52:38.000Z | from helper import *
| 56.952381 | 172 | 0.723244 |
60535516e66bf2f9d907ac1cbd0eeb26881ca2c7 | 2,728 | py | Python | tests/tests.py | desdelgado/rheology-data-toolkit | 054b1659c914b8eed86239d27a746e26404395ec | [
"MIT"
] | null | null | null | tests/tests.py | desdelgado/rheology-data-toolkit | 054b1659c914b8eed86239d27a746e26404395ec | [
"MIT"
] | 18 | 2020-04-10T15:06:50.000Z | 2020-06-23T20:57:49.000Z | tests/tests.py | desdelgado/rheology-data-toolkit | 054b1659c914b8eed86239d27a746e26404395ec | [
"MIT"
] | null | null | null | import sys, os
sys.path.append("C:/Users/Delgado/Documents/Research/rheology-data-toolkit/rheodata/extractors")
import h5py
import pandas as pd
from antonpaar import AntonPaarExtractor as APE
from ARES_G2 import ARES_G2Extractor
# %%
sys.path.append("C:/Users/Delgado/Documents/Research/rheology-data-toolkit/rheodata"... | 36.373333 | 189 | 0.712243 |
6053b76dec55ceda546ea38cd4b295199bfedd36 | 382 | py | Python | openslides_backend/action/topic/delete.py | reiterl/openslides-backend | d36667f00087ae8baf25853d4cef18a5e6dc7b3b | [
"MIT"
] | null | null | null | openslides_backend/action/topic/delete.py | reiterl/openslides-backend | d36667f00087ae8baf25853d4cef18a5e6dc7b3b | [
"MIT"
] | null | null | null | openslides_backend/action/topic/delete.py | reiterl/openslides-backend | d36667f00087ae8baf25853d4cef18a5e6dc7b3b | [
"MIT"
] | null | null | null | from ...models.models import Topic
from ..default_schema import DefaultSchema
from ..generics import DeleteAction
from ..register import register_action
| 25.466667 | 67 | 0.740838 |
605585efa2db2b321777e037a609b7a6f87c04a9 | 686 | py | Python | main.py | Dr3xler/CookieConsentChecker | 816cdfb9d9dc741c57dbcd5e9c9ef59837196631 | [
"MIT"
] | null | null | null | main.py | Dr3xler/CookieConsentChecker | 816cdfb9d9dc741c57dbcd5e9c9ef59837196631 | [
"MIT"
] | 3 | 2021-04-29T22:57:09.000Z | 2021-05-03T15:32:39.000Z | main.py | Dr3xler/CookieConsentChecker | 816cdfb9d9dc741c57dbcd5e9c9ef59837196631 | [
"MIT"
] | 1 | 2021-08-29T09:53:09.000Z | 2021-08-29T09:53:09.000Z | from core import file_handling as file_h, driver_handling as driver_h
from website_handling import website_check as wc
from cookie_handling import cookie_compare
websites = file_h.website_reader()
driver = driver_h.webdriver_setup()
try:
wc.load_with_addon(driver, websites)
except:
print('ERROR: IN FIREFO... | 20.176471 | 73 | 0.781341 |
60558cb725da5275f2069f7bb3c1bb96b154754f | 4,788 | py | Python | PyPBEC/OpticalMedium.py | photonbec/PyPBEC | fd68fa3e6206671e731bc0c2973af1f67d704f05 | [
"MIT"
] | 1 | 2020-09-07T10:21:52.000Z | 2020-09-07T10:21:52.000Z | PyPBEC/OpticalMedium.py | photonbec/PyPBEC | fd68fa3e6206671e731bc0c2973af1f67d704f05 | [
"MIT"
] | null | null | null | PyPBEC/OpticalMedium.py | photonbec/PyPBEC | fd68fa3e6206671e731bc0c2973af1f67d704f05 | [
"MIT"
] | 1 | 2022-02-04T00:00:59.000Z | 2022-02-04T00:00:59.000Z | import numpy as np
from scipy import constants as sc
from scipy.interpolate import interp1d
from pathlib import Path
from scipy.special import erf as Erf
import pandas as pd
import sys
import os
import csv
| 38.304 | 154 | 0.746658 |
60563aa2ef81de63dbaea0f3ad170ec8ec84759d | 1,251 | py | Python | corehq/apps/appstore/urls.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | corehq/apps/appstore/urls.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/appstore/urls.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls.defaults import url, include, patterns
from corehq.apps.appstore.dispatcher import AppstoreDispatcher
store_urls = patterns('corehq.apps.appstore.views',
url(r'^$', 'appstore_default', name="appstore_interfaces_default"),
AppstoreDispatcher.url_pattern(),
)
urlpatterns = patterns('corehq... | 46.333333 | 96 | 0.657074 |
6057750dc6cf45d0cc166a95aaf751e85207651a | 2,667 | py | Python | faster-rcnn-vgg16-fpn/model/fpn.py | fengkaibit/faster-rcnn_vgg16_fpn | 354efd4b5f4d4a42e9c92f48501e02cd7f0c0cdb | [
"MIT"
] | 13 | 2019-05-21T13:19:56.000Z | 2022-02-27T14:36:43.000Z | faster-rcnn-vgg16-fpn/model/fpn.py | fengkaibit/faster-rcnn_vgg16_fpn | 354efd4b5f4d4a42e9c92f48501e02cd7f0c0cdb | [
"MIT"
] | 2 | 2019-06-27T07:02:33.000Z | 2021-06-30T15:51:12.000Z | faster-rcnn-vgg16-fpn/model/fpn.py | fengkaibit/faster-rcnn_vgg16_fpn | 354efd4b5f4d4a42e9c92f48501e02cd7f0c0cdb | [
"MIT"
] | 4 | 2019-05-21T13:19:56.000Z | 2021-06-29T01:10:31.000Z | from __future__ import absolute_import
import torch
from torch.nn import functional
def normal_init(m, mean, stddev, truncated=False):
"""
weight initalizer: truncated normal and random normal.
"""
# x is a parameter
if truncated:
m.weight.data.normal_().fmod_(2).mul_(stddev).add_(mean) # ... | 37.041667 | 99 | 0.640045 |
6057d15e673e5e8174ccbf2844dfdc2c7b7a4b7d | 2,314 | py | Python | test/setups/finders/finders_test.py | bowlofstew/client | 0d5ae42aaf9863e3871828b6df06170aad17c560 | [
"MIT"
] | 40 | 2015-04-15T09:40:23.000Z | 2022-02-11T11:07:24.000Z | test/setups/finders/finders_test.py | bowlofstew/client | 0d5ae42aaf9863e3871828b6df06170aad17c560 | [
"MIT"
] | 19 | 2015-04-15T18:34:53.000Z | 2018-11-17T00:11:05.000Z | test/setups/finders/finders_test.py | bowlofstew/client | 0d5ae42aaf9863e3871828b6df06170aad17c560 | [
"MIT"
] | 22 | 2015-04-15T09:45:46.000Z | 2020-09-29T17:04:19.000Z | import unittest
from biicode.common.settings.version import Version
from mock import patch
from biicode.client.setups.finders.finders import gnu_version
from biicode.client.setups.rpi_cross_compiler import find_gnu_arm
from biicode.client.workspace.bii_paths import get_biicode_env_folder_path
GCC_VERSION_MAC = '''Con... | 44.5 | 139 | 0.709594 |
60582c7b916077e6db28ad364408137dc3ff3825 | 784 | py | Python | setup.py | mintmachine/arweave-python-client | 69e8e2d32090de5fd276efdb9b9103d91b4182f6 | [
"MIT"
] | 63 | 2020-01-22T23:43:53.000Z | 2022-03-24T23:18:13.000Z | setup.py | mintmachine/arweave-python-client | 69e8e2d32090de5fd276efdb9b9103d91b4182f6 | [
"MIT"
] | 17 | 2020-01-22T23:41:07.000Z | 2022-01-04T11:43:30.000Z | setup.py | mintmachine/arweave-python-client | 69e8e2d32090de5fd276efdb9b9103d91b4182f6 | [
"MIT"
] | 25 | 2020-08-12T05:00:25.000Z | 2022-03-31T01:43:25.000Z | from distutils.core import setup
setup(
name="arweave-python-client",
packages = ['arweave'], # this must be the same as the name above
version="1.0.15.dev0",
description="Client interface for sending transactions on the Arweave permaweb",
author="Mike Hibbert",
author_email="mike@hibbertitsolutions.co.uk"... | 28 | 82 | 0.678571 |
605951901688fbda8e99d2e5f2796e9b32eff1fe | 18,195 | py | Python | exchange_calendars/extensions/exchange_calendar_krx.py | syonoki/exchange_calendars | 639ab0f88a874af99bb601824a8ffef2572820d4 | [
"Apache-2.0"
] | null | null | null | exchange_calendars/extensions/exchange_calendar_krx.py | syonoki/exchange_calendars | 639ab0f88a874af99bb601824a8ffef2572820d4 | [
"Apache-2.0"
] | null | null | null | exchange_calendars/extensions/exchange_calendar_krx.py | syonoki/exchange_calendars | 639ab0f88a874af99bb601824a8ffef2572820d4 | [
"Apache-2.0"
] | null | null | null | """
Last update: 2018-10-26
"""
from exchange_calendars.extensions.calendar_extension import ExtendedExchangeCalendar
from pandas import (
Timestamp,
)
from pandas.tseries.holiday import (
Holiday,
previous_friday,
)
from exchange_calendars.exchange_calendar import HolidayCalendar
from datetime import tim... | 28.474178 | 85 | 0.580599 |
605a9a49370c1c190ccbd51f63a583f9a84128cd | 5,152 | py | Python | utilities.py | ameldocena/StratifiedAggregation | 0031fea120bff00c739eb6c3d654a5c6d3f094bb | [
"MIT"
] | null | null | null | utilities.py | ameldocena/StratifiedAggregation | 0031fea120bff00c739eb6c3d654a5c6d3f094bb | [
"MIT"
] | null | null | null | utilities.py | ameldocena/StratifiedAggregation | 0031fea120bff00c739eb6c3d654a5c6d3f094bb | [
"MIT"
] | null | null | null | import random
import numpy
#import tensorflow as tf
#import torch
from abc import abstractmethod
from sklearn.decomposition import PCA
from aggregators import FedAvg, MultiKrum, AlignedAvg, TrimmedMean, Median, StratifiedAggr
# class StratifiedRandomSelection(SelectionStrategy):
# #We first stratify: Each stratum ... | 39.030303 | 147 | 0.695652 |
605ad59a9efe4d2c5632efa0fb33e3ddefc540bb | 1,301 | py | Python | game/player.py | b1naryth1ef/mmo | 400f66b0ac76896af2d7108ff3540c42614a32f0 | [
"BSD-2-Clause"
] | 7 | 2015-09-29T13:32:36.000Z | 2021-06-22T19:24:01.000Z | game/player.py | b1naryth1ef/mmo | 400f66b0ac76896af2d7108ff3540c42614a32f0 | [
"BSD-2-Clause"
] | null | null | null | game/player.py | b1naryth1ef/mmo | 400f66b0ac76896af2d7108ff3540c42614a32f0 | [
"BSD-2-Clause"
] | 1 | 2019-03-03T23:24:28.000Z | 2019-03-03T23:24:28.000Z | from sprites import PlayerSprite
import time | 30.255814 | 75 | 0.544965 |
605b1532a73c491b1c591dcd0c51687f13109748 | 1,019 | py | Python | toys/layers/pool.py | cbarrick/toys | 0368036ddb7594c0b6e7cdc704aeec918786e58a | [
"MIT"
] | 1 | 2018-04-28T18:29:37.000Z | 2018-04-28T18:29:37.000Z | toys/layers/pool.py | cbarrick/csb | 0368036ddb7594c0b6e7cdc704aeec918786e58a | [
"MIT"
] | null | null | null | toys/layers/pool.py | cbarrick/csb | 0368036ddb7594c0b6e7cdc704aeec918786e58a | [
"MIT"
] | null | null | null | from typing import Sequence
import torch
from torch import nn
| 33.966667 | 67 | 0.62316 |
605c46e1dca45ffe66a05a4a91174510b5abbb04 | 433 | py | Python | src/forecastmgmt/ui/masterdata/person_window.py | vvladych/forecastmgmt | 9eea272d00bb42031f49b5bb5af01388ecce31cf | [
"Unlicense"
] | null | null | null | src/forecastmgmt/ui/masterdata/person_window.py | vvladych/forecastmgmt | 9eea272d00bb42031f49b5bb5af01388ecce31cf | [
"Unlicense"
] | 37 | 2015-07-01T22:18:51.000Z | 2016-03-11T21:17:12.000Z | src/forecastmgmt/ui/masterdata/person_window.py | vvladych/forecastmgmt | 9eea272d00bb42031f49b5bb5af01388ecce31cf | [
"Unlicense"
] | null | null | null | from gi.repository import Gtk
from masterdata_abstract_window import MasterdataAbstractWindow
from person_add_mask import PersonAddMask
from person_list_mask import PersonListMask
| 25.470588 | 124 | 0.757506 |
605ed3488c51cb7e0a5749161c5e9f3896da6586 | 1,792 | py | Python | fastseg/model/utils.py | SeockHwa/Segmentation_mobileV3 | 01d90eeb32232346b8ed071eaf5d03322049be11 | [
"MIT"
] | 274 | 2020-08-12T00:29:30.000Z | 2022-03-29T18:24:40.000Z | fastseg/model/utils.py | dcmartin/fastseg | c30759e07a52c7370eda11a93396c79f2b141778 | [
"MIT"
] | 10 | 2020-08-13T06:15:14.000Z | 2021-03-30T16:12:31.000Z | fastseg/model/utils.py | dcmartin/fastseg | c30759e07a52c7370eda11a93396c79f2b141778 | [
"MIT"
] | 27 | 2020-08-12T00:29:21.000Z | 2021-12-09T02:32:36.000Z | import torch.nn as nn
from .efficientnet import EfficientNet_B4, EfficientNet_B0
from .mobilenetv3 import MobileNetV3_Large, MobileNetV3_Small
def get_trunk(trunk_name):
"""Retrieve the pretrained network trunk and channel counts"""
if trunk_name == 'efficientnet_b4':
backbone = EfficientNet_B4(pretra... | 35.137255 | 84 | 0.651786 |
6063184472ef835deb60c56bca4bcbb89e09d477 | 136 | py | Python | python/testData/inspections/PyTypeCheckerInspection/ModuleTypeParameter/a.py | 06needhamt/intellij-community | 63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/inspections/PyTypeCheckerInspection/ModuleTypeParameter/a.py | 06needhamt/intellij-community | 63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b | [
"Apache-2.0"
] | null | null | null | python/testData/inspections/PyTypeCheckerInspection/ModuleTypeParameter/a.py | 06needhamt/intellij-community | 63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b | [
"Apache-2.0"
] | null | null | null | import module
from types import ModuleType
foo(module)
bar(module) | 12.363636 | 28 | 0.720588 |
60634a727fe7a278b36493fb58ad20aeb22882f6 | 2,151 | py | Python | tests/webapp/test_webapp_actions.py | proofdock/chaos-azure | 85302f8be18153862656c587988eafb5dd37ddf7 | [
"Apache-2.0"
] | 1 | 2021-04-24T20:01:54.000Z | 2021-04-24T20:01:54.000Z | tests/webapp/test_webapp_actions.py | proofdock/chaos-azure | 85302f8be18153862656c587988eafb5dd37ddf7 | [
"Apache-2.0"
] | 23 | 2020-05-22T06:43:14.000Z | 2021-02-25T21:02:28.000Z | tests/webapp/test_webapp_actions.py | proofdock/chaos-azure | 85302f8be18153862656c587988eafb5dd37ddf7 | [
"Apache-2.0"
] | null | null | null | from unittest.mock import patch, MagicMock
from pdchaosazure.webapp.actions import stop, restart, delete
from tests.data import config_provider, secrets_provider, webapp_provider
| 34.693548 | 87 | 0.755927 |
606417a48449b07f2cec077fb5c3441648a8cb09 | 30,091 | py | Python | echopype/model/modelbase.py | leewujung/echopype-lfs-test | b76dcf42631d0ac9cef0efeced9be4afdc15e659 | [
"Apache-2.0"
] | null | null | null | echopype/model/modelbase.py | leewujung/echopype-lfs-test | b76dcf42631d0ac9cef0efeced9be4afdc15e659 | [
"Apache-2.0"
] | null | null | null | echopype/model/modelbase.py | leewujung/echopype-lfs-test | b76dcf42631d0ac9cef0efeced9be4afdc15e659 | [
"Apache-2.0"
] | null | null | null | """
echopype data model that keeps tracks of echo data and
its connection to data files.
"""
import os
import warnings
import datetime as dt
from echopype.utils import uwa
import numpy as np
import xarray as xr
def calc_seawater_absorption(self, src='file'):
"""Base method to be overridden for calculati... | 47.763492 | 123 | 0.618557 |