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 |
|---|---|---|---|---|---|
Python/Display/display.py | alexanderkrauck/Weatherstation | 0 | 61387 | # Display the ip's from all network interfaces on the display
import time
import Adafruit_Nokia_LCD as LCD
import Adafruit_GPIO.SPI as SPI
import netifaces
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
# Raspberry Pi hardware SPI config:
DC = 23
RST = 24
SPI_PORT = 0
SPI_DEVICE = 0
# Ra... | [
1,
396,
17440,
278,
10377,
29915,
29879,
515,
599,
3564,
19510,
373,
278,
2479,
13,
5215,
931,
13,
13,
5215,
23255,
29888,
9216,
29918,
29940,
554,
423,
29918,
29931,
6530,
408,
365,
6530,
13,
5215,
23255,
29888,
9216,
29918,
29954,
222... |
agents/seqseq_agent.py | sidg54/textgeneration | 0 | 103251 | r'''
'''
# standard library imports
from __future__ import absolute_import
import math
import tqdm
import random
import shutil
from os import getcwd
from datetime import datetime
# third party imports
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torch.backends import cudnn
fro... | [
1,
364,
12008,
13,
12008,
13,
29937,
3918,
3489,
24802,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
5215,
5844,
13,
5215,
260,
29939,
18933,
13,
5215,
4036,
13,
5215,
528,
4422,
13,
3166,
2897,
1053,
679,
29883,
99... |
testscripts/RDKB/component/WIFIAgent/TS_WIFIAGENT_CheckTelemetryMarkerCHUTIL_2_Logging.py | rdkcmf/rdkb-tools-tdkb | 0 | 37925 | <filename>testscripts/RDKB/component/WIFIAgent/TS_WIFIAGENT_CheckTelemetryMarkerCHUTIL_2_Logging.py
##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2021 RDK... | [
1,
529,
9507,
29958,
1688,
16713,
29914,
29934,
17359,
29933,
29914,
9700,
29914,
22119,
3738,
19661,
29914,
9375,
29918,
22119,
3738,
10051,
3919,
29918,
5596,
7141,
2409,
27184,
24619,
3210,
2692,
6227,
29918,
29906,
29918,
3403,
3460,
2988... |
sectiondoc/sections/item_list.py | itziakos/sectiondoc | 0 | 124876 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# License: LICENSE.TXT
# Author: <NAME>
#
# Copyright (c) 2011-14, Enthought, Inc.
# All rights reserved.
# -----------------------------------------------------------------------------
from sectiondoc.util impor... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
29937,
29871,
19245,
29901,
365,
2965,
1430,
1660,
29889,
29911,
12188,
13,
29937,
29871,
13361,
29901,
529,
... |
src/pysolo/c_wrapper/function_alias.py | NCAR/lrose-solo-python | 0 | 1600957 | # this module handles mapping of C-function names
# also handles which library to import based on platform
import platform
from pathlib import Path
import ctypes
aliases = {}
# list of functions PySolo uses
functions = [
"assert_bad_flags",
"assign_value",
"bad_flags_logic",
"BB_unfold_first_good_ga... | [
1,
396,
445,
3883,
17766,
10417,
310,
315,
29899,
2220,
2983,
13,
29937,
884,
17766,
607,
3489,
304,
1053,
2729,
373,
7481,
13,
13,
5215,
7481,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
274,
8768,
13,
13,
2606,
2129,
353,
6571,
1... |
pytorch_fm/torchfm/dataset/avazu.py | qianrenjian/hy_learn | 0 | 1613084 | import shutil
import struct
from collections import defaultdict
from pathlib import Path
import lmdb
import numpy as np
import torch.utils.data
from tqdm import tqdm
class AvazuDataset(torch.utils.data.Dataset):
"""
Avazu Click-Through Rate Prediction Dataset
Dataset preparation
... | [
1,
1053,
528,
4422,
30004,
13,
5215,
2281,
30004,
13,
3166,
16250,
1053,
2322,
8977,
30004,
13,
3166,
2224,
1982,
1053,
10802,
30004,
13,
30004,
13,
5215,
301,
29885,
2585,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
5215,
4842,
305,
... |
Movement/2DIK.py | IanSMoyes/SpiderPi | 7 | 197956 | #!/usr/bin/python3
# -*- coding: UTF-8 -*-
# Copyright <EMAIL>
# Programme to calculate inverse kinematics
import math
def switch_sides(coords):
'''
Take account of servo positions switching polarity on the other side of the hexapod
param: coords: Tuple containing shoulder, knee & ankle servo positions
... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
18351,
29899,
29947,
448,
29930,
29899,
13,
29937,
14187,
1266,
529,
26862,
6227,
29958,
13,
13,
29937,
7835,
1004,
304,
8147,
16402,
19015,
4579,
... |
examples/video.py | monchier/streamlit-1 | 1 | 71543 | <reponame>monchier/streamlit-1
# -*- coding: utf-8 -*-
# Copyright 2018-2020 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | [
1,
529,
276,
1112,
420,
29958,
3712,
305,
631,
29914,
5461,
19411,
29899,
29896,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
29899,
29906,
29... |
manga_py/base_classes/callbacks.py | paulolimac/manga-py | 1 | 163171 | from typing import Callable
class Callbacks:
def _call_files_progress_callback(self):
if callable(self.progress):
_max, _current = len(self._storage['files']), self._storage['current_file']
self.progress(_max, _current, _current < 1)
def set_quest_callback(self, callback: Call... | [
1,
515,
19229,
1053,
8251,
519,
13,
13,
13,
1990,
8251,
1627,
29879,
29901,
13,
1678,
822,
903,
4804,
29918,
5325,
29918,
18035,
29918,
14035,
29898,
1311,
1125,
13,
4706,
565,
1246,
519,
29898,
1311,
29889,
18035,
1125,
13,
9651,
903,
... |
tests/test_fluids_ecl.py | trhallam/digirock | 0 | 37370 | """Test functions for pem.fluid.ecl module
"""
import pytest
from pytest import approx
import numpy as np
import digirock.fluids.ecl as fluid_ecl
from inspect import getmembers, isfunction
@pytest.fixture
def tol():
return {
"rel": 0.05, # relative testing tolerance in percent
"abs... | [
1,
9995,
3057,
3168,
363,
282,
331,
29889,
1579,
5416,
29889,
687,
29880,
3883,
30004,
13,
15945,
19451,
13,
30004,
13,
5215,
11451,
1688,
30004,
13,
3166,
11451,
1688,
1053,
2134,
29916,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
52... |
lang/python/try-doctest.py | hmisty/coding | 3 | 92794 | #!/usr/bin/env python
#coding:utf-8
"""
doctest demonstration.
how to run:
$ python -m doctest -v try-doctest.py
"""
def multiply(a, b):
"""
Multiply a with b.
>>> multiply(1, 2)
2
>>> multiply('a', 3)
'aaa'
"""
return a * b
"""
main
"""
if __name__ == '__main__':
import docte... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
29883,
3689,
29901,
9420,
29899,
29947,
13,
13,
15945,
29908,
13,
1867,
312,
342,
9004,
362,
29889,
13,
3525,
304,
1065,
29901,
13,
1678,
395,
3017,
448,
29885,
437,
312,
342,
... |
HW8.py | shng5175/Random-Python-Stuff | 0 | 115088 | <filename>HW8.py
import sys
import math
x = int(sys.argv[1]) #takes in the number as an arguement
y = math.sqrt(x) #gets the square root of x
y = math.ceil(y) #rounds up y
y = int(y) #did this because the for loop didn't want to take in a float as part of the range
i = 2
for i in range(i, y): #this whole section here... | [
1,
529,
9507,
29958,
29950,
29956,
29947,
29889,
2272,
13,
5215,
10876,
13,
5215,
5844,
13,
13,
29916,
353,
938,
29898,
9675,
29889,
19218,
29961,
29896,
2314,
396,
29873,
6926,
297,
278,
1353,
408,
385,
1852,
29884,
882,
13,
29891,
353... |
tests/test_tbears_db.py | Transcranial-Solutions/t-bears | 35 | 9318 | # -*- coding: utf-8 -*-
# Copyright 2017-2018 ICON Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
29899,
29906,
29900,
29896,
29947,
306,
6007,
10606,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
... |
flowx/poisson/_poisson.py | akashdhruv/flowX | 0 | 64714 | <filename>flowx/poisson/_poisson.py
"""Interface for Poisson solver module"""
from . import _interface
class Poisson(object):
def __init__(self, grid=None, poisson_vars=[None]*2, poisson_info=None):
"""
Constructor for the Poisson unit
Arguments
---------
grid : o... | [
1,
529,
9507,
29958,
1731,
29916,
29914,
1129,
17387,
19891,
1129,
17387,
29889,
2272,
13,
15945,
29908,
10448,
363,
3929,
17387,
899,
369,
3883,
15945,
29908,
13,
13,
3166,
869,
1053,
903,
13248,
13,
13,
1990,
3929,
17387,
29898,
3318,
... |
hydras/utils.py | Gilnaa/Hydra | 5 | 149266 | """
Contains various utility methods.
:file: utils.py
:date: 27/08/2015
:authors:
- <NAME> <<EMAIL>>
"""
from typing import Any, Type, Union
import inspect
import enum
import sys
class Endianness(enum.Enum):
BIG = '>'
LITTLE = '<'
HOST = '='
TARGET = None
def is_equivalent_to_little_endian(... | [
1,
9995,
13,
21409,
5164,
19725,
3519,
29889,
13,
13,
29901,
1445,
29901,
3667,
29879,
29889,
2272,
13,
29901,
1256,
29901,
29871,
29906,
29955,
29914,
29900,
29947,
29914,
29906,
29900,
29896,
29945,
13,
29901,
5150,
943,
29901,
13,
1678,
... |
number_punch/number_punch.py | abcdHero/battlegame | 1 | 53295 | import sys
import random
import pygame
# Define Window Size
SCREEN_WIDTH, SCREEN_HEIGHT = 800, 600
# Define Frames Per Second
FRAMES_PER_SEC = 25
# Function: Draw a text to the screen
def blit_text(screen_object, font, msg_text, color_tuple, center_tuple, antialiased=True):
# Define a message in Main Menu with Co... | [
1,
1053,
10876,
13,
5215,
4036,
13,
5215,
22028,
13,
13,
29937,
22402,
18379,
21179,
13,
7187,
1525,
1430,
29918,
22574,
29892,
12314,
1525,
1430,
29918,
9606,
22530,
353,
29871,
29947,
29900,
29900,
29892,
29871,
29953,
29900,
29900,
13,
... |
rollservice/tests/test_dice_seq.py | stallmanifold/pnpdr | 0 | 38668 | from django.contrib.auth.models import User
from rollservice.models import DiceSequence
import rest_framework.test as rf_test
import rest_framework.status as status
import rest_framework.reverse as reverse
import hypothesis.extra.django
import hypothesis.strategies as strategies
import unittest
class DiceSeq... | [
1,
515,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
4911,
13,
13,
3166,
9679,
5509,
29889,
9794,
1053,
360,
625,
20529,
13,
13,
5215,
1791,
29918,
4468,
29889,
1688,
1678,
408,
364,
29888,
29918,
1688,
13,
5215,
1791,
29918,
446... |
reporter/uhl_reports/civicrm/practice_duplicate_name.py | LCBRU/reporter | 0 | 122348 | <filename>reporter/uhl_reports/civicrm/practice_duplicate_name.py<gh_stars>0
#!/usr/bin/env python3
from reporter.core import SqlReport, Schedule
from reporter.uhl_reports.civicrm import get_contact_link
from reporter.emailing import RECIPIENT_IT_DQ
class CivicrmPracticeDuplicateName(SqlReport):
def __in... | [
1,
529,
9507,
29958,
276,
18505,
29914,
29884,
4415,
29918,
276,
4011,
29914,
29883,
440,
293,
1758,
29914,
29886,
1461,
625,
29918,
20908,
5926,
29918,
978,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,... |
Strings/count/Solution.py | Voley/AlgorithmicProblemsV2 | 0 | 135240 |
# Problem code
def countAndSay(n):
if n == 1:
return "1"
current = "1"
for i in range(2, n + 1):
current = helper(current)
return current
def helper(current):
group_count = 1
group_member = current[0]
result = ""
for i in range(1, len(current)):
if current[i] =... | [
1,
29871,
13,
29937,
11583,
775,
13,
1753,
2302,
2855,
29903,
388,
29898,
29876,
1125,
13,
1678,
565,
302,
1275,
29871,
29896,
29901,
13,
4706,
736,
376,
29896,
29908,
13,
13,
1678,
1857,
353,
376,
29896,
29908,
13,
1678,
363,
474,
29... |
official/mnist/mnist.py | TuKJet/models | 3,326 | 16319 | <filename>official/mnist/mnist.py<gh_stars>1000+
# Copyright 2017 The TensorFlow 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/... | [
1,
529,
9507,
29958,
29877,
7880,
29914,
23521,
391,
29914,
23521,
391,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29900,
29974,
13,
29937,
29871,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
450,
323,
6073,
... |
doc/paper/results/time-big-fft.py | wangxuesong29/bit-reversal-methods | 0 | 57576 | import numpy as np
from time import time
# Use the largest number of bits here:
b = 28
N = 2**b
x = np.array([ 2*i + (2*i+1)*1j for i in xrange(N)])
print 'Timing b =', b
t1=time()
y = np.fft.fft(x)
t2=time()
print t2-t1, (t2 - t2) / float(N)
| [
1,
1053,
12655,
408,
7442,
13,
3166,
931,
1053,
931,
13,
13,
29937,
4803,
278,
10150,
1353,
310,
9978,
1244,
29901,
13,
29890,
353,
29871,
29906,
29947,
13,
29940,
353,
29871,
29906,
1068,
29890,
13,
29916,
353,
7442,
29889,
2378,
4197,... |
omw/blueprints/ili/__init__.py | tnaskret/OMW | 0 | 159530 | <filename>omw/blueprints/ili/__init__.py
from omw.blueprints.ili.views import ili
| [
1,
529,
9507,
29958,
290,
29893,
29914,
9539,
2158,
29879,
29914,
2638,
29914,
1649,
2344,
26914,
2272,
13,
3166,
2703,
29893,
29889,
9539,
2158,
29879,
29889,
2638,
29889,
7406,
1053,
29040,
13,
2
] |
ca-hostpathogen.py | RachidStat/PyCX | 176 | 69972 | <reponame>RachidStat/PyCX
import pycxsimulator
from pylab import *
width = 50
height = 50
initProb = 0.01
infectionRate = 0.85
regrowthRate = 0.15
def initialize():
global time, config, nextConfig
time = 0
config = zeros([height, width])
for x in range(width):
for y in ra... | [
1,
529,
276,
1112,
420,
29958,
29934,
496,
333,
9513,
29914,
19737,
29907,
29990,
13,
5215,
282,
11078,
29916,
3601,
9183,
30004,
13,
3166,
282,
2904,
370,
1053,
334,
30004,
13,
30004,
13,
2103,
353,
29871,
29945,
29900,
30004,
13,
3545... |
Codeforces/CF1433C.py | qinyihao/Luogu_Problem_Solver | 0 | 104801 | <reponame>qinyihao/Luogu_Problem_Solver<gh_stars>0
for _ in range(int(input())):
n = int(input())
r = [int(i) for i in input().split()]
o = max(r)
if r.count(o)==len(r):
print(-1)
continue
kq = -1
for i in range(1,len(r)):
if r[i]==o and (r[i]>r[i-1]):
kq = i+1
for i in range(len(r)-1):
if r[i]==o and... | [
1,
529,
276,
1112,
420,
29958,
29939,
4901,
29875,
2350,
29877,
29914,
24126,
468,
29884,
29918,
26604,
29918,
13296,
369,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
1454,
903,
297,
3464,
29898,
524,
29898,
2080,
22130,
29901,
13,
... |
Cyber_Tyan.py | RuCybernetic/CyberTyanBot | 1 | 167386 | <gh_stars>1-10
import os
import discord
from discord.ext import commands
TOKEN = os.environ.get('BOT_TOKEN')
prefix = '!'
bot = commands.Bot(command_prefix=prefix)
bot.load_extension("jishaku")
bot.remove_command('help')
@bot.command()
async def ping(ctx):
latency = bot.latency
await ctx.send(latency)
@bo... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
2897,
13,
5215,
2313,
536,
13,
3166,
2313,
536,
29889,
1062,
1053,
8260,
13,
13,
13,
4986,
29968,
1430,
353,
2897,
29889,
21813,
29889,
657,
877,
29933,
2891,... |
pyNastran/gui/gui_objects/alt_geometry_storage.py | luzpaz/pyNastran | 293 | 104616 | <gh_stars>100-1000
from copy import deepcopy
class AltGeometry:
representations = ['main', 'toggle', 'wire', 'point', 'surface',
'bar', 'wire+point', 'wire+surf']
displays = ['Wireframe', 'Surface', 'point', None]
def __repr__(self):
msg = ('AltGeometry(%r, color=%s, line_wid... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
3166,
3509,
1053,
6483,
8552,
13,
13,
1990,
10790,
7999,
7843,
29901,
13,
1678,
22540,
353,
6024,
3396,
742,
525,
13270,
742,
525,
22376,
... |
tests/adv/test_pop_sfrd.py | jlashner/ares | 10 | 3442 | """
test_pop_models.py
Author: <NAME>
Affiliation: UCLA
Created on: Fri Jul 15 15:23:11 PDT 2016
Description:
"""
import ares
import matplotlib.pyplot as pl
PB = ares.util.ParameterBundle
def test():
# Create a simple population
pars_1 = PB('pop:fcoll') + PB('sed:bpass')
pop_fcoll = ares.population... | [
1,
9995,
13,
13,
1688,
29918,
7323,
29918,
9794,
29889,
2272,
13,
13,
13720,
29901,
529,
5813,
29958,
13,
27867,
2638,
362,
29901,
501,
13875,
13,
20399,
373,
29901,
11169,
2739,
29871,
29896,
29945,
29871,
29896,
29945,
29901,
29906,
299... |
mlab_tools/camera.py | lukius/mlab-tools | 0 | 177224 | <reponame>lukius/mlab-tools<filename>mlab_tools/camera.py
from mayavi import mlab
class Camera(object):
"""Class that wraps some of the mlab functions that manipulate the camera.
A camera instance is automatically created by the animation.
"""
def __init__(self, focalpoint=None, distance=Non... | [
1,
529,
276,
1112,
420,
29958,
6092,
1984,
375,
29914,
828,
370,
29899,
8504,
29966,
9507,
29958,
828,
370,
29918,
8504,
29914,
26065,
29889,
2272,
13,
3166,
1122,
17345,
1053,
286,
8205,
13,
13,
13,
1990,
24321,
29898,
3318,
1125,
13,
... |
src/MLP/utils.py | rudyn2/wine_market_temporal_prediction | 0 | 115918 | import pandas as pd
import torch
import torch.nn as nn
from src.MLP.mlp_models import WineDataset
def model_eval(trained_model: nn.Module, dataset: WineDataset):
"""
Takes a WineDataset and returns a pandas series (using datetime indexing) with the predictions.
"""
trained_model.eval()
y_pred = [... | [
1,
1053,
11701,
408,
10518,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
13,
3166,
4765,
29889,
1988,
29925,
29889,
828,
29886,
29918,
9794,
1053,
399,
457,
16390,
24541,
13,
13,
13,
1753,
1904,
29918,
... |
src/backend/backend/users/migrations/0010_update_uuid_field.py | tejpratap545/E-Commerce-Application | 0 | 49803 | <reponame>tejpratap545/E-Commerce-Application
# Generated by Django 3.1.2 on 2020-10-21 15:40
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('users', '0009_auto_20201021_2108'),
]
operations = [
migrations.AlterField(
... | [
1,
529,
276,
1112,
420,
29958,
371,
29926,
558,
271,
481,
29945,
29946,
29945,
29914,
29923,
29899,
1523,
15667,
29899,
4873,
13,
29937,
3251,
630,
491,
15337,
29871,
29941,
29889,
29896,
29889,
29906,
373,
29871,
29906,
29900,
29906,
29900... |
OSeMOSYS_PuLP.py | OSeMOSYS/OSeMOSYS-PuLP | 4 | 53604 | <filename>OSeMOSYS_PuLP.py
# !/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: <NAME>, Copyright 2019
# OSeMOSYS version: OSeMOSYS_2017_11_08
__doc__ = """
========================================================================================================================
OSeMOSYS-PuLP: A Stoc... | [
1,
529,
9507,
29958,
29949,
2008,
29924,
3267,
21554,
29918,
29925,
29884,
13208,
29889,
2272,
13,
29937,
1738,
29914,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
30004,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
... |
algorithms/dataStructures/graph.py | mohrtw/algorithms | 0 | 173543 | from collections import defaultdict
class graph(object):
def __init__(self, arcList=[]):
self.arcs = defaultdict(list)
for arc in arcList:
self.arcs[arc[0]].append(arc[1])
if not self.check_vertex(arc[1]):
self.add_vertex(arc[1])
def check_vertex(self... | [
1,
515,
16250,
1053,
2322,
8977,
13,
13,
13,
1990,
3983,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
15232,
1293,
29922,
2636,
1125,
13,
4706,
1583,
29889,
279,
2395,
353,
2322,
8977,
29898,
1761,
29897,
13,
... |
helpers/expr_to_dnf.py | hriener/party-elli | 9 | 128186 | <reponame>hriener/party-elli
from typing import List
from sympy import Symbol, to_dnf, Not, Or, And, simplify_logic
from sympy import false as sympy_false
from sympy import true as sympy_true
from helpers.expr_helper import get_sig_number
from helpers.spec_helper import prop
from interfaces.expr import Expr, BinOp, N... | [
1,
529,
276,
1112,
420,
29958,
29882,
374,
759,
29914,
22633,
29899,
5481,
13,
3166,
19229,
1053,
2391,
13,
13,
3166,
5016,
2272,
1053,
23858,
29892,
304,
29918,
5200,
29888,
29892,
2216,
29892,
1394,
29892,
1126,
29892,
21092,
29918,
192... |
src/data/definitions.py | tamarakatic/patient_survival_prediction | 0 | 1610246 | <reponame>tamarakatic/patient_survival_prediction
import os
file_path = os.path.dirname(os.path.abspath(__file__))
ROOT_PATH = os.path.dirname(os.path.dirname(file_path))
TRAIN_RAW = os.path.join(ROOT_PATH, 'data/raw/training_v2.csv')
TEST_RAW = os.path.join(ROOT_PATH, 'data/raw/unlabeled.csv')
TRAIN_PROCESS = os.p... | [
1,
529,
276,
1112,
420,
29958,
29873,
8715,
557,
2454,
29914,
5031,
993,
29918,
7610,
29894,
2561,
29918,
11965,
2463,
13,
5215,
2897,
13,
13,
1445,
29918,
2084,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
370,
... |
tests/unit_tests/test_system_program.py | 524119574/solana-py | 0 | 45877 | """Unit tests for solana.system_program."""
import solana.system_program as sp
from solana.account import Account
def test_transfer():
"""Test creating a transaction for transfer."""
params = sp.TransferParams(from_pubkey=Account().public_key(), to_pubkey=Account().public_key(), lamports=123)
txn = sp.tra... | [
1,
9995,
8325,
6987,
363,
899,
1648,
29889,
5205,
29918,
8860,
1213,
15945,
13,
5215,
899,
1648,
29889,
5205,
29918,
8860,
408,
805,
13,
3166,
899,
1648,
29889,
10149,
1053,
16535,
13,
13,
13,
1753,
1243,
29918,
3286,
571,
7295,
13,
1... |
src/split_data.py | sunsiche/DSCI522-2020-g22 | 0 | 29706 | # author: <NAME>
# date: 2020-11-25
"""
This script Splits the raw cleaned data to train and test splits
based on the user input and saves them into two separate csv files
Usage: clean_data.py --input_file_path=<input_file_path> --saving_path_train=<saving_path_train> --saving_path_test=<saving_path_test> --test_s... | [
1,
396,
4148,
29901,
529,
5813,
29958,
13,
29937,
2635,
29901,
29871,
29906,
29900,
29906,
29900,
29899,
29896,
29896,
29899,
29906,
29945,
13,
13,
15945,
29908,
13,
4013,
2471,
317,
572,
1169,
278,
10650,
5941,
287,
848,
304,
7945,
322,
... |
venv/Lib/site-packages/statsmodels/stats/tests/test_statstools.py | EkremBayar/bayar | 6,931 | 129645 | <gh_stars>1000+
# TODO: Test robust skewness
# TODO: Test robust kurtosis
import numpy as np
import pandas as pd
from numpy.testing import (assert_almost_equal, assert_raises, assert_equal,
assert_allclose)
from statsmodels.stats._adnorm import normal_ad
from statsmodels.stats.stattools impo... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29900,
29974,
13,
29937,
14402,
29901,
4321,
16424,
18109,
1233,
404,
13,
29937,
14402,
29901,
4321,
16424,
413,
4227,
19263,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
1... |
facexlib/headpose/hopenet_arch.py | spy14414/facexlib | 164 | 101521 | import torch
import torch.nn as nn
import torchvision
class HopeNet(nn.Module):
# Hopenet with 3 output layers for yaw, pitch and roll
# Predicts Euler angles by binning and regression with the expected value
def __init__(self, block, layers, num_bins):
super(HopeNet, self).__init__()
if b... | [
1,
1053,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
4924,
13,
13,
13,
1990,
7963,
6779,
29898,
15755,
29889,
7355,
1125,
13,
1678,
396,
379,
3150,
300,
411,
29871,
29941,
1962,
15359,
363,
343,... |
chroma-agent/chroma_agent/action_plugins/manage_fail_node.py | GarimaVishvakarma/intel-chroma | 0 | 147626 | # Copyright (c) 2017 Intel Corporation. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
from chroma_agent.lib.shell import AgentShell
def fail_node(args):
# force a manual failover by failing a node
AgentShell.try_run(["sync"])
A... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29955,
18555,
15025,
29889,
2178,
10462,
21676,
29889,
13,
29937,
4803,
310,
445,
2752,
775,
338,
4095,
287,
491,
263,
341,
1806,
29899,
3293,
13,
29937,
19405,
393,
508,... |
opencoverage/api/upload.py | kotlas92/opencoverage | 0 | 196679 | import logging
import os
import zlib
from typing import Optional
from urllib.parse import parse_qs
from starlette.requests import Request
from starlette.responses import PlainTextResponse
from opencoverage import tasks
from opencoverage.clients.scm import get_client
from .app import router
logger = logging.getLogge... | [
1,
1053,
12183,
13,
5215,
2897,
13,
5215,
503,
1982,
13,
3166,
19229,
1053,
28379,
13,
3166,
3142,
1982,
29889,
5510,
1053,
6088,
29918,
29939,
29879,
13,
13,
3166,
5810,
20200,
29889,
24830,
1053,
10729,
13,
3166,
5810,
20200,
29889,
2... |
ProcessImagePipeline.py | SamaraLove/Project-1-Lane-Following | 0 | 83594 | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 6 13:45:30 2019
@author: LOVESA
"""
#importing relevant packages
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import os
import cv2
import math
from os.path import isfile, join
import Helper as Functions
#Paramet... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
15945,
19451,
13,
20399,
373,
11169,
3826,
259,
29953,
29871,
29896,
29941,
29901,
29946,
29945,
29901,
29941,
29900,
29871,
29906,
29900,
29896,
2992... |
tests/timers/PeriodicTimer.py | SLAcM/SLAcM | 1 | 72700 | <filename>tests/timers/PeriodicTimer.py<gh_stars>1-10
'''
Created on Sep 19, 2020
@author: esdev
'''
from slacm.component import Component
class PeriodicTimer(Component):
def __init__(self):
super(PeriodicTimer, self).__init__()
def on_periodic(self):
now = self.periodic.recv_pyobj()... | [
1,
529,
9507,
29958,
21150,
29914,
9346,
414,
29914,
29853,
293,
14745,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
12008,
13,
20399,
373,
29639,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29906,
... |
src/genomehubs/lib/parse.py | genomehubs/genomehubs | 7 | 139746 | <filename>src/genomehubs/lib/parse.py
#!/usr/bin/env python3
"""
Parse a local or remote data source.
Usage:
genomehubs parse [--btk] [--btk-root STRING...]
[--wikidata PATH] [--wikidata-root STRING...] [--wikidata-xref STRING...]
[--gbif] [--gbif-root STRING...] [--gbif-... | [
1,
529,
9507,
29958,
4351,
29914,
1885,
608,
29882,
23954,
29914,
1982,
29914,
5510,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
15945,
29908,
13,
12914,
263,
1887,
470,
7592,
848,
2752,
29889,
13,
... |
piptools/repositories/local.py | simon-graham/pip-tools | 0 | 195491 | <reponame>simon-graham/pip-tools
# coding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
from contextlib import contextmanager
from pip._internal.utils.hashes import FAVORITE_HASH
from .._compat import PIP_VERSION
from .base import BaseRepository
from piptools.utils import... | [
1,
529,
276,
1112,
420,
29958,
3601,
265,
29899,
3874,
3391,
29914,
13096,
29899,
8504,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
29892,
... |
carrito_app/baseclasses/compras.py | fortegaseguel/Mi-Carrito | 0 | 1613756 | <gh_stars>0
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.uix.popup import Popup
import sqlite3
def connect_to_database(path):
try:
con = sqlite3.connect(path)
cursor = con.cursor()
create_table_insumos(cursor)
con.commit()
c... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
413,
440,
29891,
29889,
29884,
861,
29889,
1884,
2680,
1053,
11773,
3453,
13,
3166,
413,
440,
29891,
29889,
29884,
861,
29889,
3891,
2580,
15119,
1053,
11090,
2580,
7490,
13,
3166,
... |
pcc/ast/ast.py | jiamo/pcc | 4 | 1603178 | <filename>pcc/ast/ast.py
# AST hierarchy
class ASTNode(object):
def dump(self, indent=0):
raise NotImplementedError
class ExprAST(ASTNode):
pass
class NumberExprAST(ExprAST):
def __init__(self, val):
self.val = val
def dump(self, indent=0):
return '{0}{1}[{2}]'.format(
... | [
1,
529,
9507,
29958,
29886,
617,
29914,
579,
29914,
579,
29889,
2272,
13,
13,
29937,
319,
1254,
21277,
13,
1990,
319,
1254,
4247,
29898,
3318,
1125,
13,
1678,
822,
16766,
29898,
1311,
29892,
29536,
29922,
29900,
1125,
13,
4706,
12020,
2... |
scripts/window_stats.py | aakashsur/docker-hirise | 0 | 110471 | <gh_stars>0
#!/usr/bin/env python3
#
# Copyright 2015 Dovetail Genomics LLC
#
#
from __future__ import division
from __future__ import print_function
from builtins import range
from past.utils import old_div
from hirise_assembly import HiriseAssembly
import random
import re
if __name__=="__main__":
import sys
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29945,
360,
586,
300,
737,
5739,
290,
1199,
365,
12182,
13,
... |
qcmetadataprinter/struct.py | x2dev/device_leeco_x2 | 0 | 1820 | <reponame>x2dev/device_leeco_x2
#!/bin/python3
with open('../camera/QCamera2/stack/common/cam_intf.h', 'r') as f:
data = f.read()
f.closed
start = data.find(' INCLUDE(CAM_INTF_META_HISTOGRAM')
end = data.find('} metadata_data_t;')
data = data[start:end]
metadata = data.split("\n")
metalist = list()
for line ... | [
1,
529,
276,
1112,
420,
29958,
29916,
29906,
3359,
29914,
10141,
29918,
280,
687,
29877,
29918,
29916,
29906,
13,
29937,
14708,
2109,
29914,
4691,
29941,
13,
13,
2541,
1722,
877,
6995,
26065,
29914,
29984,
20717,
29906,
29914,
1429,
29914,
... |
pixette/application.py | EXLER/pixette | 0 | 25582 | <reponame>EXLER/pixette
import logging
import os
import pygame
from pixette.scenes.admin import AdminScene
from pixette.scenes.clock import ClockScene
from pixette.scenes.currencies import CurrenciesScene
from pixette.scenes.weather import WeatherScene
class Application:
def __init__(self, device, title, resolu... | [
1,
529,
276,
1112,
420,
29958,
5746,
29931,
1001,
29914,
29886,
861,
2353,
13,
5215,
12183,
13,
5215,
2897,
13,
13,
5215,
22028,
13,
13,
3166,
9277,
2353,
29889,
1557,
25487,
29889,
6406,
1053,
10229,
23472,
13,
3166,
9277,
2353,
29889,... |
tests/verbs/test_drop_verb.py | RathmoreChaos/intficpy | 25 | 35124 | from ..helpers import IFPTestCase
from intficpy.things import Thing, Container, Liquid
class TestDropVerb(IFPTestCase):
def test_verb_func_drops_item(self):
item = Thing(self.game, self._get_unique_noun())
item.invItem = True
self.me.addThing(item)
self.assertIn(item.ix, self.me.c... | [
1,
515,
6317,
3952,
6774,
1053,
10762,
29925,
3057,
8259,
13,
13,
3166,
938,
9639,
2272,
29889,
386,
886,
1053,
498,
292,
29892,
21679,
29892,
2718,
339,
333,
13,
13,
13,
1990,
4321,
15063,
6565,
29890,
29898,
6545,
29925,
3057,
8259,
... |
bot.py | finneh4249/PTBot | 0 | 69680 | import discord
import asyncio
import re
import os
import datetime
# import git
import sys
import json
import dbl
import psycopg2
import logging
import pytz
from discord.ext import commands
from classes.PTVFormatter import PTVFormatter
import sys, traceback
debug_mode = False
logging.basicConfig(level=int(os.environ['... | [
1,
1053,
2313,
536,
13,
5215,
408,
948,
3934,
13,
5215,
337,
13,
5215,
2897,
13,
5215,
12865,
13,
29937,
1053,
6315,
13,
5215,
10876,
13,
5215,
4390,
13,
5215,
270,
2204,
13,
5215,
6529,
29891,
9708,
29887,
29906,
13,
5215,
12183,
1... |
setup.py | sdpython/td3a_cpp | 1 | 199007 | <gh_stars>1-10
# -*- coding: utf-8 -*-
import os
import sys
from distutils.command.build_ext import build_ext
from setuptools import setup, Extension
from setuptools import find_packages
import numpy
##########
# helpers
##########
# Placeholder to change the default
# compilation for command ``build_ext --inplace``... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
2897,
13,
5215,
10876,
13,
3166,
1320,
13239,
29889,
6519,
29889,
4282,
29918,... |
Source_Code/Python/labinstrument/SS/CMW500/__init__.py | fenglwh/instruments | 0 | 164651 | from .CMW500_WIFI.CMW500_WIFI import CMW_WIFI | [
1,
515,
869,
24494,
29956,
29945,
29900,
29900,
29918,
22119,
3738,
29889,
24494,
29956,
29945,
29900,
29900,
29918,
22119,
3738,
1053,
315,
25365,
29918,
22119,
3738,
2
] |
firecam/lib/rect_to_squares.py | open-climate-tech/firecam | 9 | 171719 | # Copyright 2020 Open Climate Tech Contributors
#
# 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 agr... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
4673,
2233,
6490,
1920,
305,
2866,
1091,
29560,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,... |
decode.py | k-kha/Steganography-Program | 1 | 94505 |
#converts the pixel bytes to binary
def decToBin(dec):
secret_bin = []
for i in dec:
secret_bin.append(f'{i:08b}')
return secret_bin
#gets the last 2 LSB of each byte
def get2LSB(secret_bin):
last2 = []
for i in secret_bin:
for j in i[6:8]:
last2.append(j... | [
1,
6756,
13,
29937,
535,
369,
1372,
278,
15526,
6262,
304,
7581,
30004,
13,
1753,
1602,
1762,
29933,
262,
29898,
7099,
1125,
30004,
13,
1678,
7035,
29918,
2109,
353,
5159,
30004,
13,
1678,
363,
474,
297,
1602,
29901,
30004,
13,
4706,
... |
pyrtshm/metrics.py | pappacena/pyrtshm | 0 | 152818 | class Metrics:
received_packets: int = 0
sent_packets: int = 0
forward_key_set: int = 0
forward_key_del: int = 0
lost_packet_count: int = 0
out_of_order_count: int = 0
delete_unknown_key_count: int = 0
| [
1,
770,
4737,
10817,
29901,
13,
1678,
4520,
29918,
4058,
1691,
29901,
938,
353,
29871,
29900,
13,
1678,
2665,
29918,
4058,
1691,
29901,
938,
353,
29871,
29900,
13,
1678,
6375,
29918,
1989,
29918,
842,
29901,
938,
353,
29871,
29900,
13,
... |
Code/Python/limits.py | james-alvey-42/BoostedDM | 0 | 138868 | <filename>Code/Python/limits.py
# File: limits.py
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import sys
import scipy.stats
from atmos_dm_flux import kdemultifit
from mean_free_path import TzMin
def get_kernel(particle):
r"""
Obtains the kernel and the normal... | [
1,
529,
9507,
29958,
3399,
29914,
11980,
29914,
12514,
29889,
2272,
13,
29937,
3497,
29901,
13071,
29889,
2272,
13,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
4... |
Firmware/Py Scripts/smartmeshsdk-master/libs/SmartMeshSDK/protocols/xivelyConnector/xivelyConnector.py | ECE-412-Capstone-Sensor-Suite/Team-20-Sensor-Suite | 2 | 135401 | #!/usr/bin/python
import logging
class NullHandler(logging.Handler):
def emit(self, record):
pass
log = logging.getLogger('xivelyConnector')
log.setLevel(logging.ERROR)
log.addHandler(NullHandler())
import json
import threading
import socket
import traceback
import re
import time
import copy
import httpl... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
13,
5215,
12183,
13,
1990,
19014,
4598,
29898,
21027,
29889,
4598,
1125,
13,
1678,
822,
20076,
29898,
1311,
29892,
2407,
1125,
13,
4706,
1209,
13,
1188,
353,
12183,
29889,
657,
16363,
877,
2... |
aiolifx/products.py | bdraco/aiolifx | 0 | 128378 | product_map = { 1: 'Original 1000',
3: 'Color 650',
10: 'White 800 (Low Voltage)',
11: 'White 800 (High Voltage)',
18: 'White 900 BR30 (Low Voltage)',
20: 'Color 1000 BR30',
22: 'Color 1000',
27: 'LIFX A19',
28: 'LIFX BR30',
29: 'LIFX+ A19',
30: 'LIFX+ BR30',
31: 'LIFX Z',
... | [
1,
3234,
29918,
1958,
353,
426,
1678,
29896,
29901,
525,
26036,
29871,
29896,
29900,
29900,
29900,
742,
13,
268,
29941,
29901,
525,
3306,
29871,
29953,
29945,
29900,
742,
13,
268,
29896,
29900,
29901,
525,
21823,
29871,
29947,
29900,
29900,... |
src/GaussianDistributionGenerator.py | jachallbound/kmeans_python | 0 | 129917 | <reponame>jachallbound/kmeans_python<filename>src/GaussianDistributionGenerator.py
import numpy as np
import numpy.random as npr
def generate_gaussian_data(D,
ndim,
samples,
priors = None,
means = None,
... | [
1,
529,
276,
1112,
420,
29958,
29926,
496,
497,
9917,
29914,
29895,
1004,
550,
29918,
4691,
29966,
9507,
29958,
4351,
29914,
29954,
17019,
13398,
3224,
21575,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
5215,
12655,
29889,
8172,
408,
302... |
research/active_learning/_selection_methods.py | joaopfonseca/research | 1 | 110558 | <gh_stars>1-10
"""
Uncertainty estimators to be used along with the ALWrapper object. All functions must be
set up so that a higher value means higher uncertainty (higher likelihood of selection)
and vice-versa.
"""
import numpy as np
def breaking_ties(probabilities):
"""Breaking Ties uncertainty measurement. The... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
2525,
14082,
1017,
4844,
4097,
304,
367,
1304,
3412,
411,
278,
14445,
15646,
1203,
29889,
2178,
3168,
1818,
367,
13,
842,
701,
577,
393,
263,
6133... |
modules/client/gui/optsmenu.py | bullseyestudio/guns-game | 0 | 66909 | <gh_stars>0
from modules.client.gui import common
from modules.pgu import gui as pgui
from modules.client import config
hgt = common.screen.get_height()
t = pgui.Table(width=common.screen.get_width(), height=hgt)
t.tr()
t.td(pgui.Spacer(width=150, height=80), colspan=2)
t.tr()
t.td(pgui.Label('Guns-game.com username... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
10585,
29889,
4645,
29889,
23569,
1053,
3619,
13,
3166,
10585,
29889,
29886,
2543,
1053,
1410,
29875,
408,
282,
23569,
13,
3166,
10585,
29889,
4645,
1053,
2295,
13,
13,
29882,
4141,... |
app.py | AmirValeev/auto-ml-classifier | 0 | 2022 | <reponame>AmirValeev/auto-ml-classifier<gh_stars>0
import os, ast
import pandas as pd
from sklearn.svm import SVC
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import OneHotEncoder
from sklearn.compose import make_column_transformer
from sklearn.pipeline import make_pipeline
import pic... | [
1,
529,
276,
1112,
420,
29958,
6833,
381,
29963,
744,
5750,
29914,
6921,
29899,
828,
29899,
1990,
3709,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2897,
29892,
8717,
13,
5215,
11701,
408,
10518,
13,
3166,
2071,
19668,
29889,
... |
formfactory/templatetags/formfactory_tags.py | AltusBarry/django-formfactory | 0 | 102455 | from django import template
from django.db.models import Model
from django.http import Http404
from django.urls import reverse, resolve
from formfactory import models
register = template.Library()
@register.tag()
def render_form(parser, token):
"""{% render_form <form_slug> %}"""
tokens = token.split_conten... | [
1,
515,
9557,
1053,
4472,
13,
3166,
9557,
29889,
2585,
29889,
9794,
1053,
8125,
13,
3166,
9557,
29889,
1124,
1053,
9056,
29946,
29900,
29946,
13,
3166,
9557,
29889,
26045,
1053,
11837,
29892,
8814,
13,
13,
3166,
883,
14399,
1053,
4733,
... |
Python_MD_toHTML/Marked.py | StevenDias33/Marked | 1 | 50649 | import markdown2
import re
import os
from os.path import splitext
link_patterns = [(re.compile(
r'((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+(:[0-9]+)?|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)'), r'\1')]
head = "<!DOC... | [
1,
1053,
2791,
3204,
29906,
13,
5215,
337,
13,
5215,
2897,
13,
3166,
2897,
29889,
2084,
1053,
8536,
568,
486,
13,
13,
13,
2324,
29918,
11037,
29879,
353,
17288,
276,
29889,
12198,
29898,
13,
1678,
364,
29915,
3552,
4197,
29909,
29899,
... |
3D_CNNs/S3DG_small.py | Seunghoon-Yi/Paper_review-PyTorch | 2 | 40090 | import torch.nn as nn
import torch
import os
class BasicConv3d(nn.Module):
def __init__(self, in_planes, out_planes, kernel_size, stride, padding=0):
super(BasicConv3d, self).__init__()
self.conv = nn.Conv3d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding, bi... | [
1,
1053,
4842,
305,
29889,
15755,
408,
302,
29876,
30004,
13,
5215,
4842,
305,
30004,
13,
5215,
2897,
30004,
13,
30004,
13,
30004,
13,
1990,
19219,
1168,
29894,
29941,
29881,
29898,
15755,
29889,
7355,
1125,
30004,
13,
1678,
822,
4770,
... |
certbot/certbot/plugins/dns_test_common_lexicon.py | vivithemage/certbot | 3 | 77534 | <gh_stars>1-10
"""Base test class for DNS authenticators built on Lexicon."""
from typing import Any
from typing import TYPE_CHECKING
from unittest.mock import MagicMock
import josepy as jose
from requests.exceptions import HTTPError
from requests.exceptions import RequestException
from certbot import errors
from cer... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
5160,
1243,
770,
363,
16332,
15585,
4097,
4240,
373,
15045,
4144,
1213,
15945,
13,
3166,
19229,
1053,
3139,
13,
3166,
19229,
1053,
323,
6959,
29918,
321... |
bert_multitask_learning/model_fn.py | akashnd/bert-multitask-learning | 0 | 5330 | # AUTOGENERATED! DO NOT EDIT! File to edit: source_nbs/13_model_fn.ipynb (unless otherwise specified).
__all__ = ['variable_summaries', 'filter_loss', 'BertMultiTaskBody', 'BertMultiTaskTop', 'BertMultiTask']
# Cell
from typing import Dict, Tuple
from inspect import signature
import tensorflow as tf
import transform... | [
1,
396,
26524,
29949,
24647,
1001,
3040,
29928,
29991,
11662,
6058,
11488,
29991,
3497,
304,
3863,
29901,
2752,
29918,
29876,
5824,
29914,
29896,
29941,
29918,
4299,
29918,
9144,
29889,
666,
948,
29890,
313,
28952,
6467,
6790,
467,
13,
13,
... |
bmt/util.py | patrickkwang/bmt-lite | 0 | 7722 | """Utilities."""
from functools import wraps
import re
from typing import Callable, List, Optional, TypeVar, Union
from .data import (
all_classes, all_slots,
)
def pascal_to_snake(s: str, sep: str = "_") -> str:
"""Convert Pascal case to snake case.
Assumes that
a) all words are either all-lowercas... | [
1,
9995,
7270,
1907,
1213,
15945,
13,
3166,
2090,
312,
8789,
1053,
11463,
567,
13,
5215,
337,
13,
3166,
19229,
1053,
8251,
519,
29892,
2391,
29892,
28379,
29892,
5167,
9037,
29892,
7761,
13,
13,
3166,
869,
1272,
1053,
313,
13,
1678,
5... |
notebook/book/python/head-first-python/Chapter-6/kelly.py | JMwill/note | 0 | 182772 | def sanitize(time_string):
if '-' in time_string:
spliter = '-'
elif ':' in time_string:
spliter = ':'
else:
return time_string
(mins, secs) = time_string.split(spliter)
return mins + '.' + secs
def get_coach_data(filepath):
try:
with open(filepath) as f:
... | [
1,
822,
9753,
277,
675,
29898,
2230,
29918,
1807,
1125,
13,
1678,
565,
17411,
29915,
297,
931,
29918,
1807,
29901,
13,
4706,
8536,
1524,
353,
17411,
29915,
13,
1678,
25342,
525,
11283,
297,
931,
29918,
1807,
29901,
13,
4706,
8536,
1524,... |
tests/integration/test_logs.py | matthall88/localstack | 1 | 131710 | # -*- coding: utf-8 -*-
import unittest
from localstack.constants import APPLICATION_AMZ_JSON_1_1
from localstack.utils.aws import aws_stack
from localstack.utils import testutil
from localstack.utils.common import short_uid, retry
from localstack.services.awslambda.lambda_api import LAMBDA_RUNTIME_PYTHON36, func_arn
f... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
443,
27958,
13,
3166,
1887,
1429,
29889,
3075,
1934,
1053,
12279,
7390,
28541,
29918,
5194,
29999,
29918,
7249,
29918,
29896,
29918,
29896,
13,
3166,... |
example.py | mpainenz/tnas-client | 0 | 126639 | from connection import api_client
username = 'something'
password = '<PASSWORD>'
carrier_id = '12356'
tnas_connection = api_client.TNASConnection(api_client.TNAS_TEST)
tnas_connection.login(username=username, password=password, carrier_id=carrier_id)
| [
1,
515,
3957,
1053,
7882,
29918,
4645,
13,
13,
6786,
353,
525,
14481,
29915,
13,
5630,
353,
12801,
25711,
17013,
16299,
13,
4287,
4336,
29918,
333,
353,
525,
29896,
29906,
29941,
29945,
29953,
29915,
13,
13,
6277,
294,
29918,
9965,
353,... |
keystone/common/policies/policy.py | rajivmucheli/keystone | 0 | 144676 | # 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... |
virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/cloud/ovirt/ovirt_api_facts.py | lakhlaifi/RedHat-Ansible | 1 | 49697 | <gh_stars>1-10
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING 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,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14187,
1266,
313,
29883,
29... |
stamper/migrations/0004_auto_20161208_1658.py | uploadcare/stump | 0 | 19254 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-12-08 16:58
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('stamper', '0003_auto_20161122_1253'),
... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29929,
29889,
29929,
373,
29871,
29906,
29900,
29896,
29953,
29899,
29896,
29906,
29899,
29900,
29947,
298... |
trimmed_match/design/tests/geo_assignment_test.py | Praneethp09/Geo_Test | 31 | 111224 | <reponame>Praneethp09/Geo_Test
# Copyright 2020 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
1,
529,
276,
1112,
420,
29958,
29925,
10800,
621,
29886,
29900,
29929,
29914,
7999,
29877,
29918,
3057,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
5087,
365,
12182,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380... |
code.py | aashray18521/parallelModifiedGrepPython | 0 | 20068 | import multiprocessing
import os
import time
rootdir = input()
keyword = input()
batch_size = 1
def try_multiple_operations(file_path):
try:
with open(file_path, "rb") as f: # open the file for reading
for line in f: # use: for i, line in enumerate(f) if you need line numbers
... | [
1,
1053,
6674,
307,
985,
292,
13,
5215,
2897,
13,
5215,
931,
13,
13,
4632,
3972,
353,
1881,
580,
13,
26766,
353,
1881,
580,
13,
13,
16175,
29918,
2311,
353,
29871,
29896,
13,
13,
1753,
1018,
29918,
20787,
29918,
3372,
800,
29898,
14... |
demo/infer_demo.py | mrlooi/maskrcnn-benchmark | 344 | 168231 | <filename>demo/infer_demo.py
from maskrcnn_benchmark.config import cfg
from predictor import COCODemo, LOVDemo
import numpy as np
import torch
import torch.nn.functional as F
import glob
import cv2
def expand_boxes(boxes, scale):
w_half = (boxes[:, 2] - boxes[:, 0]) * .5
h_half = (boxes[:, 3] - boxes[:, 1])... | [
1,
529,
9507,
29958,
17482,
29914,
262,
571,
29918,
17482,
29889,
2272,
13,
3166,
11105,
2214,
15755,
29918,
1785,
16580,
29889,
2917,
1053,
274,
16434,
13,
3166,
8500,
272,
1053,
4810,
3217,
23444,
29892,
11247,
10699,
15810,
13,
5215,
1... |
colosseumrl/envs/poker/__init__.py | carletonz/colosseumrl | 8 | 186657 | <filename>colosseumrl/envs/poker/__init__.py
from .KuhnPokerEnvironment import KuhnPokerEnvironment | [
1,
529,
9507,
29958,
1054,
359,
344,
398,
2096,
29914,
264,
4270,
29914,
29886,
17933,
29914,
1649,
2344,
26914,
2272,
13,
3166,
869,
29968,
29884,
3123,
29925,
17933,
18649,
1053,
18185,
3123,
29925,
17933,
18649,
2
] |
scripts/crTestCaseGen.py | VRFamilyMan/CRTest | 0 | 101780 | <filename>scripts/crTestCaseGen.py
#!/usr/bin/env python
import re
import math
import crTemplate
def csvBooleanExpand(csvLineData):
"""Each line which contains 'X' is duplicated and the X replace with 0,1. Only one expansion per line is processed"""
ExpandOccurred = 0
newCsvLineData = []
for line in c... | [
1,
529,
9507,
29958,
16713,
29914,
7283,
3057,
8259,
15462,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
337,
13,
5215,
5844,
13,
5215,
2181,
6733,
13,
13,
1753,
11799,
18146,
29777,
29898,
7638,
35... |
mctl/favicons.py | jgeboski/mctl | 4 | 152808 | <filename>mctl/favicons.py
# Copyright 2012-2020 <NAME> <<EMAIL>>
#
# 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
# to use, copy... | [
1,
529,
9507,
29958,
29885,
16948,
29914,
29888,
485,
27078,
29889,
2272,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
529,
5813,
29958,
3532,
26862,
6227,
6778,
13,
29937,
13,
29937,
20894,
... |
coder_directory_api/auth/__init__.py | seekheart/coder_directory_api | 3 | 101423 | <reponame>seekheart/coder_directory_api<filename>coder_directory_api/auth/__init__.py<gh_stars>1-10
"""
Authorization Package
Copyright (c) 2017 by <NAME>.
MIT License, see LICENSE for details
"""
__all__ = ['check_token', 'token_required', 'make_token', 'refresh_token']
from .jwt_authorization import *
| [
1,
529,
276,
1112,
420,
29958,
344,
1416,
23057,
29914,
29883,
6119,
29918,
12322,
29918,
2754,
29966,
9507,
29958,
29883,
6119,
29918,
12322,
29918,
2754,
29914,
5150,
29914,
1649,
2344,
26914,
2272,
29966,
12443,
29918,
303,
1503,
29958,
... |
gpdist/tanh_saturate.py | saalfeldlab/gunpowder-distances | 0 | 29932 | import logging
import numpy as np
from gunpowder.nodes.batch_filter import BatchFilter
logger = logging.getLogger(__name__)
class TanhSaturate(BatchFilter):
'''Saturate the values of an array to be floats between -1 and 1 by applying the tanh function.
Args:
array (:class:`ArrayKey`):
... | [
1,
1053,
12183,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
13736,
12248,
672,
29889,
18010,
29889,
16175,
29918,
4572,
1053,
350,
905,
5072,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
1990,
15066,
2988... |
create_alert.py | miwiwa/sample-miwalker-no-git-issues | 0 | 126771 | <gh_stars>0
#!/usr/bin/env python
# Program submits PagerDuty incidents or Git issues upon request
import pip
package = 'requests'
pip.main(['install', package])
import requests
import json
import argparse
from os import environ
import subprocess
import re
import collections
import sys
# Read in argument(s)
descript... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
7835,
11834,
1169,
349,
1875,
29928,
329,
29891,
5528,
16719,
470,
11786,
5626,
2501,
2009,
13,
13,
5215,
8450,
13,
5113,
... |
sources/t08/t08ej02.py | workready/pythonbasic | 0 | 34892 | class Empleado(object):
"Clase para definir a un empleado"
def __init__(self, nombre, email):
self.nombre = nombre
self.email = email
def getNombre(self):
return self.nombre
jorge = Empleado("Jorge", "<EMAIL>")
jorge.guapo = "Por supuesto"
# Probando hasattr, getattr, setattr
pri... | [
1,
770,
2812,
552,
912,
29898,
3318,
1125,
13,
1678,
376,
6821,
559,
1702,
7403,
381,
263,
443,
29593,
912,
29908,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
5419,
29892,
4876,
1125,
13,
4706,
1583,
29889,
11522,
1030,
353,
5419,
... |
molmap/data-processing/pubchem/03_statistics_NumOnBits.py | riversdark/bidd-molmap | 75 | 126429 | import numpy as np
import pandas as pd
from tqdm import tqdm
from joblib import Parallel, delayed
import os
bitsize = 1024
total_sample = 110913349
data_save_folder = './data'
file = './data/%s_%s.npy' % (total_sample, bitsize)
f = np.memmap(file, dtype = np.bool, shape = (total_sample, bitsize))
def _sum(memmap... | [
1,
1053,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
3166,
4982,
1982,
1053,
1459,
6553,
29892,
29801,
13,
5215,
2897,
13,
13,
14836,
675,
353,
29871,
29896,
29900,
29906,
299... |
hover/utils/misc.py | phurwicz/hover | 251 | 1608812 | <gh_stars>100-1000
"""Mini-functions that do not belong elsewhere."""
from datetime import datetime
from abc import ABC, abstractmethod
def current_time(template="%Y%m%d %H:%M:%S"):
return datetime.now().strftime(template)
class BaseUnionFind(ABC):
"""
???+ note "Data attached to union-find."
"""
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
15945,
29908,
29924,
2172,
29899,
12171,
393,
437,
451,
6852,
17551,
1213,
15945,
13,
3166,
12865,
1053,
12865,
13,
3166,
25638,
1053,
16417... |
scripts/embed_seqs.py | susiegriggo/ProtvecHierachy | 0 | 68873 | """Code to embed a set of sequences in an embedding space using a trained protvec model and an embedding set of sequences. Creates a .csv file of the embedded sequences. Also returns file of sequences which could not be successfully embedded"""
import pickle
import numpy as np
from Bio import SeqIO
import pandas as ... | [
1,
9995,
3399,
304,
8297,
263,
731,
310,
15602,
297,
385,
23655,
2913,
773,
263,
16370,
17512,
2003,
1904,
322,
385,
23655,
731,
310,
15602,
29889,
6760,
1078,
263,
869,
7638,
934,
310,
278,
15685,
15602,
29889,
3115,
3639,
934,
310,
... |
dtc/message_types/open_orders_request.py | jseparovic/python-ws-dtc-client | 15 | 49627 | <filename>dtc/message_types/open_orders_request.py
from dtc.enums.message_types import MessageTypes
from lib.base_message_type import BaseMessageType
class OpenOrdersRequest(BaseMessageType):
def __init__(self,
request_id=None,
request_all_orders=None,
server_or... | [
1,
529,
9507,
29958,
6008,
29883,
29914,
4906,
29918,
8768,
29914,
3150,
29918,
20488,
29918,
3827,
29889,
2272,
13,
13,
3166,
11636,
29883,
29889,
264,
6762,
29889,
4906,
29918,
8768,
1053,
7777,
10562,
13,
3166,
4303,
29889,
3188,
29918,
... |
rollbar/examples/starlette/app_logger.py | jackton1/pyrollbar | 177 | 132928 | <gh_stars>100-1000
#!/usr/bin/env python
# This example uses Uvicorn package that must be installed. However, it can be
# replaced with any other ASGI-compliant server.
#
# NOTE: Python 3.6 requires aiocontextvars package to be installed.
# Optional asynchronous reporting requires HTTPX package to be installed.
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
29937,
910,
1342,
3913,
501,
26311,
1398,
3577,
393,
1818,
367,
5130,
29889,
2... |
data/quaro/csv_to_tsv.py | Nstats/my_bert | 1 | 1606707 | import re
import pandas as pd
dev_size = 20000
train_dir_csv = './train.csv'
train_balanced_dir_csv = './train_balanced.csv'
dev_dir_csv = './dev.csv'
train_dir_tsv = './train.tsv'
dev_dir_tsv = './dev.tsv'
def remove_link_and_slash_split(sen):
regex_link = r'(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@... | [
1,
1053,
337,
13,
5215,
11701,
408,
10518,
13,
13,
3359,
29918,
2311,
353,
29871,
29906,
29900,
29900,
29900,
29900,
13,
13,
14968,
29918,
3972,
29918,
7638,
353,
19283,
14968,
29889,
7638,
29915,
13,
14968,
29918,
5521,
8362,
29918,
3972... |
myapp/library/cache.py | lalanza808/lza-quart-app | 0 | 152805 | from json import loads as json_loads
from json import dumps as json_dumps
from datetime import timedelta
from redis import Redis
from app.library.market import get_market_data
from app import config
class Cache(object):
def __init__(self):
self.redis = Redis(host=config.REDIS_HOST, port=config.REDIS_POR... | [
1,
515,
4390,
1053,
15376,
408,
4390,
29918,
18132,
13,
3166,
4390,
1053,
270,
17204,
408,
4390,
29918,
29881,
17204,
13,
3166,
12865,
1053,
5335,
287,
2554,
13,
13,
3166,
29825,
1053,
4367,
275,
13,
13,
3166,
623,
29889,
5258,
29889,
... |
feather-rp2040/pio-hx711-driver/hx711/__init__.py | fivesixzero/circuitpython-experiments | 3 | 1611871 | """
`HX711`
====================================================
Driver superclass for the HX711 load cell amplifier/DAC.
* Author(s): <NAME>
Implementation Notes
--------------------
**Driver Subclasses**
* `HX711_GPIO`, works with all boards but may be subject to timing issues
* `HX711_PIO`, works with RP2040's ... | [
1,
9995,
13,
29952,
29950,
29990,
29955,
29896,
29896,
29952,
13,
9166,
9166,
9166,
2751,
13,
13,
12376,
2428,
1990,
363,
278,
379,
29990,
29955,
29896,
29896,
2254,
3038,
20563,
3709,
29914,
29928,
2477,
29889,
13,
13,
29930,
13361,
2989... |
privatise.py | seykuyinu/privatise-spotify-playlists | 1 | 71684 | <reponame>seykuyinu/privatise-spotify-playlists
import sys
import spotipy
import spotipy.util as util
def filter_public(playlist_items):
'''
Returns all public playlsits present in the given playlist array
'''
public_playlists = list(filter(lambda playlist: playlist['public'] == True, playlist_it... | [
1,
529,
276,
1112,
420,
29958,
7759,
2120,
29891,
8675,
29914,
22534,
271,
895,
29899,
17500,
1598,
29899,
1456,
21513,
13,
5215,
10876,
13,
5215,
9758,
666,
29891,
13,
5215,
9758,
666,
29891,
29889,
4422,
408,
3667,
13,
13,
1753,
4175,... |
simpleredial/model/LatentInteractionModels/dual_bert_compare.bak2.py | gmftbyGMFTBY/SimpleReDial-v1 | 36 | 114139 | <reponame>gmftbyGMFTBY/SimpleReDial-v1
from model.utils import *
class BERTDualCompEncoder(nn.Module):
'''This model needs the gray(hard negative) samples, which cannot be used for recall'''
def __init__(self, **args):
super(BERTDualCompEncoder, self).__init__()
model = args['pretrained_m... | [
1,
529,
276,
1112,
420,
29958,
29887,
29885,
615,
1609,
21576,
7818,
22716,
29914,
15427,
1123,
29928,
616,
29899,
29894,
29896,
13,
3166,
1904,
29889,
13239,
1053,
334,
13,
13,
1990,
350,
20161,
29928,
950,
6843,
8566,
6119,
29898,
15755... |
SHM prototype/arima/ma.py | acharaakshit/Structural-Health-Monitoring | 1 | 1617946 | <gh_stars>1-10
import matplotlib.pyplot as plt
from pandas import read_csv
import pandas as pd
import numpy as np
def main():
series = read_csv('/home/akshit/Documents/Downloads/2.csv', header=0, index_col=0, squeeze=True)
series.columns = ['a', 'b', 'c', 'd']
series['e'] = pow((series['a']*series['a'] + series['b... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
11701,
1053,
1303,
29918,
7638,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
166... |
sahara/service/edp/oozie/engine.py | ksshanam/sahara | 161 | 33497 | <gh_stars>100-1000
# Copyright (c) 2014 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29946,
4673,
7264,
10606,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
... |
www/tests/test_browser_html.py | ranjian0/brython | 5,926 | 1617850 | <filename>www/tests/test_browser_html.py
import browser.html as html
assert html.H2 is html.tags['H2']
class MyH1:
pass
html.tags['H1'] = MyH1
assert html.tags['H1'] == html.H1
assert html.tags == html.tags
nb = len(html.tags)
html.tags['GGHHJJ'] = 77
assert len(html.tags) == nb + 1
assert(len(html.tags.items... | [
1,
529,
9507,
29958,
1636,
29914,
21150,
29914,
1688,
29918,
15965,
29918,
1420,
29889,
2272,
13,
5215,
4714,
29889,
1420,
408,
3472,
13,
13,
9294,
3472,
29889,
29950,
29906,
338,
3472,
29889,
11338,
1839,
29950,
29906,
2033,
13,
13,
1990... |
pablo/envs/canvas.py | trstruth/pablo | 0 | 170761 | <reponame>trstruth/pablo<filename>pablo/envs/canvas.py
# coding: utf-8
"""A module for the Canvas where the image will be created
analogous to the environment in a reinforcement learning problem - accepts actions,
performs transformations to the images stored as members, thus updating the environment
and returning a ... | [
1,
529,
276,
1112,
420,
29958,
509,
710,
2806,
29914,
29886,
17877,
29966,
9507,
29958,
29886,
17877,
29914,
264,
4270,
29914,
15257,
29889,
2272,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
15945,
29908,
29909,
3883,
363,
278,
... |
mattspy/stats/__init__.py | beckermr/mattspy | 0 | 134829 | <reponame>beckermr/mattspy
from mad import mad
| [
1,
529,
276,
1112,
420,
29958,
19645,
837,
29878,
29914,
29885,
1131,
1028,
29891,
13,
3166,
10395,
1053,
10395,
13,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.