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
tests/conftest.py
weiss-d/baby-crawler
0
85086
import pytest @pytest.fixture def checkup_html() -> str: return { "html": """<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Test Page Title</title> </head> <body> <a href="https://google.com/">Root domain link</a> <a href="https://google.com/1.html">Normal link 1</a> <a hr...
[ 1, 1053, 11451, 1688, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 1753, 1423, 786, 29918, 1420, 580, 1599, 851, 29901, 13, 1678, 736, 426, 13, 4706, 376, 1420, 1115, 9995, 29966, 29991, 21300, 3472, 29958, 13, 29966, 1420, ...
userprofile/utils.py
praekelt/django-userprofile
0
167969
from django.conf import settings from django.db.models.loading import get_model def get_profile_model(): """ Returns configured user profile model or None if not found """ user_profile_module = getattr(settings, 'USER_PROFILE_MODULE', None) if user_profile_module: app_label, model_name = u...
[ 1, 515, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 2585, 29889, 9794, 29889, 13234, 1053, 679, 29918, 4299, 13, 13, 13, 1753, 679, 29918, 10185, 29918, 4299, 7295, 13, 1678, 9995, 13, 1678, 16969, 13252, 1404, 8722, 1904, 470...
Simple_AD/Simple_AD.py
elongstreet88/Python_Simple_AD
1
60647
from ldap3 import Server, Connection, ALL, NTLM, ALL_ATTRIBUTES, ALL_OPERATIONAL_ATTRIBUTES class Simple_AD: """ A simple wrapper for ldap3 in an Active Directory Environment. Examples: 0. Initilaize a connection sad = Simple_AD(server_name="server1.mydomain.com", username="mydomain.com\...
[ 1, 515, 301, 29881, 481, 29941, 1053, 5656, 29892, 15160, 29892, 15149, 29892, 405, 14632, 29924, 29892, 15149, 29918, 1299, 29911, 3960, 29933, 2692, 2890, 29892, 15149, 29918, 4590, 1001, 8098, 1964, 29918, 1299, 29911, 3960, 29933, 2692, ...
examples/plot_allpsd.py
butala/spectrum
261
106429
<filename>examples/plot_allpsd.py """ Spectral analysis of a two frequencies signal ================================================== """ ########################################################### # Context # ---------- ############################################## # Example # -------- # # In the following examp...
[ 1, 529, 9507, 29958, 19057, 29914, 5317, 29918, 497, 567, 29881, 29889, 2272, 13, 15945, 29908, 13, 29903, 1103, 1705, 7418, 310, 263, 1023, 29511, 7182, 13, 9166, 9166, 9166, 1360, 13, 13, 13, 15945, 29908, 13, 13383, 13383, 13383, 734...
src/LDPC/pycodes/build/lib.cygwin-1.5.10-i686-2.3/pycodes/tests/channel_coding/BEC/small_BEC_test.py
Horacehxw/Multi-label
1
176049
import random from pycodes.utils import CodeMaker from pycodes.utils.channel_coding_perf import * from pycodes.utils.channels import BSCOutput seed = random.getstate() random.setstate(seed) print 'using seed',seed col_w = 3 row_w = 6 N = 1002 K = N*col_w/row_w E = (N-K)*row_w L = CodeMaker.make_H_gallager(N,col_w,ro...
[ 1, 29871, 13, 5215, 4036, 13, 3166, 282, 11078, 2631, 29889, 13239, 1053, 5920, 29924, 5790, 13, 3166, 282, 11078, 2631, 29889, 13239, 29889, 12719, 29918, 29883, 3689, 29918, 546, 29888, 1053, 334, 13, 3166, 282, 11078, 2631, 29889, 1323...
recurrent_neural_networks/hopfield_network.py
sgalella/RecurrentNeuralNetworks
0
41440
import numpy as np import matplotlib.pyplot as plt from utils import get_state_vowel class HopfieldNetwork: """ Creates a Hopfield Network. """ def __init__(self, patterns): """ Initializes the network. Args: patterns (np.array): Group of states to be memorized by ...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 3166, 3667, 29879, 1053, 679, 29918, 3859, 29918, 29894, 27531, 13, 13, 13, 1990, 20727, 2671, 13724, 29901, 13, 1678, 9995, 13, 1678, 6760, 1078, 263, 20727...
Scripts/web_scraping_api.py
ElizaBedoyaZapata/Proyecto-Principal-PowerBI
0
66626
<gh_stars>0 import pandas as pd from sodapy import Socrata from selenium import webdriver #from selenium.webdriver.support.ui import Select # Links file links = pd.read_excel('..\Inputs\enlaces.xlsx', engine='openpyxl') # Chrome path to web scraping chrome_path = r"C:\Users\kmili\Downloads\chromedriver_win...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 11701, 408, 10518, 30004, 13, 3166, 20892, 27580, 1053, 317, 8415, 532, 30004, 13, 3166, 18866, 1053, 1856, 9465, 30004, 13, 29937, 3166, 18866, 29889, 29813, 29889, 5924, 29889, 14...
LeetCode/0044_Wildcard_Matching.py
scott-au/PythonAlgorithms
0
22273
class Solution: def isMatch(self, s: str, p: str) -> bool: # this is a dynamic programming solution fot this matrix = [[False for x in range(len(p) + 1)] for x in range(len(s) + 1)] matrix[0][0] = True for i in range(1, len(matrix[0])): if p[i - 1] == "*": ...
[ 1, 770, 24380, 29901, 13, 1678, 822, 338, 9652, 29898, 1311, 29892, 269, 29901, 851, 29892, 282, 29901, 851, 29897, 1599, 6120, 29901, 13, 4706, 396, 445, 338, 263, 7343, 8720, 1650, 10105, 445, 13, 4706, 4636, 353, 5519, 8824, 363, 9...
src/main.py
Grant-Steinfeld/python-ubi-openshift
7
20059
from flask import Flask from flask_restplus import Api, Resource, fields from services.serviceHandler import convertCurrency, getCurrencyExchangeRates from services.countryCurrencyCodeHandler import ( getCountryAndCurrencyCode, getCurrencyNameAndCode, ) app = Flask(__name__) api = Api( app, version="1....
[ 1, 515, 29784, 1053, 2379, 1278, 13, 3166, 29784, 29918, 5060, 11242, 1053, 29749, 29892, 18981, 29892, 4235, 13, 3166, 5786, 29889, 5509, 4598, 1053, 3588, 29907, 10880, 29892, 679, 29907, 10880, 1252, 3167, 29934, 1078, 13, 3166, 5786, ...
trpg/registration/utility.py
jffifa/trpg
2
52037
from django.conf import settings def decrypt(text): half_len = len(text)//2 return text[half_len:]
[ 1, 515, 9557, 29889, 5527, 1053, 6055, 30004, 13, 30004, 13, 30004, 13, 1753, 1602, 4641, 29898, 726, 1125, 30004, 13, 1678, 4203, 29918, 2435, 353, 7431, 29898, 726, 29897, 458, 29906, 30004, 13, 1678, 736, 1426, 29961, 24498, 29918, 2...
corehq/apps/analytics/signals.py
kkrampa/commcare-hq
1
17659
<reponame>kkrampa/commcare-hq from __future__ import absolute_import from __future__ import unicode_literals import six from django.conf import settings from django.contrib.auth.signals import user_logged_in from corehq.apps.analytics.tasks import ( track_user_sign_in_on_hubspot, HUBSPOT_COOKIE, update_hub...
[ 1, 529, 276, 1112, 420, 29958, 6859, 29878, 20056, 29914, 2055, 18020, 29899, 29882, 29939, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 5215, 4832...
number-base.py
davejlin/py-checkio
0
1601428
<gh_stars>0 ''' Do you remember the radix and Numeral systems from math class? Let's practice with it. You are given a positive number as a string along with the radix for it. Your function should convert it into decimal form. The radix is less than 37 and greater than 1. The task uses digits and the letters A-Z for ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 12008, 29871, 13, 6132, 366, 6456, 278, 2971, 861, 322, 405, 4680, 284, 6757, 515, 5844, 770, 29973, 13, 12024, 29915, 29879, 6944, 411, 372, 29889, 13, 13, 3492, 526, 2183, 263, 6374...
nginx-flask/app/run.py
codenameyau/docker-cheatsheet
1
1611776
<filename>nginx-flask/app/run.py from config import DEVELOPMENT from routes import app if __name__ == '__main__': app.run(**DEVELOPMENT)
[ 1, 529, 9507, 29958, 23257, 29899, 1579, 1278, 29914, 932, 29914, 3389, 29889, 2272, 13, 3166, 2295, 1053, 5012, 12064, 3927, 13427, 3919, 13, 3166, 12049, 1053, 623, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, ...
tests/test_config_middleware.py
cjwatson/pastedeploy
18
95458
import pytest from paste.deploy.config import ConfigMiddleware class Bug(Exception): pass def app_with_exception(environ, start_response): def cont(): yield b"something" raise Bug start_response('200 OK', [('Content-type', 'text/html')]) return cont() def test_error(): # This ...
[ 1, 1053, 11451, 1688, 13, 13, 3166, 11417, 29889, 16519, 29889, 2917, 1053, 12782, 25411, 2519, 13, 13, 13, 1990, 28209, 29898, 2451, 1125, 13, 1678, 1209, 13, 13, 13, 1753, 623, 29918, 2541, 29918, 11739, 29898, 21813, 29892, 1369, 299...
preprocessing/preprocessing.py
sanujsriv/WTM
0
83586
## Preprocessing.py """ Preprocessing Steps :- 1. Convert to lowercase 2. Remove punctuations with empty space 3. Remove digits 4. Apply lemmatization 5. Remove Stopwords 6. Remove words that do not have word embeddings 7. Remove words that have length < 3. *** NOT APPLYING STEMMING (Instead applying lemmat...
[ 1, 444, 4721, 19170, 29889, 2272, 30004, 13, 15945, 19451, 13, 6572, 19170, 2443, 567, 8956, 6756, 13, 29896, 29889, 14806, 304, 5224, 4878, 30004, 13, 29906, 29889, 15154, 6035, 22999, 800, 411, 4069, 2913, 6756, 13, 29941, 29889, 15154,...
tests/test_layers.py
SauravMaheshkar/enformer
0
181617
import pytest import tensorflow as tf from enformer.layers.activation_layers import GELU, SoftPlus from enformer.layers.container_layers import Residual from enformer.layers.pooling_layers import SoftmaxPooling1D from .utils import Identity @pytest.mark.layers @pytest.mark.actions def test_softplus(): layer = ...
[ 1, 1053, 11451, 1688, 13, 5215, 26110, 408, 15886, 13, 13, 3166, 427, 24784, 29889, 29277, 29889, 11236, 362, 29918, 29277, 1053, 402, 6670, 29965, 29892, 1105, 615, 29575, 13, 3166, 427, 24784, 29889, 29277, 29889, 7611, 29918, 29277, 10...
resist/types/models/message.py
an-dyy/Resist
4
34903
from __future__ import annotations from typing import Literal, TypedDict, Union, final from typing_extensions import NotRequired from .asset import AssetData class YoutubeLinkEmbedMetadata(TypedDict): type: Literal["YouTube"] id: str timestamp: NotRequired[str] class TwitchLinkEmbedMetadata(TypedDict...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 3166, 19229, 1053, 5449, 284, 29892, 14213, 287, 21533, 29892, 7761, 29892, 2186, 13, 13, 3166, 19229, 29918, 24299, 1053, 2216, 19347, 13, 13, 3166, 869, 24129, 1053, 1094, 842, 146...
lemur/certificates/models.py
rajatsharma94/lemur
2
193925
""" .. module: lemur.certificates.models :platform: Unix :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: <NAME> <<EMAIL>> """ from datetime import timedelta import arrow from cryptography import x509 from cryptography.hazmat.primi...
[ 1, 9995, 13, 636, 3883, 29901, 9336, 332, 29889, 6327, 928, 1078, 29889, 9794, 13, 1678, 584, 12120, 29901, 26663, 13, 1678, 584, 8552, 1266, 29901, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 491, 12670, 20157, 29916, 9266, 169...
python/testing/parameterized/test_parameterized.py
amitsaha/playground
4
73425
<filename>python/testing/parameterized/test_parameterized.py import unittest from nose_parameterized import parameterized, param @parameterized([param(2), param(3)]) def test_square(x): assert x**2 == x**2 class AddTestCase(unittest.TestCase): @parameterized.expand([ ("string1", "string1"), (...
[ 1, 529, 9507, 29958, 4691, 29914, 13424, 29914, 15501, 1891, 29914, 1688, 29918, 15501, 1891, 29889, 2272, 13, 5215, 443, 27958, 13, 3166, 26414, 29918, 15501, 1891, 1053, 3443, 1891, 29892, 1828, 13, 13, 29992, 15501, 1891, 4197, 3207, 2...
geoip_test/__init__.py
soutys/geoip_test
0
157236
# -*- coding: utf-8 -*- '''Package info module ''' from __future__ import ( absolute_import, division, print_function, unicode_literals, with_statement, ) import os WORK_DIR = os.path.dirname(os.path.abspath(__file__)) __author__ = 'soutys <<EMAIL>>' __version__ = open(os.path.join(WORK_DIR, '...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 12008, 14459, 5235, 3883, 13, 12008, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 313, 13, 1678, 8380, 29918, 5215, 29892, 13, 1678, 8542, 29892, 1...
parser/team27/G-27/execution/symbol/table.py
Lenin201/tytus
1
25962
class Table(object): def __init__(self, name): self.name = name self.columns = [] def createColumn(self, column): self.columns.append(column) def readColumn(self, name): for value in self.columns: if value.name == name: return value ...
[ 1, 770, 6137, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1024, 1125, 13, 4706, 1583, 29889, 978, 353, 1024, 13, 4706, 1583, 29889, 13099, 353, 5159, 13, 268, 13, 1678, 822, 1653, 4409, 29898, 1311, 29892, 1897, ...
flask_user/tests/test_multiple_emails.py
80pctsols/Flask-User
0
138386
<filename>flask_user/tests/test_multiple_emails.py """ tests.test_all_forms.py --------------------------- Flask-User automated tests: Tests posting a sequence of valid forms for all possible config combinations :copyright: (c) 2013 by <NAME> :author: <NAME> (<EMAIL>) :license: Simplified B...
[ 1, 529, 9507, 29958, 1579, 1278, 29918, 1792, 29914, 21150, 29914, 1688, 29918, 20787, 29918, 331, 2234, 29889, 2272, 13, 15945, 29908, 13, 1678, 6987, 29889, 1688, 29918, 497, 29918, 9514, 29889, 2272, 13, 1678, 448, 2683, 28400, 13, 167...
catkin_ws/src/00-infrastructure/duckietown/include/duckietown_utils_tests/colors.py
yxiao1996/dev
2
188687
<gh_stars>1-10 from comptests.registrar import comptest, run_module_tests from termcolor import colored from duckietown_utils.text_utils import (get_length_on_screen, format_table_plus, remove_escapes, make_row_red) @comptest def test_color_sizes(): s1 = 'one' ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 13, 3166, 18741, 9197, 29889, 29238, 279, 1053, 18741, 342, 29892, 1065, 29918, 5453, 29918, 21150, 13, 13, 3166, 1840, 2780, 1053, 28684, 13, 13, 3166, 868, 384, 2...
anaf/documents/migrations/0001_initial.py
tovmeod/anaf
2
18751
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import anaf.documents.models import anaf.documents.files class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 2585, 1053, 4733, 29892, 9725, 800, 13, 5215, 385, 2142, 29889...
ibeis/algo/graph/mixin_groundtruth.py
brmscheiner/ibeis
0
199584
<filename>ibeis/algo/graph/mixin_groundtruth.py # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import utool as ut import numpy as np import vtool as vt import pandas as pd from ibeis.algo.graph.nx_utils import ensure_multi_index from ibeis.algo.graph.state imp...
[ 1, 529, 9507, 29958, 18673, 275, 29914, 284, 1484, 29914, 4262, 29914, 28084, 262, 29918, 2057, 509, 2806, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, ...
codetest.py
Shannon-NJIT/PyCharmsHW
0
42501
#adding two numbers num1 = 2 num2 = 3 sum = num1 + num2 print("The sum is:", sum)
[ 1, 396, 4676, 1023, 3694, 13, 13, 1949, 29896, 353, 29871, 29906, 13, 1949, 29906, 353, 29871, 29941, 13, 2083, 353, 954, 29896, 718, 954, 29906, 13, 13, 2158, 703, 1576, 2533, 338, 29901, 613, 2533, 29897, 2 ]
scripts/acled2locations.py
ynxue/FabFlee
1
180693
<filename>scripts/acled2locations.py import pandas as pd import warnings import sys import os import calendar as cal from datetime import datetime def month_convert(month): name_to_number = {name: number for number, name in enumerate(cal.month_name) if number } # dict ...
[ 1, 529, 9507, 29958, 16713, 29914, 562, 839, 29906, 2029, 800, 29889, 2272, 13, 5215, 11701, 408, 10518, 13, 5215, 18116, 13, 5215, 10876, 13, 5215, 2897, 13, 5215, 17684, 408, 1208, 13, 3166, 12865, 1053, 12865, 13, 13, 13, 1753, 409...
supermamas/areas/service.py
oasalonen/supermamas
0
43538
from flask_babel import gettext from dateutil import rrule, parser from datetime import datetime, date, timedelta from supermamas.areas.districts import District from supermamas.areas.cities import City class Service: __instance = None def __new__(cls, district_repository=None, city_repository=None): ...
[ 1, 515, 29784, 29918, 28727, 1053, 679, 726, 13, 3166, 2635, 4422, 1053, 364, 7491, 29892, 13812, 13, 3166, 12865, 1053, 12865, 29892, 2635, 29892, 5335, 287, 2554, 13, 13, 3166, 2428, 29885, 314, 294, 29889, 598, 294, 29889, 29881, 680...
tests/highlevel_functions/test_highlevel_functions.py
meta00/vital_sqi
4
173700
<gh_stars>1-10 import pytest import os import numpy as np from vital_sqi.data.signal_io import PPG_reader from vital_sqi.highlevel_functions.highlevel import \ compute_SQI,compute_multiple_SQIs,get_clean_signals,\ get_cutpoints,basic_ecg_pipeline,basic_ppg_pipeline,segment_PPG_SQI_extraction class TestSignalPr...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 11451, 1688, 13, 5215, 2897, 13, 5215, 12655, 408, 7442, 13, 3166, 27131, 29918, 3044, 29875, 29889, 1272, 29889, 25436, 29918, 601, 1053, 349, 16903, 29918, 16...
itests/pages/permissions.py
bonniech3n/merou
0
164935
from typing import TYPE_CHECKING from itests.pages.base import BaseElement, BasePage if TYPE_CHECKING: from typing import List class PermissionsPage(BasePage): @property def has_create_permission_button(self): # type: () -> bool return self.find_elements_by_class_name("create-permission"...
[ 1, 515, 19229, 1053, 323, 6959, 29918, 3210, 16658, 4214, 13, 13, 3166, 372, 9197, 29889, 12292, 29889, 3188, 1053, 7399, 2642, 29892, 7399, 5074, 13, 13, 361, 323, 6959, 29918, 3210, 16658, 4214, 29901, 13, 1678, 515, 19229, 1053, 2391...
tests/test_main.py
newvicx/pybatch
0
125459
<gh_stars>0 import os from datetime import datetime from typing import List, Union import pandas as pd import pytest from dotenv import load_dotenv from pypibatch import NoBatchesFound, PIBatch, PIBatchError load_dotenv() SERVER = os.getenv("PI_SERVER") UNIT_W_SUB = os.getenv("PI_UNIT_W_SUB") UNIT_NO_SUB = os.geten...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 13, 3166, 12865, 1053, 12865, 13, 3166, 19229, 1053, 2391, 29892, 7761, 13, 13, 5215, 11701, 408, 10518, 13, 5215, 11451, 1688, 13, 3166, 8329, 6272, 1053, 2254, 29918, 6333...
tests/unit/cirrus/quality_control_test.py
Maxsparrow/cirrus
12
55405
''' qc command tests ''' import mock import unittest from cirrus.quality_control import main, run_linters, build_parser class QCCommandTests(unittest.TestCase): """ test coverage for qc command module """ def test_build_parser(self): """test build_parser call""" args = [ ...
[ 1, 14550, 13, 29939, 29883, 1899, 6987, 13, 12008, 13, 5215, 11187, 13, 5215, 443, 27958, 13, 13, 3166, 5902, 15816, 29889, 29567, 29918, 6451, 1053, 1667, 29892, 1065, 29918, 29880, 1639, 29879, 29892, 2048, 29918, 16680, 13, 13, 13, 1...
tests/UnitTests.py
MattBussing/DistancePi
0
88730
<reponame>MattBussing/DistancePi # This is the experimental testing suite for this app import json import re import sys import unittest import requests from main import Device from custom_threads import MyThread # TODO delete all the messages added class TestAdd(unittest.TestCase): url = 'https://distance-pi....
[ 1, 529, 276, 1112, 420, 29958, 29924, 1131, 29933, 1558, 292, 29914, 27469, 12197, 13, 29937, 910, 338, 278, 17986, 6724, 9460, 363, 445, 623, 13, 13, 5215, 4390, 13, 5215, 337, 13, 5215, 10876, 13, 5215, 443, 27958, 13, 13, 5215, 7...
Mundo 3/ex105.py
erickeloi/ExerciciosTreino
0
35905
<reponame>erickeloi/ExerciciosTreino # Exercício Python 105: Analisando e gerando Dicionários # Faça um programa que tenha uma função notas() que pode receber várias notas de alunos # e vai retornar um dicionário com as seguintes informações: # # - Quantidade de notas # - A maior nota # - A menor nota # - A média da tu...
[ 1, 529, 276, 1112, 420, 29958, 261, 860, 7078, 29875, 29914, 1252, 6269, 19382, 29911, 276, 1789, 13, 29937, 1222, 6269, 24394, 5132, 29871, 29896, 29900, 29945, 29901, 530, 5711, 1743, 321, 9814, 1743, 360, 15353, 26047, 13, 29937, 7748,...
dvc/output/gs.py
Abrosimov-a-a/dvc
0
78428
<reponame>Abrosimov-a-a/dvc from __future__ import unicode_literals from dvc.output.s3 import OutputS3 from dvc.remote.gs import RemoteGS class OutputGS(OutputS3): REMOTE = RemoteGS
[ 1, 529, 276, 1112, 420, 29958, 4920, 1883, 326, 586, 29899, 29874, 29899, 29874, 29914, 29881, 7071, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 270, 7071, 29889, 4905, 29889, 29879, 29941, 1053, 1060...
websites/gamefaqs/gameparser.py
jb262/completewasteoftime
6
115305
<gh_stars>1-10 ''' This module contains all necessary functions to scrape both base info (description, release date, etc.) and advanced info (versions, add-ons, etc.) for a video game provided a BeautifulSoup object containing the corresponding base/advance data page. ''' import re def get_name(info_page): ''' ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 12008, 13, 4013, 3883, 3743, 599, 5181, 3168, 304, 24559, 412, 13, 20313, 2967, 5235, 313, 8216, 29892, 6507, 2635, 29892, 2992, 1846, 322, 13, 328, 16858, 5235, 31...
code/examples/example_binomial_and_log_normal_abtest.py
hugopibernat/BayesianABTestAnalysis
0
3658
################################################# ####### Author: <NAME> ####### ####### Contact: <EMAIL> ####### ####### Date: April 2014 ####### ################################################# from bayesianABTest import sampleSuccessRateForBinomial, sampleMeanForLogNormal, probabili...
[ 1, 835, 13383, 13383, 7346, 4136, 2277, 13, 4136, 2277, 29937, 13361, 29901, 529, 5813, 29958, 632, 835, 4136, 13, 4136, 2277, 29937, 22387, 29901, 529, 26862, 6227, 29958, 259, 835, 4136, 13, 4136, 2277, 29937, 4712, 29901, 3786, 29871, ...
v2/audio/audio_reader.py
safgen/deep-speaker
0
40741
<reponame>safgen/deep-speaker<filename>v2/audio/audio_reader.py from time import time import dill import librosa import numpy as np import os import re from glob import glob from random import shuffle, randint, choice from tqdm import tqdm from helpers.logger import Logger logger = Logger.instance() TMP_DIR = '/tmp...
[ 1, 529, 276, 1112, 420, 29958, 29879, 2142, 1885, 29914, 24535, 29899, 5965, 5790, 29966, 9507, 29958, 29894, 29906, 29914, 18494, 29914, 18494, 29918, 16950, 29889, 2272, 13, 3166, 931, 1053, 931, 13, 13, 5215, 270, 453, 13, 5215, 4303, ...
scripts/plot.py
dfvella/vtol
0
47069
<reponame>dfvella/vtol #!/usr/bin/env python3 import sys import matplotlib.pyplot as plt try: filename = sys.argv[1] except IndexError: print('error: data file not specified') exit(1) #response = [ 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 ] #response = [ 0.2, 0.2, 0.2, 0.2, 0.1, 0.05, 0.02, 0.02...
[ 1, 529, 276, 1112, 420, 29958, 2176, 955, 433, 29914, 21908, 324, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 10876, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 2202, 29901, 13, 1678, 10422, ...
plugins/modules/tag.py
robertcsapo/dnacenter-ansible
0
90261
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: tag short_description: Manage Tag objects of Tag description: - Returns the Tags for given filter criteria. - Cre...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 14187, 1266, 29901, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29896, 29892, 315, 275, 1111, 23...
bin/extract_shared_or_unique_otuids.py
bhawan1/phylotoast
19
1609176
<filename>bin/extract_shared_or_unique_otuids.py<gh_stars>10-100 #! /usr/bin/env python """ Abstract: Get unique OTUIDs present in each category of your dataset. Date: 06/09/2016 """ import sys import argparse import os.path as osp from itertools import combinations from collections import defaultdict from phylotoast i...
[ 1, 529, 9507, 29958, 2109, 29914, 21111, 29918, 12366, 29918, 272, 29918, 13092, 29918, 327, 29884, 4841, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 29991, 847, 4855, 29914, 2109, ...
my_ip/migrations/0007_alter_project_project_image.py
OscarMugendi/Django-week3-IP
0
112760
<reponame>OscarMugendi/Django-week3-IP # Generated by Django 3.2.7 on 2021-09-24 05:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('my_ip', '0006_auto_20210924_0111'), ] operations = [ migrations.AlterField( model_name='p...
[ 1, 529, 276, 1112, 420, 29958, 29949, 14494, 29924, 688, 26464, 29914, 29928, 5364, 29899, 18448, 29941, 29899, 5690, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29906, 29889, 29955, 373, 29871, 29906, 29900, 29906, 29896, 29899, ...
bedrock/sqlalchemy_test.py
hieast/bedrock
0
165297
from ark.db import Database from sqlalchemy import Column, Integer from sqlalchemy.dialects import postgresql db = Database('postgresql://oceanuse:851JqIaLicRwkGs@10.30.183.102:5432/ocean') class Test(db.Model): __tablename__ = 'test' id = Column(Integer, primary_key=True) query = db.session.query(Test).limit...
[ 1, 29871, 13, 3166, 564, 29895, 29889, 2585, 1053, 5470, 13, 3166, 4576, 284, 305, 6764, 1053, 12481, 29892, 8102, 13, 3166, 4576, 284, 305, 6764, 29889, 15321, 781, 29879, 1053, 27035, 13, 2585, 353, 5470, 877, 29272, 597, 29877, 11956...
average_screen_color.py
Animenosekai/AverageColor
0
137936
### Code by <NAME> ### ### import pyautogui import PIL def average_image_color(image): """ Code by olooney on GitHub > https://gist.github.com/olooney/1246268 Returns the average color from a given image (PIL) """ i = image h = i.histogram() # split into red, green, blue r = h[0:256] g = h[256:256*2] b = ...
[ 1, 835, 5920, 491, 529, 5813, 29958, 13, 2277, 29937, 13, 2277, 29937, 13, 5215, 11451, 1300, 468, 1481, 13, 5215, 349, 6227, 13, 13, 1753, 6588, 29918, 3027, 29918, 2780, 29898, 3027, 1125, 13, 12, 15945, 29908, 13, 12, 3399, 491, ...
package/__init__.py
jfcrenshaw/python-package
0
146261
__version__ = "0.1.0" from .module import *
[ 1, 4770, 3259, 1649, 353, 376, 29900, 29889, 29896, 29889, 29900, 29908, 13, 3166, 869, 5453, 1053, 334, 13, 2 ]
tolteca/simu/__init__.py
dennis-l/tolteca
2
164661
#!/usr/bin/env python import astropy.units as u from typing import Union from dataclasses import dataclass, field, is_dataclass from cached_property import cached_property import copy from typing import ClassVar from schema import Or from tollan.utils.dataclass_schema import add_schema from tollan.utils.log import ge...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 8717, 14441, 29889, 348, 1169, 408, 318, 13, 3166, 19229, 1053, 7761, 13, 3166, 848, 13203, 1053, 848, 1990, 29892, 1746, 29892, 338, 29918, 1272, 1990, 13, 3166, 22152, 2991...
ticket/migrations/0011_ticketmeantimes.py
aessex24/rindr
1
186681
<reponame>aessex24/rindr # Generated by Django 3.2.8 on 2021-11-01 19:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ticket', '0010_ticket_archived'), ] operations = [ migrations.CreateModel( name='TicketMeanTimes', ...
[ 1, 529, 276, 1112, 420, 29958, 29874, 5340, 29916, 29906, 29946, 29914, 29878, 513, 29878, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29906, 29889, 29947, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29896, 29896, 29899, 29900, ...
Python-Advanced/multidimensional_elements_exercise/2x2_squares_in_matrix.py
Xamaneone/SoftUni-Intro
0
143428
<gh_stars>0 def read_matrix(): (rows, columns) = map(int, input().split(" ")) matrix = [] for r in range(rows): row = input().split(" ") matrix.append(row) return matrix, rows, columns def subsqares_count(matrix,subsquare, rows, columns): count = 0 for r in range(rows - (subsqua...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 1753, 1303, 29918, 5344, 7295, 13, 1678, 313, 5727, 29892, 4341, 29897, 353, 2910, 29898, 524, 29892, 1881, 2141, 5451, 703, 376, 876, 13, 1678, 4636, 353, 5159, 13, 1678, 363, 364, 2...
test.py
markmelnic/Car-Indexes-Scraper
2
54542
import os import json import subprocess import mobile_de import autoscout24_ch import anibis_ch if __name__ == '__main__': try: #autoscout24_ch.scrape_makes() #autoscout24_ch.scrape_models() #mobile_de.scrape_makes() #mobile_de.scrape_models() anibis_ch.scrape_makes() ...
[ 1, 29871, 13, 5215, 2897, 13, 5215, 4390, 13, 5215, 1014, 5014, 13, 13, 5215, 10426, 29918, 311, 13, 5215, 1120, 359, 13147, 29906, 29946, 29918, 305, 13, 5215, 385, 747, 275, 29918, 305, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525,...
oldcode/guestbook111013.py
mdreid/dinkylink
1
16638
import os import urllib from google.appengine.api import users from google.appengine.ext import ndb import jinja2 import webapp2 from sys import argv import datetime import pickle import sys sys.path.insert(0, 'libs') import BeautifulSoup from bs4 import BeautifulSoup import requests import json JINJA_ENVIRONM...
[ 1, 1053, 2897, 13, 5215, 3142, 1982, 13, 13, 3166, 5386, 29889, 932, 10599, 29889, 2754, 1053, 4160, 13, 3166, 5386, 29889, 932, 10599, 29889, 1062, 1053, 29871, 299, 29890, 13, 13, 5215, 432, 262, 1764, 29906, 13, 5215, 1856, 932, 29...
q2/1_Graph/pair_count.py
PostQuantum/Buckyball-Ising-Model
8
108937
import numpy as np def count(LM): co = 0 if LM.shape[0]>2: index = np.argwhere(LM==1)[:5] for it in index: lm_ = np.delete(LM,it[0],0) lm_ = np.delete(lm_,it[1]-1,0) lm_ = np.delete(lm_,it[0],1) lm = np.delete(lm_,it[1]-1,1) L...
[ 1, 1053, 12655, 408, 7442, 13, 13, 1753, 2302, 29898, 26369, 1125, 13, 1678, 1302, 353, 29871, 29900, 13, 1678, 565, 365, 29924, 29889, 12181, 29961, 29900, 29962, 29958, 29906, 29901, 13, 4706, 2380, 353, 7442, 29889, 1191, 3062, 29898, ...
webrecorder/test/test_colls_api.py
ssteo/webrecorder
1,217
150207
from datetime import datetime import os from .testutils import FullStackTests # ============================================================================ class TestWebRecCollsAPI(FullStackTests): @classmethod def setup_class(cls): super(TestWebRecCollsAPI, cls).setup_class() def test_create_a...
[ 1, 515, 12865, 1053, 12865, 13, 5215, 2897, 13, 13, 3166, 869, 1688, 13239, 1053, 14846, 7264, 24376, 13, 13, 13, 29937, 1275, 9166, 9166, 9166, 9166, 4936, 1360, 13, 1990, 4321, 3609, 4789, 1625, 3137, 8787, 29898, 13658, 7264, 24376, ...
CangJie/CTC/RFAG/Module/sym/net/WCRLSTM.py
bigdata-ustc/CangJie
2
1607491
<reponame>bigdata-ustc/CangJie # coding: utf-8 # 2020/1/2 @ tongshiwei from longling.ML.MxnetHelper.gallery.layer.attention import \ DotProductAttentionCell import mxnet as mx from mxnet import gluon from .net import EmbeddingLSTM class WCRLSTM(EmbeddingLSTM): def __init__(self, net_type, ...
[ 1, 529, 276, 1112, 420, 29958, 3752, 1272, 29899, 504, 29883, 29914, 29907, 574, 29967, 347, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 29937, 29871, 29906, 29900, 29906, 29900, 29914, 29896, 29914, 29906, 732, 21861, 845, 29875, 265...
samples/snippets/test_export_to_bigquery.py
renovate-bot/python-contact-center-insights
4
12518
# 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 applicable law or agreed to in writing, s...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29906, 29896, 5087, 365, 12182, 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, ...
tests/functional_tests/identity_tests/test_properties.py
lycantropos/lz
7
72823
from typing import Any from hypothesis import given from lz.functional import (curry, identity) from tests import strategies @given(strategies.scalars) def test_currying(object_: Any) -> None: curried = curry(identity) result = curried(object_) assert result is object_
[ 1, 515, 19229, 1053, 3139, 13, 13, 3166, 20051, 1053, 2183, 13, 13, 3166, 301, 29920, 29889, 2220, 284, 1053, 313, 2764, 719, 29892, 13, 462, 965, 10110, 29897, 13, 3166, 6987, 1053, 16650, 583, 13, 13, 13, 29992, 29887, 5428, 29898, ...
orm_database/create.py
SamuelSSan28/camara_bot_2.0
0
186562
<gh_stars>0 from models import Projetos projeto_1 = { 'protocolo':1402, 'processo':"1394 /2021", 'data':'----', 'titulo': '---', 'vereador': "---", 'situacao':'---', 'tipo':'----' } projetos = [projeto_1] # Inserimos os quatro projetos na tabela 'Projetos' Projetos.insert_many(projetos...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 4733, 1053, 29871, 1019, 4026, 359, 13, 13, 771, 4026, 29877, 29918, 29896, 353, 426, 13, 1678, 525, 20464, 29877, 2396, 29896, 29946, 29900, 29906, 29892, 13, 1678, 525, 5014, 29...
__init__.py
ModEngineer/pygraphutils
1
143199
#Copyright 2020 ModEngineer # #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, softwa...
[ 1, 396, 11882, 1266, 29871, 29906, 29900, 29906, 29900, 3382, 12412, 261, 13, 29937, 13, 29937, 29931, 293, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 6293, ...
main.py
wdsrocha/anime-recommender
0
144203
from src import preprocessing, telegram_bot if __name__ == "__main__": preprocessing.main() telegram_bot.main()
[ 1, 515, 4765, 1053, 758, 19170, 29892, 4382, 1393, 29918, 7451, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 758, 19170, 29889, 3396, 580, 13, 1678, 4382, 1393, 29918, 7451, 29889, 3396, 580, 13, 2 ]
direct_gd_predict/hash-profile.py
wac/meshop
1
12609
<reponame>wac/meshop<gh_stars>1-10 import sys import heapq import optparse from bitcount2 import bitcount hasher={} profile={} key_list=[] key_col=0 def usage(): print sys.argv[0]," [profile_file]" print " Load the profile lines from profile_file" print " Hash function uses the features listed in profi...
[ 1, 529, 276, 1112, 420, 29958, 29893, 562, 29914, 4467, 29882, 459, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 10876, 13, 5215, 16947, 29939, 13, 5215, 3523, 5510, 13, 3166, 2586, 2798, 29906, 1053, 2586,...
test/integration/broken/maint/test_vpc_host_maintenance.py
elShiaLabeouf/cloudstack
1
134915
<filename>test/integration/broken/maint/test_vpc_host_maintenance.py # 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 ownership. The ASF licenses this file # to you u...
[ 1, 529, 9507, 29958, 1688, 29914, 27925, 29914, 6729, 1717, 29914, 29885, 2365, 29914, 1688, 29918, 29894, 6739, 29918, 3069, 29918, 3396, 841, 749, 29889, 2272, 13, 29937, 10413, 21144, 304, 278, 13380, 18540, 10606, 313, 3289, 29943, 2989...
trac/Scripts/pygmentize-script.py
thinkbase/PortableTrac
2
180713
#!"E:\PortableTrac\Portable Python 2.7.3.1\App\python.exe" # EASY-INSTALL-ENTRY-SCRIPT: 'Pygments==1.5','console_scripts','pygmentize' __requires__ = 'Pygments==1.5' import sys from pkg_resources import load_entry_point sys.exit( load_entry_point('Pygments==1.5', 'console_scripts', 'pygmentize')() )
[ 1, 396, 3850, 29923, 3583, 2290, 519, 29911, 945, 29905, 2290, 519, 5132, 29871, 29906, 29889, 29955, 29889, 29941, 29889, 29896, 29905, 2052, 29905, 4691, 29889, 8097, 19451, 13, 29937, 382, 3289, 29979, 29899, 25580, 9818, 29899, 3919, 13...
rest_framework_sudo/expiration.py
Nekmo/djangorestframework-sudo
1
95412
<gh_stars>1-10 import datetime from functools import wraps from rest_framework.exceptions import PermissionDenied from rest_framework_sudo import settings from django.contrib.auth.models import AbstractUser from django.utils import timezone from rest_framework_sudo.utils import get_request_argument def get_user_re...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 12865, 13, 3166, 2090, 312, 8789, 1053, 11463, 567, 13, 13, 3166, 1791, 29918, 4468, 29889, 11739, 29879, 1053, 20894, 2333, 29315, 1000, 13, 13, 3166, 1791, ...
src/schemas/serlializers/bright.py
rena2damas/healthcheck-service
0
116669
from marshmallow import Schema, fields class HealthCheckSchema(Schema): name = fields.String() status = fields.String(attribute="status.name") node = fields.String() seconds_ago = fields.Integer() timestamp = fields.Integer() info = fields.String()
[ 1, 515, 1766, 845, 29885, 9536, 1053, 1102, 2603, 29892, 4235, 13, 13, 13, 1990, 15202, 5596, 12763, 29898, 12763, 1125, 13, 1678, 1024, 353, 4235, 29889, 1231, 580, 13, 1678, 4660, 353, 4235, 29889, 1231, 29898, 12715, 543, 4882, 29889...
migration/management/commands/migratedata.py
dixonary/uwcs-zarya
7
29797
from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from django.template.defaultfilters import slugify, linebreaks, date, truncatechars from wagtail.core.models import Page from wagtail.core.rich_text import RichText from migration.models import * from accounts.models im...
[ 1, 515, 9557, 29889, 3221, 29889, 21895, 29889, 3188, 1053, 7399, 6255, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 679, 29918, 1792, 29918, 4299, 13, 3166, 9557, 29889, 6886, 29889, 4381, 26705, 1053, 2243, 688, 1598, 29892, 1196, 8...
main.py
maxBombrun/lipidDroplets
0
38511
<reponame>maxBombrun/lipidDroplets<gh_stars>0 import os import csv import multiprocessing import settings import segmentNucAndGFP import cellProfilerGetRelation import measureGFPSize import plotFeatures import fusionCSV import clusterDroplets import computeZprime settings.init() CPPath=settings.p...
[ 1, 529, 276, 1112, 420, 29958, 3317, 29933, 290, 1182, 348, 29914, 3466, 333, 29928, 307, 552, 1372, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 30004, 13, 5215, 11799, 30004, 13, 5215, 6674, 307, 985, 292, 30004, 13, ...
examples/tasks/dtw-energy-plus-models-data/code.py
dburian/ivis-core
2
14106
<gh_stars>1-10 import sys import os import json from elasticsearch import Elasticsearch, helpers from datetime import datetime, timezone import numpy as np from dtw import dtw # Get parameters and set up elasticsearch data = json.loads(sys.stdin.readline()) es = Elasticsearch([{'host': data['es']['host'], 'port': int...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 10876, 13, 5215, 2897, 13, 5215, 4390, 13, 3166, 560, 20291, 1053, 1260, 20291, 29892, 1371, 414, 13, 13, 3166, 12865, 1053, 12865, 29892, 29431, 13, 5215, 12...
src/lib/detectors/ddd.py
nerminsamet/houghnet
161
67088
from __future__ import absolute_import from __future__ import division from __future__ import print_function import cv2 import numpy as np from progress.bar import Bar import time import torch from src.lib.external.nms import soft_nms from src.lib.models.decode import ddd_decode from src.lib.models.utils import flip_...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 13850, 29906, 13, 5215, 12655, 408, 7442, 13, 3166, 6728,...
biserici_inlemnite/biserici/migrations/0047_auto_20210804_1305.py
ck-tm/biserici-inlemnite
0
184213
<reponame>ck-tm/biserici-inlemnite<gh_stars>0 # Generated by Django 3.1.13 on 2021-08-04 10:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biserici', '0046_auto_20210804_1253'), ] operations = [ migrations.AddField( mode...
[ 1, 529, 276, 1112, 420, 29958, 384, 29899, 18276, 29914, 29890, 7608, 1654, 29899, 262, 2409, 29876, 568, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 29889, 29896, 29941, 373, ...
hyperparameter_tuning/mxnet_gluon_cifar10_random_search/random_tuner.py
zanhsieh/amazon-sagemaker-examples
3
197064
<gh_stars>1-10 import random import time import boto3 import re import pandas as pd import numpy as np ################# # Hyperparameters ################# class CategoricalParameter(): ''' Class for categorical hyperparameters. Takes one argument which is a list of possible hyperparameter values. ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 4036, 13, 5215, 931, 13, 5215, 289, 3747, 29941, 13, 5215, 337, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 13, 13, 13383, 29937, 13, 29937...
tracardi/service/wf/domain/work_flow.py
Tracardi/tracardi
153
182186
from typing import Tuple, List from tracardi.domain.event import Event from tracardi.domain.payload.tracker_payload import TrackerPayload from tracardi.domain.profile import Profile from tracardi.domain.session import Session from .debug_info import DebugInfo from .flow import Flow from .flow_history import FlowHistor...
[ 1, 515, 19229, 1053, 12603, 552, 29892, 2391, 13, 13, 3166, 16703, 18015, 29889, 7247, 29889, 3696, 1053, 6864, 13, 3166, 16703, 18015, 29889, 7247, 29889, 23813, 29889, 3018, 4937, 29918, 23813, 1053, 3201, 4937, 15467, 1359, 13, 3166, 1...
imgapp/management/commands/create_token.py
Thakursim/dodjapp
0
126334
<reponame>Thakursim/dodjapp<filename>imgapp/management/commands/create_token.py import getpass from django.core.management import BaseCommand from django.contrib.auth.models import User from django.db import IntegrityError from rest_framework.authtoken.models import Token #The class must be named Command, and subcla...
[ 1, 529, 276, 1112, 420, 29958, 1349, 557, 1295, 326, 29914, 29881, 397, 29926, 932, 29966, 9507, 29958, 2492, 932, 29914, 21895, 29914, 26381, 29914, 3258, 29918, 6979, 29889, 2272, 13, 5215, 679, 3364, 13, 13, 3166, 9557, 29889, 3221, ...
examples/trivial_post_input.py
ajCameron/mewbot
0
183169
#!/usr/bin/env python3 """ Implementing a new Input - as it happens to be the first input, a few other things are going to have to go on - like defining some behaviors - and actually building a bot - and fixing any weird type errors """ from __future__ import annotations from typing import Set, Type, Dict, Any fro...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 15945, 29908, 13, 1888, 2037, 292, 263, 716, 10567, 448, 408, 372, 5930, 304, 367, 278, 937, 1881, 29892, 13, 29874, 2846, 916, 2712, 526, 2675, 304, 505, 304, 748, 373, ...
face.py
justinham/rasp
0
48965
<reponame>justinham/rasp<filename>face.py import os import glob import numpy as np import cv2 import tensorflow as tf from fr_utils import * from inception_blocks_v2 import * from keras import backend as K from easyfacenet.simple import facenet def triplet_loss(y_true, y_pred, alpha = 0.3): anchor, positive, negati...
[ 1, 529, 276, 1112, 420, 29958, 5143, 262, 3391, 29914, 3417, 29886, 29966, 9507, 29958, 2161, 29889, 2272, 13, 5215, 2897, 13, 5215, 13149, 13, 5215, 12655, 408, 7442, 13, 5215, 13850, 29906, 13, 5215, 26110, 408, 15886, 13, 3166, 1424,...
Python_Projects/numeric/lossofsignificance.py
arifBurakDemiray/TheCodesThatIWrote
1
18869
# -*- coding: utf-8 -*- """ Created on Mon Apr 13 13:35:33 2020 """ #for finding loss of significances x=1e-1 flag = True a=0 while (flag): print (((2*x)/(1-(x**2))),"......",(1/(1+x))-(1/(1-x))) x= x*(1e-1) a=a+1 if(a==25): flag=False
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 2598, 319, 558, 29871, 29896, 29941, 29871, 29896, 29941, 29901, 29941, 29945, 29901, 29941, 29941, 29871, 29906, 29900, 29906,...
09-mock-challenge/my_library/module.py
haneyr/pytest-examples
0
124652
import pandas as pd def is_sum_of_series_big(series): # Lets check if this dataframe has over a thousand rows if series.sum() > 1000: return True else: return False if __name__ == "__main__": s1 = pd.Series([1000, 1000]) print(s1) print(is_sum_of_series_big(s1)) s2 = pd.Se...
[ 1, 1053, 11701, 408, 10518, 13, 13, 1753, 338, 29918, 2083, 29918, 974, 29918, 13757, 29918, 3752, 29898, 13757, 1125, 13, 1678, 396, 365, 1691, 1423, 565, 445, 12205, 756, 975, 263, 10405, 4206, 13, 1678, 565, 3652, 29889, 2083, 580, ...
synmock/sphere.py
bengranett/synmock
1
167923
<filename>synmock/sphere.py<gh_stars>1-10 import numpy as np import healpy ic = 180/np.pi def xyz2lonlat(x,y,z,norm=True,getr=False): """ """ if norm: r = np.sqrt(x*x+y*y+z*z) else: r = np.ones(x.shape) ii = r > 0 lat = np.zeros(len(r), dtype=float) lon = np.zeros(len(r), dty...
[ 1, 529, 9507, 29958, 19274, 17640, 29914, 29879, 9085, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 12655, 408, 7442, 13, 5215, 540, 284, 2272, 13, 13, 293, 353, 29871, 29896, 29947, 29900, 299...
api/subscription_api/serializers.py
vmariiechko/sport-club
0
103890
<reponame>vmariiechko/sport-club<filename>api/subscription_api/serializers.py from django.utils import timezone from rest_framework import serializers from ..accounts_api.models import Member from ..cards_api.models import Pass from .models import Subscription class SubscriptionSerializer(serializers.ModelSerializer...
[ 1, 529, 276, 1112, 420, 29958, 6925, 1306, 22149, 2901, 29914, 29879, 637, 29899, 29066, 29966, 9507, 29958, 2754, 29914, 1491, 22371, 29918, 2754, 29914, 15550, 19427, 29889, 2272, 13, 3166, 9557, 29889, 13239, 1053, 29431, 13, 3166, 1791,...
tests/rororo/test_openapi.py
fajfer/rororo
105
43711
import datetime import io import json import zipfile from pathlib import Path import pyrsistent import pytest import yaml from aiohttp import web from openapi_core.shortcuts import create_spec from yarl import URL from rororo import ( BaseSettings, get_openapi_context, get_openapi_schema, get_openapi_...
[ 1, 1053, 12865, 13, 5215, 12013, 13, 5215, 4390, 13, 5215, 14319, 1445, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 5215, 11451, 2288, 9696, 13, 5215, 11451, 1688, 13, 5215, 343, 8807, 13, 3166, 263, 601, 1124, 1053, 1856, 13, 3166, ...
src/rnn/text_classification_train.py
jorgemf/kaggle_redefining_cancer_treatment
20
52106
import tensorflow as tf import csv import time from datetime import timedelta import sys import numpy as np from tensorflow.python.training import training_util from tensorflow.contrib import slim from tensorflow.python.ops import variables as tf_variables from ..configuration import * from .. import trainer, evaluator...
[ 1, 1053, 26110, 408, 15886, 13, 5215, 11799, 13, 5215, 931, 13, 3166, 12865, 1053, 5335, 287, 2554, 13, 5215, 10876, 13, 5215, 12655, 408, 7442, 13, 3166, 26110, 29889, 4691, 29889, 26495, 1053, 6694, 29918, 4422, 13, 3166, 26110, 29889...
tests/test_middleware/test_pure_asgi_middleware.py
adamantike/starlette-context
242
73327
<reponame>adamantike/starlette-context from starlette import status from starlette.applications import Starlette from starlette.middleware import Middleware from starlette.requests import Request from starlette.responses import JSONResponse from starlette.testclient import TestClient from starlette_context import cont...
[ 1, 529, 276, 1112, 420, 29958, 328, 314, 3656, 446, 29914, 8508, 20200, 29899, 4703, 13, 3166, 5810, 20200, 1053, 4660, 13, 3166, 5810, 20200, 29889, 932, 5795, 1053, 7828, 20200, 13, 3166, 5810, 20200, 29889, 17662, 2519, 1053, 14253, ...
corehq/ex-submodules/casexml/apps/phone/fixtures.py
johan--/commcare-hq
0
196102
<gh_stars>0 from collections import namedtuple from casexml.apps.case.xml import V1 from django.conf import settings from corehq.apps.users.models import CommCareUser from dimagi.utils.modules import to_function import itertools class FixtureGenerator(object): """ The generator object, which gets fixtures fro...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 16250, 1053, 4257, 23583, 13, 3166, 1206, 3134, 29889, 13371, 29889, 4878, 29889, 3134, 1053, 478, 29896, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 7136, 29882, 29939, 2988...
src/modax/layers/network.py
GJBoth/modax
2
36463
from typing import Callable from jax import lax from flax import linen as nn class MultiTaskDense(nn.Module): features: int n_tasks: int kernel_init: Callable = nn.initializers.lecun_normal() bias_init: Callable = nn.initializers.zeros @nn.compact def __call__(self, inputs): kernel = ...
[ 1, 515, 19229, 1053, 8251, 519, 13, 3166, 432, 1165, 1053, 425, 29916, 13, 3166, 17422, 29916, 1053, 6276, 264, 408, 302, 29876, 13, 13, 13, 1990, 14974, 5398, 29928, 1947, 29898, 15755, 29889, 7355, 1125, 13, 1678, 5680, 29901, 938, ...
mmdet/models/backbones/cspresnet.py
jie311/miemiedetection
65
120322
# Copyright (c) 2021 PaddlePaddle Authors. 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 appli...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29896, 349, 22352, 29925, 22352, 13189, 943, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, ...
src/OTLMOW/OTLModel/Classes/DwarseMarkeringVerschuind.py
davidvlaminck/OTLClassPython
2
22698
# coding=utf-8 from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut from OTLMOW.OTLModel.Classes.DwarseMarkeringToegang import DwarseMarkeringToegang from OTLMOW.OTLModel.Datatypes.KlDwarseMarkeringVerschuindCode import KlDwarseMarkeringVerschuindCode from OTLMOW.OTLModel.Datatypes.KlDwarseMarkeringVerschu...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 3166, 438, 14632, 6720, 29956, 29889, 2891, 29931, 3195, 29889, 5160, 27403, 29889, 2891, 29931, 4165, 7741, 329, 1053, 438, 14632, 4165, 7741, 329, 13, 3166, 438, 14632, 6720, 29956, 29889, 2...
titan/files/mixins/versions_views.py
GoogleCloudPlatform/titan
19
109441
<filename>titan/files/mixins/versions_views.py #!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apach...
[ 1, 529, 9507, 29958, 29873, 8929, 29914, 5325, 29914, 28084, 1144, 29914, 26100, 29918, 7406, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29906, 5087, 9266, 29889, ...
x_tef2/profiles.py
parkermac/LiveOcean
4
126096
<filename>x_tef2/profiles.py """ Make profiles of salt or density vs. depth at each section. Goal is to explore time evolution of ds/dx at places like Admiralty Inlet. """ # setup import netCDF4 as nc import matplotlib.pyplot as plt import numpy as np from datetime import datetime import scipy.stats as stats import p...
[ 1, 529, 9507, 29958, 29916, 29918, 371, 29888, 29906, 29914, 771, 5325, 29889, 2272, 13, 15945, 29908, 13, 9984, 28723, 310, 15795, 470, 9027, 7186, 29889, 10809, 472, 1269, 4004, 29889, 13, 13, 8120, 284, 338, 304, 26987, 931, 14675, 3...
forte/multipack_pipeline.py
huzecong/forte
0
186819
<reponame>huzecong/forte import logging from typing import Dict, List, Optional import yaml from texar.torch import HParams from forte.base_pipeline import BasePipeline from forte.data.multi_pack import MultiPack from forte.data.selector import Selector from forte.utils import get_class logger = logging.getLogger(__...
[ 1, 529, 276, 1112, 420, 29958, 6905, 911, 21015, 29914, 1454, 371, 13, 5215, 12183, 13, 3166, 19229, 1053, 360, 919, 29892, 2391, 29892, 28379, 13, 13, 5215, 343, 8807, 13, 3166, 19696, 279, 29889, 7345, 305, 1053, 379, 9629, 13, 13, ...
vjezba1/UDP_client.py
vmilkovic/primjena-blockchain-tehnologije
0
133187
<filename>vjezba1/UDP_client.py import socket HOST = '127.0.0.1' PORT = 6444 poruka = input("unesi: ") poruka = poruka.encode() with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s: s.sendto(poruka, (HOST, PORT)) data = s.recv(1024) print('Received from server ', data)
[ 1, 529, 9507, 29958, 29894, 1324, 29920, 2291, 29896, 29914, 29965, 11191, 29918, 4645, 29889, 2272, 13, 5215, 9909, 13, 13, 20832, 353, 525, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29915, 13, 15082, 353, 29871, 29953...
code/Built-in-Types/set.py
zhangsucheng/Python-pracive
0
179481
set1 = set() set1.add(1) set2 = {1, 2, 3} print(set1) print(set1 | set2) print(set1 & set2)
[ 1, 731, 29896, 353, 731, 580, 13, 842, 29896, 29889, 1202, 29898, 29896, 29897, 13, 842, 29906, 353, 426, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29913, 13, 2158, 29898, 842, 29896, 29897, 13, 2158, 29898, 842, 29896, 891, 731, ...
timeeval_experiments/algorithms/mstamp.py
HPI-Information-Systems/TimeEval
2
190720
<reponame>HPI-Information-Systems/TimeEval from durations import Duration from typing import Any, Dict, Optional from timeeval import Algorithm, TrainingType, InputDimensionality from timeeval.adapters import DockerAdapter from timeeval.params import ParameterConfig import numpy as np from timeeval.utils.window imp...
[ 1, 529, 276, 1112, 420, 29958, 29950, 2227, 29899, 20350, 29899, 3924, 29879, 29914, 2481, 29923, 791, 13, 3166, 1411, 800, 1053, 360, 2633, 13, 3166, 19229, 1053, 3139, 29892, 360, 919, 29892, 28379, 13, 13, 3166, 931, 14513, 1053, 290...
test/integration/objectstore/test_mixed_store_by.py
beatrizserrano/galaxy
0
85116
<reponame>beatrizserrano/galaxy<gh_stars>0 """Integration tests for mixing store_by.""" import os import re import string from galaxy.util import is_uuid from ._base import ( BaseObjectStoreIntegrationTestCase, files_count, ) DISTRIBUTED_OBJECT_STORE_CONFIG_TEMPLATE = string.Template( """<?xml version="1...
[ 1, 529, 276, 1112, 420, 29958, 915, 271, 7485, 643, 12776, 29914, 23014, 26825, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 23573, 362, 6987, 363, 24907, 3787, 29918, 1609, 1213, 15945, 13, 13, 5215, 2897, 13, 5215, ...
src/pyrin/cli/core/template/__init__.py
wilsonGmn/pyrin
0
41891
<filename>src/pyrin/cli/core/template/__init__.py # -*- coding: utf-8 -*- """ cli core template package. """ from pyrin.packaging.base import Package class CLICoreTemplatePackage(Package): """ cli core template package class. """ NAME = __name__
[ 1, 529, 9507, 29958, 4351, 29914, 2272, 17056, 29914, 11303, 29914, 3221, 29914, 6886, 29914, 1649, 2344, 26914, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 11303, 7136, 44...
jreast.py
setomits/jreaststatus
0
48265
#!/usr/bin/env python # -*- coding: utf-8 -*- from lxml import html class JREast: URL = 'http://traininfo.jreast.co.jp/train_info/{}.aspx' lines = { 'kanto': ('東海道線', '京浜東北線', '横須賀線', '南武線', '横浜線', '伊東線', '相模線', '鶴見線', '宇都宮線', '高崎線', '京浜東北線', '埼京線', '川越線', ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 3166, 301, 3134, 1053, 3472, 13, 13, 1990, 435, 1525, 579, 29901, 13, 1678, 3988, 353, 525, 1124...
server/util/stringutil.py
rleir/MediaCloud-Web-Tools
0
193733
<filename>server/util/stringutil.py import logging from datetime import datetime from server import mc logger = logging.getLogger(__name__) def ids_from_comma_separated_str(comma_separated_string): id_list = [] if len(comma_separated_string) > 0: id_list = [int(cid) for cid in comma_separated_string...
[ 1, 529, 9507, 29958, 2974, 29914, 4422, 29914, 1807, 4422, 29889, 2272, 13, 5215, 12183, 13, 3166, 12865, 1053, 12865, 13, 3166, 1923, 1053, 286, 29883, 29871, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 1...
smartsheet/models/alternate_email.py
Funtimes-Smarts/Python-import-Smart
0
1613839
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101 # Smartsheet Python SDK. # # Copyright 2016 Smartsheet.com, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www....
[ 1, 396, 282, 2904, 524, 29901, 11262, 29922, 29907, 29900, 29896, 29896, 29896, 29892, 29934, 29900, 29929, 29900, 29906, 29892, 29934, 29900, 29929, 29900, 29946, 29892, 29934, 29900, 29929, 29896, 29906, 29892, 29934, 29900, 29929, 29896, 299...
backend/Layer/layer/validation/param_check.py
cvc-Fujii/line-api-use-case-reservation-Restaurant
8
160324
<gh_stars>1-10 import datetime class ParamCheck(): """ パラメータチェックを実施するクラス。 """ def __init__(self): """ 初期化を実施する。 """ pass def check_required(self, columns, column_name): """ 必須チェックを実施する。 Parameters ---------- ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 30004, 13, 5215, 12865, 30004, 13, 30004, 13, 30004, 13, 1990, 12662, 5596, 7295, 30004, 13, 1678, 9995, 30004, 13, 268, 30715, 30281, 30604, 30185, 30369, 30656, 308...
tests/networks/test_enas_net.py
marsggbo/hyperbox
1
1602836
import torch from hyperbox.networks.enas import ENASMicroNetwork from hyperbox.mutator.random_mutator import RandomMutator if __name__ == '__main__': net = ENASMicroNetwork( num_layers=2, num_nodes=3, ).cuda() m = RandomMutator(net) m.reset() x = torch.rand(2,3,64,64)...
[ 1, 6756, 13, 5215, 4842, 305, 30004, 13, 30004, 13, 3166, 11266, 1884, 29889, 11618, 29879, 29889, 23509, 1053, 12524, 3289, 29924, 2357, 13724, 30004, 13, 3166, 11266, 1884, 29889, 6149, 1061, 29889, 8172, 29918, 6149, 1061, 1053, 16968, ...
Anylink-server/add_user.py
orike122/anylink
3
57188
from config import Configuration if __name__ == "__main__": config = Configuration("/home/orikeidar01/config.json", "anylink") config.database.add_user("<EMAIL>", "ECD71870D1963316A97E3AC3408C9835AD8CF0F3C1BC703527C30265534F75AE", "anylink")
[ 1, 515, 2295, 1053, 20999, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 2295, 353, 20999, 11974, 5184, 29914, 4170, 446, 333, 279, 29900, 29896, 29914, 2917, 29889, 3126, 613, 376, 1384, 2324, 1159, 13, 1...
symbols/grucnn.py
gkfthddk/keras
0
145928
<reponame>gkfthddk/keras from keras.models import Sequential, Model from keras.layers import Dense, Dropout, Flatten, Reshape, Concatenate from keras.layers import Input, Conv2D, MaxPooling2D, ZeroPadding2D from keras.layers import SimpleRNN, LSTM, GRU from keras.optimizers import SGD import cv2, numpy as np def get_...
[ 1, 529, 276, 1112, 420, 29958, 29887, 29895, 29888, 386, 1289, 29895, 29914, 3946, 294, 13, 3166, 13023, 294, 29889, 9794, 1053, 922, 339, 2556, 29892, 8125, 13, 3166, 13023, 294, 29889, 29277, 1053, 360, 1947, 29892, 20724, 449, 29892, ...
speedysvc/web_monitor/WebServiceManager.py
mcyph/shmrpc
4
50905
import sys from datetime import datetime LColours = [ 'red', 'green', 'blue', 'purple', 'orange', 'brown', 'pink', 'cyan', 'magenta', 'yellow' ] class WebServiceManager: def __init__(self, jinja2_env): self.jinja2_env = jinja2_env self.DServices = {} # TODO: Replace me, directly...
[ 1, 1053, 10876, 13, 3166, 12865, 1053, 12865, 13, 13, 13, 29931, 1625, 2470, 353, 518, 13, 1678, 525, 1127, 742, 525, 12692, 742, 525, 9539, 742, 13, 1678, 525, 15503, 552, 742, 525, 272, 927, 742, 525, 29890, 4708, 742, 13, 1678, ...