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 |
|---|---|---|---|---|---|
shelter/migrations/0024_auto_20201018_2225.py | kermox/schronisko-krakow | 1 | 163450 | # Generated by Django 3.0.5 on 2020-10-18 22:25
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shelter', '0023_animal_adopted_by'),
]
operations = [
migrations.AlterField(
model_name='animal... | [
1,
396,
3251,
630,
491,
15337,
29871,
29941,
29889,
29900,
29889,
29945,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29896,
29900,
29899,
29896,
29947,
29871,
29906,
29906,
29901,
29906,
29945,
13,
13,
5215,
9557,
29889,
2585,
29889,
9794,... |
tests/test_pycolor.py | edonyzpc/toolkitem | 3 | 30877 | from __future__ import print_function
import sys
sys.path.append('./')
from colorprinter.pycolor import PyColor
from colorprinter.pycolor import cprint
@PyColor('ured')
def printer(string):
a = 1
b = 2
print(str((a + b)**4) + string)
class TestClass(object):
def test_pycolor(self):
printer('ed... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
5215,
10876,
13,
9675,
29889,
2084,
29889,
4397,
877,
6904,
1495,
13,
3166,
2927,
558,
1639,
29889,
2272,
2780,
1053,
10772,
3306,
13,
3166,
2927,
558,
1639,
29889,
2272,
278... |
chat/models.py | nim65s/tutochan | 0 | 177902 | from django.conf import settings
from django.db import models
from ndh.models import Links, NamedModel, TimeStampedModel
class Chan(TimeStampedModel, NamedModel, Links):
pass
class Message(TimeStampedModel):
chan = models.ForeignKey(Chan, on_delete=models.CASCADE)
user = models.ForeignKey(settings.AUTH... | [
1,
515,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
13,
3166,
29871,
299,
29882,
29889,
9794,
1053,
6645,
29879,
29892,
405,
2795,
3195,
29892,
5974,
855,
1160,
287,
3195,
13,
13,
13,
1990,
22433,
29898,
... |
rbldap/accounts/uid.py | butlerx/rb-ldap-python | 0 | 196636 | <filename>rbldap/accounts/uid.py<gh_stars>0
"""uid functions"""
from .clients import LDAPConnection
async def find_available_uid(ldap_conn: LDAPConnection) -> int:
"""
Seach RB ldap for next available uid
Args:
ldap_conn: LDAP connection to use for searching
Returns:
next avilable u... | [
1,
529,
9507,
29958,
6050,
430,
481,
29914,
10149,
29879,
29914,
5416,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
5416,
3168,
15945,
29908,
13,
13,
3166,
869,
11303,
1237,
1053,
365,
29928,
3301,
5350,
13... |
tests/plugins/__init__.py | kyldery/streamlink | 1 | 166661 | from streamlink.plugin import Plugin
generic_negative_matches = [
"http://example.com/",
"https://example.com/",
"https://example.com/index.html",
]
class PluginCanHandleUrl:
__plugin__ = None
# A list of URLs that should match any of the plugin's URL regexes.
# ["https://foo", "https://b... | [
1,
515,
4840,
2324,
29889,
8582,
1053,
1858,
3851,
13,
13,
13,
19206,
29918,
22198,
29918,
20317,
353,
518,
13,
1678,
376,
1124,
597,
4773,
29889,
510,
29914,
613,
13,
1678,
376,
991,
597,
4773,
29889,
510,
29914,
613,
13,
1678,
376,
... |
gtk/ch6_header.py | ykyang/org.allnix.python | 0 | 192290 | """
https://python-gtk-3-tutorial.readthedocs.io/en/latest/layout.html#headerbar
@author: <NAME> <<EMAIL>>
"""
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gio
class HeaderBarWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="HeaderBar Demo")
s... | [
1,
9995,
13,
991,
597,
4691,
29899,
4141,
29895,
29899,
29941,
29899,
12631,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
2680,
29889,
1420,
29937,
6672,
1646,
13,
13,
29992,
8921,
29901,
529,
5813,
29958,
353... |
OverFitting Simulation.py | escha2019/python_codes | 0 | 71767 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import normalize
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
29937,
512,
29961,
29896,
5387,
13,
13,
13,
3166,
2071,
19668,
29889,
4299,
29918,
21731,
1053,
7945,
29918,
1688,
29918,
5451,
13,
3166... |
setup.py | gsoft-inc/github-secret-finder | 4 | 1615652 | <gh_stars>1-10
from setuptools import setup, find_packages
setup(
name='github_secret_finder',
version='2.0.0',
description='Script to monitor commits from Github users and organizations for secrets.',
url='https://github.com/gsoft-inc/github-secret-finder',
author='<NAME>',
author_email='<EMAI... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
13,
14669,
29898,
13,
1678,
1024,
2433,
3292,
29918,
19024,
29918,
2886,
261,
742,
13,
1678,
1873,
... |
backend/boards/admin.py | LucasSantosGuedes/App-Gestao | 142 | 108222 | from django.contrib import admin
from .models import Board, List, Item, Label, Comment, Attachment, Notification
admin.site.register(Board)
admin.site.register(List)
admin.site.register(Item)
admin.site.register(Label)
admin.site.register(Comment)
admin.site.register(Attachment)
admin.site.register(Notification)
| [
1,
515,
9557,
29889,
21570,
1053,
4113,
13,
3166,
869,
9794,
1053,
12590,
29892,
2391,
29892,
10976,
29892,
15796,
29892,
461,
29892,
6212,
25117,
29892,
28578,
13,
13,
6406,
29889,
2746,
29889,
9573,
29898,
28397,
29897,
13,
6406,
29889,
... |
ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/spnego_kerberos_auth.py | zyclove/ambari | 0 | 138588 | <filename>ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/spnego_kerberos_auth.py
#!/usr/bin/python2
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright o... | [
1,
529,
9507,
29958,
1117,
1306,
29899,
2527,
10817,
29914,
1117,
1306,
29899,
2527,
10817,
29899,
3069,
29899,
3712,
2105,
292,
29914,
4351,
29914,
3396,
29914,
4691,
29914,
3221,
29914,
1028,
10313,
29918,
3946,
495,
359,
29918,
5150,
298... |
src/os_detection/sequence_generation/sequence_generation.py | Deacllock/OSpy | 0 | 130584 | from scapy.all import *
import time
from os_detection.fingerprints import Result, FingerPrint
from os_detection.sequence_generation.seq import get_seq
from os_detection.sequence_generation.t1 import get_t1
SEQ_START = 22000
ACK_START = 44000
SPORT_START = 63000
TCP_PROBES_TIMES = []
# Send TCP probes with given pa... | [
1,
515,
885,
27580,
29889,
497,
1053,
334,
13,
5215,
931,
13,
13,
3166,
2897,
29918,
29881,
2650,
428,
29889,
29888,
5621,
2158,
29879,
1053,
7867,
29892,
383,
5621,
11816,
13,
3166,
2897,
29918,
29881,
2650,
428,
29889,
16506,
29918,
4... |
framework/Decorators/Parallelization.py | rinelson456/raven | 1 | 74557 | <filename>framework/Decorators/Parallelization.py
# Copyright 2017 Battelle Energy Alliance, 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... | [
1,
529,
9507,
29958,
4468,
29914,
6185,
272,
4097,
29914,
2177,
6553,
2133,
29889,
2272,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
14077,
1808,
24836,
29855,
29892,
365,
12182,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,... |
tests/test_parser_identifier.py | mvisat/kopyt | 2 | 68913 | <reponame>mvisat/kopyt
import unittest
from kopyt import node
from . import TestParserBase
class TestParserSimpleIdentifier(TestParserBase):
def do_test(self, code: str) -> node.SimpleIdentifier:
return super().do_test("parse_simple_identifier", code,
node.SimpleIdentifier)... | [
1,
529,
276,
1112,
420,
29958,
29885,
1730,
271,
29914,
29895,
2270,
29873,
13,
5215,
443,
27958,
13,
13,
3166,
413,
2270,
29873,
1053,
2943,
13,
3166,
869,
1053,
4321,
11726,
5160,
13,
13,
13,
1990,
4321,
11726,
15427,
12889,
29898,
... |
setup.py | jsdnlb/Tangelo-challenge | 0 | 27530 | from setuptools import setup, find_packages
# Building and Distributing Packages with Setuptools
# Documentation here: https://setuptools.pypa.io/en/latest/setuptools.html
setup(name='app', version='1.0', packages=find_packages())
| [
1,
515,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
13,
29937,
17166,
322,
6652,
1091,
17068,
18744,
1179,
411,
3789,
21245,
8789,
13,
29937,
10854,
362,
1244,
29901,
2045,
597,
842,
21245,
8789,
29889,
29886,
1478,
29874,... |
src/operator/transformer/align.py | k-harada/abstraction-and-reasoning-challenge | 3 | 37801 | <filename>src/operator/transformer/align.py<gh_stars>1-10
from heapq import heappop, heappush
import numpy as np
from src.data import Problem, Case, Matter
from src.operator.mapper.map_connect import MapConnect
def align_xy(x0_arr: np.array, y0_arr: np.array, x1_arr: np.array, y1_arr: np.array, c_arr: np.array) -> np... | [
1,
529,
9507,
29958,
4351,
29914,
6891,
29914,
9067,
261,
29914,
2520,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
16947,
29939,
1053,
540,
932,
459,
29892,
540,
932,
1878,
13,
5215,
12655,
40... |
homeassistant/components/tradfri.py | automatemyhome/home-assistant-amh | 1 | 199147 | <reponame>automatemyhome/home-assistant-amh
"""
Support for Ikea Tradfri.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/ikea_tradfri/
"""
import asyncio
import logging
from uuid import uuid4
import voluptuous as vol
import homeassistant.helpers.confi... | [
1,
529,
276,
1112,
420,
29958,
17405,
271,
6764,
5184,
29914,
5184,
29899,
465,
22137,
29899,
314,
29882,
13,
15945,
29908,
13,
14039,
363,
306,
446,
29874,
18375,
7932,
29889,
13,
13,
2831,
901,
4902,
1048,
445,
4163,
29892,
3113,
2737... |
app/tasker/tasks/models.py | jaredlockhart/django-htmx-todo | 4 | 142784 | from django.db import models
from django.db.models.query import QuerySet
from django.urls import reverse
class TaskList(models.Model):
name = models.CharField(max_length=255)
slug = models.CharField(max_length=255)
tasks: QuerySet["Task"]
class Meta:
verbose_name = "Task List"
verbos... | [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
2585,
29889,
9794,
29889,
1972,
1053,
13641,
2697,
13,
3166,
9557,
29889,
26045,
1053,
11837,
13,
13,
13,
1990,
9330,
1293,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
35... |
optionstrader/script.py | Zaitsev11/Optionstrader | 6 | 89761 | # TODO
# Fix the importing
# import CustomName
# ...
# obj = CustomName()
# obj.account.get_balance()
# obj.parser.extract_symbols()
import __init__
from __init__ import Account
from __init__ import Webservice
from __init__ import Database
from __init__ import Parser
import sys, json
if __name__ == "__main__":
#... | [
1,
396,
14402,
13,
29937,
24778,
278,
28348,
13,
29937,
1053,
8701,
1170,
13,
29937,
2023,
13,
29937,
5446,
353,
8701,
1170,
580,
13,
29937,
5446,
29889,
10149,
29889,
657,
29918,
5521,
749,
580,
13,
29937,
5446,
29889,
16680,
29889,
21... |
tenants/admin.py | ibowditch/polls | 0 | 176397 | <filename>tenants/admin.py
from django.db import models
from django.contrib import admin
from django_tenants.admin import TenantAdminMixin
from .models import Client, Domain
@admin.register(Client)
class ClientAdmin(TenantAdminMixin, admin.ModelAdmin):
list_display = ('name', 'paid_until')
# @admin.register(... | [
1,
529,
9507,
29958,
841,
1934,
29914,
6406,
29889,
2272,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
29918,
841,
1934,
29889,
6406,
1053,
12444,
424,
12754,
29924,
861,
262,
13,
13... |
Mundo 2/Ex46.py | legna7/Python | 2 | 65855 | <filename>Mundo 2/Ex46.py
from time import sleep
print(f'{"-=-" * 7}[CONTAGEM REGRESSIVA]{"-=-" * 7}')
print('''Vai estourar os fogos de artifício daqui a 10 segundos,
vamos começar a contar!''')
sleep(1)
for c in range(10, -1, -1):
print(c)
sleep(1)
print('BOOM! POOW! BOOM!')
print('AEEEEEE! OS FOGOS ESTOURARA... | [
1,
529,
9507,
29958,
29924,
6201,
29871,
29906,
29914,
1252,
29946,
29953,
29889,
2272,
13,
3166,
931,
1053,
8709,
13,
2158,
29898,
29888,
29915,
6377,
29899,
10457,
29908,
334,
29871,
29955,
4400,
6007,
6040,
1692,
29924,
5195,
29954,
2678... |
data/scaling/DataScaler.py | khoehlein/CNNs-for-Wind-Field-Downscaling | 5 | 175030 | import numpy as np
import torch
import torch.nn as nn
class DataScaler(nn.Module):
def __init__(
self,
bias=None, scale=None,
channels=None, dtype=None, device=None,
**kwargs
):
super(DataScaler, self).__init__()
if bias is None:
asse... | [
1,
1053,
12655,
408,
7442,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
13,
13,
1990,
3630,
29636,
261,
29898,
15755,
29889,
7355,
1125,
13,
1678,
822,
4770,
2344,
12035,
13,
9651,
1583,
29892,
13,
9651... |
clusterval/validation.py | Nuno09/clusterval | 3 | 125697 | <filename>clusterval/validation.py
"""
Function evaluate does hierarchical clustering and validation of it's results.
Validation can be done with external or internal indices, or both.
"""
from scipy.cluster.hierarchy import dendrogram, fcluster, cut_tree
from fastcluster import linkage
from scipy.spatial.distance ... | [
1,
529,
9507,
29958,
19594,
791,
29914,
18157,
29889,
2272,
13,
15945,
29908,
13,
6678,
14707,
947,
6128,
1279,
936,
16993,
3241,
322,
8845,
310,
372,
29915,
29879,
2582,
29889,
13,
19448,
508,
367,
2309,
411,
7029,
470,
7463,
16285,
29... |
auth-api/src/auth_api/resources/org_products.py | severinbeauvais/sbc-auth | 0 | 273 | <gh_stars>0
# Copyright © 2019 Province of British Columbia
#
# 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,
29900,
13,
29937,
14187,
1266,
29871,
30211,
29871,
29906,
29900,
29896,
29929,
17325,
310,
4908,
15411,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
... |
tests/game_utils_test.py | TylerYep/wolfbot | 3 | 102079 | <gh_stars>1-10
import pytest
from tests.conftest import override_input, verify_output_string
from wolfbot.enums import Role
from wolfbot.game_utils import (
find_all_player_indices,
get_center,
get_numeric_input,
get_player,
print_roles,
swap_characters,
)
class TestPrintRoles:
"""Tests f... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
11451,
1688,
13,
13,
3166,
6987,
29889,
535,
615,
342,
1053,
5712,
29918,
2080,
29892,
11539,
29918,
4905,
29918,
1807,
13,
3166,
281,
4369,
7451,
29889,
264,
... |
Algorithms/5_Searching/11.py | abphilip-codes/Hackerrank_DSA | 1 | 39374 | <filename>Algorithms/5_Searching/11.py
# https://www.hackerrank.com/challenges/short-palindrome/problem
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'shortPalindrome' function below.
#
# The function is expected to return an INTEGER.
# The function accepts STRING s as para... | [
1,
529,
9507,
29958,
22461,
12404,
29914,
29945,
29918,
7974,
292,
29914,
29896,
29896,
29889,
2272,
13,
29937,
2045,
597,
1636,
29889,
29882,
28940,
10003,
29889,
510,
29914,
305,
16047,
267,
29914,
12759,
29899,
7830,
513,
4871,
29914,
17... |
simulator/thruster_plotter.py | ErikRowe/Bachelor-E2205 | 1 | 48935 | <reponame>ErikRowe/Bachelor-E2205
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
lengths = np.array([
[0.156, 0.111, 0.085],
[0.156, -0.111, 0.085],
[-0.156, 0.111, 0.085],
[-0.156, -0.111, 0.085],
[0.12,... | [
1,
529,
276,
1112,
420,
29958,
29923,
5357,
4301,
29872,
29914,
29933,
496,
12779,
29899,
29923,
29906,
29906,
29900,
29945,
13,
3166,
286,
572,
29918,
10154,
29895,
1169,
29889,
29885,
5317,
29941,
29881,
1053,
319,
9100,
29941,
29928,
13,... |
homeassistant/components/tesla/device_tracker.py | domwillcode/home-assistant | 23 | 61446 | """Support for tracking Tesla cars."""
import logging
from homeassistant.components.device_tracker import SOURCE_TYPE_GPS
from homeassistant.components.device_tracker.config_entry import TrackerEntity
from . import DOMAIN as TESLA_DOMAIN, TeslaDevice
_LOGGER = logging.getLogger(__name__)
async def async_setup_entr... | [
1,
9995,
14039,
363,
23110,
323,
267,
433,
18647,
1213,
15945,
13,
5215,
12183,
13,
13,
3166,
3271,
465,
22137,
29889,
14036,
29889,
10141,
29918,
3018,
4937,
1053,
7791,
4574,
4741,
29918,
11116,
29918,
29954,
7024,
13,
3166,
3271,
465,
... |
sandbox/grist/migrations.py | gristlabs/grist-core | 2,667 | 79126 | <filename>sandbox/grist/migrations.py
import json
import re
import six
from six.moves import xrange
import actions
import identifiers
import schema
import summary
import table_data_set
import logger
log = logger.Logger(__name__, logger.INFO)
# PHILOSOPHY OF MIGRATIONS.
#
# We should probably never remove, modify, or... | [
1,
529,
9507,
29958,
29879,
26738,
29914,
629,
391,
29914,
26983,
800,
29889,
2272,
13,
5215,
4390,
13,
5215,
337,
13,
13,
5215,
4832,
13,
3166,
4832,
29889,
13529,
267,
1053,
921,
3881,
13,
13,
5215,
8820,
13,
5215,
2893,
14903,
13,
... |
tools/make_folders.py | leonzucchini/recipes | 8 | 31509 | <filename>tools/make_folders.py
import os
import sys
import shutil
import re
def make_output_folder(folder_path, debug=False):
""" Make folder for output, checking for previous results """
# Skip if debug (avoids replace prompt)
if debug:
print "FolderSetup warning: Not creating di... | [
1,
529,
9507,
29958,
8504,
29914,
5675,
29918,
8771,
414,
29889,
2272,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
528,
4422,
13,
5215,
337,
13,
13,
1753,
1207,
29918,
4905,
29918,
12083,
29898,
12083,
29918,
2084,
29892,
4744,
29922,
88... |
bounties_api/std_bounties/migrations/0003_bountystate_event.py | tenthirtyone/BountiesAPI | 45 | 173151 | <reponame>tenthirtyone/BountiesAPI
# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-04-18 22:15
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
depend... | [
1,
529,
276,
1112,
420,
29958,
29873,
9097,
13163,
650,
29914,
29933,
792,
583,
8787,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29896,
29896,
... |
script/organiseTaskList.py | shawnwun/woz | 13 | 86374 | ######################################################################
######################################################################
# Copyright <NAME>, Cambridge Dialogue Systems Group, 2017 #
######################################################################
#############################################... | [
1,
835,
13383,
13383,
13383,
13383,
2277,
29937,
13,
13383,
13383,
13383,
13383,
4136,
2277,
13,
29937,
29871,
14187,
1266,
529,
5813,
10202,
12585,
18878,
434,
23985,
6431,
29892,
29871,
29906,
29900,
29896,
29955,
396,
13,
13383,
13383,
1... |
controller/controller_client.py | ZeBraHack0/ATP-Controller | 1 | 1617122 | <gh_stars>1-10
from socket import *
import argparse
parser = argparse.ArgumentParser(description='P4ML User Client')
parser.add_argument('--model', type=str, default='vgg16',
help='model to train')
parser.add_argument('--dataset', type=str, default='benchmark',
help='dataset to ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
9909,
1053,
334,
13,
5215,
1852,
5510,
13,
13,
16680,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
2433,
29925,
29946,
1988,
4911,
12477,
1495,
13,
16680,... |
focal_mech/demo/test6.py | blasscoc/FocalMechClassifier | 12 | 12361 | from numpy import array, rad2deg, pi, mgrid, argmin
from matplotlib.pylab import contour
import matplotlib.pyplot as plt
import mplstereonet
from obspy.imaging.beachball import aux_plane
from focal_mech.lib.classify_mechanism import classify, translate_to_sphharm
from focal_mech.io.read_hash import read_demo, read_h... | [
1,
515,
12655,
1053,
1409,
29892,
2971,
29906,
12163,
29892,
2930,
29892,
286,
7720,
29892,
1852,
1195,
13,
13,
3166,
22889,
29889,
2272,
8205,
1053,
640,
473,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
286,
572,
303,
406... |
tests/test_Methods.py | davidjsanders/python_cowbull_webapp | 0 | 125004 | <filename>tests/test_Methods.py
import io
import logging
import os
import unittest
from app import app
from GameSPA.GameSPA import GameSPA
from initialization_package.set_config import set_config
from unittest import TestCase
class TestMethods(TestCase):
def setUp(self):
# Setup the environment to ensure a... | [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
26112,
29889,
2272,
13,
5215,
12013,
13,
5215,
12183,
13,
5215,
2897,
13,
5215,
443,
27958,
13,
3166,
623,
1053,
623,
13,
3166,
8448,
5550,
29909,
29889,
14199,
5550,
29909,
1053,
8448,
55... |
setup.py | viktorsapozhok/kubernetes-cronjob-tutorial | 0 | 132236 | from setuptools import setup
def get_requirements():
r = []
with open("requirements.txt") as fp:
for line in fp.read().split("\n"):
if not line.startswith("#"):
r += [line.strip()]
return r
setup(
name="app",
packages=["app"],
include_package_data=True,
... | [
1,
515,
731,
21245,
8789,
1053,
6230,
13,
13,
13,
1753,
679,
29918,
12277,
1860,
7295,
13,
1678,
364,
353,
5159,
13,
1678,
411,
1722,
703,
12277,
1860,
29889,
3945,
1159,
408,
285,
29886,
29901,
13,
4706,
363,
1196,
297,
285,
29886,
... |
stubs/ssm.py | claytonbrown/troposphere | 0 | 157658 | <reponame>claytonbrown/troposphere
from . import AWSObject, AWSProperty
from .validators import *
from .constants import *
# -------------------------------------------
class SSMParameterValues(AWSProperty):
"""# ParameterValues - CloudFormationResourceSpecification version: 1.4.0
{
"Documentation": "htt... | [
1,
529,
276,
1112,
420,
29958,
695,
388,
880,
29890,
4708,
29914,
29873,
307,
1066,
9085,
13,
3166,
869,
1053,
15540,
2061,
29892,
15540,
4854,
13,
3166,
869,
3084,
4097,
1053,
334,
13,
3166,
869,
3075,
1934,
1053,
334,
13,
13,
13,
... |
Python Fundamentals/Data types and Variables/Exercise/Task04.py | IvanTodorovBG/SoftUni | 1 | 178390 | n = int(input())
total_sum = 0
for x in range(1, n + 1):
ascii_code = input()
total_sum += ord(ascii_code)
print(f"The sum equals: {total_sum}") | [
1,
302,
353,
938,
29898,
2080,
3101,
13,
13,
7827,
29918,
2083,
353,
29871,
29900,
13,
13,
1454,
921,
297,
3464,
29898,
29896,
29892,
302,
718,
29871,
29896,
1125,
13,
1678,
408,
18869,
29918,
401,
353,
1881,
580,
13,
1678,
3001,
2991... |
app/views/v1/search.py | daghan/Ostrich | 0 | 17222 | from app import webapp, mysql
from app.models import Search , Utils, Collection, WebUtils
from flask import request, jsonify
from flask.ext.jsonpify import jsonify as jsonp
import json
'''
Generic search call
@params
q: search query
page: the page number of search results (default 0)
t... | [
1,
515,
623,
1053,
1856,
932,
29892,
5749,
13,
3166,
623,
29889,
9794,
1053,
11856,
1919,
22310,
29879,
29892,
14348,
29892,
2563,
12177,
13,
3166,
29784,
1053,
2009,
29892,
4390,
1598,
13,
3166,
29784,
29889,
1062,
29889,
3126,
29886,
15... |
backtester.py | iamthejao/portfolioTools | 0 | 176612 | from portfolio import Portfolio, PM
import datetime as dt
from collections import OrderedDict
import utility
import copy
import numpy as np
class Backtester:
def __init__(self, universeObj, start=None, end=None):
if start is None:
start = universeObj.dateRange[0]
if end is None:
... | [
1,
515,
2011,
25648,
1053,
3371,
25648,
29892,
11278,
13,
5215,
12865,
408,
11636,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
5215,
19725,
13,
5215,
3509,
13,
5215,
12655,
408,
7442,
13,
13,
1990,
7437,
1688,
261,
29901,
13,
13,
167... |
self driving/controls/kalman/EKF_dynamic.py | Systemx-ai/Pilot-X | 1 | 131569 | """ Code for the EKF Refactored """
import sympy
from sympy import atan, pi, tan
from sympy import symbols, Matrix
from math import sqrt, tan, cos, sin, atan2
import matplotlib.pyplot as plt
import numpy as np
from numpy.random import randn
from filterpy.kalman import ExtendedKalmanFilter as EKF
from numpy import arra... | [
1,
9995,
5920,
363,
278,
382,
29968,
29943,
9897,
627,
4395,
9995,
13,
13,
5215,
5016,
2272,
13,
3166,
5016,
2272,
1053,
472,
273,
29892,
2930,
29892,
10345,
13,
3166,
5016,
2272,
1053,
15072,
29892,
22513,
13,
3166,
5844,
1053,
18074,
... |
examples/intro-example/dags/billomat-test.py | lukasdraheim/airflow-tutorial | 0 | 142050 | from datetime import timedelta
import airflow
from airflow.models import DAG
from airflow.operators.python_operator import PythonOperator, BranchPythonOperator
from airflow.operators.bash_operator import BashOperator
import random
import requests
default_args = {
'owner': 'airflow',
'depends_on_past': False,
... | [
1,
515,
12865,
1053,
5335,
287,
2554,
13,
13,
5215,
4799,
1731,
13,
3166,
4799,
1731,
29889,
9794,
1053,
360,
10051,
13,
3166,
4799,
1731,
29889,
3372,
4097,
29889,
4691,
29918,
6891,
1053,
5132,
26486,
29892,
25889,
11980,
26486,
13,
3... |
analysis/copy_cluster_mat.py | JaerongA/lman-deafening | 0 | 138646 | <gh_stars>0
"""
This program copy/pastes SpkInfo.mat from each cell root to the destination folder (InformationAnalysis)
"""
import os
from summary import load
project_path = load.project(load.config()) # load cluster summary file
summary_df, nb_cluster = load.summary(load.config()) # load cluster summary file
# M... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
4013,
1824,
3509,
29914,
29886,
579,
267,
1706,
29895,
3401,
29889,
2922,
515,
1269,
3038,
3876,
304,
278,
12551,
4138,
313,
20350,
21067,
4848,
29897,
13,
15945,
29908,... |
zSPA/zSPA/spa/views.py | hawwestin/MSR.DjangoByExample | 1 | 79578 | from django.shortcuts import render
from decouple import config
from .models import Images
# Create your views here.
def index(request, **kwargs):
"""
Render single page application and provide context data.
:param request:
:param kwargs:
:return:
"""
context = {
'images': Images... | [
1,
515,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
13,
3166,
1602,
283,
552,
1053,
2295,
13,
13,
3166,
869,
9794,
1053,
1954,
1179,
13,
13,
13,
29937,
6204,
596,
8386,
1244,
29889,
13,
13,
1753,
2380,
29898,
3827,
29892,
3579,
19290... |
avkapi/vk.py | JMarkin/aVKapi | 7 | 77978 | import asyncio
import logging
from aiohttp import ClientSession
from .methods import Messages
from .utils import json
logger = logging.getLogger(__name__)
API_URL = 'https://api.vk.com/method/'
class VK:
def __init__(self, confirmation_code=None, secret_key=None, access_token=None, loop=None):
"""
... | [
1,
1053,
408,
948,
3934,
13,
5215,
12183,
13,
13,
3166,
263,
601,
1124,
1053,
12477,
7317,
13,
13,
3166,
869,
23515,
1053,
11946,
1179,
13,
3166,
869,
13239,
1053,
4390,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
... |
src/beefore/diff.py | pybee/beefore | 24 | 80134 | <reponame>pybee/beefore
import os
import re
FILE_START = re.compile(r"diff --git a/(.*) b/(.*)")
LINE_RANGE = re.compile(r"@@ -(\d+),(\d+) \+(\d+),(\d+) @@")
def positions(directory, diff_content):
"""Given a diff payload, look for all the line ranges described for a given file.
Returns a map of source file... | [
1,
529,
276,
1112,
420,
29958,
2272,
915,
29872,
29914,
915,
29872,
1079,
13,
5215,
2897,
13,
5215,
337,
13,
13,
7724,
29918,
25826,
353,
337,
29889,
12198,
29898,
29878,
29908,
12765,
1192,
5559,
263,
14571,
5575,
29897,
289,
14571,
55... |
main.py | laMia482/tensorflow-example | 0 | 178151 | <reponame>laMia482/tensorflow-example<filename>main.py
from config import cfg
import kernel
import tensorflow as tf
def main(_):
if cfg.is_train is True:
kernel.train()
if cfg.is_eval is True:
kernel.eval()
if __name__ == '__main__':
tf.app.run()
| [
1,
529,
276,
1112,
420,
29958,
433,
29924,
423,
29946,
29947,
29906,
29914,
29056,
29899,
4773,
29966,
9507,
29958,
3396,
29889,
2272,
13,
3166,
2295,
1053,
274,
16434,
13,
5215,
8466,
13,
5215,
26110,
408,
15886,
13,
13,
1753,
1667,
73... |
src_py/hat/syslog/server/ui.py | hat-open/hat-syslog | 1 | 142420 | """Web server implementation"""
from pathlib import Path
import functools
import logging
import typing
import urllib
from hat import aio
from hat import juggler
from hat.syslog.server import common
import hat.syslog.server.backend
mlog: logging.Logger = logging.getLogger(__name__)
"""Module logger"""
package_path... | [
1,
9995,
3609,
1923,
5314,
15945,
29908,
13,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
2090,
312,
8789,
13,
5215,
12183,
13,
5215,
19229,
13,
5215,
3142,
1982,
13,
13,
3166,
3056,
1053,
263,
601,
13,
3166,
3056,
1053,
8740,
29887,
... |
lstchain/visualization/camera.py | misabelber/cta-lstchain | 0 | 14556 | import numpy as np
from ..reco.disp import disp_vector
import astropy.units as u
import matplotlib.pyplot as plt
from ctapipe.visualization import CameraDisplay
__all__ = [
'overlay_disp_vector',
'overlay_hillas_major_axis',
'overlay_source',
'display_dl1_event',
]
def display_dl1_event(event, camera_... | [
1,
1053,
12655,
408,
7442,
13,
3166,
6317,
276,
1111,
29889,
2218,
29886,
1053,
12272,
29918,
8111,
13,
5215,
8717,
14441,
29889,
348,
1169,
408,
318,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
274,
29873,
2754,
412,
2988... |
db_creator.py | Ksusha1319/stud_projects | 0 | 71319 | import datetime
from sqlalchemy import create_engine, ForeignKey
from sqlalchemy import Column, Date, Integer, String, DateTime, func
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, backref
engine = create_engine('sqlite:///test.db', echo=True)
Base = declarative_base()... | [
1,
1053,
12865,
13,
3166,
4576,
284,
305,
6764,
1053,
1653,
29918,
10599,
29892,
19358,
2558,
13,
3166,
4576,
284,
305,
6764,
1053,
12481,
29892,
4712,
29892,
8102,
29892,
1714,
29892,
12315,
29892,
3653,
13,
3166,
4576,
284,
305,
6764,
... |
app.py | tangingw/python_spotify | 0 | 59212 | <gh_stars>0
import hashlib
import json
import requests
from flask import Flask
from flask import request
from flask import jsonify
from flask import redirect
from flask import url_for
from utils import Handler
from utils import auth
from utils import config
BASE_URL = "https://api.spotify.com"
app = Flask(__name__... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
6608,
1982,
13,
5215,
4390,
13,
5215,
7274,
13,
3166,
29784,
1053,
2379,
1278,
13,
3166,
29784,
1053,
2009,
13,
3166,
29784,
1053,
4390,
1598,
13,
3166,
29784,
1053,
6684,
13,
3... |
clkhash/benchmark.py | data61/clkhash | 28 | 79255 | <filename>clkhash/benchmark.py<gh_stars>10-100
import os
import tempfile
from timeit import default_timer as timer
from clkhash.clk import generate_clk_from_csv
from clkhash.randomnames import NameList
def compute_hash_speed(num: int, quiet: bool = False, max_workers=None) -> float:
""" Hash time.
"""
na... | [
1,
529,
9507,
29958,
20495,
8568,
29914,
1785,
16580,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
2897,
13,
5215,
5694,
1445,
13,
3166,
931,
277,
1053,
2322,
29918,
20404,
408,
1... |
polynomial_mixture/polynomial_mixture.py | sremes/polynomial-mixture | 0 | 151879 | """Bayesian polynomial mixture model."""
# pylint: disable=invalid-name
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
tfd = tfp.distributions
tfb = tfp.bijectors
class BayesianPolynomialMixture: # pylint: disable=too-few-public-methods
"""Handles creation of a polynomial mixtu... | [
1,
9995,
29933,
388,
18970,
10159,
29544,
1904,
1213,
15945,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
20965,
29899,
978,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
26110,
408,
15886,
13,
5215,
26110,
29918,
22795,
3097,
408,
15886,
... |
yatube/posts/views.py | Ecmek/yatube_project | 1 | 188706 | <filename>yatube/posts/views.py
from django.core.paginator import Paginator
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404, redirect, render
from django.views.decorators.cache import cache_page
from django.http import HttpResponseRedirect
from .models import Fo... | [
1,
529,
9507,
29958,
29891,
271,
4003,
29914,
14080,
29914,
7406,
29889,
2272,
13,
3166,
9557,
29889,
3221,
29889,
13573,
262,
1061,
1053,
349,
26584,
1061,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
19557,
4097,
1053,
6464,
29918,
... |
app/controllers/web/admin/dashboard.py | Clivern/Kraven | 3 | 1612842 | """
Dashboard Web Controller
"""
# standard library
import os
# Django
from django.views import View
from django.shortcuts import render
from django.utils.translation import gettext as _
# local Django
from app.modules.core.context import Context
from app.modules.core.decorators import login_if_not_authenticated
c... | [
1,
9995,
13,
29928,
1161,
3377,
2563,
15830,
13,
15945,
29908,
13,
13,
29937,
3918,
3489,
13,
5215,
2897,
13,
13,
29937,
15337,
13,
3166,
9557,
29889,
7406,
1053,
4533,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
13,
3166,
... |
Integrator.py | ganesh-cc/ticket_update | 0 | 112320 |
import endpointGenerator
import freshdeskService
import processData
import slackService
from collections import defaultdict
fd = defaultdict(list)
def integrator_func(team):
tag = endpointGenerator.url_generator_multiple(team)
global fd
for k,v in tag.items():
fd.clear()
print('\n' + '\n' +'\n' +k)
if k == ... | [
1,
29871,
13,
5215,
16248,
21575,
13,
5215,
10849,
2783,
29895,
3170,
13,
5215,
1889,
1469,
13,
5215,
269,
2364,
3170,
13,
3166,
16250,
1053,
2322,
8977,
13,
13,
11512,
353,
2322,
8977,
29898,
1761,
29897,
13,
13,
1753,
3990,
1061,
29... |
src/get/download_nino34.py | jdossgollin/2018-paraguay-floods | 2 | 1607353 | <filename>src/get/download_nino34.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Download raw NINO 3.4 data from
http://iridl.ldeo.columbia.edu/SOURCES/.Indices/.nino/.EXTENDED/.NINO34
and parse it
"""
import argparse
import os
import pandas as pd
import numpy as np
from datetime import datetime
parser = argpar... | [
1,
529,
9507,
29958,
4351,
29914,
657,
29914,
10382,
29918,
29876,
1789,
29941,
29946,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
... |
nnet/run/srl/run.py | SaidehNK/sr | 193 | 178992 | from nnet.models.srl import *
from nnet.run.runner import *
from nnet.ml.voc import *
from nnet.run.srl.run import *
from nnet.run.srl.util import *
from nnet.run.srl.decoder import *
from functools import partial
from nnet.run.srl.read_dependency import get_adj
import nnet.run.srl.conll09_evaluation.eval
def make_l... | [
1,
515,
302,
1212,
29889,
9794,
29889,
29879,
2096,
1053,
334,
13,
3166,
302,
1212,
29889,
3389,
29889,
27492,
1053,
334,
13,
3166,
302,
1212,
29889,
828,
29889,
29894,
542,
1053,
334,
13,
3166,
302,
1212,
29889,
3389,
29889,
29879,
209... |
images/splunk/deployment/init_dmc.py | halr9000/docker-splunk-cluster | 0 | 84697 | def configurations():
return {
"components": {
"kvstore": False,
"web": True,
"indexing": False,
"dmc": True
}
} | [
1,
822,
22920,
7295,
13,
1678,
736,
426,
13,
4706,
376,
14036,
1115,
426,
13,
9651,
376,
27049,
8899,
1115,
7700,
29892,
13,
9651,
376,
2676,
1115,
5852,
29892,
13,
9651,
376,
2248,
292,
1115,
7700,
29892,
13,
9651,
376,
29881,
14047,... |
windows/winproxy/apis/shlwapi.py | IMULMUL/PythonForWindows | 479 | 182921 | import ctypes
import windows
import windows.generated_def as gdef
from ..apiproxy import ApiProxy, NeededParameter, is_implemented
from ..error import fail_on_zero
class ShlwapiProxy(ApiProxy):
APIDLL = "Shlwapi"
default_error_check = staticmethod(fail_on_zero)
@ShlwapiProxy()
def StrStrIW(pszFirst, pszSrch)... | [
1,
1053,
274,
8768,
13,
5215,
5417,
13,
5215,
5417,
29889,
13525,
29918,
1753,
408,
330,
1753,
13,
13,
3166,
6317,
481,
666,
307,
3594,
1053,
29749,
14048,
29892,
2448,
19226,
9329,
29892,
338,
29918,
326,
2037,
287,
13,
3166,
6317,
2... |
tutorial/simple_flowsheet.py | Nukleon84/pypedream | 9 | 181624 | #Hacked Path to find package. Would no be needed when package is installed via pip
import sys
import os
sys.path.append(os.path.abspath('../pypedream'))
from pypedream import MaterialStream, Flowsheet, ThermodynamicSystem
import pypedream.database.purecomponents as pcdb
sys= ThermodynamicSystem("Test", "NRTL")
sys.add... | [
1,
396,
29950,
547,
287,
10802,
304,
1284,
3577,
29889,
10878,
694,
367,
4312,
746,
3577,
338,
5130,
3025,
8450,
13,
5215,
10876,
13,
5215,
2897,
13,
9675,
29889,
2084,
29889,
4397,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
877,
... |
Python/Code/Thermal_Models/models/__init__.py | mhasoba/TPCFitting | 0 | 96436 | #!/usr/bin/env python3
"""
This directory contains classes representing each growth model.
"""
from .linear_models import boltzmann_arrhenius, \
lm
from .schoolfield_models import schoolfield_two_factor, \
schoolfield_two_factor_tpk, \
... | [
1,
29871,
30143,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
15945,
29908,
13,
4013,
3884,
3743,
4413,
15783,
1269,
14321,
1904,
29889,
13,
15945,
29908,
13,
13,
3166,
869,
10660,
29918,
9794,
1053,
289,
14339,
2992... |
tests/utilities/test_fetching.py | PeppeSaccardi/pytorch-lightning | 1 | 94574 | # Copyright The PyTorch Lightning team.
#
# 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 i... | [
1,
396,
14187,
1266,
450,
10772,
29911,
25350,
12790,
1076,
3815,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
... |
setup.py | zuokangbo/strack-connect | 0 | 168586 | # :coding: utf-8
# :copyright: Copyright (c) 2021 strack
"""Describe the distribution to distutils."""
# Import third-party modules
import os
from setuptools import find_packages
from setuptools import setup
ROOT_PATH = os.path.dirname(os.path.realpath(__file__))
README_PATH = os.path.join(ROOT_PATH, 'README.md')
r... | [
1,
396,
584,
29883,
3689,
29901,
23616,
29899,
29947,
13,
29937,
584,
8552,
1266,
29901,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29896,
5312,
384,
13,
13,
15945,
29908,
4002,
29581,
278,
4978,
304,
1320,
13239,
1213,
1... |
robot/migrations/0011_auto_20200105_1702.py | Misschl/wechat | 1 | 183238 | <filename>robot/migrations/0011_auto_20200105_1702.py
# Generated by Django 2.1.5 on 2020-01-05 17:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('robot', '0010_auto_20200105_1342'),
]
operations = [
migrations.AlterModelOptions(
... | [
1,
529,
9507,
29958,
307,
7451,
29914,
26983,
800,
29914,
29900,
29900,
29896,
29896,
29918,
6921,
29918,
29906,
29900,
29906,
29900,
29900,
29896,
29900,
29945,
29918,
29896,
29955,
29900,
29906,
29889,
2272,
13,
29937,
3251,
630,
491,
15337... |
Python/maximum-candies-you-can-get-from-boxes.py | RideGreg/LeetCode | 1 | 73255 | <gh_stars>1-10
# Time: O(n^2)
# Space: O(n)
# 1298 weekly contest 168 12/21/2019
# Given n boxes, each box is given in the format [status, candies, keys, containedBoxes] where:
#
# status[i]: an integer which is 1 if box[i] is open and 0 if box[i] is closed.
# candies[i]: an integer representing the number of candie... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
5974,
29901,
29871,
438,
29898,
29876,
29985,
29906,
29897,
13,
29937,
14121,
29901,
438,
29898,
29876,
29897,
13,
13,
29937,
29871,
29896,
29906,
29929,
29947,
... |
model/data_module.py | ricardorei/lightning-convai | 5 | 65786 | # -*- coding: utf-8 -*-
r"""
DataModule
==========
The DataModule encapsulates all the steps needed to process data:
- Download / tokenize
- Save to disk.
- Apply transforms (tokenize, pad, batch creation, etc…).
- Load inside Dataset.
- Wrap inside a DataLoader.
The most important function to... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29878,
15945,
29908,
29871,
13,
1469,
7355,
13,
4936,
1360,
13,
1678,
450,
3630,
7355,
2094,
2547,
352,
1078,
599,
278,
6576,
4312,
304,
1889,
848,
299... |
Ex_Files_Python_EssT/Exercise Files/Chap01/rockPaperScissors.py | cinthiatengan/Basic-Python | 0 | 39773 | <reponame>cinthiatengan/Basic-Python
""" Rock Paper Scissors
--------------------------------------------------------------
"""
import random
import os
import re
os.system('cls' if os.name=='nt' else clear)
while (1< 2):
print ("\n")
print ("Rock, Paper, Scissors - Shoot!")
userChoice = input("Choose your ... | [
1,
529,
276,
1112,
420,
29958,
16381,
386,
7163,
996,
273,
29914,
16616,
29899,
11980,
13,
15945,
29908,
8027,
349,
7202,
2522,
790,
943,
13,
2683,
2683,
2683,
9072,
489,
13,
15945,
29908,
13,
13,
5215,
4036,
13,
5215,
2897,
13,
5215,... |
algDev/visualization/plot_indicators.py | ajmal017/ralph-usa | 0 | 34953 | from models.indicators import Indicators
import numpy as np
import matplotlib.pyplot as plt
def plot_prices(ax, prices, line_style):
i = np.arange(len(prices))
ax.plot(ax, prices, line_style)
return ax
def plot_macd(ax, prices, slow_period, fast_period, line_style='k-'):
macd = Indicators.macd(price... | [
1,
515,
4733,
29889,
513,
293,
4097,
1053,
1894,
293,
4097,
13,
5215,
12655,
408,
7442,
13,
5215,
29871,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
1753,
6492,
29918,
558,
1575,
29898,
1165,
29892,
26094,
29892,
1196,
29918,
3293,
11... |
serve.py | uwmisl/purpledrop-driver | 0 | 27038 |
from gevent import monkey
monkey.patch_all()
import sys
import purpledrop.server as server
from purpledrop.purpledrop import list_purpledrop_devices, PurpleDropDevice, PurpleDropController
devices = list_purpledrop_devices()
if(len(devices) == 0):
print("No PurpleDrop USB device found")
sys.exit(1)
elif len(d... | [
1,
29871,
13,
3166,
1737,
794,
1053,
1601,
1989,
13,
3712,
1989,
29889,
5041,
29918,
497,
580,
13,
5215,
10876,
13,
5215,
3708,
552,
8865,
29889,
2974,
408,
1923,
13,
3166,
3708,
552,
8865,
29889,
15503,
552,
8865,
1053,
1051,
29918,
... |
pybabylonjs/babylonjs.py | TileDB-Inc/TileDB-PyBabylonJS | 2 | 50179 | <filename>pybabylonjs/babylonjs.py<gh_stars>1-10
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) TileDB, Inc..
# Distributed under the terms of the Modified BSD License.
"""
BabylonJS Jupyter Widget
"""
from ipywidgets import DOMWidget
import json
import os
from traitlets import CInt, Float, Dict, List, TraitE... | [
1,
529,
9507,
29958,
2272,
29890,
370,
2904,
265,
1315,
29914,
29890,
370,
2904,
265,
1315,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
... |
pylearn2/sampling/replace_samples.py | CKehl/pylearn2 | 0 | 38827 | <gh_stars>0
'''
Created on Apr 16, 2015
@author: christian
'''
from optparse import OptionParser
import numpy
import os
from os import listdir
from os.path import isfile, join
import cPickle
import glob
def unpickle(file):
fo = open(file, 'rb')
dictionary = cPickle.load(fo)
fo.close()
return diction... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
12008,
13,
20399,
373,
319,
558,
29871,
29896,
29953,
29892,
29871,
29906,
29900,
29896,
29945,
13,
13,
29992,
8921,
29901,
25542,
713,
13,
12008,
13,
13,
3166,
3523,
5510,
1053,
10831,
... |
app/__init__.py | VirginiaNdungu1/ugatuzi | 1 | 190352 | from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from config import config_options
from flask_login import LoginManager
bootstrap = Bootstrap()
db = SQLAlchemy()
login_manager = LoginManager()
login_manager.session_protection = 'strong'
login_manager.login_message... | [
1,
515,
29784,
1053,
2379,
1278,
13,
3166,
29784,
29918,
8704,
1053,
25746,
13,
3166,
29784,
29918,
2850,
284,
305,
6764,
1053,
3758,
2499,
305,
6764,
13,
3166,
2295,
1053,
2295,
29918,
6768,
13,
13,
3166,
29784,
29918,
7507,
1053,
1913... |
server.py | palmpilot71/CMPUT404-assignment-webserver | 0 | 113360 | <reponame>palmpilot71/CMPUT404-assignment-webserver
# coding: utf-8
import SocketServer, os
# Copyright 2013 <NAME>, <NAME>, <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
#
# h... | [
1,
529,
276,
1112,
420,
29958,
7830,
1526,
309,
327,
29955,
29896,
29914,
29907,
3580,
2692,
29946,
29900,
29946,
29899,
465,
10194,
29899,
2676,
2974,
13,
29937,
29871,
14137,
29901,
23616,
29899,
29947,
13,
5215,
29141,
6004,
29892,
2897,... |
tests/test_timeout.py | MattBBaker/ucx-py | 0 | 123999 | import pytest
import asyncio
import ucp
import time
async def talk_to_server(ip, port, timeout):
try:
ep = await ucp.get_endpoint(ip, port, timeout)
except TimeoutError:
pass
@pytest.mark.asyncio
async def test_timeout():
ucp.init()
ip = ucp.get_address()
await asyncio.gather(tal... | [
1,
1053,
11451,
1688,
13,
5215,
408,
948,
3934,
13,
5215,
318,
6814,
13,
5215,
931,
13,
13,
13,
12674,
822,
5193,
29918,
517,
29918,
2974,
29898,
666,
29892,
2011,
29892,
11815,
1125,
13,
1678,
1018,
29901,
13,
4706,
9358,
353,
7272,
... |
instrumentserver/apps.py | Coughman058/instrumentserver | 0 | 177766 | import os
import argparse
import logging
from . import QtWidgets, QtCore
from .log import setupLogging
from .server.application import startServerGuiApplication
from .server.core import startServer
from .client import Client
from .gui import widgetDialog
from .gui.instruments import ParameterManagerGui
setupLogging(a... | [
1,
1053,
2897,
13,
5215,
1852,
5510,
13,
5215,
12183,
13,
13,
3166,
869,
1053,
14705,
8801,
29879,
29892,
14705,
9203,
13,
3166,
869,
1188,
1053,
6230,
3403,
3460,
13,
3166,
869,
2974,
29889,
6214,
1053,
1369,
6004,
28707,
4873,
13,
3... |
common/Request_Package.py | Four-sun/Requests_Load | 0 | 44479 | <gh_stars>0
# -*- coding: utf-8 -*-
"""
Created: on 2018-04-11
@author: Four
Project: common\Request_Package.py
Request重新封装
"""
import json
import time
from common.log import Logger
Logger_Message = Logger()
send_time=time.strftime("%Y-%m-%d-%H_%M_%S",time.localtime(time.time())) #获取当前时间
def send_requests(s, testd... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
29901,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29900,
29946,
29899,
29896,
... |
searchBar/basicapp/tests.py | rajvijen/Industry-Visit-Planning-and-Booking | 0 | 128868 | <filename>searchBar/basicapp/tests.py
from django.test import TestCase ,Client
from django.http import HttpRequest
from django.urls import reverse
from .models import UserProfileInfo
from django.contrib.auth.models import User
class ListView_Testing(TestCase):
@classmethod
def setUpTestData(cls):
... | [
1,
529,
9507,
29958,
4478,
4297,
29914,
16121,
932,
29914,
21150,
29889,
2272,
13,
3166,
9557,
29889,
1688,
1053,
4321,
8259,
1919,
4032,
30004,
13,
3166,
9557,
29889,
1124,
1053,
9056,
3089,
30004,
13,
3166,
9557,
29889,
26045,
1053,
118... |
examples/canvas/stencil_canvas.py | Sentient07/kivy | 0 | 1610690 | '''
Stencil demo
============
This is a test of the stencil graphics instruction inside the stencil view
widget. When you use a stencil, every draw outside the bounding box of the
stencil view will be avoid. All the graphics will draw only in the stencil view.
You can "draw" a stencil view by touch & draw. The touch ... | [
1,
14550,
13,
29903,
841,
5553,
13455,
13,
4936,
2751,
13,
13,
4013,
338,
263,
1243,
310,
278,
380,
3977,
309,
18533,
15278,
2768,
278,
380,
3977,
309,
1776,
13,
8030,
29889,
1932,
366,
671,
263,
380,
3977,
309,
29892,
1432,
4216,
5... |
models/base.py | neural-reckoning/decoding_sound_location | 1 | 129979 | <reponame>neural-reckoning/decoding_sound_location
from brian import *
from brian.hears import *
from matplotlib import cm, rcParams
import sys, os, glob
sys.path = [os.path.normpath(os.path.join(os.path.split(__file__)[0], '../'))]+sys.path
from common import *
| [
1,
529,
276,
1112,
420,
29958,
484,
3631,
29899,
18217,
28259,
29914,
7099,
3689,
29918,
29802,
29918,
5479,
13,
3166,
289,
6392,
1053,
334,
13,
3166,
289,
6392,
29889,
354,
1503,
1053,
334,
13,
3166,
22889,
1053,
7477,
29892,
364,
2988... |
identipy_app/migrations/0016_auto_20191025_1622.py | levitsky/identipy_server | 0 | 94735 | <gh_stars>0
# -*- coding: utf-8 -*-
# Generated by Django 1.11.25 on 2019-10-25 13:22
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('identipy_app', '0015_auto_20190719_2316'),
]
operations = [
mi... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29896,
29896,
29889,
29906,
29945,
373,
29871,
29906,
... |
common_logger/utils1.py | NathanKr/python-logger-playground | 0 | 183955 | <reponame>NathanKr/python-logger-playground
import logging
def add(num1 : float,num2 : float)->float:
logging.warning(f'args : {num1} , {num2}')
return num1+num2 | [
1,
529,
276,
1112,
420,
29958,
29940,
11385,
29968,
29878,
29914,
4691,
29899,
21707,
29899,
1456,
2057,
13,
5215,
12183,
13,
13,
1753,
788,
29898,
1949,
29896,
584,
5785,
29892,
1949,
29906,
584,
5785,
19969,
7411,
29901,
13,
1678,
12183... |
python/python_challenge/25/25.py | yunyu2019/blog | 0 | 27951 | <reponame>yunyu2019/blog<filename>python/python_challenge/25/25.py<gh_stars>0
#!/usr/bin/python
# -*- coding: utf-8 -*-
# @Date : 2016-05-17 16:36:18
# @Author : Yunyu2019 (<EMAIL>)
# @Link : http://www.pythonchallenge.com/pc/hex/lake.html
import os
import wave
import time
import Image
import requests... | [
1,
529,
276,
1112,
420,
29958,
29891,
348,
29891,
29884,
29906,
29900,
29896,
29929,
29914,
7312,
29966,
9507,
29958,
4691,
29914,
4691,
29918,
305,
11768,
29914,
29906,
29945,
29914,
29906,
29945,
29889,
2272,
29966,
12443,
29918,
303,
1503,... |
nvmexplorer_src/input_defs/nvsim_interface.py | lpentecost/NVMExplorer | 5 | 87048 | <reponame>lpentecost/NVMExplorer
#initialize class for nvsim output class, to be extracted from parsed nvsim results and pickled as input to the analytical model
#per-technology specifications can be inherit
from nvmexplorer_src.input_defs.cell_cfgs import *
class NVSimInputConfig:
def __init__(self,
... | [
1,
529,
276,
1112,
420,
29958,
29880,
22825,
687,
520,
29914,
29940,
9219,
1252,
14716,
13,
29937,
24926,
770,
363,
302,
29894,
3601,
1962,
770,
29892,
304,
367,
23892,
515,
21213,
302,
29894,
3601,
2582,
322,
5839,
839,
408,
1881,
304,... |
labdrivers/labdrivers/lakeshore/__init__.py | RMUlti/Alex | 0 | 54807 | <gh_stars>0
from .ls332 import Ls332
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
869,
3137,
29941,
29941,
29906,
1053,
365,
29879,
29941,
29941,
29906,
30004,
13,
2
] |
python/thread/writing_thread.py | y2ghost/study | 0 | 190687 | <gh_stars>0
import random
import time
from threading import Thread
class WritingThread(Thread):
def __init__(self, filename: str, number_of_lines: int,
work_time: int = 1) -> None:
Thread.__init__(self)
self.filename = filename
self.number_of_lines = number_of_lines
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4036,
13,
5215,
931,
13,
3166,
3244,
292,
1053,
10480,
13,
13,
13,
1990,
28676,
4899,
29898,
4899,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
10422,
29901,
851,
29... |
src/hcb/artifacts/make_threshold_breakdown_plots.py | Strilanc/honeycomb-boundaries | 0 | 164636 | import pathlib
import sys
from typing import List, Tuple, Dict, Any
import matplotlib.colors as mcolors
import matplotlib.pyplot as plt
from hcb.artifacts.make_lambda_plots import DesiredLineFit, project_intersection_of_both_observables
from hcb.artifacts.make_threshold_plots import make_threshold_plots
from hcb.tool... | [
1,
1053,
2224,
1982,
13,
5215,
10876,
13,
3166,
19229,
1053,
2391,
29892,
12603,
552,
29892,
360,
919,
29892,
3139,
13,
13,
5215,
22889,
29889,
27703,
408,
286,
27703,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
3166,
298,
... |
examples/test_feasibility.py | OllieBoyne/sslap | 7 | 24581 | """Check the feasibility of a bipartite graph by using SSLAP's feasibility module"""
import numpy as np
from sslap import hopcroft_solve
# All 3 methods will use the same input bipartite graph:
# i = 0 connects to j = 0, 1
# i = 1 connects to j = 1, 2
# i = 2 connects to j = 1, 4
# i = 3 connects to j = 2
# i = 4 con... | [
1,
9995,
5596,
278,
28326,
4127,
310,
263,
289,
27494,
568,
3983,
491,
773,
17122,
3301,
29915,
29879,
28326,
4127,
3883,
15945,
29908,
13,
5215,
12655,
408,
7442,
13,
3166,
17971,
6984,
1053,
8171,
24077,
615,
29918,
2929,
345,
13,
13,... |
demo/part_1.py | eric6239/HeartsEnv | 6 | 101256 | <reponame>eric6239/HeartsEnv
from gym import spaces
table_space = spaces.Tuple([
spaces.Discrete(13), # n_round
spaces.Discrete(4), # start_pos
spaces.Discrete(4), # cur_pos
spaces.Discrete(1), # exchanged
spaces.Discrete(1), # heart_occured
spaces.Discrete(100), # n_games
spaces.Tuple([ # b... | [
1,
529,
276,
1112,
420,
29958,
261,
293,
29953,
29906,
29941,
29929,
29914,
3868,
5708,
21745,
13,
3166,
330,
962,
1053,
8162,
13,
2371,
29918,
3493,
353,
8162,
29889,
23215,
552,
4197,
13,
1678,
8162,
29889,
4205,
9084,
29898,
29896,
2... |
Quiron/users/admin.py | CesarNav/Quiron | 0 | 91209 | # Django
from django.contrib import admin
# Import our models to the admin
from users.models import Profile
# Register the model profile in the admin
@admin.register(Profile)
class ProfileAdmin(admin.ModelAdmin):
list_display = ['pk', 'user','prof_register','picture']
list_display_links = ('pk', 'prof_regist... | [
1,
396,
15337,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
13,
29937,
16032,
1749,
4733,
304,
278,
4113,
13,
3166,
4160,
29889,
9794,
1053,
20802,
13,
13,
29937,
12577,
278,
1904,
8722,
297,
278,
4113,
13,
13,
29992,
6406,
29889,
95... |
jccli/jc_api_v1.py | zaro0508/jccli | 0 | 57510 | # -*- coding: utf-8 -*-
"""
.. currentmodule:: jccli.jc_api_v1.py
.. moduleauthor:: zaro0508 <<EMAIL>>
This is a utility library for the jumpcloud version 1 api
.. note::
To learn more about the jumpcloud api 1
`project website <https://github.com/TheJumpCloud/jcapi-python/tree/master/jcapiv1>`_.
"""
from d... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
13,
636,
1857,
5453,
1057,
432,
617,
492,
29889,
29926,
29883,
29918,
2754,
29918,
29894,
29896,
29889,
2272,
13,
636,
3883,
8921,
1057... |
lib/spack/spack/test/cache_fetch.py | LiamBindle/spack | 2,360 | 8325 | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import pytest
from llnl.util.filesystem import mkdirp, touch
import spack.config
from spack.fetch_strategy im... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29941,
29899,
29906,
29900,
29906,
29896,
19520,
22469,
5514,
3086,
14223,
29892,
365,
12182,
322,
916,
13,
29937,
1706,
547,
8010,
10682,
414,
29889,
2823,
278,
2246,
29899,
5563,
315,
4590,... |
plus_factory.py | dlb123/pipebend-caculate | 0 | 179133 | <filename>plus_factory.py
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'plus_factory.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are d... | [
1,
529,
9507,
29958,
11242,
29918,
14399,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
30004,
13,
29937,
3812,
5314,
5759,
515,
5183,
14313,
934,
525,
11242,
29918,
14399,
29889... |
auth/tests/test_views.py | asb29/Redundant | 0 | 3689 | from django.test import TestCase
from django.test import Client
class RegisterTestCase(TestCase):
def test_register(self):
c = Client()
# on success redirects to /
response = c.post('/accounts/register/', {
'username': 'asdas',
'password1': '<PASSWORD>',
... | [
1,
515,
9557,
29889,
1688,
1053,
4321,
8259,
13,
3166,
9557,
29889,
1688,
1053,
12477,
13,
13,
13,
1990,
12577,
3057,
8259,
29898,
3057,
8259,
1125,
13,
1678,
822,
1243,
29918,
9573,
29898,
1311,
1125,
13,
4706,
274,
353,
12477,
580,
... |
scripts/misc/redis_test.py | cclauss/archai | 344 | 45288 | import redis
redis_client = redis.StrictRedis(host="127.0.0.1", port=6379)
input("") | [
1,
1053,
29825,
13,
13,
1127,
275,
29918,
4645,
353,
29825,
29889,
5015,
919,
9039,
275,
29898,
3069,
543,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
613,
2011,
29922,
29953,
29941,
29955,
29929,
29897,
13,
13,
2080,
7... |
clickhouse_proxy/auth.py | kfzteile24/clickhouse-proxy | 1 | 126043 | <reponame>kfzteile24/clickhouse-proxy<filename>clickhouse_proxy/auth.py
from clickhouse_proxy.config import config
from typing import Dict
def is_ipv6(ip: str) -> bool:
return ip.find(':') > -1
def ip_to_bits(ip: str) -> int:
# See what kind of IP this is and set parsing parameters
if is_ipv6(ip):
... | [
1,
529,
276,
1112,
420,
29958,
29895,
29888,
8832,
488,
29906,
29946,
29914,
3808,
8697,
29899,
14701,
29966,
9507,
29958,
3808,
8697,
29918,
14701,
29914,
5150,
29889,
2272,
13,
3166,
2828,
8697,
29918,
14701,
29889,
2917,
1053,
2295,
13,
... |
everything_db.py | muondu/Nesh-hotel | 1 | 1605545 | import sqlite3
donn = sqlite3.connect('bill.db')
d = donn.cursor()
conn = sqlite3.connect('everything.db')
c = conn.cursor()
def rooms():
c.execute('CREATE TABLE IF NOT EXISTS hotel_rooms(hotelnumber INTEGER)')
c.execute('INSERT INTO hotel_rooms VALUES(15)')
c.execute('INSERT INTO hotel_rooms VALUES(13)... | [
1,
1053,
21120,
29941,
13,
13,
13,
29881,
3409,
353,
21120,
29941,
29889,
6915,
877,
29890,
453,
29889,
2585,
1495,
13,
29881,
353,
14735,
29889,
18127,
580,
13,
13082,
353,
21120,
29941,
29889,
6915,
877,
17991,
1918,
29889,
2585,
1495,
... |
setup.py | meeas/sqlite | 1 | 66041 | #!/usr/bin/env python3
"""
SQLite Clinet written in python3
"""
# Always prefer setuptools over distutils
import re
import sys
# To use a consistent encoding
from codecs import open
from os import path
from setuptools import find_packages, setup
here = path.abspath(path.dirname(__file__))
# Get the long descriptio... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
15945,
29908,
13,
4176,
568,
315,
1915,
300,
3971,
297,
3017,
29941,
13,
15945,
29908,
13,
13,
29937,
29849,
5821,
731,
21245,
8789,
975,
1320,
13239,
13,
5215,
337,
13,
5... |
tools/go_generics/defs.bzl | Exhorder6/gvisor | 12,536 | 90835 | <reponame>Exhorder6/gvisor<gh_stars>1000+
"""Generics support via go_generics.
A Go template is similar to a go library, except that it has certain types that
can be replaced before usage. For example, one could define a templatized List
struct, whose elements are of type T, then instantiate that template for
T=segmen... | [
1,
529,
276,
1112,
420,
29958,
1252,
29882,
2098,
29953,
29914,
29887,
19188,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29900,
29974,
13,
15945,
29908,
5631,
1199,
2304,
3025,
748,
29918,
4738,
1199,
29889,
13,
13,
29909,
... |
help_functions.py | markozeman/TransformerSuperposition | 0 | 131508 | <reponame>markozeman/TransformerSuperposition<gh_stars>0
import numpy as np
import torch
from sklearn.metrics import roc_auc_score, classification_report, confusion_matrix
from sklearn.metrics import average_precision_score
'''
def load_data(dataset):
"""
Load ELMo embeddings for 'dataset'.
:param datase... | [
1,
529,
276,
1112,
420,
29958,
3502,
2112,
11422,
29914,
13372,
261,
19111,
3283,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12655,
408,
7442,
13,
5215,
4842,
305,
13,
3166,
2071,
19668,
29889,
2527,
10817,
1053,
696,
29883,
... |
malaysiaflights/tests/test_mas.py | azam-a/malaysiaflights | 2 | 80377 | <gh_stars>1-10
import unittest
import datetime
import httpretty as HP
import json
from malaysiaflights.mas import MAS
class MASRequestTests(unittest.TestCase):
def url_helper(self, from_, to, date):
host = 'https://flymh.mobi'
path = ("/TravelAPI/travelapi/shop/1/mh/"
"{from_}/... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
13,
5215,
443,
27958,
13,
5215,
12865,
13,
5215,
1143,
1457,
4349,
408,
379,
29925,
13,
5215,
4390,
13,
13,
3166,
4439,
1036,
423,
1579,
5861,
29889,
8247,
1053,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.