max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 117 | max_stars_count int64 0 95.2k | id stringlengths 1 7 | content stringlengths 12 593k | input_ids listlengths 7 549k |
|---|---|---|---|---|---|
src/gps_babel_tower/tasks/language_detection/language_detection.py | google/gps-babel-tower | 2 | 59832 | <gh_stars>1-10
# coding=utf-8
# Copyright 2021 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 applicabl... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
5087,
365,
12182,
636,
13,
29937,
13,
29937,
10413,
21144,
1090,
278... |
tests/trainers/test_eval_loop.py | locoalien/mmf | 0 | 99419 | # Copyright (c) Facebook, Inc. and its affiliates.
import unittest
from unittest.mock import MagicMock, patch
import torch
from tests.trainers.test_training_loop import TrainerTrainingLoopMock
class TestEvalLoop(unittest.TestCase):
@patch(
"mmf.common.test_reporter.PathManager",
return_value=Mag... | [
1,
396,
14187,
1266,
313,
29883,
29897,
13327,
29892,
9266,
29889,
322,
967,
23736,
1078,
29889,
13,
13,
5215,
443,
27958,
13,
3166,
443,
27958,
29889,
17640,
1053,
26494,
18680,
29892,
13261,
13,
13,
5215,
4842,
305,
13,
3166,
6987,
29... |
r2r/r2r_problem.py | google-research/valan | 71 | 148390 | # coding=utf-8
# Copyright 2019 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
5087,
365,
12182,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1... |
src/sentry/api/views/help_base.py | ChadKillingsworth/sentry | 0 | 175992 | from __future__ import absolute_import
import textwrap
from django.contrib.admindocs.views import simplify_regex
from django.utils.importlib import import_module
from django.utils.text import slugify
from sentry.api.base import Endpoint
from sentry.constants import HTTP_METHODS
from sentry.web.frontend.base import B... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
13,
5215,
1426,
6312,
13,
13,
3166,
9557,
29889,
21570,
29889,
328,
24021,
12332,
29889,
7406,
1053,
21092,
29918,
13087,
13,
3166,
9557,
29889,
13239,
29889,
5215,
1982,
1053,... |
ozone-framework-python-server/tests/stacks/test_stacks_api.py | aamduka/ozone | 6 | 167559 | from django.urls import reverse
from django.test import TestCase
from stacks.models import Stack
from people.models import Person
from rest_framework.test import APIClient
from dashboards.models import Dashboard
from domain_mappings.models import DomainMapping, MappingType
from owf_groups.models import OwfGroupP... | [
1,
515,
9557,
29889,
26045,
1053,
11837,
30004,
13,
3166,
9557,
29889,
1688,
1053,
4321,
8259,
30004,
13,
3166,
5096,
29879,
29889,
9794,
1053,
10292,
30004,
13,
3166,
2305,
29889,
9794,
1053,
5196,
30004,
13,
3166,
1791,
29918,
4468,
298... |
MongoDB/Exercises/personal_finances/run.py | CaioCavalcanti/big-data-course | 15 | 120989 | <reponame>CaioCavalcanti/big-data-course
from eve import Eve
from personal_finances.auth import RolesAuth, add_token
if __name__ == '__main__':
app = Eve(auth=RolesAuth)
app.on_insert_accounts += add_token
app.run() | [
1,
529,
276,
1112,
420,
29958,
26270,
601,
29907,
7712,
29883,
3656,
29914,
3752,
29899,
1272,
29899,
15775,
13,
3166,
321,
345,
1053,
382,
345,
13,
13,
3166,
7333,
29918,
4951,
2925,
29889,
5150,
1053,
390,
6544,
6444,
29892,
788,
2991... |
conjureup/ui/views/credentials.py | iMichka/conjure-up | 1 | 16938 | from ubuntui.utils import Padding
from ubuntui.widgets.hr import HR
from conjureup.app_config import app
from conjureup.ui.views.base import BaseView, SchemaFormView
from conjureup.ui.widgets.selectors import MenuSelectButtonList
class NewCredentialView(SchemaFormView):
title = "New Credential Creation"
def... | [
1,
515,
13069,
1657,
1481,
29889,
13239,
1053,
349,
4676,
13,
3166,
13069,
1657,
1481,
29889,
8030,
29879,
29889,
1092,
1053,
379,
29934,
13,
13,
3166,
9589,
545,
786,
29889,
932,
29918,
2917,
1053,
623,
13,
3166,
9589,
545,
786,
29889,... |
001285StepikPythonLUC/Stepik001285pythonLUCсh06p02st02TASK01_append.py | SafonovMikhail/python_000577 | 0 | 59082 | # lucky_numbers = []
# lucky_numbers.append(4)
# assertEqual(lucky_numbers, __)
# lucky_numbers.append(8)
# assertEqual(lucky_numbers, __) | [
1,
396,
9885,
29891,
29918,
20326,
353,
5159,
13,
29937,
9885,
29891,
29918,
20326,
29889,
4397,
29898,
29946,
29897,
13,
29937,
4974,
9843,
29898,
29880,
14395,
29918,
20326,
29892,
4770,
29897,
13,
29937,
9885,
29891,
29918,
20326,
29889,
... |
tess/model/feature_selection.py | LithiumSR/tess | 0 | 111616 | import lightgbm as lgb
from tess.utils import Utils
class FeatureSelection:
def __init__(self, data, threshold=1, force_base_entries=True):
self.data = data
self.threshold = threshold
self.force_base_entries = force_base_entries
def select(self):
schema = Utils.get_available... | [
1,
1053,
3578,
29887,
5838,
408,
301,
26300,
13,
13,
3166,
260,
404,
29889,
13239,
1053,
22310,
29879,
13,
13,
13,
1990,
5169,
1535,
15097,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
848,
29892,
16897,
29922,
29896,
29892... |
python/merge_sort.py | shibli049/miscellaneous | 1 | 49097 | <gh_stars>1-10
def mergeSort(a, temp, leftStart, rightEnd):
if(leftStart >= rightEnd):
return
middle = int((leftStart + rightEnd) / 2)
mergeSort(a, temp, leftStart, middle)
mergeSort(a, temp, middle + 1, rightEnd)
merge(a, temp, leftStart, middle, rightEnd)
return
def merge(a, temp, le... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
1753,
10366,
13685,
29898,
29874,
29892,
5694,
29892,
2175,
4763,
29892,
1492,
5044,
1125,
13,
1678,
565,
29898,
1563,
4763,
6736,
1492,
5044,
1125,
13,
4706,
736,
13... |
setup.py | JosepSampe/swift-linking-middleware | 0 | 81080 | <reponame>JosepSampe/swift-linking-middleware<filename>setup.py
from setuptools import setup, find_packages
paste_factory = ['softlink = '
'softlink:filter_factory']
setup(name='swift-softlink-middleware',
version='0.1.0',
description='Softlink middleware for OpenStack Swift',
autho... | [
1,
529,
276,
1112,
420,
29958,
26473,
29886,
22966,
412,
29914,
26792,
29899,
2324,
292,
29899,
17662,
2519,
29966,
9507,
29958,
14669,
29889,
2272,
13,
3166,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
13,
16179,
29918,
1... |
combine-namedtuples.py | motoom/farasabina | 0 | 123017 | <filename>combine-namedtuples.py
import glob
import os
import datetime
import collections
from pprint import pprint as pp
import csv
months = {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "may": 5, "jun": 6,
"jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12}
# Output files
pre = csv.writer(open("p... | [
1,
529,
9507,
29958,
17743,
457,
29899,
17514,
9161,
2701,
29889,
2272,
13,
5215,
13149,
4706,
13,
5215,
2897,
13,
5215,
12865,
13,
5215,
16250,
13,
3166,
282,
2158,
1053,
282,
2158,
408,
6499,
13,
5215,
11799,
13,
13,
13,
10874,
2987... |
tensorflow_federated/python/core/impl/bindings_utils/data_conversions.py | RyanMarten/federated | 1,918 | 44562 | # Copyright 2021, The TensorFlow Federated Authors.
#
# 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 o... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
29892,
450,
323,
6073,
17907,
7351,
630,
13189,
943,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931... |
test_apps/python_app/tests/_shared/for_proc.py | Origen-SDK/o2 | 0 | 36007 | <filename>test_apps/python_app/tests/_shared/for_proc.py
def setenv(config_root, config_name=None, bypass_config_lookup=None):
import os, inspect, pathlib, sys
if bypass_config_lookup:
os.environ['origen_bypass_config_lookup'] = "1"
if config_name is None:
config_name = inspect.stack()[1].fu... | [
1,
529,
9507,
29958,
1688,
29918,
13371,
29914,
4691,
29918,
932,
29914,
21150,
19891,
12366,
29914,
1454,
29918,
15439,
29889,
2272,
13,
1753,
731,
6272,
29898,
2917,
29918,
4632,
29892,
2295,
29918,
978,
29922,
8516,
29892,
491,
3364,
299... |
src/pdc2/scripts/mask_tips_by_taxonID_genomes.py | jlanga/smsk_selection | 4 | 88305 | <filename>src/pdc2/scripts/mask_tips_by_taxonID_genomes.py
"""
Input is a dir of trees
Mask monophyletic tips that belong to the same taxon
Keep the tip with the shortest terminal branch lenth
"""
import newick3,phylo3,os,sys
#if taxon id pattern changes, change it here
def get_name(name):
return name.split("@")[0]... | [
1,
529,
9507,
29958,
4351,
29914,
29886,
13891,
29906,
29914,
16713,
29914,
13168,
29918,
2034,
567,
29918,
1609,
29918,
20725,
265,
1367,
29918,
1885,
290,
267,
29889,
2272,
13,
15945,
29908,
13,
4290,
338,
263,
4516,
310,
10697,
13,
13,... |
Python Programming/01. Primitive Types/06-numbers.py | luckyrabbit85/Python | 1 | 62895 | <filename>Python Programming/01. Primitive Types/06-numbers.py
x = 1 # int
print(type(x))
x = 1.1 # float
print(type(x))
x = 1 + 2j # complex number
print(type(x))
print(10 + 3)
print(10 - 3)
print(10 * 3)
print(10 / 3)
print(10 // 3)
print(10 % 3)
print(10 ** 3)
x = 10
x = x + 3
x += 3
print(x)
| [
1,
529,
9507,
29958,
11980,
7835,
4056,
29914,
29900,
29896,
29889,
9724,
3321,
28025,
29914,
29900,
29953,
29899,
20326,
29889,
2272,
13,
29916,
353,
29871,
29896,
29871,
396,
938,
13,
2158,
29898,
1853,
29898,
29916,
876,
13,
13,
29916,
... |
trilearn/graph/subtree_sampler.py | melmasri/trilearn | 10 | 42190 | from collections import deque
import networkx as nx
import numpy as np
def random_subtree(T, alpha, beta, subtree_mark):
""" Random subtree of T according to Algorithm X in [1].
Args:
alpha (float): probability of continuing to a neighbor
beta (float): probability of non empty subtree
... | [
1,
515,
16250,
1053,
316,
802,
13,
13,
5215,
3564,
29916,
408,
302,
29916,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
4036,
29918,
1491,
8336,
29898,
29911,
29892,
15595,
29892,
21762,
29892,
1014,
8336,
29918,
3502,
1125,
13,
1678,
... |
lib/metrics/__init__.py | kisonho/torchmanager | 0 | 94836 | from .accuracy import Accuracy, CategoricalAccuracy, MAE, SparseCategoricalAccuracy
from .conf_met import ConfusionMetrics
from .iou import InstanceIoU, MeanIoU, MIoU
from .metric import Metric, metric | [
1,
515,
869,
562,
2764,
4135,
1053,
4831,
332,
4135,
29892,
315,
20440,
936,
7504,
332,
4135,
29892,
14861,
29923,
29892,
317,
5510,
29907,
20440,
936,
7504,
332,
4135,
13,
3166,
869,
5527,
29918,
2527,
1053,
10811,
3958,
10095,
10817,
... |
test_project/tests/test_widgets.py | epanchee/django-autocomplete-light | 0 | 111536 | """Test the base widget."""
from dal.widgets import Select
from django import forms
from django import http
from django import test
from django.conf.urls import url
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
from django.utils import six
import mock
urlpatterns = [
... | [
1,
9995,
3057,
278,
2967,
11109,
1213,
15945,
13,
13,
3166,
2959,
29889,
8030,
29879,
1053,
7605,
13,
13,
3166,
9557,
1053,
7190,
13,
3166,
9557,
1053,
1732,
13,
3166,
9557,
1053,
1243,
13,
3166,
9557,
29889,
5527,
29889,
26045,
1053,
... |
autopacmen/submodules/apply_manual_changes.py | Paulocracy/autopacmen | 5 | 123656 | #!/usr/bin/env python3
#
# Copyright 2019 PSB
#
# 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 agree... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
349,
1744,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
3... |
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py | timgates42/Flask-MonitoringDashboard | 3 | 9969 | import unittest
from flask_monitoringdashboard.core.profiler.util.stringHash import StringHash
class TestStringHash(unittest.TestCase):
def test_stringhash(self):
string_hash = StringHash()
self.assertEqual(string_hash.hash('abc'), 0)
self.assertEqual(string_hash.hash('def'), 1)
... | [
1,
1053,
443,
27958,
13,
13,
3166,
29784,
29918,
3712,
2105,
292,
14592,
3377,
29889,
3221,
29889,
771,
1777,
261,
29889,
4422,
29889,
1807,
10438,
1053,
1714,
10438,
13,
13,
13,
1990,
4321,
1231,
10438,
29898,
348,
27958,
29889,
3057,
... |
database-sql/python-migrations/microweb/env.py | ultraschemer/microweb-sample | 2 | 132885 | from logging.config import fileConfig
from sqlalchemy import engine_from_config
from sqlalchemy import pool
from alembic import context
# To set register primary key operation:
from alembic.operations import Operations, MigrateOperation
import sqlalchemy as sa
# Custom database types to support UUID:
from sqlalche... | [
1,
515,
12183,
29889,
2917,
1053,
934,
3991,
13,
13,
3166,
4576,
284,
305,
6764,
1053,
6012,
29918,
3166,
29918,
2917,
13,
3166,
4576,
284,
305,
6764,
1053,
11565,
13,
13,
3166,
20712,
29890,
293,
1053,
3030,
13,
13,
29937,
1763,
731,... |
src/engine/renderer.py | gabdube/panic-panda | 67 | 61386 | from vulkan import vk, helpers as hvk
class Renderer(object):
def __init__(self, engine):
self.engine = engine
self.image_ready = None
self.rendering_done = None
self.render_fences = ()
self.render_cache = {}
self.enabled = True
self._setup_sync()
... | [
1,
515,
12799,
11052,
1053,
325,
29895,
29892,
1371,
414,
408,
298,
29894,
29895,
13,
13,
13,
1990,
26000,
261,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6012,
1125,
13,
4706,
1583,
29889,
10599,
353,
6012,
... |
mainapp/views.py | mmiyaji/Dansible | 0 | 87551 | <reponame>mmiyaji/Dansible
#!/usr/bin/env python
# encoding: utf-8
'''
views.py
Created by mmiyaji on 2016-07-10.
Copyright (c) 2016 ruh<EMAIL>. All rights reserved.
'''
from django.shortcuts import render
from django.http import HttpResponse
import os, re, sys, commands, time, datetime, random, logging
from django.... | [
1,
529,
276,
1112,
420,
29958,
29885,
2460,
29891,
1175,
29875,
29914,
29928,
550,
1821,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
8025,
29901,
23616,
29899,
29947,
13,
12008,
13,
7406,
29889,
2272,
13,
13,
20399,... |
utils.py | HenryZerocool/DoNotSend | 0 | 162401 | <gh_stars>0
#!/usr/bin/env python3
import socket
import logging
import colorlog
def get_ip_from_hostname(hostname: str) -> str or None:
try:
ip = socket.gethostbyname(hostname)
except socket.gaierror as e:
logging.error(e)
return None
else:
return ip
def init_logger(log_... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
9909,
13,
5215,
12183,
13,
5215,
2927,
1188,
13,
13,
13,
1753,
679,
29918,
666,
29918,
3166,
29918,
28988,
29898... |
alipay/aop/api/domain/AlipayOpenOperationBizfeeAftechCancelModel.py | snowxmas/alipay-sdk-python-all | 213 | 80541 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayOpenOperationBizfeeAftechCancelModel(object):
def __init__(self):
self._app_name = None
self._gmt_service = None
self._order_no = None
self._out_biz_no = Non... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
4390,
13,
13,
3166,
394,
666,
388,
29889,
29874,
459,
29889,
2754,
29889,
23362,
29889,
4736,
26... |
editor/tests/factories.py | CivicKnowledge/metaeditor | 1 | 180581 | # -*- coding: utf-8 -*-
import factory
from accounts.tests.factories import UserFactory
from editor.constants import REGION_CHOICES
from editor.models import Dataset, Format, Category, Source, Extension, DataFile
class CategoryFactory(factory.django.DjangoModelFactory):
class Meta:
model = Category
... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
12529,
13,
13,
3166,
15303,
29889,
21150,
29889,
17028,
3842,
1053,
4911,
5126,
13,
13,
3166,
6920,
29889,
3075,
1934,
1053,
5195,
29954,
2725,... |
raster_statistic.py | Summer0328/DeeplabforRS | 3 | 12498 | <gh_stars>1-10
#!/usr/bin/env python
# Filename: raster_statistic
"""
introduction: conduct statistic based on vectos, similar to https://github.com/perrygeo/python-rasterstats,
# but allow image tiles (multi-raster).
authors: <NAME>
email:<EMAIL>
add time: 02 March, 2021
"""
import os,sys
import vector_gp... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
2514,
3871,
29901,
364,
1901,
29918,
6112,
4695,
29871,
13,
15945,
29908,
13,
524,
13210,
29901,
7512,
... |
project/home/forms.py | Kirza/flask-learning | 0 | 78215 | <filename>project/home/forms.py<gh_stars>0
from flask_wtf import Form
from wtforms import TextField, TextAreaField, FileField
from wtforms.validators import DataRequired, Length
class MessageForm(Form):
title = TextField('Title', validators=[DataRequired()])
description = TextField(
'Description', val... | [
1,
529,
9507,
29958,
4836,
29914,
5184,
29914,
9514,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
29784,
29918,
29893,
13264,
1053,
3812,
13,
3166,
281,
29873,
9514,
1053,
3992,
3073,
29892,
3992,
13799,
3073,
29892,... |
xp/tests/task_properties.py | druths/xp | 46 | 66288 | """
Copyright 2016 <NAME>
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, software
distrib... | [
1,
9995,
13,
11882,
1266,
29871,
29906,
29900,
29896,
29953,
529,
5813,
29958,
13,
13,
29931,
293,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
6293,
1122,
451,
671,... |
nlp/test_chatbot.py | gary-ai/gary-docker | 0 | 1602872 | import numpy as np
from chatbot import clean_up_sentence
from chatbot import bow
from chatbot import classify
from chatbot import chat_response
def test_clean_up_hello_sentence_():
assert clean_up_sentence("Hi, HoW are you?!") == ['hi', ',', 'how', 'ar', 'you', '?', '!']
def test_bow_with_no_equality_():
a... | [
1,
1053,
12655,
408,
7442,
13,
13,
3166,
13563,
7451,
1053,
5941,
29918,
786,
29918,
18616,
663,
13,
3166,
13563,
7451,
1053,
12580,
13,
3166,
13563,
7451,
1053,
770,
1598,
13,
3166,
13563,
7451,
1053,
13563,
29918,
5327,
13,
13,
13,
... |
funny_morse/key.py | nkpro2000sr/funny-morse | 1 | 186359 | import time
from pynput import keyboard
import morse
WPM = morse.WPM
FS = morse.FS
def info():
print("Keyboard :")
print(" None")
def main(message, wpm=-1, fs=-1, key="caps"):
wpm = WPM if wpm == -1 else wpm
fs = FS if fs == -1 else fs
code = morse.stringToMorse(message)
flip_intervals = m... | [
1,
1053,
931,
13,
3166,
282,
948,
649,
1053,
12247,
13,
13,
5215,
3036,
344,
13,
13,
29956,
13427,
353,
3036,
344,
29889,
29956,
13427,
13,
9998,
353,
3036,
344,
29889,
9998,
13,
13,
13,
1753,
5235,
7295,
13,
1678,
1596,
703,
2558,
... |
loris/app/autoscripting/form_creater.py | gucky92/loris | 1 | 53628 | """Class to dynamically create the different forms in the config file
"""
import os
from wtforms import (
BooleanField, SelectField, StringField, FloatField, IntegerField,
FormField, TextAreaField, FieldList, DecimalField
)
from wtforms.validators import InputRequired, Optional, NumberRange, \
ValidationEr... | [
1,
9995,
2385,
304,
11200,
1653,
278,
1422,
7190,
297,
278,
2295,
934,
13,
15945,
29908,
13,
13,
5215,
2897,
13,
3166,
281,
29873,
9514,
1053,
313,
13,
1678,
11185,
3073,
29892,
7605,
3073,
29892,
1714,
3073,
29892,
27842,
3073,
29892,
... |
fellowcrm/upgrade/forms.py | Fellow-Consulting-AG/fellowcrm | 0 | 168272 | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, BooleanField
from wtforms.validators import DataRequired, Length, Email, EqualTo
from wtforms_sqlalchemy.fields import QuerySelectField
from fellowcrm.settings.models import Currency, TimeZone
class NewSystemUser(FlaskForm):... | [
1,
515,
29784,
29918,
29893,
13264,
1053,
2379,
1278,
2500,
13,
3166,
281,
29873,
9514,
1053,
1714,
3073,
29892,
25280,
3073,
29892,
3323,
2415,
3073,
29892,
11185,
3073,
13,
3166,
281,
29873,
9514,
29889,
3084,
4097,
1053,
3630,
19347,
2... |
CameraCalibration.py | lsmanoel/StereoVision | 0 | 23281 |
import numpy as np
import cv2
import glob
from matplotlib import pyplot as plt
class CameraCalibration():
def __init__(self):
pass
# ===========================================================
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@staticmethod
def find_chess(frame... | [
1,
29871,
13,
5215,
12655,
408,
7442,
13,
5215,
13850,
29906,
13,
5215,
13149,
13,
3166,
22889,
1053,
11451,
5317,
408,
14770,
13,
13,
1990,
24321,
7856,
26218,
7295,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1209,
13,
1... |
mufsim/insts/timedate.py | revarbat/mufsim | 1 | 59594 | import time
# from mufsim.errors import MufRuntimeError
from mufsim.insts.base import Instruction, instr
@instr("date")
class InstDate(Instruction):
def execute(self, fr):
when = time.localtime()
fr.data_push(int(when.tm_mday))
fr.data_push(int(when.tm_mon))
fr.data_push(int(when.... | [
1,
1053,
931,
13,
13,
29937,
515,
286,
1137,
3601,
29889,
12523,
1053,
341,
1137,
7944,
2392,
13,
3166,
286,
1137,
3601,
29889,
2611,
29879,
29889,
3188,
1053,
2799,
4080,
29892,
297,
710,
13,
13,
13,
29992,
262,
710,
703,
1256,
1159,... |
adjutant/startup/config.py | knikolla/adjutant | 21 | 1604042 | # Copyright (C) 2019 Catalyst Cloud 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-2.0
#
# Unless required by applicable la... | [
1,
396,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29929,
11732,
858,
14293,
19806,
13,
29937,
13,
29937,
1678,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
19... |
simple_rl/experiments/ExperimentClass.py | melroderick/simple_rl | 0 | 66282 | '''
ExperimentClass.py: Contains the Experiment Class for reproducing RL Experiments.
Purpose:
- Stores all relevant parameters in experiment directory for easy reproducibility.
- Auto generates plot using chart_utils.
- Can document learning activity.
'''
# Python imports.
from __future__ import print_fu... | [
1,
14550,
13,
1252,
15362,
2385,
29889,
2272,
29901,
2866,
2708,
278,
1222,
15362,
4134,
363,
9483,
3277,
390,
29931,
28224,
7862,
29889,
13,
13,
29925,
332,
4220,
29901,
13,
1678,
448,
624,
2361,
599,
8018,
4128,
297,
7639,
3884,
363,
... |
mealie/routes/meal_routes.py | stevenroh/mealie | 0 | 176811 | <filename>mealie/routes/meal_routes.py
from typing import List
from fastapi import APIRouter, HTTPException
from services.meal_services import MealPlan
from utils.snackbar import SnackResponse
router = APIRouter(tags=["Meal Plan"])
@router.get("/api/meal-plan/all/", response_model=List[MealPlan])
def get_all_meals(... | [
1,
529,
9507,
29958,
1004,
284,
347,
29914,
27894,
29914,
1004,
284,
29918,
27894,
29889,
2272,
13,
3166,
19229,
1053,
2391,
13,
13,
3166,
5172,
2754,
1053,
3450,
23971,
29892,
7331,
2451,
13,
3166,
5786,
29889,
1004,
284,
29918,
9916,
... |
ros/src/map_collector/src/navigator.py | jkulhanek/robot-visual-navigation | 13 | 194621 | import numpy as np
from controller import Controller
from wrappers import visualize
from collections import defaultdict
from math import pi
GRID_SIZE = 0.5
ROTATION_STEPS = 4
def move_position(position, rotation):
if rotation == 0:
return (position[0] + 1, position[1])
elif rotation == 1:
retu... | [
1,
1053,
12655,
408,
7442,
13,
3166,
4701,
1053,
15830,
13,
3166,
11463,
22437,
1053,
7604,
675,
13,
3166,
16250,
1053,
2322,
8977,
13,
3166,
5844,
1053,
2930,
13,
13,
14345,
1367,
29918,
14226,
353,
29871,
29900,
29889,
29945,
13,
1672... |
performance_measures.py | kkeya1/FCPH | 0 | 45492 | <reponame>kkeya1/FCPH
#%%
# Main source = Deep hit model, 'https://github.com/chl8856/DeepHit'
#%%
'''
This provide time-dependent Concordance index and Brier Score:
- Use weighted_c_index and weighted_brier_score, which are the unbiased estimates.
See equations and descriptions eq. (11) and (12) of the... | [
1,
529,
276,
1112,
420,
29958,
29895,
1989,
29874,
29896,
29914,
29943,
6271,
29950,
13,
29937,
7686,
30004,
13,
29937,
4241,
2752,
353,
21784,
7124,
1904,
29892,
525,
991,
597,
3292,
29889,
510,
29914,
305,
29880,
29947,
29947,
29945,
29... |
utils/read_data.py | ynztwlz/HSI_FewShot | 1 | 1617424 | import torch
from torch.utils.data import DataLoader,Dataset
import random
import numpy as np
from torch.utils.data.sampler import Sampler
#从数据集中选取support_set 和query_set
class get_SQ_set(object):
def __init__(self, data_classes, number_class, support_sample_num, query_sample_num):
self.data_classe... | [
1,
1053,
4842,
305,
30004,
13,
3166,
4842,
305,
29889,
13239,
29889,
1272,
1053,
3630,
10036,
29892,
16390,
24541,
30004,
13,
5215,
4036,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
3166,
4842,
305,
29889,
13239,
29889,
1272,
29889,
134... |
python/cohorte/boot/looper/AppHelper.py | isandlaTech/cohorte-runtime | 6 | 171306 | """
Original code from PyObjC-Cocoa
See: https://bitbucket.org/ronaldoussoren/pyobjc/
AppKit helpers.
Exported functions:
* runEventLoop - run NSApplicationMain in a safer way
* stopEventLoop - stops the event loop or terminates the application
* callAfter - call a function on the main thread (async)
"""
# Use cocoa... | [
1,
9995,
13,
26036,
775,
515,
10772,
9930,
29907,
29899,
29907,
22531,
13,
13393,
29901,
2045,
597,
2966,
21454,
29889,
990,
29914,
1617,
2741,
21167,
8085,
29914,
2272,
5415,
29883,
29914,
13,
13,
2052,
13117,
1371,
414,
29889,
13,
13,
... |
pyrfuniverse/envs/robotics/franka_cloth_fold_env.py | happyCoderJDFJJ/pyrfuniverse | 0 | 58917 | <reponame>happyCoderJDFJJ/pyrfuniverse
from pyrfuniverse.envs import RFUniverseGymGoalWrapper
from pyrfuniverse.utils import RFUniverseController
import numpy as np
from gym import spaces
from gym.utils import seeding
import copy
class FrankaClothFoldEnv(RFUniverseGymGoalWrapper):
metadata = {'render.modes': ['hu... | [
1,
529,
276,
1112,
420,
29958,
29882,
14862,
29907,
6119,
29967,
4037,
29967,
29967,
29914,
2272,
29878,
7692,
12193,
13,
3166,
282,
4316,
7692,
12193,
29889,
264,
4270,
1053,
390,
29943,
8110,
3901,
29954,
962,
8120,
284,
15646,
13,
3166... |
acme/agents/jax/dqn/builder.py | ostap-viniavskyi/acme | 1 | 70046 | # Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
21784,
29924,
513,
8364,
11763,
28873,
29889,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,... |
setup.py | getwarped/powershift-image | 2 | 1602427 | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Pytho... | [
1,
1053,
10876,
13,
5215,
2897,
13,
13,
3166,
731,
21245,
8789,
1053,
6230,
13,
13,
5426,
29918,
8216,
353,
1722,
877,
16310,
2303,
29889,
29878,
303,
2824,
949,
580,
13,
13,
1990,
14903,
353,
518,
13,
1678,
525,
21956,
358,
16034,
... |
MiniTwitter/MiniTwitter/serializer.py | camumbembe/mini_twitter | 0 | 119565 | <filename>MiniTwitter/MiniTwitter/serializer.py
from rest_framework import serializers
from .models import Tweet
class TweetModelSerializer(serializers.ModelSerializer):
class Meta:
model = Tweet
fiels = ('author', 'content', 'likes') | [
1,
529,
9507,
29958,
29924,
2172,
27418,
5171,
29914,
29924,
2172,
27418,
5171,
29914,
15550,
3950,
29889,
2272,
13,
3166,
1791,
29918,
4468,
1053,
7797,
19427,
13,
13,
3166,
869,
9794,
1053,
323,
16668,
13,
13,
1990,
323,
16668,
3195,
... |
tests/core/http/test_clienting.py | pfeairheller/hio | 1 | 177448 | <reponame>pfeairheller/hio<filename>tests/core/http/test_clienting.py
# -*- coding: utf-8 -*-
"""
Unittests for http clienting module
"""
import sys
import os
import time
from urllib.parse import urlsplit, quote_plus, unquote
import pytest
from hio import help
from hio.help import helping
from hio.help import Hict
... | [
1,
529,
276,
1112,
420,
29958,
29886,
1725,
1466,
29882,
4539,
29914,
29882,
601,
29966,
9507,
29958,
21150,
29914,
3221,
29914,
1124,
29914,
1688,
29918,
4645,
292,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
299... |
xkeysnail/.xkeysnail/config.py | tomato-300yen/dotfiles | 0 | 176692 | import re
from xkeysnail.transform import K, define_keymap, set_mark, with_mark
define_keymap(
lambda wm_class: wm_class not in ("Gnome-terminal", "Alacritty", "kitty"),
{
# cousor
K("LC-A"): with_mark(K("home")),
K("LC-E"): with_mark(K("end")),
K("LC-P"): K("UP"),
K("L... | [
1,
1053,
337,
13,
13,
3166,
921,
8149,
29876,
737,
29889,
9067,
1053,
476,
29892,
4529,
29918,
446,
962,
481,
29892,
731,
29918,
3502,
29892,
411,
29918,
3502,
13,
13,
7922,
29918,
446,
962,
481,
29898,
13,
1678,
14013,
281,
29885,
29... |
FinanceDicBuilder/DicBuilder.py | dukechain2333/Finance-Text-Analysis-System | 2 | 26227 | # -*- coding: UTF-8 -*-
from pyhanlp import *
from DataBaseOperator import DBConnector
class DicBuilder:
def __init__(self, id=-1):
"""
构建金融行业字典
:param id: 从数据库中通过index选择文本,默认-1即全选
"""
self.id = id
self.stopWords_path = r'EmotionBasedDic/stopwords.txt'
self... | [
1,
396,
448,
29930,
29899,
14137,
29901,
18351,
29899,
29947,
448,
29930,
29899,
13,
3166,
11451,
5403,
22833,
1053,
334,
13,
3166,
3630,
5160,
26486,
1053,
6535,
20971,
2801,
13,
13,
13,
1990,
28550,
5627,
29901,
13,
1678,
822,
4770,
2... |
src/school_college/models.py | paceite/Seelife---An-NGO-Website | 0 | 168308 | from django.db import models
from django.contrib.auth import get_user_model, authenticate, login, logout
User = get_user_model()
# Create your models here.
class Teacher(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField(max_length=255, unique=True, verbose_name='email address')... | [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
679,
29918,
1792,
29918,
4299,
29892,
15585,
403,
29892,
6464,
29892,
1480,
449,
13,
13,
2659,
353,
679,
29918,
1792,
29918,
4299,
580,
13,
13,
2993... |
googleanalytics/commands/query.py | ruber0id/google-analytics | 170 | 84439 | # encoding: utf-8
import json
import yaml
import click
import googleanalytics as ga
from googleanalytics import utils
from .common import cli
# TODO: the blueprint stuff can probably be simplified so that
# it's little more than just a call to ga.describe
def from_blueprint(scope, src):
description = yaml.load(... | [
1,
396,
8025,
29901,
23616,
29899,
29947,
13,
13,
5215,
4390,
13,
5215,
343,
8807,
13,
5215,
2828,
13,
13,
5215,
5386,
7054,
22026,
408,
10364,
13,
3166,
5386,
7054,
22026,
1053,
3667,
29879,
13,
3166,
869,
9435,
1053,
9335,
13,
13,
... |
src/drugcentral.py | AstrorEnales/GenCoNet | 2 | 100087 | <filename>src/drugcentral.py
#!/usr/bin/env python3
import io
import csv
from model.network import Network
from model.drug import Drug
from model.disease import Disease
from model.edge import Edge
network = Network()
with io.open('../data/DrugCentral/drugcentral_mappings.csv', 'r', encoding='utf-8', newline='') as f:... | [
1,
529,
9507,
29958,
4351,
29914,
29881,
11124,
25171,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
12013,
13,
5215,
11799,
13,
3166,
1904,
29889,
11618,
1053,
8527,
13,
3166,
1904,
29889,
2988... |
dev/tools/leveleditor/direct/showutil/TexMemWatcher.py | CrankySupertoon01/Toontown-2 | 1 | 1607750 | from pandac.PandaModules import *
from direct.showbase.DirectObject import DirectObject
import math
import copy
class TexMemWatcher(DirectObject):
"""
This class creates a separate graphics window that displays an
approximation of the current texture memory, showing the textures
that are resident and/o... | [
1,
515,
282,
392,
562,
29889,
29925,
5863,
2111,
2540,
1053,
334,
13,
3166,
1513,
29889,
4294,
3188,
29889,
17392,
2061,
1053,
8797,
2061,
13,
5215,
5844,
13,
5215,
3509,
13,
13,
1990,
8490,
11442,
24709,
261,
29898,
17392,
2061,
1125,
... |
timebox/tests/test_timebox_pandas.py | BrianKopp/timebox | 1 | 28621 | from timebox.timebox import TimeBox
from timebox.utils.exceptions import InvalidPandasIndexError
import pandas as pd
import numpy as np
import unittest
import os
import logging
class TestTimeBoxPandas(unittest.TestCase):
def test_save_pandas(self):
file_name = 'save_pandas.npb'
df = pd.read_csv('t... | [
1,
515,
931,
1884,
29889,
2230,
1884,
1053,
5974,
3313,
13,
3166,
931,
1884,
29889,
13239,
29889,
11739,
29879,
1053,
21403,
29925,
7086,
3220,
2392,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
5215,
443,
27958,
13,
521... |
model_zoo/research/cv/centernet/src/dcn_v2.py | chncwang/mindspore | 1 | 65336 | <reponame>chncwang/mindspore
# Copyright 2020 Huawei Technologies Co., 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-2.0
#
# Unless required b... | [
1,
529,
276,
1112,
420,
29958,
3049,
29883,
29893,
574,
29914,
24021,
1028,
487,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
379,
3357,
26599,
8364,
11763,
3189,
1696,
19806,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
1... |
travis/submit_issue.py | chrisma/rails-intro-16-mirror | 0 | 129857 | <gh_stars>0
#!/usr/bin/env python2.7
import logging, sys, json
from github3 import GitHub
logging.basicConfig(level=logging.DEBUG)
logging.getLogger('github3').setLevel(logging.WARNING)
log = logging.getLogger(__name__)
# Load json from Rspec run from stdin
test_runs = json.loads(sys.stdin.read())
# As Rspec should ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29906,
29889,
29955,
13,
13,
5215,
12183,
29892,
10876,
29892,
4390,
13,
3166,
18546,
29941,
1053,
25492,
13,
13,
21027,
29889,
16121,
... |
plttools/ep_curve.py | anishpatelwork/plt-tools | 0 | 1616504 | <gh_stars>0
""" EP Curve module for the representation of an EP Curve"""
from enum import Enum
import pandas as pd
import numpy as np
class EPType(Enum):
""" EP Type Enum representing type of EP Curve """
OEP = 1
AEP = 2
UNKNOWN = 3
class EPCurve:
"""EP Curve"""
RETURN_PERIODS = [1, 2, 5, 1... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
16502,
10837,
345,
3883,
363,
278,
8954,
310,
385,
16502,
10837,
345,
15945,
29908,
13,
3166,
14115,
1053,
1174,
398,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
74... |
src/hangar/remote/config.py | siddhu15798/hangar-py | 1 | 81073 | <reponame>siddhu15798/hangar-py
"""Provides editable config of server & rpc behavior from on disk yaml file
Portions of this code have been taken and modified from the "Dask" project.
URL: https://github.com/dask/dask
File: dask/config.py
Commit: <PASSWORD>
Accessed: 09 APR 2019
Dask License
-------------... | [
1,
529,
276,
1112,
420,
29958,
29879,
2205,
6905,
29896,
29945,
29955,
29929,
29947,
29914,
11895,
279,
29899,
2272,
13,
15945,
29908,
1184,
29894,
2247,
3863,
519,
2295,
310,
1923,
669,
364,
6739,
6030,
515,
373,
8086,
343,
8807,
934,
... |
test_day01.py | clfs/aoc2019 | 0 | 27988 | <filename>test_day01.py
def fuel_required(weight: int) -> int:
return weight // 3 - 2
def fuel_required_accurate(weight: int) -> int:
fuel = 0
while weight > 0:
weight = max(0, weight // 3 - 2)
fuel += weight
return fuel
def test_fuel_required() -> None:
cases = [(12, 2), (14, 2)... | [
1,
529,
9507,
29958,
1688,
29918,
3250,
29900,
29896,
29889,
2272,
13,
1753,
26413,
29918,
12403,
29898,
7915,
29901,
938,
29897,
1599,
938,
29901,
13,
1678,
736,
7688,
849,
29871,
29941,
448,
29871,
29906,
13,
13,
13,
1753,
26413,
29918,... |
Algorithms/Implementation/library-fine.py | RitvijSrivastava/Hackerrank-1 | 29 | 104546 | #!/bin/python3
import sys
total = 0
d1,m1,y1 = input().strip().split(' ')
d1,m1,y1 = [int(d1),int(m1),int(y1)]
d2,m2,y2 = input().strip().split(' ')
d2,m2,y2 = [int(d2),int(m2),int(y2)]
if(y2<y1):
total = 10000
elif (y2==y1):
if(m2<m1):
total = 500*(m1-m2)
elif(m1==m2):
if(d2<d1):
... | [
1,
18787,
2109,
29914,
4691,
29941,
13,
13,
5215,
10876,
13,
7827,
353,
29871,
29900,
13,
29881,
29896,
29892,
29885,
29896,
29892,
29891,
29896,
353,
1881,
2141,
17010,
2141,
5451,
877,
25710,
13,
29881,
29896,
29892,
29885,
29896,
29892,
... |
weleak.py | lectair/WeLeak-CLI | 2 | 151831 | import requests
import json
import cloudscraper
import re
import sys
from bs4 import BeautifulSoup
mode = input('''Select mode:
- Email: email
- Username: username
- Email by password: <PASSWORD>
- Username by password: elogin
- Phone (BETA): phone
- Domain (BETA): domain
- Email by hash: hash
''').lower()
tr... | [
1,
1053,
7274,
13,
5215,
4390,
13,
5215,
9570,
1557,
336,
546,
13,
5215,
337,
13,
5215,
10876,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
13,
13,
8513,
353,
1881,
877,
4907,
3549,
4464,
29901,
13,
448,
22608,
29901,
4876,
13,
... |
instagrapi/mixins/direct.py | wpbloger/instagrapi | 1 | 135651 | <reponame>wpbloger/instagrapi
import random
import re
import time
from pathlib import Path
from typing import List
from instagrapi.exceptions import ClientNotFoundError, DirectThreadNotFound
from instagrapi.extractors import (
extract_direct_message,
extract_direct_response,
extract_direct_short_thread,
... | [
1,
529,
276,
1112,
420,
29958,
11912,
14073,
914,
29914,
2611,
351,
336,
1631,
13,
5215,
4036,
13,
5215,
337,
13,
5215,
931,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
19229,
1053,
2391,
13,
13,
3166,
832,
351,
336,
1631,
29889,
1... |
tfCore_adversarial_attacks.py | nielsleadholm/CNN_Binding | 1 | 165651 | #!/usr/bin/env python3
import tensorflow as tf
import numpy as np
import os
import math
import foolbox
import scipy
import matplotlib.pyplot as plt
from PIL import Image
#Utilizes the FoolBox Python library (https://github.com/bethgelab/foolbox) to implement a variety
#of adversarial attacks against deep-learning mo... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
26110,
408,
15886,
13,
5215,
12655,
408,
7442,
13,
5215,
2897,
13,
5215,
5844,
13,
5215,
17928,
1884,
13,
5215,
4560,
2272,
13,
5215,
22889,
29889,
2272,
5317,
408,
... |
labs/08_frameworks/solutions/momentum_optimizer.py | soufiomario/labs-Deep-learning | 1,398 | 116986 | class MomentumGradientDescent(GradientDescent):
def __init__(self, params, lr=0.1, momentum=.9):
super(MomentumGradientDescent, self).__init__(params, lr)
self.momentum = momentum
self.velocities = [torch.zeros_like(param, requires_grad=False)
for param in params]... | [
1,
770,
341,
2932,
398,
25584,
993,
4002,
1760,
29898,
25584,
993,
4002,
1760,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
8636,
29892,
301,
29878,
29922,
29900,
29889,
29896,
29892,
19399,
21098,
29929,
1125,
13,
4706,
2428,... |
pypal/body/box.py | code-forger/PyPal | 0 | 1615439 | <reponame>code-forger/PyPal<filename>pypal/body/box.py
from pypal import private_globals as _pal
import ctypes as c
import weakref
from body import Body
class Box(Body):
""" A Dynamic Ridgid Cuboid. """
def __init__(self, pos, size, mass = 1.):
"""
Parameters:
pos: ``float[3]`` The x, ... | [
1,
529,
276,
1112,
420,
29958,
401,
29899,
1454,
914,
29914,
19737,
18210,
29966,
9507,
29958,
29886,
1478,
284,
29914,
2587,
29914,
1884,
29889,
2272,
13,
3166,
282,
1478,
284,
1053,
2024,
29918,
23705,
1338,
408,
903,
7830,
13,
5215,
... |
slixmpp/plugins/xep_0223.py | marconfus/slixmpp | 0 | 18246 | """
Slixmpp: The Slick XMPP Library
Copyright (C) 2012 <NAME>, <NAME>
This file is part of Slixmpp.
See the file LICENSE for copying permission.
"""
import logging
from slixmpp.xmlstream import register_stanza_plugin
from slixmpp.plugins.base import BasePlugin, register_plugin
log = logging.getLogg... | [
1,
9995,
13,
1678,
317,
492,
29916,
29885,
407,
29901,
450,
317,
1406,
1060,
3580,
29925,
9538,
13,
1678,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29906,
529,
5813,
10202,
529,
5813,
29958,
13,
1678,
910,
934,
338,
76... |
test-framework/test-suites/integration/tests/list/test_list_repo.py | sammeidinger/stack | 123 | 22272 | import json
class TestListRepo:
def test_invalid(self, host):
result = host.run('stack list repo test')
assert result.rc == 255
assert result.stderr.startswith('error - ')
def test_args(self, host, add_repo):
# Add a second repo so we can make sure it is skipped
add_repo('test2', 'test2url')
# Run list... | [
1,
1053,
4390,
13,
13,
1990,
4321,
1293,
5612,
29877,
29901,
13,
12,
1753,
1243,
29918,
20965,
29898,
1311,
29892,
3495,
1125,
13,
12,
12,
2914,
353,
3495,
29889,
3389,
877,
1429,
1051,
13761,
1243,
1495,
13,
12,
12,
9294,
1121,
29889... |
rebus/buses/dbusbus/master.py | dev-pro-jma/rebus | 25 | 1603590 | #! /usr/bin/env python
import sys
import signal
from collections import Counter, defaultdict
import dbus.service
import dbus.glib
from dbus.mainloop.glib import DBusGMainLoop
from rebus.descriptor import Descriptor
import gobject
import logging
from rebus.tools.config import get_output_altering_options
from rebus.tool... | [
1,
396,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
10876,
13,
5215,
7182,
13,
3166,
16250,
1053,
315,
5336,
29892,
2322,
8977,
13,
5215,
4833,
375,
29889,
5509,
13,
5215,
4833,
375,
29889,
29887,
1982,
13,
3166,
4... |
ledstripcontroller.py | mattytrentini/led_strip | 5 | 177383 | import uasyncio as asyncio
class LedStripController:
def __init__(self, enc, button_pin, fader_pins):
''' enc should be an instance of Encoder.
button_pin is expected to be an instance of machine.Pin.
fader_pins is expected to be an iterable of machine.PWM's.
'''
s... | [
1,
1053,
318,
294,
948,
3934,
408,
408,
948,
3934,
13,
13,
1990,
28934,
855,
6472,
2956,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2094,
29892,
2826,
29918,
12687,
29892,
285,
1664,
29918,
29886,
1144,
1125,
13,
4706,
... |
proceduralbricks/main.py | jncraton/procedural-bricks | 0 | 71547 | from random import random
from buildings import ModularBuilding
def main():
building = ModularBuilding()
with open('test.ldr', 'w') as out:
out.write(building.to_ldr())
if __name__ == '__main__':
main() | [
1,
515,
4036,
1053,
4036,
13,
13,
3166,
13814,
1053,
3382,
1070,
8893,
292,
13,
13,
1753,
1667,
7295,
13,
29871,
5214,
353,
3382,
1070,
8893,
292,
580,
13,
13,
29871,
411,
1722,
877,
1688,
29889,
430,
29878,
742,
525,
29893,
1495,
4... |
registrobrepp/ipnetwork/brtransferipnetworkcommand.py | ivcmartello/registrobrepp | 0 | 144810 | <reponame>ivcmartello/registrobrepp<gh_stars>0
from eppy.doc import EppTransferCommand
class BrEppTransferIpNetworkCommand(EppTransferCommand):
_path = ('epp', 'command', 'transfer', 'ipnetwork:transfer')
def __init__(self, op: str, roid: str):
extra_nsmap = {'ipnetwork': 'urn:ietf:params:xml:ns:ipne... | [
1,
529,
276,
1112,
420,
29958,
440,
4912,
442,
3156,
29914,
1727,
19150,
1030,
407,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
321,
23717,
29889,
1514,
1053,
382,
407,
4300,
571,
6255,
13,
13,
13,
1990,
1771,
29923,
407,
... |
uniflex_module_wifi_flex/ap_daemons.py | wishful-project/wishrem_wifi_flex | 0 | 163392 | import logging
import datetime
import os
import signal
import subprocess
__author__ = "<NAME>"
__copyright__ = "Copyright (c) 2017, Faculty of Electrical Engineering and Information Technologies, UKIM, Skopje, Macedonia"
__version__ = "0.1.0"
__email__ = <EMAIL>"
'''
ap_daemons class
Controlling the daemon processes ... | [
1,
1053,
12183,
13,
5215,
12865,
13,
5215,
2897,
13,
5215,
7182,
13,
5215,
1014,
5014,
13,
13,
1649,
8921,
1649,
353,
9872,
5813,
11903,
13,
1649,
8552,
1266,
1649,
353,
376,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
... |
labs/lab2/analyze.py | asmhatre96/nano266 | 15 | 170158 | <gh_stars>10-100
#!/usr/bin/env python
import re
import sys
import csv
import argparse
# This defines the patterns for extracting relevant data from the output
# files.
patterns = {
"energy": re.compile(r"total energy\s+=\s+([\d\.\-]+)\sRy"),
"ecut": re.compile(r"kinetic\-energy cutoff\s+=\s+([\d\.\-]+)\s+Ry... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
337,
13,
5215,
10876,
13,
5215,
11799,
13,
5215,
1852,
5510,
13,
13,
13,
29937,
910,... |
python/test.py | dugsong/libdnet | 103 | 108216 | <filename>python/test.py
#!/usr/bin/env python
import sys, unittest
from os import listdir
from interfacefinder import mac_addr,local_ip,loopback_intf
for dir in listdir('build'):
if dir.startswith('lib.'):
sys.path.insert(0, "build/" + dir)
import dnet
class AddrTestCase(unittest.TestCase):
def test_... | [
1,
529,
9507,
29958,
4691,
29914,
1688,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
10876,
29892,
443,
27958,
13,
3166,
2897,
1053,
1051,
3972,
13,
3166,
5067,
2886,
261,
1053,
5825,
29918,
10030,
... |
config/settings/production.py | rimphyd/Django-OPAC | 1 | 23709 | import django_heroku
from config.settings.base import *
DEBUG = False
SECRET_KEY = os.environ['SECRET_KEY']
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(asc... | [
1,
1053,
9557,
29918,
2276,
9154,
13,
13,
3166,
2295,
29889,
11027,
29889,
3188,
1053,
334,
13,
13,
13,
18525,
353,
7700,
13,
13,
13,
1660,
22245,
29911,
29918,
10818,
353,
2897,
29889,
21813,
1839,
1660,
22245,
29911,
29918,
10818,
203... |
custom_components/edgeos/__init__.py | kcleong/homeassistant-config | 0 | 61688 | """
This component provides support for Home Automation Manager (HAM).
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/edgeos/
"""
import logging
import sys
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant... | [
1,
9995,
13,
4013,
4163,
8128,
2304,
363,
8778,
15854,
362,
15629,
313,
29950,
5194,
467,
13,
2831,
901,
4902,
1048,
445,
4163,
29892,
3113,
2737,
304,
278,
5106,
472,
13,
991,
597,
5184,
29899,
465,
22137,
29889,
601,
29914,
14036,
2... |
example_02/app.py | moppermonster/alpine-python-falcon-examples | 0 | 63799 | '''
alpine-python-falcon example
In this example, we import one of our own scripts: myfunction.
We then modify Numbers() to return myfunction.myfunction()'s result when we perform a POST request.
'''
import falcon
from middleware import JSONTranslator
from myfunction import myfunction
class Hello_world(object):
... | [
1,
14550,
13,
284,
26215,
29899,
4691,
29899,
18263,
535,
1342,
13,
13,
797,
445,
1342,
29892,
591,
1053,
697,
310,
1749,
1914,
12078,
29901,
590,
2220,
29889,
13,
13,
4806,
769,
6623,
11848,
2596,
580,
304,
736,
590,
2220,
29889,
135... |
src/head_detector_vgg16.py | bill-lin/FCHD-Fully-Convolutional-Head-Detector | 648 | 87850 | <gh_stars>100-1000
import torch as t
from torch import nn
from torchvision.models import vgg16
from src.region_proposal_network import RegionProposalNetwork
from src.head_detector import Head_Detector
from src.config import opt
def decom_vgg16():
""" Load the default PyTorch model or the pre-trained caffe model. ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
5215,
4842,
305,
408,
260,
13,
3166,
4842,
305,
1053,
302,
29876,
13,
3166,
4842,
305,
4924,
29889,
9794,
1053,
325,
1505,
29896,
29953,
... |
tests/load_cmat_cmat10.py | ffreemt/cmat2aset | 0 | 60872 | """load cmat cmat10.
import matplotlib.pyplit as plt
import seaborn as sns
sns.set()
plt.ion() # interactive plot
plt.clf(); sns.heatmap(cmat, cmap="gist_earth_r").invert_yaxis()
plt.clf(); sns.heatmap(cmat, cmap="viridis_r").invert_yaxis()
"""
import pickle
from pathlib import Path
cdir = Path(__file__).parent.... | [
1,
9995,
1359,
274,
2922,
274,
2922,
29896,
29900,
29889,
13,
13,
5215,
22889,
29889,
2272,
2830,
408,
14770,
13,
5215,
409,
370,
1398,
408,
269,
1983,
13,
13,
29879,
1983,
29889,
842,
580,
13,
572,
29873,
29889,
291,
580,
29871,
396,... |
setup.py | awesome-archive/webspider | 0 | 518 | <filename>setup.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import find_packages, setup
from app import __version__
# get the dependencies and installs
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'requirements.txt')) as f:
all_requirements = f.read... | [
1,
529,
9507,
29958,
14669,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
2897,
13,
3166,
731,
21245,
8789,
1053,
1284,
2... |
HEPTools/__init__.py | weissercn/HEPtools | 0 | 142039 | <gh_stars>0
import sys
import os
os.environ["HEPTools"]=os.getcwd()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
10876,
13,
5215,
2897,
13,
359,
29889,
21813,
3366,
9606,
7982,
8789,
3108,
29922,
359,
29889,
657,
29883,
9970,
580,
13,
2
] |
python/list_namespace_limits.py | iamabhishek-dubey/kubernetes-rest-api | 1 | 126640 | <reponame>iamabhishek-dubey/kubernetes-rest-api<gh_stars>1-10
import kubernetes.client
from kubernetes.client.rest import ApiException
from kubernetes import config
def initiate_api():
"""Function to Initiate Kubernetes API"""
configuration = config.load_kube_config()
api_instance = kubernetes.client.CoreV... | [
1,
529,
276,
1112,
420,
29958,
2829,
370,
22880,
354,
29895,
29899,
29881,
431,
1032,
29914,
29895,
17547,
29899,
5060,
29899,
2754,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
413,
17547,
29889,
4645,
13,
... |
pathfinder/AStar.py | simplykamil6/2d-pathfinding-visualiser | 1 | 78123 | from queue import PriorityQueue
import pygame
from mazecreator.MazeCreator import MazeCreator
from mazecreator.Picasso import Picasso
from mazecreator.RGBColours import RGBColours
from mazecreator.SquareState import SquareState
class AStar:
"""
Poor man's implementation of A* Pathfinding algorithm
"""
... | [
1,
515,
9521,
1053,
22096,
537,
10620,
13,
13,
5215,
22028,
13,
13,
3166,
611,
17938,
276,
1061,
29889,
29924,
28334,
9832,
1061,
1053,
17326,
29872,
9832,
1061,
13,
3166,
611,
17938,
276,
1061,
29889,
29925,
293,
9979,
1053,
14612,
997... |
setup.py | bmustiata/archer-py | 0 | 122028 | from setuptools import setup
from setuptools import find_packages
with open("README.rst") as readme_file:
readme = readme_file.read()
packages = find_packages()
setup(
name="project_archer",
version="0.3.0",
description="Switch projects with ease.",
long_description=readme,
author="<NAME>",
... | [
1,
515,
731,
21245,
8789,
1053,
6230,
13,
3166,
731,
21245,
8789,
1053,
1284,
29918,
8318,
13,
13,
2541,
1722,
703,
16310,
2303,
29889,
29878,
303,
1159,
408,
1303,
1004,
29918,
1445,
29901,
13,
1678,
1303,
1004,
353,
1303,
1004,
29918,... |
hough_lines.py | will-r-wang/NTP-Remote-Sensing | 0 | 152245 | <filename>hough_lines.py
"""
Purpose
-------
Takes in an input image and calculates its top `n` Hough lines and predicted major angle
Inputs
-------
- Input image to which Hough transform is applied to
- (Optional) VERBOSE parameter which decides whether additional matplotlib plots are made
- (Optional) output im... | [
1,
529,
9507,
29958,
29882,
820,
29918,
9012,
29889,
2272,
13,
15945,
29908,
13,
29925,
332,
4220,
13,
26589,
13,
29911,
6926,
297,
385,
1881,
1967,
322,
3408,
1078,
967,
2246,
421,
29876,
29952,
379,
820,
3454,
322,
25383,
4655,
10696,... |
packages/w3af/w3af/core/data/url/handlers/cookie_handler.py | ZooAtmosphereGroup/HelloPackages | 3 | 21370 | <gh_stars>1-10
"""
cookie_handler.py
Copyright 2006 <NAME>
This file is part of w3af, http://w3af.org/ .
w3af 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 version 2 of the License.
w3af is distributed in the... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
21509,
29918,
13789,
29889,
2272,
13,
13,
11882,
1266,
29871,
29906,
29900,
29900,
29953,
529,
5813,
29958,
13,
13,
4013,
934,
338,
760,
310,
281,
... |
Balsn_CTF_2019/Need_some_flags/solution/Need_some_flags_2_exp.py | sces60107/My-CTF-Challenges | 3 | 40266 | from pwn import *
import hashlib
r=remote("172.16.17.32",10122)
## pow
temp=r.recvuntil("sha256( ")
prefix=r.recvline().split()[0]
i=0
while True:
data=prefix+str(i)
Hash=hashlib.sha256(data)
if Hash.hexdigest()[:5]=="0"*5:
r.sendline(str(i))
break
i+=1
## get flag
r.sendline("0")
r.sendline("system... | [
1,
515,
282,
1233,
1053,
334,
13,
5215,
6608,
1982,
13,
13,
29878,
29922,
16674,
703,
29896,
29955,
29906,
29889,
29896,
29953,
29889,
29896,
29955,
29889,
29941,
29906,
613,
29896,
29900,
29896,
29906,
29906,
29897,
13,
2277,
4764,
13,
1... |
python/cuml/benchmark/ci_benchmark.py | taureandyernv/cuml | 3 | 1611168 | <reponame>taureandyernv/cuml
#
# 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... | [
1,
529,
276,
1112,
420,
29958,
941,
545,
13910,
824,
29894,
29914,
29883,
398,
29880,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29929,
29892,
405,
13044,
10764,
315,
1955,
29925,
1955,
8098,
29889,
... |
fgivenx/test/test_mass.py | ejhigson/fgivenx | 11 | 11716 | import numpy
import pytest
import os
from shutil import rmtree
from numpy.testing import assert_allclose
import scipy.stats
import scipy.integrate
import scipy.special
from fgivenx.mass import PMF, compute_pmf
def gaussian_pmf(y, mu=0, sigma=1):
return scipy.special.erfc(numpy.abs(y-mu)/numpy.sqrt(2)/sigma)
def... | [
1,
1053,
12655,
13,
5215,
11451,
1688,
13,
5215,
2897,
13,
3166,
528,
4422,
1053,
364,
4378,
929,
13,
3166,
12655,
29889,
13424,
1053,
4974,
29918,
497,
5358,
13,
5215,
4560,
2272,
29889,
16202,
13,
5215,
4560,
2272,
29889,
14146,
403,
... |
FSMSIM/expr/__init__.py | FSMSIM/FSMSIM | 0 | 175120 | from FSMSIM.expr.and_expr import *
from FSMSIM.expr.arr_access_expr import *
from FSMSIM.expr.arr_expr import *
from FSMSIM.expr.bool_expr import *
from FSMSIM.expr.concat_expr import *
from FSMSIM.expr.eq_expr import *
from FSMSIM.expr.expr import *
from FSMSIM.expr.neq_expr import *
from FSMSIM.expr.or_expr import *
... | [
1,
515,
383,
29903,
4345,
7833,
29889,
13338,
29889,
392,
29918,
13338,
1053,
334,
13,
3166,
383,
29903,
4345,
7833,
29889,
13338,
29889,
2749,
29918,
5943,
29918,
13338,
1053,
334,
13,
3166,
383,
29903,
4345,
7833,
29889,
13338,
29889,
2... |
alembic/versions/1d3b0df7f698_add_users_table.py | go-lab/appcomposer | 1 | 126982 | <filename>alembic/versions/1d3b0df7f698_add_users_table.py
"""Add Users table
Revision ID: <PASSWORD>
Revises: None
Create Date: 2013-09-16 13:16:21.622369
"""
# revision identifiers, used by Alembic.
revision = '<PASSWORD>'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
##... | [
1,
529,
9507,
29958,
744,
8337,
293,
29914,
26100,
29914,
29896,
29881,
29941,
29890,
29900,
2176,
29955,
29888,
29953,
29929,
29947,
29918,
1202,
29918,
7193,
29918,
2371,
29889,
2272,
13,
15945,
29908,
2528,
23861,
1591,
13,
13,
1123,
492... |
pythonexercicios/ex074.py | andrebatist4/cursoemvideo-python | 0 | 150846 | <gh_stars>0
import numpy as np
alea = (np.random.randint(0, 10, (5)))
print(alea)
print(f'O maior número sorteado foi {max(alea)}')
print(f'O menor número sorteado foi {min(alea)}')
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12655,
408,
7442,
13,
744,
29874,
353,
313,
9302,
29889,
8172,
29889,
9502,
524,
29898,
29900,
29892,
29871,
29896,
29900,
29892,
313,
29945,
4961,
13,
2158,
29898,
744,
29874,
2989... |
proud/unification/interface.py | RemuLang/proud | 16 | 88561 | <gh_stars>10-100
from proud.unification.type_encode import *
from proud.unification.tc_make import make
from contextlib import contextmanager
import typing as t
class TCState:
def __init__(self):
make(self)
def push_level(self) -> Level:
raise NotImplementedError
def new_var(self, *props... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
22314,
29889,
348,
2450,
29889,
1853,
29918,
12508,
1053,
334,
13,
3166,
22314,
29889,
348,
2450,
29889,
14246,
29918,
5675,
1053,
1207,
13,
3166,
... |
pbj/electrostatics/pb_formulation/__init__.py | kstylesc/PBJ | 0 | 152100 | import pbj.electrostatics.pb_formulation.formulations as formulations
import pbj.electrostatics.pb_formulation.preconditioning as preconditioning | [
1,
1053,
282,
29890,
29926,
29889,
15436,
307,
6112,
1199,
29889,
24381,
29918,
689,
2785,
29889,
689,
8250,
408,
883,
8250,
13,
5215,
282,
29890,
29926,
29889,
15436,
307,
6112,
1199,
29889,
24381,
29918,
689,
2785,
29889,
1457,
16122,
2... |
200-299/200-209/202.py | dcragusa/LeetCode | 0 | 52737 | """
Write an algorithm to determine if a number n is happy.
A happy number is a number defined by the following process:
- Starting with any positive integer, replace the number by the sum of the squares of its digits.
- Repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycl... | [
1,
9995,
13,
6113,
385,
5687,
304,
8161,
565,
263,
1353,
302,
338,
9796,
29889,
13,
13,
29909,
9796,
1353,
338,
263,
1353,
3342,
491,
278,
1494,
1889,
29901,
13,
29899,
23748,
411,
738,
6374,
6043,
29892,
5191,
278,
1353,
491,
278,
... |
sesame/utils.py | GamePad64/django-sesame | 0 | 35123 | <reponame>GamePad64/django-sesame<gh_stars>0
from __future__ import unicode_literals
from .backends import UrlAuthBackendMixin
from .compatibility import urlencode
from .middleware import TOKEN_NAME
def get_parameters(user):
"""
Return GET parameters to log in `user`.
"""
return {TOKEN_NAME: UrlAuth... | [
1,
529,
276,
1112,
420,
29958,
14199,
20369,
29953,
29946,
29914,
14095,
29899,
29879,
267,
420,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
3166,
869,
1627,
19... |
frontend/main.py | boazjohn/quarryio | 1 | 118465 | #!/usr/bin/python
# Standard Library
import argparse
import datetime
import json
import logging
import os
import subprocess
from functools import wraps
# Third Party
import requests
import mixingboard
from chassis.database import db_session
from chassis.models import User, Account, JobHistory, Notification, Token
fro... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
13,
29937,
10117,
9538,
13,
5215,
1852,
5510,
13,
5215,
12865,
13,
5215,
4390,
13,
5215,
12183,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
3166,
2090,
312,
8789,
1053,
11463,
567,
13,
13,
... |
our_interfaceGAN/celebahq_utils/dex/networks/classifiers/attribute_utils.py | BillyXYB/TransEditor | 4 | 95056 | import torch
import os
from . import attribute_classifier
import glob
softmax = torch.nn.Softmax(dim=1)
def downsample(images, size=256):
# Downsample to 256x256. The attribute classifiers were built for 256x256.
# follows https://github.com/NVlabs/stylegan/blob/master/metrics/linear_separability.py#L127
... | [
1,
1053,
4842,
305,
13,
5215,
2897,
13,
3166,
869,
1053,
5352,
29918,
1990,
3709,
13,
5215,
13149,
13,
13,
2695,
3317,
353,
4842,
305,
29889,
15755,
29889,
6295,
615,
3317,
29898,
6229,
29922,
29896,
29897,
13,
13,
1753,
1623,
11249,
... |
CPAC/nuisance/__init__.py | gkiar/C-PAC | 125 | 94102 | from .utils import (
find_offending_time_points,
temporal_variance_mask,
generate_summarize_tissue_mask,
NuisanceRegressor
)
from .nuisance import (
create_regressor_workflow,
create_nuisance_regression_workflow,
filtering_bold_and_regressors
)
from .bandpass import (
bandpass_voxels
)... | [
1,
515,
869,
13239,
1053,
313,
13,
1678,
1284,
29918,
2696,
2548,
29918,
2230,
29918,
9748,
29892,
13,
1678,
25406,
29918,
1707,
8837,
29918,
13168,
29892,
13,
1678,
5706,
29918,
2083,
3034,
675,
29918,
29873,
15118,
29918,
13168,
29892,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.