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
utils/generate-sha256.py
dskrvk/anteater
177
33869
############################################################################## # Copyright (c) 2017 <NAME> <<EMAIL>>, Red Hat # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is availab...
[ 1, 835, 13383, 13383, 13383, 13383, 7346, 2277, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29955, 529, 5813, 29958, 3532, 26862, 6227, 6778, 29892, 4367, 25966, 13, 29937, 13, 29937, 2178, 10462, 21676, 29...
src/workflow/ops.py
uts-cic/ontask_b
0
129930
<filename>src/workflow/ops.py # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import gzip from io import BytesIO from django.contrib.auth import get_user_model from django.contrib.sessions.models import Session from django.core.exceptions import ObjectDoesNotExist from django.db.models...
[ 1, 529, 9507, 29958, 4351, 29914, 1287, 1731, 29914, 3554, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 29892, 1596, 299...
tests/shell/test_shell_commandline.py
mjacobs/impala
0
1612828
# encoding=utf-8 # # 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 under the Apache License, Version 2.0 (the # "Licen...
[ 1, 396, 8025, 29922, 9420, 29899, 29947, 13, 29937, 13, 29937, 10413, 21144, 304, 278, 13380, 18540, 10606, 313, 3289, 29943, 29897, 1090, 697, 13, 29937, 470, 901, 17737, 3406, 19405, 8571, 4110, 29889, 29871, 2823, 278, 6058, 12107, 934...
Password-Gen/pwned_check.py
FoxInTheClouds/Memorable-Password-Generator
0
120152
<reponame>FoxInTheClouds/Memorable-Password-Generator import requests import hashlib def pwned_check(password): password = password.encode() # Turns it into bytes hashed_password = hashlib.sha1(password).hexdigest() # Api recuires sha1 hash url = "https://api.pwnedpasswords.com/rang...
[ 1, 529, 276, 1112, 420, 29958, 29943, 2251, 797, 1576, 20442, 29879, 29914, 11442, 272, 519, 29899, 10048, 29899, 21575, 13, 5215, 7274, 30004, 13, 5215, 6608, 1982, 30004, 13, 30004, 13, 30004, 13, 1753, 282, 1233, 287, 29918, 3198, 29...
python/src/main/python/pyalink/alink/tests/examples/from_docs/test_berttextembeddingbatchop.py
wenwei8268/Alink
0
166528
<reponame>wenwei8268/Alink import unittest from pyalink.alink import * import numpy as np import pandas as pd class TestBertTextEmbeddingBatchOp(unittest.TestCase): def test_berttextembeddingbatchop(self): df_data = pd.DataFrame([ [1, 'An english sentence.'], [2, '这是一个中文句子'] ...
[ 1, 529, 276, 1112, 420, 29958, 15556, 26599, 29947, 29906, 29953, 29947, 29914, 29909, 2324, 13, 5215, 443, 27958, 13, 3166, 282, 4605, 682, 29889, 284, 682, 1053, 334, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 1990, ...
tests/bulk_importer/test_bulk_importer.py
alessiamarcolini/hangar-py
202
147029
import pytest import numpy as np def assert_equal(arr, arr2): assert np.array_equal(arr, arr2) assert arr.dtype == arr2.dtype def test_bulk_importer_ndarray(repo): from hangar.bulk_importer import run_bulk_import from hangar.bulk_importer import UDF_Return def make_ndarray(column, key, shape, d...
[ 1, 1053, 11451, 1688, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 4974, 29918, 11745, 29898, 2749, 29892, 3948, 29906, 1125, 13, 1678, 4974, 7442, 29889, 2378, 29918, 11745, 29898, 2749, 29892, 3948, 29906, 29897, 13, 1678, 4974, 3948, ...
setup.py
jean/labels
1
4526
<reponame>jean/labels<gh_stars>1-10 import pathlib import setuptools def read(*args: str) -> str: file_path = pathlib.Path(__file__).parent.joinpath(*args) return file_path.read_text("utf-8") setuptools.setup( name="labels", version="0.3.0.dev0", author="<NAME>", author_email="<EMAIL>", ...
[ 1, 529, 276, 1112, 420, 29958, 1324, 273, 29914, 21134, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2224, 1982, 13, 5215, 731, 21245, 8789, 13, 13, 13, 1753, 1303, 10456, 5085, 29901, 851, 29897, 1599, 8...
chatbot_jesse/snotbot/chatServer_snotbot.py
carmensteenbrink/getyourreview
0
167580
#!/usr/bin/env python3 # Command Line Interface (CLI) version import time import uniquebot as bot # Chat Server Framework functions def sleep(n): """Sleep n number of seconds. Pauses the execution of the program. """ time.sleep(n) def output(s): """Outputs string s as chat message. Send t...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 29937, 10516, 7407, 25796, 313, 27205, 29897, 1873, 13, 13, 5215, 931, 13, 5215, 20498, 774, 327, 408, 9225, 13, 13, 13, 29937, 678, 271, 5656, 16657, 3168, 13, 13, 1753, ...
src/python-speech-recognition/auto.py
Zambashilidye/face_recognition_robocup
0
159124
<reponame>Zambashilidye/face_recognition_robocup<filename>src/python-speech-recognition/auto.py #!/usr/bin/env python #coding:utf-8 from audio import AudioControl import os import time #import winsound def DetectImage(): #print(os.path.abspath("facereg")) return os.path.isfile("/home/snfgto/robocup/facereg/fa...
[ 1, 529, 276, 1112, 420, 29958, 29999, 1117, 1161, 309, 333, 4099, 29914, 2161, 29918, 29423, 654, 29918, 13716, 542, 786, 29966, 9507, 29958, 4351, 29914, 4691, 29899, 5965, 5309, 29899, 29423, 654, 29914, 6921, 29889, 2272, 13, 29937, 14...
comments/views.py
praekeltfoundation/ge-web
1
1603504
<reponame>praekeltfoundation/ge-web<filename>comments/views.py<gh_stars>1-10 from django.contrib import messages from django.views.generic import FormView from django.views.generic.base import ContextMixin from threadedcomments.forms import ThreadedCommentForm from threadedcomments.models import ThreadedComment class...
[ 1, 529, 276, 1112, 420, 29958, 29886, 336, 1416, 2152, 11940, 362, 29914, 479, 29899, 2676, 29966, 9507, 29958, 21032, 29914, 7406, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 9557, 29889, 21570...
tasks/kaggle/disaster_tweets/bert_finetuing.py
charliemorning/mlws
0
130787
import os import argparse import pandas as pd from models.tf.nlp.bert.bert_models import BertTrainer from util.corpus import train_test_split_from_data_frame from util.label import encode_labels if __name__ == '__main__': parser = argparse.ArgumentParser(description='train cls models on bert.') parser.add...
[ 1, 1053, 2897, 13, 5215, 1852, 5510, 13, 13, 5215, 11701, 408, 10518, 13, 13, 3166, 4733, 29889, 13264, 29889, 12938, 29886, 29889, 2151, 29889, 2151, 29918, 9794, 1053, 16662, 5323, 4983, 13, 3166, 3667, 29889, 2616, 13364, 1053, 7945, ...
unit_tests/expressions/Subquery.py
jaredlunde/cargo-orm
3
102496
#!/usr/bin/python3 -S # -*- coding: utf-8 -*- """ `Unit tests for cargo.expressions.Subquery` --·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·-- 2016 <NAME> © The MIT License (MIT) http://github.com/jaredlunde """ import unittest from vital.security import randkey from cargo imp...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 448, 29903, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 1678, 421, 8325, 6987, 363, 17040, 29889, 17073, 1080, 29889, 4035, 1972,...
general_maths/sph_harms/azi_deriv.py
chrisjdavie/ws_cross_project
0
133552
''' Examining the gradients of the azimuthally symmetric legendre polynomial. Created on 1 May 2013 @author: chris ''' def main(): l = 4 a = max_n_minimas(l) print a def leg_poly(l): m = 0 from pert_sphere import pert_sphere rs, thetas, _ = pert_sphere(l,m) rs = rs[:,0] theta...
[ 1, 14550, 13, 1252, 314, 2827, 278, 4656, 10070, 310, 278, 2698, 326, 2806, 635, 18348, 2814, 9030, 10159, 29889, 13, 13, 20399, 373, 29871, 29896, 2610, 29871, 29906, 29900, 29896, 29941, 13, 13, 29992, 8921, 29901, 521, 3780, 13, 1200...
custom_components/shinhugas_fee/const.py
tsunglung/ShinhuGasFee
1
1607297
"""Constants of the ShinHu Gas Fee component.""" DEFAULT_NAME = "ShinHu Gas Fee" DEFAULT_NAME_UPLOAD_USAGE = "ShinHu Gas Upload Usage" DOMAIN = "shinhugas_fee" DOMAINS = [ "sensor", "binary_sensor" ] DATA_KEY = "sensor.shinhugas_fee" DATA_KEY_BINARY = "binary_sensor.shinhu_gas_upload_usage" ATTR_BILLING_MONTH = "bill...
[ 1, 9995, 26570, 310, 278, 27948, 29950, 29884, 19141, 383, 3905, 4163, 1213, 15945, 13, 13, 23397, 29918, 5813, 353, 376, 2713, 262, 29950, 29884, 19141, 383, 3905, 29908, 13, 23397, 29918, 5813, 29918, 4897, 29428, 29918, 3308, 10461, 35...
molecules/ml/callbacks/loss_callback.py
braceal/molecules
4
74526
<reponame>braceal/molecules<filename>molecules/ml/callbacks/loss_callback.py import json import wandb import numpy as np from .callback import Callback class LossCallback(Callback): def __init__(self, path, interval=1, wandb_config=None, mpi_comm=None): ...
[ 1, 529, 276, 1112, 420, 29958, 13842, 284, 29914, 29885, 1772, 21337, 29966, 9507, 29958, 29885, 1772, 21337, 29914, 828, 29914, 14035, 29879, 29914, 6758, 29918, 14035, 29889, 2272, 13, 5215, 4390, 13, 5215, 24706, 29890, 13, 5215, 12655, ...
Json_handling/read_write.py
hbachchas/myexp
0
1608808
# example from: https://stackabuse.com/reading-and-writing-json-to-a-file-in-python/ import json data = {} with open('imagenet_class_index.json') as json_file: data = json.load(json_file) with open('imagenet_class_index_indented.json', 'w') as outfile: json.dump(data, outfile, sort_keys=True, indent=4)
[ 1, 396, 1342, 515, 29901, 2045, 597, 1429, 370, 1509, 29889, 510, 29914, 19715, 29899, 392, 29899, 16554, 29899, 3126, 29899, 517, 29899, 29874, 29899, 1445, 29899, 262, 29899, 4691, 29914, 13, 13, 5215, 4390, 13, 13, 1272, 353, 6571, 1...
python_parikshith21/Day15.py
01coders/50-Days-Of-Code
0
89308
# -*- coding: utf-8 -*- """ Created on Wed May 22 17:54:15 2019 @author: Parikshith.H """ L1 = [10,20,30,40] print(L1) print(L1[0]) print(L1[3]) L1[3] = 50 print(L1) #output: # ============================================================================= # [10, 20, 30, 40] # 10 # 40 # [10, 20, 30, 50] # ===========...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 15050, 2610, 29871, 29906, 29906, 29871, 29896, 29955, 29901, 29945, 29946, 29901, 29896, 29945, 29871, 29906, 29900, 29896, 29...
taxi_zebra/ui.py
sephii/taxi-zebra
5
41720
<reponame>sephii/taxi-zebra import inspect from collections import namedtuple import click from taxi.aliases import aliases_database from taxi.backends import PushEntryFailed from .roles import NEVER_SAVE_ROLE_ID from .utils import get_role_id_from_alias, update_alias_mapping class CancelInput(Exception): pass...
[ 1, 529, 276, 1112, 420, 29958, 344, 561, 2236, 29914, 941, 5389, 29899, 29920, 774, 336, 13, 5215, 16096, 13, 3166, 16250, 1053, 4257, 23583, 13, 13, 5215, 2828, 13, 13, 3166, 8818, 29875, 29889, 2606, 2129, 1053, 14430, 2129, 29918, ...
deliver/social/api/serializers.py
Untouchable17/social-web
1
113534
from rest_framework import serializers from social.models import Post, Comment, UserProfile class CommentSerializer(serializers.ModelSerializer): class Meta: model = Comment fields = '__all__' class PostSerializer(serializers.ModelSerializer): comments = CommentSerializer(many=True, requir...
[ 1, 515, 1791, 29918, 4468, 1053, 7797, 19427, 13, 13, 3166, 5264, 29889, 9794, 1053, 4918, 29892, 461, 29892, 4911, 13909, 13, 13, 13, 1990, 461, 17679, 29898, 15550, 19427, 29889, 3195, 17679, 1125, 13, 1678, 770, 20553, 29901, 13, 470...
sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py
rsdoherty/azure-sdk-for-python
1
1607742
<reponame>rsdoherty/azure-sdk-for-python # coding=utf-8 pylint: disable=too-many-lines # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import re from enum import Enum from ._generated.models import ( LanguageInpu...
[ 1, 529, 276, 1112, 420, 29958, 2288, 29881, 1148, 814, 29891, 29914, 17688, 29899, 15348, 29899, 1454, 29899, 4691, 13, 29937, 14137, 29922, 9420, 29899, 29947, 29871, 282, 2904, 524, 29901, 11262, 29922, 517, 29877, 29899, 13011, 29899, 90...
onlinejudge/implementation/command/test.py
gitter-badger/online-judge-tools
1
197908
<filename>onlinejudge/implementation/command/test.py # Python Version: 3.x import onlinejudge import onlinejudge.implementation.utils as utils import onlinejudge.implementation.logging as log import onlinejudge.implementation.command.utils as cutils import sys import os import os.path import re import glob import color...
[ 1, 529, 9507, 29958, 14627, 17675, 479, 29914, 21382, 29914, 6519, 29914, 1688, 29889, 2272, 13, 29937, 5132, 10079, 29901, 29871, 29941, 29889, 29916, 13, 5215, 7395, 17675, 479, 13, 5215, 7395, 17675, 479, 29889, 21382, 29889, 13239, 408,...
0015_3Sum.py
taro-masuda/leetcode
0
36495
class Solution: def twoSum(self, nums: List[int], target: int) -> List[List[int]]: complement = {} out = [] for i,n in enumerate(nums): complement[target-n] = i for i,n in enumerate(nums): idx = complement.get(n, None) if idx != None and idx !...
[ 1, 770, 24380, 29901, 13, 268, 13, 1678, 822, 1023, 11139, 29898, 1311, 29892, 954, 29879, 29901, 2391, 29961, 524, 1402, 3646, 29901, 938, 29897, 1599, 2391, 29961, 1293, 29961, 524, 5262, 29901, 13, 4706, 19595, 353, 6571, 13, 4706, 7...
tests/core/test_urn.py
joshuataylor/great_expectations
6,451
125719
<gh_stars>1000+ from urllib.parse import parse_qs import pytest from pyparsing import ParseException from great_expectations.core.urn import ge_urn def test_ge_validations_urn(): # We should be able to parse validations urns urn = ( "urn:great_expectations:validations:my_suite:expect_something.obser...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29900, 29974, 13, 3166, 3142, 1982, 29889, 5510, 1053, 6088, 29918, 29939, 29879, 13, 13, 5215, 11451, 1688, 13, 3166, 11451, 862, 2976, 1053, 20969, 2451, 13, 13, 3166, 2107, ...
dist/functional/pipeline.py
evandroforks/CrowdAnki
0
1611378
""" The pipeline module contains the transformations and actions API of PyFunctional """ from __future__ import division, absolute_import from operator import mul, add import collections from functools import reduce, wraps, partial import json import csv import sqlite3 import re import six from tabulate import tabu...
[ 1, 9995, 13, 1576, 16439, 3883, 3743, 278, 29304, 322, 8820, 3450, 310, 10772, 6678, 284, 13, 15945, 29908, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 29892, 8380, 29918, 5215, 13, 13, 3166, 5455, 1053, 15065, 29892, 788, 13, ...
setup.py
eddbrown/coodinate_country_lookup
0
97825
<filename>setup.py from distutils.core import setup setup( name = 'coordinate_country_lookup', # How you named your package folder (MyLib) packages = ['coordinate_country_lookup'], # Chose the same as "name" version = '0.1.5', # Start with a small number and increase it with every change you make ...
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 13, 3166, 1320, 13239, 29889, 3221, 1053, 6230, 13, 14669, 29898, 13, 29871, 1024, 353, 525, 29302, 29918, 13509, 29918, 20401, 742, 308, 396, 1128, 366, 4257, 596, 3577, 4138, 313, 3421, 14868, ...
obsolete/pipeline_idr.py
kevinrue/cgat-flow
11
195416
"""=========================== Pipeline IDR =========================== Overview ======== This pipeline is a wrapper for the Irreproducibility Discovery Pipeline outlined by <NAME>. (see https://sites.google.com/site/anshulkundaje/projects/idr) It is split into two stages and performs several basic steps: Fist stag...
[ 1, 9995, 9166, 4936, 25512, 13, 29925, 23828, 3553, 29934, 13, 9166, 4936, 25512, 13, 13, 3563, 1493, 13, 4936, 13, 13, 4013, 16439, 338, 263, 14476, 363, 278, 6600, 276, 5498, 455, 29890, 1793, 8565, 22205, 349, 23828, 13, 449, 21354...
out/production/CS-4950-Applied-Crypto/HW1/hillCipher.py
prchander/CS-4950-Applied-Crypto
0
158184
<gh_stars>0 import numpy as np import os from sympy import Matrix alphabet = "abcdefghijklmnopqrstuvwxyz" #Change the name of the file below to test other files with open('ChandramoulihillCustom.txt', 'r') as file: data = file.read().replace(' ', '') key = np.array([[9, 4],[5, 7]]) def encrypt(contents): #...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 12655, 408, 7442, 13, 5215, 2897, 29871, 13, 3166, 5016, 2272, 1053, 22513, 13, 13, 284, 17416, 353, 376, 10736, 1753, 12443, 823, 6321, 23521, 459, 29939, 29878, 303, 4090, 29893...
LeetCode/LastWord.py
Jaidev810/Competitive-Questions
1
93428
<reponame>Jaidev810/Competitive-Questions<filename>LeetCode/LastWord.py string = 'b a ' newstring = string[-1::-1] length = 0 print(newstring) for i in range(0, len(newstring)): if newstring[i] == ' ': if i == 0: continue if newstring[i-1] == ' ': continue brea...
[ 1, 529, 276, 1112, 420, 29958, 29967, 29874, 680, 29894, 29947, 29896, 29900, 29914, 6843, 300, 3321, 29899, 2182, 2297, 29966, 9507, 29958, 3226, 300, 3399, 29914, 8897, 14463, 29889, 2272, 13, 1807, 353, 525, 29890, 263, 259, 525, 13, ...
odoo-13.0/addons/l10n_cl/models/account_journal.py
VaibhavBhujade/Blockchain-ERP-interoperability
0
1613558
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, api class AccountJournal(models.Model): _inherit = "account.journal" l10n_cl_sequence_ids = fields.Many2many( 'ir.sequence', 'l10n_cl_journal_sequence_rel', 'journal_id', 'sequence_id', string...
[ 1, 396, 3455, 310, 438, 1867, 29877, 29889, 2823, 365, 2965, 1430, 1660, 934, 363, 2989, 3509, 1266, 322, 7794, 575, 292, 4902, 29889, 13, 13, 3166, 288, 1867, 29877, 1053, 4235, 29892, 4733, 29892, 7882, 13, 13, 13, 1990, 16535, 2996...
epydoc/util.py
ftfniqpl/epydoc
0
65992
# epydoc -- Utility functions # # Copyright (C) 2005 <NAME> # Author: <NAME> <<EMAIL>> # URL: <http://epydoc.sf.net> # # $Id: util.py 1671 2008-01-29 02:55:49Z edloper $ """ Miscellaneous utility functions that are used by multiple modules. @group Python source types: is_module_file, is_package_dir, is_pyname, py...
[ 1, 396, 321, 2272, 1514, 1192, 22310, 537, 3168, 13, 29937, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29900, 29945, 529, 5813, 29958, 13, 29937, 13361, 29901, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 398...
applications/cli/commands/model/tests/test_common.py
starcell/deepcell-ncluster
0
148754
# # Copyright (c) 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ 1, 396, 30004, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29929, 18555, 15025, 30004, 13, 29937, 30004, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, ...
ManageProxy.py
guiqiqi/AirPoluionData
1
187617
import subprocess import time import threading import shelve import queue import re from collections import defaultdict import urllib.request as request import urllib import socket import datetime socket.setdefaulttimeout(5) class DBHandler(object): """数据文件操作""" def __init__(self, file_name, file_...
[ 1, 1053, 1014, 5014, 30004, 13, 5215, 931, 30004, 13, 5215, 3244, 292, 30004, 13, 5215, 528, 13841, 30004, 13, 5215, 9521, 30004, 13, 5215, 337, 30004, 13, 3166, 16250, 1053, 2322, 8977, 30004, 13, 5215, 3142, 1982, 29889, 3827, 408, ...
applications/popart/bert/utils/__init__.py
Alwaysproblem/examples-1
0
75774
<filename>applications/popart/bert/utils/__init__.py # Copyright (c) 2019 Graphcore Ltd. 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/lic...
[ 1, 529, 9507, 29958, 932, 5795, 29914, 7323, 442, 29914, 2151, 29914, 13239, 29914, 1649, 2344, 26914, 2272, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29929, 12367, 3221, 19806, 29889, 2178, 10462, 21676, 29889, ...
starfile/writer.py
robertbuecker/starfile
0
64424
from __future__ import annotations from collections import OrderedDict from datetime import datetime from pathlib import Path from typing import TYPE_CHECKING, Union, Dict, List import pandas as pd from pkg_resources import get_distribution from .utils import TextBuffer if TYPE_CHECKING: from os import PathLike...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 3166, 16250, 1053, 8170, 287, 21533, 13, 3166, 12865, 1053, 12865, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 19229, 1053, 323, 6959, 29918, 3210, 16658, 4214, 29892, 7761, 29892, ...
models/loss.py
kungyao/StyledFontGAN
18
1606928
<filename>models/loss.py from operator import itemgetter import torch from torch.autograd import grad as torch_grad def l1_and_adversarial_loss(D, G, real_data, generated_data, losses, options): l1_lamba = 10 return min_max_loss(D, G, real_data, generated_data, losses, options) + l1_lamba * l1_loss(D, G, real_dat...
[ 1, 529, 9507, 29958, 9794, 29914, 6758, 29889, 2272, 13, 3166, 5455, 1053, 2944, 657, 357, 13, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 29889, 1300, 468, 3665, 1053, 4656, 408, 4842, 305, 29918, 5105, 13, 13, 1753, 301, 29896, 29918,...
EasyRecycle/tests/unittests/recycle/views/test_EditCommercialOrderAPIView.py
YuriyLisovskiy/EasyRecycle
0
43457
from django.urls import reverse from rest_framework import status from rest_framework.test import force_authenticate from core.models import UserModel from recycle import garbage from recycle.models import CommercialRequest, Location from recycle.views.commercial_order import EditCommercialOrderAPIView from tests.unit...
[ 1, 515, 9557, 29889, 26045, 1053, 11837, 13, 3166, 1791, 29918, 4468, 1053, 4660, 13, 3166, 1791, 29918, 4468, 29889, 1688, 1053, 4889, 29918, 27218, 403, 13, 13, 3166, 7136, 29889, 9794, 1053, 4911, 3195, 13, 3166, 1162, 13317, 1053, 2...
alarm_clock/AlarmClock.py
anshul2807/Automation-scripts
5
1617923
<gh_stars>1-10 import time import datetime import simpleaudio set_time = input("please enter the time in HH:MM format to set an alarm : ") while True: time.sleep(1) obj = simpleaudio.WaveObject.from_wave_file("./alarm.wav") current_time = datetime.datetime.now().time().strftime("%H:%M") curr_l = curre...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 931, 13, 5215, 12865, 13, 5215, 2560, 18494, 13, 13, 13, 842, 29918, 2230, 353, 1881, 703, 552, 559, 3896, 278, 931, 297, 379, 29950, 29901, 7428, 3402, 304...
Interview_Questions_Arrays/duplicates_in_array.py
MNikov/Algorithms-and-Data-Structures
0
195372
# Interview Question #5 # The problem is that we want to find duplicates in a one-dimensional array of integers in O(N) running time # where the integer values are smaller than the length of the array! # For example: if we have a list [1, 2, 3, 1, 5] then the algorithm can detect that there are a duplicate with value 1...
[ 1, 396, 4124, 1493, 894, 396, 29945, 13, 29937, 450, 1108, 338, 393, 591, 864, 304, 1284, 20955, 297, 263, 697, 29899, 12531, 1409, 310, 11920, 297, 438, 29898, 29940, 29897, 2734, 931, 13, 29937, 988, 278, 6043, 1819, 526, 7968, 1135...
mmdet/models/necks/fpn_carafe.py
evgps/mmdetection_trashcan
12,377
196605
import torch.nn as nn from mmcv.cnn import ConvModule, build_upsample_layer, xavier_init from mmcv.ops.carafe import CARAFEPack from ..builder import NECKS @NECKS.register_module() class FPN_CARAFE(nn.Module): """FPN_CARAFE is a more flexible implementation of FPN. It allows more choice for upsample methods ...
[ 1, 1053, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 3166, 5654, 11023, 29889, 29883, 15755, 1053, 1281, 29894, 7355, 29892, 2048, 29918, 14340, 981, 29918, 13148, 29892, 921, 18852, 29918, 2344, 13, 3166, 5654, 11023, 29889, 3554, 29889,...
cinder/tests/test_glusterfs.py
sombrafam/cinder
0
195718
# Copyright (c) 2013 Red Hat, 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.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ 1, 29871, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29941, 4367, 25966, 29892, 9266, 29889, 13, 29937, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 1678, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10...
Python/multiscale_quad_retrieval.py
Spectavi/video-diff
1
102963
<reponame>Spectavi/video-diff<gh_stars>1-10 import math import numpy as np import cv2 import common import config import findquads import spatial_consistency import Matlab FILTER = True USE_GPS_COORDINATES = False if config.USE_MULTITHREADING: import multiprocessing class Globals: r_quadsTree = Non...
[ 1, 529, 276, 1112, 420, 29958, 29903, 1103, 17345, 29914, 9641, 29899, 12765, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 5844, 13, 5215, 12655, 408, 7442, 13, 13, 5215, 13850, 29906, 13, 13, 5215, 3619, ...
pyradmon/args.py
will-mccarty/pyradmon
0
112904
<filename>pyradmon/args.py #!/usr/bin/env python # PyRadmon - Python Radiance Monitoring Tool # Copyright 2014 <NAME>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apach...
[ 1, 529, 9507, 29958, 2272, 3665, 3712, 29914, 5085, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 10772, 9908, 3712, 448, 5132, 4957, 8837, 2598, 2105, 292, 21704, 13, 29937, 14187, 1266, 29871, 29906, 29...
DQMOffline/Trigger/python/SoftdropMonitor_cfi.py
PKUfudawei/cmssw
1
189236
<filename>DQMOffline/Trigger/python/SoftdropMonitor_cfi.py import FWCore.ParameterSet.Config as cms from DQMOffline.Trigger.htMonitoring_cfi import htMonitoring # config file for monitoring the trigger efficiency vs softdropmass of the leading jet # see python/HTMonitor_cfi.py or plugins/HTMonitor.h or plugins/HTMoni...
[ 1, 529, 9507, 29958, 29928, 29984, 6720, 600, 1220, 29914, 20211, 29914, 4691, 29914, 6295, 615, 8865, 7185, 2105, 29918, 6854, 29875, 29889, 2272, 13, 5215, 383, 29956, 9203, 29889, 9329, 2697, 29889, 3991, 408, 274, 1516, 13, 13, 3166, ...
lib/python3.8/site-packages/ansible_collections/cisco/aci/plugins/modules/aci_bd.py
cjsteel/python3-venv-ansible-2.10.5
0
85989
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 15143, 4593, 5236, 19245, 325, 29941, 29889, 29900, 29974, 313, 4149, 365, 2965, 1430, 1660, 470, ...
code/data-cleaning/generate_overlapping_features.py
tejasph/qlesq_prediction
0
179132
<reponame>tejasph/qlesq_prediction<filename>code/data-cleaning/generate_overlapping_features.py import os import sys import pandas as pd import numpy as np from overlapping_globals import HEADER_CONVERSION_DICT, CANBIND_OVERLAPPING_VALUE_CONVERSION_MAP,NEW_FEATURES_CANBIND,QIDS_STARD_TO_CANBIND_DICT as Q_DICT_C from o...
[ 1, 529, 276, 1112, 420, 29958, 371, 14196, 561, 29914, 29939, 793, 29939, 29918, 11965, 2463, 29966, 9507, 29958, 401, 29914, 1272, 29899, 14941, 292, 29914, 17158, 29918, 957, 433, 3262, 29918, 22100, 29889, 2272, 13, 5215, 2897, 13, 521...
test22.py
spatole12/ssw555tmashishningrohnitshivani2019Spring
0
37451
import unittest import io import sys from main import Gedcom class TestProject(unittest.TestCase): def test_us22_unique_id(self): # Redirect stdout for unit test capturedOutput = io.StringIO() sys.stdout = capturedOutput FILENAME="My-Family-27-Jan-2019-275.ged" ...
[ 1, 1053, 443, 27958, 13, 5215, 12013, 13, 5215, 10876, 13, 3166, 1667, 1053, 16836, 510, 13, 13, 1990, 4321, 7653, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 375, 29906, 29906, 29918, 13092, 29918, 333, 2989...
bin/run_imctools.py
nf-core/nf-core-imcyto
15
75983
<gh_stars>10-100 #!/usr/bin/env python import os import sys import argparse import re import imctools.io.mcdparser as mcdparser import imctools.io.txtparser as txtparser import imctools.io.ometiffparser as omeparser import imctools.io.mcdxmlparser as meta ############################################ ################...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 1852, 5510, 13, 5215, 337, 13, 13, 5215, 527, 312, ...
admin_tools_stats/utils.py
afkmamunbd/django-admin-tools-stats
204
166850
<reponame>afkmamunbd/django-admin-tools-stats # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The Initial Developer o...
[ 1, 529, 276, 1112, 420, 29958, 2142, 8848, 314, 348, 6448, 29914, 14095, 29899, 6406, 29899, 8504, 29899, 16202, 13, 29937, 13, 29937, 910, 7562, 5920, 3812, 338, 4967, 304, 278, 4958, 310, 278, 18129, 2911, 5236, 13, 29937, 19245, 2989...
python/re-group-groups.py
gajubadge11/HackerRank-1
340
160128
#!/usr/bin/env python3 import re if __name__ == "__main__": string = input() match = re.search(r'([a-zA-Z0-9])\1+', string) print(match.group(1) if match else -1)
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 337, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1347, 353, 1881, 580, 13, 268, 13, 1678, 1993, 353, 337, 29889, 4478, 29898, 29878, ...
startup/20-diagon.py
mrakitin/profile_collection-six
0
73522
<filename>startup/20-diagon.py<gh_stars>0 from ophyd import Device, EpicsMotor from ophyd import Component as Cpt class DIAGON(Device): hml = Cpt(EpicsMotor, '_HLPM}Mtr') hyag = Cpt(EpicsMotor, '_HLPF}Mtr') vml = Cpt(EpicsMotor, '_VLPM}Mtr') vyag = Cpt(EpicsMotor, '_VLPF}Mtr') diagon = DIAGON...
[ 1, 529, 9507, 29958, 2962, 786, 29914, 29906, 29900, 29899, 6051, 12841, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 288, 561, 2941, 1053, 21830, 29892, 14055, 1199, 29924, 327, 272, 13, 3166, 288, 561, 2941, 1053...
tests/integration/Story.py
marqov/storyscript
1
153294
# -*- coding: utf-8 -*- from io import StringIO from storyscript.Story import Story def test_story_from_stream(): stream = StringIO('x = 0') story = Story.from_stream(stream) assert story.story == 'x = 0'
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 12013, 1053, 1714, 5971, 13, 13, 3166, 5828, 2154, 29889, 29359, 1053, 13740, 13, 13, 13, 1753, 1243, 29918, 24098, 29918, 3166, 29918, 5461, 7295,...
setup.py
stb-tester/stbt-rig
0
178835
# coding: utf-8 import setuptools long_description = """\ # stbt_rig Command-line tool & library for interacting with the Stb-tester Portal's [REST API]. For more details see [IDE Configuration] in the Stb-tester manual. [IDE Configuration]: https://stb-tester.com/manual/ide-configuration [REST API]: https://stb-...
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 13, 5215, 731, 21245, 8789, 13, 13, 13, 5426, 29918, 8216, 353, 9995, 29905, 13, 29937, 380, 3116, 29918, 8966, 13, 13, 6255, 29899, 1220, 5780, 669, 3489, 363, 16254, 292, 411, 278, 624,...
claim_frags.py
mattharris/adfs-tools
0
190197
#! /usr/bin/python import sys from objects import Map from utils import find_map fd = open("Loader", "r") fd.seek(0,2) loader_len = fd.tell() fd.close() print "Loader is {0} bytes long.".format(loader_len) if len(sys.argv) != 2: print("Usage: claim_frags <device>") exit(1) fd = open(sys.argv[1], "r+b") map...
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 4691, 13, 13, 5215, 10876, 13, 3166, 3618, 1053, 7315, 13, 3166, 3667, 29879, 1053, 1284, 29918, 1958, 13, 13, 11512, 353, 1722, 703, 10036, 613, 376, 29878, 1159, 13, 11512, 29889, 344, 1...
setup.py
rionehome/face_predictor
0
1610270
<reponame>rionehome/face_predictor<filename>setup.py<gh_stars>0 import os from setuptools import setup package_name = 'face_predictor' def create_install_files(paths: list): target_data_files = [('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + pac...
[ 1, 529, 276, 1112, 420, 29958, 29878, 1421, 5184, 29914, 2161, 29918, 27711, 272, 29966, 9507, 29958, 14669, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 13, 13, 3166, 731, 21245, 8789, 1053, 6230, 13, 13, ...
run.py
berges99/Spatial-Pyramid-Kernel-for-Image-Recognition
1
152687
<reponame>berges99/Spatial-Pyramid-Kernel-for-Image-Recognition import subprocess cmd = 'python3 histogram_svm2.py --data df128.csv --L 0 --train_frac 0.5 --test_frac 0.2 > ./results/out1.txt' subprocess.Popen(cmd, shell = True) cmd = 'python3 histogram_svm2.py --data df128.csv --L 1 --train_frac 0.5 --test_frac 0....
[ 1, 529, 276, 1112, 420, 29958, 2552, 267, 29929, 29929, 29914, 29903, 5031, 616, 29899, 19737, 2572, 333, 29899, 29968, 5851, 29899, 1454, 29899, 2940, 29899, 23122, 654, 13, 5215, 1014, 5014, 13, 13, 13, 13, 9006, 353, 525, 4691, 29941...
piret/workflows/__init__.py
bos-lab/piret
2
197486
<gh_stars>1-10 """Importing.""" import os import sys dir_path = os.path.dirname(os.path.realpath(__file__)) sys.path.append(dir_path) from single_seq import SingleSeq from dual_seq import DualSeq """Importing."""
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 17518, 292, 1213, 15945, 13, 5215, 2897, 13, 5215, 10876, 13, 3972, 29918, 2084, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 6...
src/img_prediction.py
henlein/PoseContrast
0
189924
import bpy from PIL import ImageDraw import os import torch import cv2 import math import numpy as np from math import radians from PIL import Image, ImageFilter from dataset.data_utils import process_viewpoint_label, TransLightning, resize_pad, random_crop import torchvision.transforms as transforms from model.resnet ...
[ 1, 1053, 289, 2272, 13, 3166, 349, 6227, 1053, 7084, 8537, 13, 5215, 2897, 13, 5215, 4842, 305, 13, 5215, 13850, 29906, 13, 5215, 5844, 13, 5215, 12655, 408, 7442, 13, 3166, 5844, 1053, 2971, 5834, 13, 3166, 349, 6227, 1053, 7084, 2...
yahoo_with_mixtext/train_tmix_single_policy.py
sgondala/Automix
1
59034
<filename>yahoo_with_mixtext/train_tmix_single_policy.py<gh_stars>1-10 import torch import torch.nn as nn import torch.nn.functional as F from torch.optim import Adam from torch.utils.data import DataLoader, random_split, ConcatDataset import pandas as pd import numpy as np import transformers from transformers import...
[ 1, 529, 9507, 29958, 29891, 26779, 29918, 2541, 29918, 28084, 726, 29914, 14968, 29918, 18276, 861, 29918, 14369, 29918, 22197, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 4842, 305, 13, 5215, 4...
stations.py
wipfli/airspaces
1
186956
import requests import pandas as pd from io import StringIO import json r = requests.get('https://data.geo.admin.ch/ch.meteoschweiz.messnetz-automatisch/ch.meteoschweiz.messnetz-automatisch_de.csv') df = pd.read_csv(StringIO(r.text), sep=';') features = [] for i in range(299): if df.loc[i]['Stationsty...
[ 1, 1053, 7274, 30004, 13, 5215, 11701, 408, 10518, 30004, 13, 3166, 12013, 1053, 1714, 5971, 30004, 13, 5215, 4390, 30004, 13, 30004, 13, 29878, 353, 7274, 29889, 657, 877, 991, 597, 1272, 29889, 24756, 29889, 6406, 29889, 305, 29914, 3...
src/migrations/versions/0930fdefb325_initial_migration.py
vishaltanwar96/Py-iTrack
4
43632
"""initial migration Revision ID: 0930fdefb325 Revises: Create Date: 2020-09-27 21:13:23.088570 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0930fdefb325' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto g...
[ 1, 9995, 11228, 20332, 13, 13, 1123, 4924, 3553, 29901, 29871, 29900, 29929, 29941, 29900, 29888, 1753, 29890, 29941, 29906, 29945, 13, 1123, 1730, 267, 29901, 29871, 13, 4391, 4712, 29901, 29871, 29906, 29900, 29906, 29900, 29899, 29900, 2...
src/omfgp/scp02.py
stepansnigirev/omfgp
0
141444
class SCP02: pass
[ 1, 770, 317, 6271, 29900, 29906, 29901, 13, 12, 3364, 13, 2 ]
Problemset/distribute-candies-to-people/distribute-candies-to-people.py
KivenCkl/LeetCode
7
75055
<filename>Problemset/distribute-candies-to-people/distribute-candies-to-people.py # @Title: 分糖果 II (Distribute Candies to People) # @Author: KivenC # @Date: 2019-07-03 18:34:09 # @Runtime: 44 ms # @Memory: 13 MB class Solution: def distributeCandies(self, candies: int, num_people: int) -> List[int]: # # w...
[ 1, 529, 9507, 29958, 26604, 842, 29914, 5721, 2666, 29899, 29883, 392, 583, 29899, 517, 29899, 25719, 29914, 5721, 2666, 29899, 29883, 392, 583, 29899, 517, 29899, 25719, 29889, 2272, 13, 13, 29937, 732, 7030, 29901, 29871, 30748, 234, 18...
nokiaapp/views.py
orcasgit/django-nokia
2
97524
<gh_stars>1-10 import logging from django.contrib.auth.decorators import login_required from django.contrib.auth.signals import user_logged_in from django.core.urlresolvers import reverse from django.dispatch import receiver from django.http import HttpResponse, Http404 from django.shortcuts import redirect, render fr...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 12183, 13, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 19557, 4097, 1053, 6464, 29918, 12403, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 4530, 1338, ...
rec_to_nwb/test/processing/tools/test_beartype.py
jihyunbak/rec_to_nwb
8
23957
<reponame>jihyunbak/rec_to_nwb #!/usr/bin/env python3 """ `py.test`-driven unit test suite for the `@beartype` decorator, implementing a rudimentary subset of PEP 484-style type checking based on Python 3.x function annotations. Usage ---------- These tests assume the `@beartype` decorator and all utility functions (...
[ 1, 529, 276, 1112, 420, 29958, 2397, 5819, 348, 29890, 557, 29914, 3757, 29918, 517, 29918, 29876, 29893, 29890, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 15945, 29908, 13, 29952, 2272, 29889, 1688, 27969, 244...
sfepy/terms/terms_navier_stokes.py
vondrejc/sfepy
0
13637
import numpy as nm from sfepy.linalg import dot_sequences from sfepy.terms.terms import Term, terms class DivGradTerm(Term): r""" Diffusion term. :Definition: .. math:: \int_{\Omega} \nu\ \nabla \ul{v} : \nabla \ul{u} \mbox{ , } \int_{\Omega} \nu\ \nabla \ul{u} : \nabla \ul{w} \\ ...
[ 1, 1053, 12655, 408, 302, 29885, 13, 13, 3166, 18668, 1022, 29891, 29889, 29880, 979, 29887, 1053, 8329, 29918, 6831, 2063, 13, 3166, 18668, 1022, 29891, 29889, 357, 1516, 29889, 357, 1516, 1053, 11814, 29892, 4958, 13, 13, 1990, 4910, ...
grr/server/grr_response_server/instant_output_plugin_test.py
khanhgithead/grr
4,238
197398
<filename>grr/server/grr_response_server/instant_output_plugin_test.py #!/usr/bin/env python # Lint as: python3 """Tests for grr.lib.output_plugin.""" import io from absl import app from grr_response_core.lib import rdfvalue from grr_response_server import export from grr_response_server.output_plugins import test_p...
[ 1, 529, 9507, 29958, 629, 29878, 29914, 2974, 29914, 629, 29878, 29918, 5327, 29918, 2974, 29914, 2611, 424, 29918, 4905, 29918, 8582, 29918, 1688, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 365, 524, ...
python/paddle/fluid/tests/unittests/test_gru_op.py
javakian/Paddle
0
197769
<gh_stars>0 # Copyright (c) 2018 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 req...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 259, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 349, 22352, 29925, 22352, 13189, 943, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 10413, 2114...
porder/multiproc_pydl.py
testinggis/porder
33
1616757
<gh_stars>10-100 from __future__ import print_function __copyright__ = """ Copyright 2019 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licen...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 1649, 8552, 1266, 1649, 353, 9995, 13, 13, 1678, 14187, 1266, 29871, 29906, 29900, 29896...
python/setup.py
deepest-stack/graph2tensor
0
56392
<reponame>deepest-stack/graph2tensor # coding=utf-8 import numpy as np from setuptools import find_packages, setup, Extension sampler = Extension('graph2tensor.client.sampler', include_dirs=[np.get_include(), ], extra_compile_args=['-std=c++11', '-fopenmp'], ...
[ 1, 529, 276, 1112, 420, 29958, 24535, 342, 29899, 1429, 29914, 4262, 29906, 20158, 13, 29937, 14137, 29922, 9420, 29899, 29947, 13, 5215, 12655, 408, 7442, 13, 13, 3166, 731, 21245, 8789, 1053, 1284, 29918, 8318, 29892, 6230, 29892, 7338,...
pdfs/req.py
prof-andre/TCC
0
187317
import requests as rt import pandas as pd import numpy as np import PyPDF2 as p2 from pathlib import Path def trans_csv(path): #Recebe o caminho do arquivo csv e retorna uma array do tipo string. Leitura do arquivo csv com os dados das escolas. Transforma a coluna COD_ESC em uma unida Array do tipo string. data =...
[ 1, 1053, 7274, 408, 364, 29873, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 10772, 8493, 29906, 408, 282, 29906, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 1753, 1301, 29918, 7638, 29898, 2084, 1125, 13, 29937, ...
tests/test_roleplay.py
kintaclausin01/GHG-reduction-project
0
139668
<filename>tests/test_roleplay.py import sys import os parent_dir = os.path.join(os.path.dirname(__file__), '..') sys.path.append(parent_dir) from roleplay import * #main.roleplayRun(sys.argv[1],sys.argv[2],sys.argv[3]) #main2.roleplayRun(sys.argv[1],sys.argv[2],sys.argv[3]) main2.roleplayRun()
[ 1, 529, 9507, 29958, 21150, 29914, 1688, 29918, 12154, 1456, 29889, 2272, 13, 5215, 10876, 30004, 13, 5215, 2897, 30004, 13, 3560, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, ...
tgml/validator/generator/yamodel.py
kshaposhnikov/twitter-graph-model
0
71055
<filename>tgml/validator/generator/yamodel.py # Yet Another Model for generating random graphs
[ 1, 529, 9507, 29958, 29873, 29887, 828, 29914, 3084, 1061, 29914, 27959, 29914, 29891, 314, 27224, 29889, 2272, 13, 29937, 15175, 7280, 8125, 363, 14655, 4036, 18445, 13, 2 ]
tests/integration/voice/v1/connection_policy/test_connection_policy_target.py
BrimmingDev/twilio-python
1,362
172259
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class ConnectionPolicyTargetTes...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29878, 15945, 29908, 13, 4013, 775, 471, 5759, 491, 13, 29905, 847, 903, 1678, 903, 29871, 903, 29989, 259, 903, 29871, 903, 13, 891, 9423, 2144, 29914, 7373, 5033, 29918, 4295, 29914, 29989...
international_data_preprocessing/money.py
emcarlson2017/international-data-preprocessing
0
183081
<filename>international_data_preprocessing/money.py """The money module includes an object representation of money, and functions to parse strings into Money.""" from .country import Country from ._util import check_single_row import pandas as pd import re import os import os.path dirpath = os.path.dirname(os.path.rea...
[ 1, 529, 9507, 29958, 14168, 1288, 29918, 1272, 29918, 1457, 19170, 29914, 29885, 4992, 29889, 2272, 13, 15945, 29908, 1576, 6909, 3883, 7805, 385, 1203, 8954, 310, 6909, 29892, 13, 392, 3168, 304, 6088, 6031, 964, 341, 4992, 1213, 15945, ...
setup.py
vishnumenon/pyims
1
13688
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup(name="pyims", version='0.1.2', description='A python wrapper for the IMS Word Sense Disambiguation tool (Zhong and Ng, 2010)', url='http://github.com/vishnumenon/pyims', author="<NAME>", author_em...
[ 1, 1053, 731, 21245, 8789, 13, 2541, 1722, 703, 16310, 2303, 29889, 3487, 613, 376, 29878, 1159, 408, 285, 29882, 29901, 13, 1678, 1472, 29918, 8216, 353, 285, 29882, 29889, 949, 580, 13, 13, 842, 21245, 8789, 29889, 14669, 29898, 978, ...
ecasb2share/tests/__init__.py
statiksof/ECAS-B2SHARE
1
163855
all = ["ecas_b2share_test", "tests.py"]
[ 1, 599, 353, 6796, 687, 294, 29918, 29890, 29906, 13653, 29918, 1688, 613, 376, 21150, 29889, 2272, 3108, 2 ]
adminmgr/media/code/A3/task2/BD_1595_1702_0194_43EhjOV.py
IamMayankThakur/test-bigdata
9
1607833
from pyspark.sql import SparkSession from pyspark.sql.types import * from pyspark.conf import SparkConf from pyspark.streaming import StreamingContext from pyspark.sql import Row,SQLContext import csv from pyspark.sql.functions import col,split,explode sp = SparkSession.builder.appName("app").getOrCreate() myschem...
[ 1, 515, 282, 952, 6378, 29889, 2850, 1053, 20814, 7317, 13, 3166, 282, 952, 6378, 29889, 2850, 29889, 8768, 1053, 334, 13, 3166, 282, 952, 6378, 29889, 5527, 1053, 20814, 16376, 13, 3166, 282, 952, 6378, 29889, 5461, 292, 1053, 13763, ...
src/aws_lambda/movie_lens_data_injection_lambda.py
joshch1630/movie_data_platform
0
1605370
import os import zipfile import logging import boto3 import wget logger = logging.getLogger() logger.setLevel(logging.INFO) S3_BUCKET_NAME = "movie-data-platform.mpd" TEMP_PATH = "/tmp/" MOVIE_LENS_PATH = "movie_lens/" RAW_ZONE_PATH = "raw_zone/" MOVIE_LENS_URL_PREFIX = "https://files.grouplens.org/datasets/movielens...
[ 1, 1053, 2897, 13, 5215, 14319, 1445, 13, 5215, 12183, 13, 5215, 289, 3747, 29941, 13, 5215, 281, 657, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 580, 13, 21707, 29889, 842, 10108, 29898, 21027, 29889, 11690, 29897, 13, 13, 29903, ...
main.py
keyan/reaction_reader
0
186735
import io import os import time from collections import Counter from tempfile import NamedTemporaryFile import cv2 import numpy as np import pyautogui from gtts import gTTS from mpg123 import Mpg123, Out123 def get_screen_image(): with NamedTemporaryFile() as f: pil_image = pyautogui.screenshot(imageFile...
[ 1, 1053, 12013, 13, 5215, 2897, 13, 5215, 931, 13, 3166, 16250, 1053, 315, 5336, 13, 3166, 5694, 1445, 1053, 405, 2795, 5776, 1971, 653, 2283, 13, 13, 5215, 13850, 29906, 13, 5215, 12655, 408, 7442, 13, 5215, 11451, 1300, 468, 1481, ...
software/kilsyth/platform/kilsyth.py
kbeckmann/Kilsyth
5
128401
<gh_stars>1-10 import os import subprocess from nmigen.build import * from nmigen.vendor.lattice_ecp5 import * from nmigen_boards.resources import * from ..gateware.ft600 import FT600Resource __all__ = ["KilsythPlatform"] class KilsythPlatform(LatticeECP5Platform): device = "LFE5U-45F" package = "...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2897, 13, 5215, 1014, 5014, 13, 13, 3166, 302, 29885, 2101, 29889, 4282, 1053, 334, 13, 3166, 302, 29885, 2101, 29889, 19167, 29889, 29880, 19704, 29918, 687, ...
scripts/s3-uploader.py
kltm/go-site
31
48300
""" Copy the contents of a local directory into the correct S3 location, using the correct metadata as supplied by the metadata file (or internal defaults). """ #### #### Copy the contents of a local directory into the correct S3 #### location, using the correct metadata as supplied by the metadata #### file (or intern...
[ 1, 9995, 13, 11882, 278, 8118, 310, 263, 1887, 3884, 964, 278, 1959, 317, 29941, 4423, 29892, 13, 4746, 278, 1959, 15562, 408, 19056, 491, 278, 15562, 934, 313, 272, 13, 7564, 21274, 467, 13, 15945, 29908, 13, 4136, 13, 4136, 14187, ...
supervisr/dns/tests/test_provider_compat.py
BeryJu/supervisr
1
170256
"""supervisr dns provider compat tests""" from unittest.mock import patch from supervisr.core.models import Domain, ProviderAcquirableRelationship from supervisr.core.providers.objects import ProviderObjectTranslator from supervisr.core.utils.constants import TEST_DOMAIN from supervisr.core.utils.tests import TestCas...
[ 1, 9995, 9136, 1730, 29878, 270, 1983, 13113, 10007, 6987, 15945, 29908, 13, 13, 3166, 443, 27958, 29889, 17640, 1053, 13261, 13, 13, 3166, 2428, 1730, 29878, 29889, 3221, 29889, 9794, 1053, 28460, 29892, 1019, 5489, 10644, 339, 27797, 96...
resolve_all_issues.py
cloudpassage-community/resolve_all_halo_issues
0
181680
<reponame>cloudpassage-community/resolve_all_halo_issues #! /usr/local/bin/python # Author: <NAME> # Script for resolving all Halo issues. This script is intended to clear out # data related to Halo testing and issues created from a PoC # Updated 2017/03/08 by <NAME> to add count, user input and progress import json...
[ 1, 529, 276, 1112, 420, 29958, 9274, 3364, 482, 29899, 23834, 29914, 17863, 29918, 497, 29918, 4077, 29877, 29918, 12175, 13, 29937, 29991, 847, 4855, 29914, 2997, 29914, 2109, 29914, 4691, 13, 13, 29937, 13361, 29901, 529, 5813, 29958, 1...
dialpad/client.py
dialpad/dialpad-python-sdk
5
40757
<filename>dialpad/client.py import requests from cached_property import cached_property from .resources import ( SMSResource, RoomResource, UserResource, CallResource, NumberResource, OfficeResource, WebhookResource, CompanyResource, ContactResource, CallbackResource, CallCenterResource, Call...
[ 1, 529, 9507, 29958, 29881, 616, 8305, 29914, 4645, 29889, 2272, 13, 13, 5215, 7274, 13, 13, 3166, 22152, 29918, 6799, 1053, 22152, 29918, 6799, 13, 13, 3166, 869, 13237, 1053, 313, 13, 29871, 317, 4345, 6848, 29892, 13, 29871, 25114, ...
src/visions/declarative.py
bhumikapahariapuresoftware/visions
142
164471
from typing import Any, Callable, List, Optional, Sequence, Type, TypeVar, Union from visions.relations import IdentityRelation, InferenceRelation from visions.types.type import VisionsBaseType T = TypeVar("T") def process_relation(items: Union[dict, Type[VisionsBaseType]]) -> IdentityRelation: if isinstance(it...
[ 1, 515, 19229, 1053, 3139, 29892, 8251, 519, 29892, 2391, 29892, 28379, 29892, 922, 3910, 29892, 5167, 29892, 5167, 9037, 29892, 7761, 13, 13, 3166, 1998, 1080, 29889, 2674, 800, 1053, 27486, 9662, 362, 29892, 512, 1659, 9662, 362, 13, ...
_scripts/_build.py
dfreeman06/wxyz
1
3195
import subprocess import sys from . import ROOT, PY_SRC, _run, PY, DIST CONDA_ORDER = [ "core", "html", "lab", "datagrid", "svg", "tpl-jjinja" "yaml" ] CONDA_BUILD_ARGS = [ "conda-build", "-c", "conda-forge", "--output-folder", DIST / "conda-bld", ] if __name__ == "__main__": f...
[ 1, 1053, 1014, 5014, 13, 5215, 10876, 13, 13, 3166, 869, 1053, 16641, 2891, 29892, 349, 29979, 29918, 29903, 10363, 29892, 903, 3389, 29892, 349, 29979, 29892, 360, 9047, 13, 13, 13, 6007, 7698, 29918, 22364, 353, 518, 13, 1678, 376, ...
anonymizer/__init__.py
jjhuang/django-anonymizer
13
151173
<filename>anonymizer/__init__.py # flake8: noqa from anonymizer.base import Anonymizer
[ 1, 529, 9507, 29958, 273, 4735, 3950, 29914, 1649, 2344, 26914, 2272, 13, 29937, 17422, 446, 29947, 29901, 694, 25621, 13, 3166, 385, 4735, 3950, 29889, 3188, 1053, 530, 4735, 3950, 13, 2 ]
project/sema2/managers.py
eorygen/sema2_web
0
61005
from django.db import models class AnswerSetUniqueManager(models.Manager): def get_queryset(self): return super(AnswerSetUniqueManager, self).get_queryset().filter(is_duplicate=False)
[ 1, 515, 9557, 29889, 2585, 1053, 4733, 13, 13, 1990, 673, 2697, 8110, 802, 3260, 29898, 9794, 29889, 3260, 1125, 13, 13, 1678, 822, 679, 29918, 1972, 842, 29898, 1311, 1125, 13, 4706, 736, 2428, 29898, 22550, 2697, 8110, 802, 3260, 29...
RequestInfo.py
AndreyRub/LoveLetter
0
85636
class RequestInfo: def __init__(self, human_string, # human-readable string (will be printed for Human object) action_requested, # action requested ('card' + index of card / 'opponent' / 'guess') current_hand = [], ...
[ 1, 770, 10729, 3401, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 13, 462, 5199, 29918, 1807, 29892, 462, 418, 396, 5199, 29899, 949, 519, 1347, 313, 14043, 367, 13350, 363, 12968, 1203, 29897, 13, 462, 3158, 29918, 3827, 287, ...
windows_to_fasta.py
latticetower/top_introns
2
169538
import fileinput import sys from collections import OrderedDict from window_info import WindowInfo from optparse import OptionParser class WindowToFastaConverter(object): def __init__(self): self.current_chromosome = "" self.chromosome_windows = list() self.current_window = 0 def load_fasta(self, fas...
[ 1, 1053, 934, 2080, 13, 5215, 10876, 13, 3166, 16250, 1053, 8170, 287, 21533, 13, 3166, 3474, 29918, 3888, 1053, 18379, 3401, 13, 3166, 3523, 5510, 1053, 10831, 11726, 13, 13, 1990, 18379, 1762, 29943, 5427, 18545, 29898, 3318, 1125, 13...
code/check_image_exists.py
LRoeseler/generalisation-humans-DNNs
1
121818
# check whether each of the images used here is contained in the downloaded entirety of images import os path = "../16-class-ImageNet/image_names" txt_file_list = os.listdir(path) print(txt_file_list) for txt_file in txt_file_list: file_path = os.path.join(path, txt_file) print(file_path) print(f"Now scanni...
[ 1, 396, 1423, 3692, 1269, 310, 278, 4558, 1304, 1244, 338, 11122, 297, 278, 16532, 4152, 1017, 310, 4558, 13, 5215, 2897, 13, 2084, 353, 376, 6995, 29896, 29953, 29899, 1990, 29899, 2940, 6779, 29914, 3027, 29918, 7039, 29908, 13, 3945,...
test/test-sys.py
xupingmao/minipy
52
37302
<filename>test/test-sys.py import sys assert len(sys.argv) == 1
[ 1, 529, 9507, 29958, 1688, 29914, 1688, 29899, 9675, 29889, 2272, 13, 13, 5215, 10876, 13, 13, 9294, 7431, 29898, 9675, 29889, 19218, 29897, 1275, 29871, 29896, 2 ]
chaco/array_plot_data.py
martinRenou/chaco
0
1610716
""" Defines ArrayPlotData. """ import six import six.moves as sm from numpy import array, ndarray # Enthought library imports from traits.api import Dict # Local, relative imports from .abstract_plot_data import AbstractPlotData from .abstract_data_source import AbstractDataSource class ArrayPlotData(AbstractPlotDa...
[ 1, 9995, 5282, 1475, 4398, 20867, 1469, 29889, 13, 15945, 29908, 13, 5215, 4832, 13, 5215, 4832, 29889, 13529, 267, 408, 1560, 13, 3166, 12655, 1053, 1409, 29892, 29871, 299, 2378, 13, 13, 29937, 1174, 386, 1774, 3489, 24802, 13, 3166, ...
djangologdb/utils.py
cgroschupp/django-logdb
5
126261
import datetime import time from django.db import models from django.core.serializers.json import DjangoJSONEncoder from django.utils import simplejson as json def get_timestamp(date_time): """ Create a `timestamp` from a `datetime` object. A `timestamp` is defined as the number of milliseconds ...
[ 1, 1053, 12865, 30004, 13, 5215, 931, 30004, 13, 30004, 13, 3166, 9557, 29889, 2585, 1053, 4733, 30004, 13, 3166, 9557, 29889, 3221, 29889, 15550, 19427, 29889, 3126, 1053, 15337, 7249, 8566, 6119, 30004, 13, 3166, 9557, 29889, 13239, 105...
ingestors/misc/jsonfile.py
simonwoerpel/ingest-file
23
52666
<reponame>simonwoerpel/ingest-file<filename>ingestors/misc/jsonfile.py import json from followthemoney import model from followthemoney.util import MEGABYTE from ingestors.ingestor import Ingestor from ingestors.support.encoding import EncodingSupport from ingestors.exc import ProcessingException class JSONIngestor...
[ 1, 529, 276, 1112, 420, 29958, 3601, 265, 827, 261, 13111, 29914, 292, 342, 29899, 1445, 29966, 9507, 29958, 292, 342, 943, 29914, 29885, 10669, 29914, 3126, 1445, 29889, 2272, 13, 5215, 4390, 13, 13, 3166, 1101, 386, 331, 4992, 1053, ...
examples/anomaly_detection.py
KrishnanSG/pytsal
32
46090
""" Holt Winter Anomaly detection Example In this example we will look into how to create holt winters model and build an anomaly detection model in less than 4 steps. """ if __name__ == '__main__': from pytsal import anomaly, forecasting from pytsal.dataset import * # 1. Load the dataset ts_...
[ 1, 9995, 13, 29950, 14339, 12267, 530, 290, 14997, 15326, 8741, 13, 1678, 512, 445, 1342, 591, 674, 1106, 964, 920, 304, 1653, 8753, 29873, 13851, 29879, 1904, 322, 2048, 385, 29342, 14997, 15326, 1904, 13, 1678, 297, 3109, 1135, 29871,...
venv/Lib/site-packages/keystoneauth1/tests/unit/extras/oauth1/test_oauth1.py
prasoon-uta/IBM-coud-storage
48
78112
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ 1, 396, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 13, 29937, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 887, 1122, 4017, 1...
examples/sns.py
calebmarcus/awacs
0
141349
<gh_stars>0 from awacs.aws import Allow, ArnEquals, AWSPrincipal, Condition from awacs.aws import Policy, Statement import awacs.sns as sns import awacs.sqs as sqs region = 'us-east-1' account = '012345678891' pd = Policy( Statement=[ Statement( Effect=Allow, Principal=AWSPrincipa...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 3773, 16815, 29889, 10467, 1053, 29408, 29892, 13767, 14776, 29892, 15540, 4040, 26706, 29892, 11790, 654, 13, 3166, 3773, 16815, 29889, 10467, 1053, 25219, 29892, 6666, 882, 13, 5215...
word_trainer.py
matthew-a-adams/morse-practice-scripts
0
150078
#!/usr/bin/env python3 from __future__ import division, print_function import string, time, random, msvcrt import sounddevice as sd import numpy as np from scipy import io import scipy.io.wavfile import csv from collections import Counter import morse SPS = 8000 LETTERS = string.ascii_uppercase FREQ = 750 WPM = 25 F...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 29892, 1596, 29918, 2220, 13, 5215, 1347, 29892, 931, 29892, 4036, 29892, 286, 4501, 29883, 2273, 13, 5215, 6047, 10141, 408, 28972,...
hopper/utils/args/CommandHandler.py
Xilinx/hopper
2
104454
<filename>hopper/utils/args/CommandHandler.py # Copyright (c) 2015 Xilinx Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights #...
[ 1, 529, 9507, 29958, 1251, 2496, 29914, 13239, 29914, 5085, 29914, 6255, 4598, 29889, 2272, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29945, 1060, 309, 14668, 9266, 29889, 13, 29937, 13, 29937, 20894, 2333, 338,...