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 |
|---|---|---|---|---|---|
OOPS_CONCEPT/OOP Principles/class_program_14.py | abhigyan709/dsalgo | 1 | 56391 | <filename>OOPS_CONCEPT/OOP Principles/class_program_14.py
class Mobile:
def __init__(self, brand, price):
print("Inside Constructor")
self.brand = brand
self.price = price
def purchase(self):
print("Purchasing a mobile")
print("The mobile has brand", self.brand, "and pri... | [
1,
529,
9507,
29958,
29949,
4590,
29903,
29918,
6007,
4741,
7982,
29914,
29949,
4590,
14771,
2701,
29914,
1990,
29918,
8860,
29918,
29896,
29946,
29889,
2272,
13,
1990,
21600,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
14982,
298... |
cx_Freeze/hooks.py | xtreme3d/editor | 22 | 65033 | <filename>cx_Freeze/hooks.py<gh_stars>10-100
import os
import sys
def initialize(finder):
"""upon initialization of the finder, this routine is called to set up some
automatic exclusions for various platforms."""
finder.ExcludeModule("FCNTL")
finder.ExcludeModule("os.path")
finder.ExcludeModule(... | [
1,
529,
9507,
29958,
18904,
29918,
20475,
911,
29914,
1251,
12117,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
1753,
11905,
29898,
2886,
261,
1125,
... |
resources/views/Absensi/models/DB.py | Ackyras/KP-LabMM | 0 | 157191 | <filename>resources/views/Absensi/models/DB.py
# %%
# import
import pymysql.cursors
from datetime import date
from models.Asprak import Asprak
# %%
class DB:
def __init__(self, DB_HOST, DB_USER, DB_PASS, DB_NAME):
self.host = DB_HOST
self.name = DB_NAME
self.user = DB_USER
self.pa... | [
1,
529,
9507,
29958,
13237,
29914,
7406,
29914,
4920,
23149,
29875,
29914,
9794,
29914,
4051,
29889,
2272,
13,
29937,
17806,
13,
29937,
1053,
13,
5215,
282,
962,
952,
1519,
29889,
29883,
1295,
943,
13,
3166,
12865,
1053,
2635,
13,
3166,
... |
mylib/web_client.py | mo-han/mo-han-toolbox | 24 | 91452 | <filename>mylib/web_client.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Library for website operation"""
import json
from concurrent.futures.thread import ThreadPoolExecutor
from queue import Queue
from urllib.parse import urlparse, ParseResult
import colorama
import humanize
import lxml.html
import requests.u... | [
1,
529,
9507,
29958,
1357,
1982,
29914,
2676,
29918,
4645,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
12284,
363... |
dl_l8s2_uv/satreaders/l8image.py | csaybar/DL-L8S2-UV | 13 | 47882 | <gh_stars>10-100
"""
Classes and functions for reading L8 images and manually annotated cloud masks from the Biome and 38-Cloud
cloud cover dataset.
https://landsat.usgs.gov/landsat-8-cloud-cover-assessment-validation-data
"""
import os
from datetime import datetime
from datetime import timezone
import numpy as np
i... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
15945,
29908,
13,
27403,
322,
3168,
363,
5183,
365,
29947,
4558,
322,
7522,
9732,
630,
9570,
11105,
29879,
515,
278,
3457,
608,
322,
29871,
29941,
29947... |
extract_code.py | sajjad2014/vq-vae-2-pytorch | 1,007 | 199465 | <filename>extract_code.py
import argparse
import pickle
import torch
from torch.utils.data import DataLoader
from torchvision import transforms
import lmdb
from tqdm import tqdm
from dataset import ImageFileDataset, CodeRow
from vqvae import VQVAE
def extract(lmdb_env, loader, model, device):
inde... | [
1,
529,
9507,
29958,
21111,
29918,
401,
29889,
2272,
13,
5215,
1852,
5510,
30004,
13,
5215,
5839,
280,
30004,
13,
30004,
13,
5215,
4842,
305,
30004,
13,
3166,
4842,
305,
29889,
13239,
29889,
1272,
1053,
3630,
10036,
30004,
13,
3166,
484... |
tests/unit/downloader/test_data_collector.py | ebi-ait/ingest-client | 0 | 62483 | import json
import os
import unittest
from unittest.mock import MagicMock
from ingest.api.ingestapi import IngestApi
from ingest.downloader.data_collector import DataCollector
class DataCollectorTest(unittest.TestCase):
def setUp(self) -> None:
self.maxDiff = None
self.mock_ingest_api = MagicMoc... | [
1,
1053,
4390,
13,
5215,
2897,
13,
5215,
443,
27958,
13,
3166,
443,
27958,
29889,
17640,
1053,
26494,
18680,
13,
13,
3166,
2348,
342,
29889,
2754,
29889,
292,
342,
2754,
1053,
512,
7118,
11713,
13,
3166,
2348,
342,
29889,
10382,
261,
... |
insta/forms.py | Samfan01/instagram | 0 | 1606332 | <gh_stars>0
from django import forms
from .models import Image,Profile,Comment
class ImageForm(forms.ModelForm):
class Meta:
model = Image
fields = ('image_name','image_caption','image')
widgets = {
'image_name': forms.TextInput(attrs = {'class': 'form-control'}),
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
9557,
1053,
7190,
13,
3166,
869,
9794,
1053,
7084,
29892,
13909,
29892,
20001,
13,
13,
1990,
7084,
2500,
29898,
9514,
29889,
3195,
2500,
1125,
13,
1678,
770,
20553,
29901,
13,
470... |
backend/portal/management/commands/load_target_populations.py | pennlabs/student-life | 7 | 156859 | <filename>backend/portal/management/commands/load_target_populations.py
import requests
from django.core.management.base import BaseCommand
from django.utils import timezone
from portal.models import TargetPopulation
class Command(BaseCommand):
def handle(self, *args, **kwargs):
# loads majors, years, sc... | [
1,
529,
9507,
29958,
27852,
29914,
25089,
29914,
21895,
29914,
26381,
29914,
1359,
29918,
5182,
29918,
7323,
8250,
29889,
2272,
13,
5215,
7274,
13,
3166,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
13,
3166,
9557,
29889,... |
app/src/main/python/menu.py | 108360224/watch_video | 0 | 1605327 | <reponame>108360224/watch_video<gh_stars>0
# -*- coding: utf-8 -*-
"""
Created on Sat May 2 10:47:12 2020
@author: max
"""
from bs4 import BeautifulSoup
import requests
import re
class Menu():
def __init__(self,URL='http://www.99kubo.tv'):
html = requests.get(URL).text
self.soup = BeautifulSoup(h... | [
1,
529,
276,
1112,
420,
29958,
29896,
29900,
29947,
29941,
29953,
29900,
29906,
29906,
29946,
29914,
12344,
29918,
9641,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930... |
radvel/basis.py | lgbouma/radvel | 0 | 68067 | <reponame>lgbouma/radvel
import numpy as np
import pandas as pd
from collections import OrderedDict
from radvel.orbit import timeperi_to_timetrans, timetrans_to_timeperi
import radvel.model
BASIS_NAMES = ['per tp e w k', # The synth basis
'per tc secosw sesinw logk',
'per tc secosw sesi... | [
1,
529,
276,
1112,
420,
29958,
19920,
29890,
283,
655,
29914,
3665,
955,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
3166,
2971,
955,
29889,
272,
2966,
1053,
931,
546,
29875,
2... |
pyScripts/crawlers_and_extraction/extraction_of_domain_doi.py | felipecuetor/WebSemantica_Proyecto | 0 | 72507 | <filename>pyScripts/crawlers_and_extraction/extraction_of_domain_doi.py
from selenium import webdriver
import time
import re
#from selenium.webdriver.common.keys import keys
def clean_string(str_to_clean):
clean_str = str_to_clean
clean_str = clean_str.replace(":", "<#><#>")
clean_str = clean_str.replace("... | [
1,
529,
9507,
29958,
2272,
4081,
29879,
29914,
29883,
1610,
9306,
29918,
392,
29918,
1062,
13857,
29914,
1062,
13857,
29918,
974,
29918,
7247,
29918,
1867,
29875,
29889,
2272,
13,
3166,
18866,
1053,
1856,
9465,
13,
5215,
931,
13,
5215,
33... |
bwgpt2/workspace.py | daemon/bungeeweb-gpt2 | 0 | 75474 | <gh_stars>0
UUID_RESOLVE_FILENAME = 'uuid-resolv.json'
CHAT_LOG_FILENAME = 'chat-log.tsv' | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29965,
11150,
29918,
15989,
5607,
12064,
29918,
7724,
5813,
353,
525,
25118,
29899,
9778,
29894,
29889,
3126,
29915,
13,
3210,
1299,
29918,
14480,
29918,
7724,
5813,
353,
525,
13496,
29899,... |
pymtl3/passes/rtlir/behavioral/BehavioralRTLIRTypeCheckL2Pass.py | mondO/pymtl3 | 0 | 1613979 | <reponame>mondO/pymtl3
#=========================================================================
# BehavioralRTLIRTypeCheckL2Pass.py
#=========================================================================
# Author : <NAME>
# Date : March 29, 2019
"""Provide L2 behavioral RTLIR type check pass."""
from collection... | [
1,
529,
276,
1112,
420,
29958,
8315,
29949,
29914,
29886,
962,
15206,
29941,
13,
29937,
9166,
9166,
9166,
9166,
4936,
29922,
13,
29937,
1522,
16300,
284,
13079,
5265,
29934,
1542,
5596,
29931,
29906,
7129,
29889,
2272,
13,
29937,
9166,
91... |
platform_disk_api/utils.py | neuro-inc/platform-disk-api | 0 | 155720 | from datetime import datetime, timedelta, timezone
def utc_now() -> datetime:
return datetime.now(timezone.utc)
def datetime_dump(dt: datetime) -> str:
return str(dt.timestamp())
def datetime_load(raw: str) -> datetime:
return datetime.fromtimestamp(float(raw), timezone.utc)
def timedelta_dump(td: t... | [
1,
515,
12865,
1053,
12865,
29892,
5335,
287,
2554,
29892,
29431,
13,
13,
13,
1753,
3477,
29883,
29918,
3707,
580,
1599,
12865,
29901,
13,
1678,
736,
12865,
29889,
3707,
29898,
2230,
8028,
29889,
329,
29883,
29897,
13,
13,
13,
1753,
128... |
wongkar_selling/wongkar_selling/doctype/rule/rule.py | Wahyulutfi97/wongkar_selling | 0 | 59067 | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Wongkar and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class Rule(Document):
def validate(self):
frappe.msgprint("after_insert")
# manufacture = frapp... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29896,
29892,
399,
549,
5689,
322,
17737,
29560,
13,
29937,
1152,
19405,
2472,
29892,
31... |
tensorflow/python/util/tf_should_use_test.py | npow/tensorflow | 0 | 4904 | # 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/licenses/LICENSE-2.0
#
# Unless required by applica... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
450,
323,
6073,
17907,
13189,
943,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
15... |
src/evaluators/parser_evaluator.py | shigashiyama/seikanlp | 4 | 114323 | import sys
from evaluators.common import AccuracyEvaluator, DoubleAccuracyEvaluator
class ParserEvaluator(AccuracyEvaluator):
def __init__(self, ignore_head=True):
super().__init__(ignore_head=ignore_head, ignored_labels=set())
class TypedParserEvaluator(DoubleAccuracyEvaluator):
def __init__(self,... | [
1,
1053,
10876,
13,
13,
3166,
6161,
4097,
29889,
9435,
1053,
4831,
332,
4135,
29923,
4387,
1061,
29892,
11599,
7504,
332,
4135,
29923,
4387,
1061,
13,
13,
13,
1990,
1459,
643,
29923,
4387,
1061,
29898,
7504,
332,
4135,
29923,
4387,
1061... |
graphql_subscription_manager/__init__.py | Danielhiversen/PyGraphqlWebsocketManager | 0 | 26288 | """Subscription manager for Graph QL websocket."""
import asyncio
import json
import logging
import socket
import sys
from time import time
import pkg_resources
import websockets
_LOGGER = logging.getLogger(__name__)
STATE_STARTING = "starting"
STATE_RUNNING = "running"
STATE_STOPPED = "stopped"
try:
VERSION =... | [
1,
9995,
4035,
22371,
8455,
363,
12367,
660,
29931,
1856,
11514,
1213,
15945,
13,
13,
5215,
408,
948,
3934,
13,
5215,
4390,
13,
5215,
12183,
13,
5215,
9909,
13,
5215,
10876,
13,
3166,
931,
1053,
931,
13,
13,
5215,
282,
9415,
29918,
... |
livestyled/tests/test_resource_screens.py | livestyled/python-sdk | 0 | 1600662 | import os
import time
from livestyled.models import Screen, Widget, WidgetVariation
from livestyled.resource_client import LiveStyledResourceClient
from livestyled.tests.utils import configure_mock_responses
FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixtures')
TEST_API_DOMAIN = 'test.livestyled.com'
CO... | [
1,
1053,
2897,
13,
5215,
931,
13,
13,
3166,
7294,
14596,
839,
29889,
9794,
1053,
22666,
29892,
27080,
29892,
27080,
10444,
362,
13,
3166,
7294,
14596,
839,
29889,
10314,
29918,
4645,
1053,
10782,
855,
29891,
839,
6848,
4032,
13,
3166,
7... |
text_util.py | liuzl/nlp4econ | 3 | 113669 | #encoding=utf-8
import re
RE_SEN_SPLITER = u"(.+?(\r|\n|。|!|!|\?|?|;|;|……))"
def get_sentences(text):
if not isinstance(text, (unicode,)): return []
s = re.sub(RE_SEN_SPLITER, lambda x: x.group(0)+"\t", text)
return [x.strip() for x in s.split('\t') if x.strip() != '']
if __name__ == "__main__":
tex... | [
1,
396,
22331,
29922,
9420,
29899,
29947,
13,
5215,
337,
13,
13,
1525,
29918,
29903,
1430,
29918,
5550,
29931,
1806,
1001,
353,
318,
29908,
11891,
29974,
29973,
1194,
29878,
4295,
29876,
29989,
30267,
29989,
29991,
29989,
30584,
4295,
29973... |
fibonacci_sphere.py | GRASBOCK/fibonacci-sphere-section | 0 | 184594 | from math import ceil, floor
import numpy as np
from BoundingBox import BoundingBox
def fibonacci_sphere_section(num_points_whole_sphere: int, bbox: BoundingBox):
lat_min, lat_max, lon_min, lon_max = bbox.lat_min, bbox.lat_max, bbox.lon_min, bbox.lon_max
#print("lat_min: {}, lat_max: {}, lon_min: {}, lon_max: ... | [
1,
515,
5844,
1053,
2257,
309,
29892,
11904,
13,
5215,
12655,
408,
7442,
13,
3166,
350,
12449,
3313,
1053,
350,
12449,
3313,
13,
13,
1753,
18755,
265,
21566,
29918,
29879,
9085,
29918,
2042,
29898,
1949,
29918,
9748,
29918,
15970,
280,
... |
unittests/test_cases.py | arieltrevisan/python-3-from-scratch-practices | 0 | 112294 | <reponame>arieltrevisan/python-3-from-scratch-practices
import unittest as ut
"""
https://docs.python.org/3/library/unittest.html#test-discovery
"""
class TestClassOne(ut.TestCase):
@classmethod
def setUpClass(cls):
# print("setupClass")
pass
@classmethod
def tearDownClass(cls):
... | [
1,
529,
276,
1112,
420,
29958,
279,
709,
2484,
1730,
273,
29914,
4691,
29899,
29941,
29899,
3166,
29899,
10526,
905,
29899,
29886,
1461,
1575,
13,
5215,
443,
27958,
408,
3477,
13,
13,
15945,
29908,
13,
13,
991,
597,
2640,
29889,
4691,
... |
src/metemcyber/core/bc/catalog.py | soum-kazuaki/metemcyber | 11 | 51262 | #
# Copyright 2021, NTT Communications Corp.
#
# 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 applic... | [
1,
396,
13,
29937,
1678,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
29892,
405,
19988,
22365,
800,
2994,
29886,
29889,
13,
29937,
13,
29937,
1678,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
15... |
greengraph/commands.py | ernestwcl/greengraph | 0 | 116560 | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from greengraph import Greengraph
from map import Map
def process():
parser = ArgumentParser(description = "Create a graph showing number of green pixels between two locations on a satellite image")
parser.add_argument('--origin', h... | [
1,
515,
1852,
5510,
1053,
23125,
11726,
13,
3166,
22889,
1053,
11451,
5317,
408,
14770,
13,
3166,
1395,
996,
1140,
1053,
4122,
996,
1140,
13,
3166,
2910,
1053,
7315,
13,
13,
1753,
1889,
7295,
13,
13,
1678,
13812,
353,
23125,
11726,
29... |
Semester 6/MA 322 (Scientific Computing Theory)/Labs/Lab 7/Code/q7.py | Imperial-lord/IITG | 4 | 42848 | # Question 07, Lab 07
# AB Satyaprakash, 180123062
# imports
import pandas as pd
import numpy as np
# functions
def f(t, y):
return y - t**2 + 1
def F(t):
return (t+1)**2 - 0.5*np.exp(t)
def RungeKutta4(t, y, h):
k1 = f(t, y)
k2 = f(t+h/2, y+h*k1/2)
k3 = f(t+h/2, y+h*k2/2)
k4 = f(t+h, y+... | [
1,
396,
894,
29871,
29900,
29955,
29892,
12016,
29871,
29900,
29955,
13,
29937,
17571,
317,
11156,
481,
4442,
1161,
29892,
29871,
29896,
29947,
29900,
29896,
29906,
29941,
29900,
29953,
29906,
13,
13,
29937,
24802,
13,
5215,
11701,
408,
105... |
python-algorithm/leetcode/problem_69.py | isudox/nerd-algorithm | 5 | 139975 | <reponame>isudox/nerd-algorithm
"""69. Sqrt(x)
https://leetcode.com/problems/sqrtx/
Implement int sqrt(int x).
Compute and return the square root of x, where x is guaranteed to be a
non-negative integer.
Since the return type is an integer, the decimal digits are truncated and
only the integer part of the result is ... | [
1,
529,
276,
1112,
420,
29958,
275,
566,
2251,
29914,
1089,
29881,
29899,
20567,
13,
15945,
29908,
29953,
29929,
29889,
317,
29939,
2273,
29898,
29916,
29897,
13,
991,
597,
280,
300,
401,
29889,
510,
29914,
17199,
29879,
29914,
3676,
2991... |
esp/4_digit_7_segment.py | steve9164/micropython_quokka | 3 | 82235 | import machine
spi = machine.SPI(1)
spi.init(baudrate=1000000)
rclk = machine.Pin(15, machine.Pin.OUT)
rclk.off()
ZERO = 0b00111111
ONE = 0b00000110
TWO = 0b01011011
THREE = 0b01001111
FOUR = 0b01100110
FIVE = 0b01101101
SIX = 0b01111101
SEVEN = 0b00000111
EIGHT = 0b01111111
NINE = 0b01101111
digits = [ZER... | [
1,
1053,
4933,
13,
13,
1028,
29875,
353,
4933,
29889,
29903,
2227,
29898,
29896,
29897,
13,
1028,
29875,
29889,
2344,
29898,
2291,
566,
10492,
29922,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29897,
13,
29878,
20495,
353,
4933,
29889... |
today/models.py | wwj718/xiguaforvps | 1 | 167185 | <gh_stars>1-10
#coding=utf-8
from time import time
from urlparse import urlparse
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from mezzanine.core.models import Displayable, Ownable
from mezzanine.generic.models import Rating
from mezzanine.generic.fi... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
29883,
3689,
29922,
9420,
29899,
29947,
13,
3166,
931,
1053,
931,
13,
3166,
3142,
5510,
1053,
3142,
5510,
13,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
31... |
Problem 59.py | mmax5/project-euler | 0 | 60211 | import sys
__author__ = 'mikemax'
text = open('p059_cipher.txt').read(-1)
weights = {}
sums = {}
string = {}
for a in range(97, 122):
for b in range(97, 122):
for c in range(97, 122):
weights[(a << 16) + (b << 8) + c] = 0
sums[(a << 16) + (b << 8) + c] = 0
string[(a <<... | [
1,
1053,
10876,
13,
13,
1649,
8921,
1649,
353,
525,
29885,
638,
331,
1165,
29915,
13,
726,
353,
1722,
877,
29886,
29900,
29945,
29929,
29918,
455,
8096,
29889,
3945,
2824,
949,
6278,
29896,
29897,
13,
13,
705,
5861,
353,
6571,
13,
208... |
google/home/enterprise/sdm/v1/enterprise-sdm-v1-py/google/home/enterprise/sdm_v1/services/smart_device_management_service/client.py | googleapis/googleapis-gen | 7 | 94883 | <gh_stars>1-10
# -*- coding: utf-8 -*-
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | [
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,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
5087,
365,
12182,
13,
29937,
... |
gslib/tests/test_stet_util.py | ttobisawa/gsutil | 0 | 8863 | <reponame>ttobisawa/gsutil<filename>gslib/tests/test_stet_util.py
# -*- coding: utf-8 -*-
# Copyright 2021 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#... | [
1,
529,
276,
1112,
420,
29958,
16461,
18809,
10011,
29914,
3174,
4422,
29966,
9507,
29958,
3174,
1982,
29914,
21150,
29914,
1688,
29918,
303,
300,
29918,
4422,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
44... |
app.py | Terrence-Cummings/sqlalchemy-challenge | 0 | 38799 | #Dependencies, libraries, and imports
from matplotlib import style
style.use('fivethirtyeight')
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import datetime as dt
#SQLalchemy libraries and functions
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import S... | [
1,
396,
8498,
7158,
29892,
9562,
29892,
322,
24802,
13,
3166,
22889,
1053,
3114,
13,
3293,
29889,
1509,
877,
29888,
440,
621,
13163,
29872,
523,
1495,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
5215,... |
legacy_code/tf_cnn_siamese/model.py | PerryXDeng/project_punyslayer | 2 | 7297 | import legacy_code.tf_cnn_siamese.configurations as conf
import tensorflow as tf
import numpy as np
def construct_cnn(x, conv_weights, conv_biases, fc_weights, fc_biases,
dropout = False):
"""
constructs the convolution graph for one image
:param x: input node
:param conv_weights: convolutio... | [
1,
1053,
25000,
29918,
401,
29889,
13264,
29918,
29883,
15755,
29918,
1039,
314,
968,
29889,
2917,
332,
800,
408,
1970,
13,
5215,
26110,
408,
15886,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
3386,
29918,
29883,
15755,
29898,
29916,
... |
src/temp2.py | FabBrolMons/frbayart | 0 | 238 | from w1thermsensor import W1ThermSensor
sensor = W1ThermSensor()
temperature_in_celsius = sensor.get_temperature()
temperature_in_fahrenheit = sensor.get_temperature(W1ThermSensor.DEGREES_F)
temperature_in_all_units = sensor.get_temperatures([W1ThermSensor.DEGREES_C, W1ThermSensor.DEGREES_F, W1ThermSensor.KELVIN])
pri... | [
1,
515,
281,
29896,
721,
1516,
6073,
1053,
399,
29896,
1349,
837,
29903,
6073,
13,
13,
29879,
6073,
353,
399,
29896,
1349,
837,
29903,
6073,
580,
13,
12863,
1535,
29918,
262,
29918,
2242,
1039,
375,
353,
23530,
29889,
657,
29918,
12863,... |
cms/migrations/0006_auto_20170122_1545.py | josemlp91/django-landingcms | 0 | 10310 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-22 15:45
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('content', '0002_auto_20170122_1509'),
('cms', '0005... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29896,
29900,
29889,
29945,
373,
29871,
29906,
29900,
29896,
29955,
29899,
29900,
29896,
29899,
29906,
299... |
pypeflow/plugins/contrib/__init__.py | pypeflow/pypeflow | 2 | 59721 | # coding: utf-8
from __future__ import unicode_literals
__author__ = 'gleber'
| [
1,
396,
14137,
29901,
23616,
29899,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
1649,
8921,
1649,
353,
525,
6234,
495,
29915,
13,
2
] |
src/main/9.tuning_parameters.py | Peter-32/bank_customer | 0 | 154066 | # Add this project to the path
import os; import sys; currDir = os.path.dirname(os.path.realpath("__file__"))
rootDir = os.path.abspath(os.path.join(currDir, '..')); sys.path.insert(1, rootDir)
# Warnings
import warnings
warnings.filterwarnings("ignore")
# My modules
from features.build_features import *
# Public mo... | [
1,
396,
3462,
445,
2060,
304,
278,
2224,
13,
5215,
2897,
29936,
1053,
10876,
29936,
16256,
9170,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
6370,
2084,
703,
1649,
1445,
1649,
5783,
13,
4632,
9170,
353,
2897,
2... |
images.py | tikurahul/Inkplate-6-micropython | 21 | 123007 | <gh_stars>10-100
# https://javl.github.io/image2cpp/
# 40x40
CALENDAR_40_40 = bytearray([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x1c, 0x00, 0x00,
0x38, 0x00, 0x1c, 0x00, 0x00, 0x3c, 0x00, 0x1c, 0x00, 0x01, 0xff, 0xff, 0xff, 0x80, 0x03, 0xff,
0xff, 0xff, 0xc0, 0x07, ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
13,
29937,
2045,
597,
9494,
29880,
29889,
3292,
29889,
601,
29914,
3027,
29906,
8223,
29914,
13,
13,
29937,
29871,
29946,
29900,
29916,
29946,
29900,
13,
... |
python/displaywidget.py | karlssonper/gpuip | 10 | 31259 | <reponame>karlssonper/gpuip
from PySide import QtGui, QtOpenGL, QtCore
from OpenGL import GL
from OpenGL import GL
from OpenGL.GL import shaders
from OpenGL.arrays import vbo
from OpenGL.GL.ARB import texture_rg
from OpenGL.GL.ARB import half_float_vertex
from ctypes import c_void_p
import numpy
import math
vert_src =... | [
1,
529,
276,
1112,
420,
29958,
5689,
29880,
12371,
546,
29914,
29887,
3746,
666,
13,
3166,
10772,
23908,
1053,
14705,
28707,
29892,
14705,
6585,
7239,
29892,
14705,
9203,
13,
3166,
29508,
1053,
12729,
13,
3166,
29508,
1053,
12729,
13,
316... |
taburu/event.py | TRI-AMDD/taburu | 0 | 60727 | <reponame>TRI-AMDD/taburu
# Copyright (c) 2019 Toyota Research Institute
import abc
from datetime import datetime
from monty.json import MSONable
class Event(abc.ABC):
def __init__(self, time=None):
self._time = time or datetime.utcnow().isoformat()
# TODO: more descriptive name, populate space?
class P... | [
1,
529,
276,
1112,
420,
29958,
29911,
3960,
29899,
5194,
7858,
29914,
3891,
20144,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29929,
29411,
4616,
10550,
8907,
13,
5215,
25638,
13,
3166,
12865,
1053,
12865,
13,
... |
odoo/addons/base/tests/test_ir_http.py | jjiege/odoo | 0 | 78159 | # -*- coding: utf-8 -*-
from odoo.tests import common
import odoo
GIF = b"R0lGODdhAQABAIAAAP///////ywAAAAAAQABAAACAkQBADs="
class test_ir_http_mimetype(common.TransactionCase):
def test_ir_http_mimetype_attachment(self):
""" Test mimetype for attachment """
attachment = self.env['ir.attachment'... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
288,
1867,
29877,
29889,
21150,
1053,
3619,
13,
5215,
288,
1867,
29877,
13,
13,
29954,
6545,
353,
289,
29908,
29934,
29900,
29880,
29954,
13668... |
TwitterModule/tweet_complaint.py | CFGIndia20/team-19 | 0 | 176088 | <reponame>CFGIndia20/team-19<filename>TwitterModule/tweet_complaint.py
class TweetComplaint:
def __init__(self, complain_text, city, state, tweet_id, username, image_url):
self.complain_text = complain_text
self.tweet_id = tweet_id
self.username = username
self.city = city
s... | [
1,
529,
276,
1112,
420,
29958,
9207,
29954,
2568,
423,
29906,
29900,
29914,
14318,
29899,
29896,
29929,
29966,
9507,
29958,
27418,
5171,
7355,
29914,
29873,
16668,
29918,
2388,
433,
524,
29889,
2272,
13,
1990,
323,
16668,
6843,
433,
524,
... |
funcoes.py | ZezaoDev/Circtrigo | 0 | 3294 | <reponame>ZezaoDev/Circtrigo
import turtle as t
import math
class circTrigo:
def __init__(self):
self.raio = 0
self.grau = 0
self.seno = 0
self.cosseno = 0
self.tangente = 0
self.quadrante = 0
self.tema = ''
t.bgcolor("black")
t.pencolor("wh... | [
1,
529,
276,
1112,
420,
29958,
24625,
1362,
29877,
16618,
29914,
29907,
381,
9988,
5973,
13,
5215,
260,
4227,
280,
408,
260,
13,
5215,
5844,
13,
13,
13,
1990,
3449,
2308,
5973,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
... |
Notatki/Obliczenia-naukowe/NumPy/NumPy.py | bzglinicki/python-trainin | 1 | 150909 | # Programowanie I R
# Pakiet NumPy
import numpy as np
arr_list = np.array([1, 2, 3, 4, 5])
print(arr_list)
print(type(arr_list))
print()
arr_tuple = np.array((1, 2, 3, 4, 5))
print(arr_tuple)
print(type(arr_tuple))
print()
arr = np.array(42)
print(arr)
print(arr.ndim)
print()
arr = np.array([[1, 2, 3], [4, 5, 6]... | [
1,
396,
7835,
21752,
306,
390,
13,
29937,
14371,
2035,
11848,
19737,
13,
13,
5215,
12655,
408,
7442,
13,
13,
2749,
29918,
1761,
353,
7442,
29889,
2378,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
298... |
setup.py | srini009/reducer | 0 | 1616943 | <gh_stars>0
import os
import shutil
import re
import sys
def replace_in_file(filename, mapping):
print('==> Editing '+filename)
infile = open(filename)
outfile = open(filename+'.tmp', 'w+')
for line in infile:
for k, v in mapping.items():
line = line.replace(k, v)
outfile.w... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2897,
13,
5215,
528,
4422,
13,
5215,
337,
13,
5215,
10876,
13,
13,
13,
1753,
5191,
29918,
262,
29918,
1445,
29898,
9507,
29892,
10417,
1125,
13,
1678,
1596,
877,
1360,
29958,
76... |
core/management/commands/gendoc.py | klebed/esdc-ce | 97 | 44962 | import os
import re
import shutil
from ._base import DanubeCloudCommand, CommandOption, CommandError, lcd
class Command(DanubeCloudCommand):
help = 'Generate documentation files displayed in GUI.'
DOC_REPO = 'https://github.com/erigones/esdc-docs.git'
DOC_TMP_DIR = '/var/tmp/esdc-docs'
options = (
... | [
1,
1053,
2897,
13,
5215,
337,
13,
5215,
528,
4422,
13,
13,
3166,
869,
29918,
3188,
1053,
3951,
4003,
20442,
6255,
29892,
10516,
8375,
29892,
10516,
2392,
29892,
301,
2252,
13,
13,
13,
1990,
10516,
29898,
18529,
4003,
20442,
6255,
1125,
... |
arc004_a.py | Lockdef/kyopro-code | 0 | 167238 | import math
n = int(input())
s = [list(map(int, input().split())) for _ in range(n)]
ans = 0
for i in range(n):
for j in range(i+1, n):
x_i = s[i][0]
y_i = s[i][1]
x_j = s[j][0]
y_j = s[j][1]
ans = max(ans, math.sqrt((x_i - x_j)**2 + (y_i - y_j)**2))
print(ans)
| [
1,
1053,
5844,
13,
13,
29876,
353,
938,
29898,
2080,
3101,
13,
29879,
353,
518,
1761,
29898,
1958,
29898,
524,
29892,
1881,
2141,
5451,
22130,
363,
903,
297,
3464,
29898,
29876,
4638,
13,
13,
550,
353,
29871,
29900,
13,
13,
13,
1454,
... |
783-minimum-distance-between-bst-nodes/783-minimum-distance-between-bst-nodes.py | hyeseonko/LeetCode | 2 | 19880 | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def minDiffInBST(self, root: Optional[TreeNode]) -> int:
output=[]
stack=[root]
whil... | [
1,
396,
21940,
363,
263,
7581,
5447,
2943,
29889,
13,
29937,
770,
15472,
4247,
29901,
13,
29937,
268,
822,
4770,
2344,
12035,
1311,
29892,
659,
29922,
29900,
29892,
2175,
29922,
8516,
29892,
1492,
29922,
8516,
1125,
13,
29937,
308,
1583,
... |
nodes/swagger_server/models/job_simulator_opts.py | rdbox-intec/r2s2_for_rostest | 0 | 44990 | <filename>nodes/swagger_server/models/job_simulator_opts.py<gh_stars>0
# coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class JobSi... | [
1,
529,
9507,
29958,
18010,
29914,
2774,
9921,
29918,
2974,
29914,
9794,
29914,
9057,
29918,
3601,
9183,
29918,
25707,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
3166,
47... |
src/python/turicreate/toolkits/drawing_classifier/drawing_classifier.py | Bpowers4/turicreate | 1 | 145383 | <reponame>Bpowers4/turicreate<filename>src/python/turicreate/toolkits/drawing_classifier/drawing_classifier.py
# -*- coding: utf-8 -*-
# Copyright © 2019 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource... | [
1,
529,
276,
1112,
420,
29958,
29933,
12248,
414,
29946,
29914,
29873,
332,
293,
3015,
29966,
9507,
29958,
4351,
29914,
4691,
29914,
29873,
332,
293,
3015,
29914,
10154,
29895,
1169,
29914,
4012,
292,
29918,
1990,
3709,
29914,
4012,
292,
... |
main/models.py | LeonDante-ctrl/danterev | 0 | 1617187 | from django.db import models
class Award(models.Model):
name=models.CharField(max_length=300)
description=models.TextField(max_length=5000)
developer=models.CharField(max_length=300)
created_date=models.DateField()
averangeRating=models.FloatField(default=0)
image=models.URLField(default=... | [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
13,
13,
1990,
7526,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
29922,
9794,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29941,
29900,
29900,
29897,
13,
1678,
6139,
29922,
9794,
29889,
157... |
python/course/leetcode/leetcode.py | TimVan1596/ACM-ICPC | 1 | 30951 | # -*- coding:utf-8 -*-
# @Time:2020/6/15 11:38
# @Author:TimVan
# @File:leetcode.py
# @Software:PyCharm
# Definition for singly-linked list.
# for j in range(10, 5, -1):
# print(j)
print('a'.find(' '))
| [
1,
396,
448,
29930,
29899,
14137,
29901,
9420,
29899,
29947,
448,
29930,
29899,
13,
29937,
732,
2481,
29901,
29906,
29900,
29906,
29900,
29914,
29953,
29914,
29896,
29945,
29871,
29896,
29896,
29901,
29941,
29947,
13,
29937,
732,
13720,
29901... |
bigml/tests/create_external_steps.py | pertinkoira/python | 0 | 59950 | <filename>bigml/tests/create_external_steps.py<gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2020-2022 BigML
#
# 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/l... | [
1,
529,
9507,
29958,
3752,
828,
29914,
21150,
29914,
3258,
29918,
23176,
29918,
24530,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
... |
MRC/q.py | alinghi/AI-Portfolio-Hub | 0 | 79867 | <gh_stars>0
from datasets import (
Dataset,
load_from_disk,
concatenate_datasets,
)
org_dataset = load_from_disk("data/test_dataset")
tt=org_dataset["validation"]
f=open("./question.csv","w")
for idx,i in enumerate(tt):
f.write("\t ".join([str(idx+1),i["id"],i["question"]])+"\n")
f.close()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
20035,
1053,
313,
13,
1678,
13373,
24541,
29892,
13,
1678,
2254,
29918,
3166,
29918,
20960,
29892,
13,
1678,
16125,
403,
29918,
14538,
1691,
29892,
13,
29897,
13,
990,
29918,
24713,... |
Chapter 13/stableSpiral.py | hsauro/PathwayModelingBook | 2 | 137270 | <reponame>hsauro/PathwayModelingBook
import numpy as np
import matplotlib.pyplot as plt
import tellurium as te
Y, X = np.mgrid[-4:4:100j, -4:4:100j]
r = te.loada('''
x' = -0.5*x - y;
y' = x - y;
x = 4; y = -4;
''')
m = r.simulate (0, 8, 100)
U = -0.5*X - Y
V = X - Y
plt.subplots(1,2, figsize=(1... | [
1,
529,
276,
1112,
420,
29958,
9499,
585,
307,
29914,
2605,
1582,
3195,
292,
10967,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
2649,
332,
1974,
408,
734,
13,
13,
29979,
29892,
1060,
353,
7442... |
GPBlend/dct_module.py | GuardSkill/ImageBlend | 0 | 92083 | <filename>GPBlend/dct_module.py
import time
import torch
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import numbers
import numpy as np
class dctmodule(nn.Module):
def __init__(self, shape):
super(dctmodule, self).__init__()
N = shape[-1]
k = torch.nn.Pa... | [
1,
529,
9507,
29958,
19903,
10358,
355,
29914,
29881,
312,
29918,
5453,
29889,
2272,
13,
5215,
931,
13,
13,
5215,
4842,
305,
13,
5215,
5844,
13,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
... |
sets-add.py | limeonion/Python-Programming | 0 | 19550 | <reponame>limeonion/Python-Programming
'''
f we want to add a single element to an existing set, we can use the .add() operation.
It adds the element to the set and returns 'None'.
Example
>>> s = set('HackerRank')
>>> s.add('H')
>>> print s
set(['a', 'c', 'e', 'H', 'k', 'n', 'r', 'R'])
>>> print s.add('HackerRank')... | [
1,
529,
276,
1112,
420,
29958,
28046,
265,
291,
29914,
11980,
29899,
9283,
4056,
13,
12008,
13,
29888,
591,
864,
304,
788,
263,
2323,
1543,
304,
385,
5923,
731,
29892,
591,
508,
671,
278,
869,
1202,
580,
5858,
29889,
29871,
13,
3112,
... |
scripts/testSmurfProcessor.py | bopopescu/smurf-processor | 1 | 111094 | <filename>scripts/testSmurfProcessor.py
#!/usr/bin/env python3
#-----------------------------------------------------------------------------
# Title : Test file for MceTransmit
#-----------------------------------------------------------------------------
# File : exoTest.py
# Created : 2018-02-28
#-----... | [
1,
529,
9507,
29958,
16713,
29914,
1688,
12636,
332,
29888,
18689,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
2683,
2683,
2683,
2683,
9072,
29899,
13,
29937,
18527,
418,
584,
4321,
934,
363,
341... |
MultiObjectiveModel_YMPNet_Pavan/depth_predictor.py | eva5covergence/EVA5_AI_Projects | 0 | 195190 | <filename>MultiObjectiveModel_YMPNet_Pavan/depth_predictor.py
"""Compute depth maps for images in the input folder.
"""
import os
import glob
import torch
import midas_utils
import cv2
from midas_processing import pre_processing
from midas_processing import post_processing
from utils.model_utils import load_model
cf... | [
1,
529,
9507,
29958,
15329,
2061,
573,
3195,
29918,
29979,
3580,
6779,
29918,
29925,
29080,
29914,
19488,
29918,
27711,
272,
29889,
2272,
13,
15945,
29908,
20606,
29872,
10809,
11053,
363,
4558,
297,
278,
1881,
4138,
29889,
13,
15945,
29908... |
unittests/testing.py | DNPLab/dnpLab | 0 | 154398 | import numpy as np
import dnplab as dnp
def get_gauss_3d(std_noise=0.0):
x = np.r_[0:100]
y = np.r_[0:100]
z = np.r_[0:100]
noise = std_noise * np.random.randn(len(x), len(y), len(z))
gauss = np.exp(-1.0 * (x - 50) ** 2.0 / (10.0 ** 2))
gauss_3d = (
gauss.reshape(-1, 1, 1) * gauss.res... | [
1,
1053,
12655,
408,
7442,
13,
5215,
270,
29876,
572,
370,
408,
270,
9302,
13,
13,
13,
1753,
679,
29918,
29887,
11214,
29918,
29941,
29881,
29898,
4172,
29918,
1217,
895,
29922,
29900,
29889,
29900,
1125,
13,
1678,
921,
353,
7442,
29889... |
Weather/Citi_Weather_Impact.py | sakshiseth/Citi_Hack | 5 | 120957 | <filename>Weather/Citi_Weather_Impact.py
from Weather.WeatherAlert import getWeatherForecastDetails
import matplotlib.pyplot as plt
import random
class makeWeatherConclusion():
def getWeatherConclusionAsImage(self):
metro_city = ["Delhi", "Bangalore", "Pune", "Hyderabad", "Chennai", "Mumbai", "Kolkat... | [
1,
529,
9507,
29958,
4806,
1624,
29914,
29907,
4812,
29918,
4806,
1624,
29918,
24192,
627,
29889,
2272,
13,
3166,
1334,
1624,
29889,
4806,
1624,
16649,
1053,
679,
4806,
1624,
29943,
487,
4384,
10602,
30004,
13,
5215,
22889,
29889,
2272,
5... |
scripts/watch_continuous.py | drozzy/autonomous-learning-library | 584 | 128820 | # pylint: disable=unused-import
import argparse
from all.bodies import TimeFeature
from all.environments import GymEnvironment, PybulletEnvironment
from all.experiments import load_and_watch
from .continuous import ENVS
def main():
parser = argparse.ArgumentParser(description="Watch a continuous agent.")
pars... | [
1,
396,
282,
2904,
524,
29901,
11262,
29922,
348,
3880,
29899,
5215,
13,
5215,
1852,
5510,
13,
3166,
599,
29889,
29890,
397,
583,
1053,
5974,
19132,
13,
3166,
599,
29889,
21813,
1860,
1053,
402,
962,
18649,
29892,
10772,
18850,
18649,
1... |
hy-data-analysis-with-python-spring-2020/part05-e12_coefficient_of_determination/test/test_coefficient_of_determination.py | Melimet/DAP2020 | 0 | 95329 | <reponame>Melimet/DAP2020
#!/usr/bin/python3
import unittest
from tmc import points
from tmc.utils import load, get_out
coefficient_of_determination = load('src.coefficient_of_determination', 'coefficient_of_determination')
class CoefficientOfDetermination(unittest.TestCase):
@points('p05-12.1')
def test... | [
1,
529,
276,
1112,
420,
29958,
29924,
295,
17528,
29914,
29928,
3301,
29906,
29900,
29906,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
13,
13,
5215,
443,
27958,
13,
13,
13,
3166,
260,
14047,
1053,
3291,
13,
13,
3166,... |
lsc.py | yubeic/Lie-Group-Sparse-Coding | 9 | 128549 | <reponame>yubeic/Lie-Group-Sparse-Coding<filename>lsc.py
import torch
import numpy as np
import matplotlib.pyplot as plt
import torch.nn.functional as f
import utils
from IPython import display
import time
device = torch.device("cuda")
def combine_variance(avg_a, count_a, var_a, avg_b, count_b, var_b):
"""
Co... | [
1,
529,
276,
1112,
420,
29958,
29891,
4003,
293,
29914,
29931,
347,
29899,
4782,
29899,
29903,
5510,
29899,
29907,
3689,
29966,
9507,
29958,
29880,
1557,
29889,
2272,
13,
5215,
4842,
305,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,
29889... |
setup.py | olgabot/NouGAT | 5 | 94298 | #!/usr/bin/env python
from nougat import __version__
from setuptools import setup
version = __version__
try:
with open("requirements.txt", "r") as f:
install_requires = [x.strip() for x in f.readlines()]
except IOError:
install_requires = []
setup(name='nougat',
version=version,
description=... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
3166,
302,
692,
271,
1053,
4770,
3259,
1649,
13,
3166,
731,
21245,
8789,
1053,
6230,
13,
13,
3259,
353,
4770,
3259,
1649,
13,
13,
2202,
29901,
13,
1678,
411,
1722,
703,
12277,
1860,
... |
tools/lint/lib/checks/negative.py | maiermic/test262 | 0 | 1616291 | <reponame>maiermic/test262
import re
from ..check import Check
_THROW_STMT = re.compile(
r'^\$DONOTEVALUATE\(\);$',
re.MULTILINE)
_THROW_STMT_LEGACY = re.compile(
r'^throw "Test262: This statement should not be evaluated\.";$',
re.MULTILINE)
class CheckNegative(Check):
'''Ensure tests hav... | [
1,
529,
276,
1112,
420,
29958,
655,
631,
13076,
29914,
1688,
29906,
29953,
29906,
13,
5215,
337,
13,
3166,
6317,
3198,
1053,
5399,
13,
13,
29918,
4690,
25180,
29918,
1254,
11490,
353,
337,
29889,
12198,
29898,
13,
418,
364,
29915,
3823,... |
pyaud_plugins/__init__.py | jshwi/pyaud | 2 | 102256 | """
plugins
=======
"""
from . import modules
__all__ = ["modules"]
| [
1,
9995,
13,
12800,
13,
2751,
25512,
13,
15945,
29908,
13,
3166,
869,
1053,
10585,
13,
13,
1649,
497,
1649,
353,
6796,
7576,
3108,
13,
2
] |
fiftyone/core/patches.py | SNeugber/fiftyone | 0 | 8282 | """
Patches views.
| Copyright 2017-2021, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
|
"""
from copy import deepcopy
import eta.core.utils as etau
import fiftyone.core.aggregations as foa
import fiftyone.core.dataset as fod
import fiftyone.core.fields as fof
import fiftyone.core.labels as fol
import fifty... | [
1,
9995,
13,
29925,
905,
267,
8386,
29889,
13,
13,
29989,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
29899,
29906,
29900,
29906,
29896,
29892,
478,
2251,
295,
29945,
29896,
29892,
9266,
29889,
13,
29989,
421,
1365,
29916,
295,
29945,
... |
preprocess.py | Antonioxv/Transformer-Pytorch | 3 | 82679 | <reponame>Antonioxv/Transformer-Pytorch
# -*- coding: utf-8 -*-
"""
Copied from https://www.github.com/kyubyong/transformer.
"""
from __future__ import print_function
import os
import regex
import codecs
import argparse
from collections import Counter
parser = argparse.ArgumentParser(description='Preprocessing')
pars... | [
1,
529,
276,
1112,
420,
29958,
13448,
14642,
29916,
29894,
29914,
13372,
261,
29899,
29925,
3637,
25350,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
29907,
459,
1000,
515,
2045,
... |
db_conn.py | achhetr/Library-book-store-app | 0 | 16901 | import sqlite3
class Database:
# create book always if not exists
def __init__(self,db):
self.conn = sqlite3.connect(db)
self.cur = self.conn.execute("CREATE TABLE IF NOT EXISTS book (id INTEGER PRIMARY KEY, " +
"title TEXT, author TEXT, year INTEGER, isbn INTEGER)"... | [
1,
1053,
21120,
29941,
13,
13,
1990,
5470,
29901,
13,
13,
1678,
396,
1653,
3143,
2337,
565,
451,
4864,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2585,
1125,
13,
4706,
1583,
29889,
13082,
353,
21120,
29941,
29889,
6915,
29898,
2585,... |
src/data/make_weather.py | sreejithkrishnanr/powerlaws | 1 | 181307 | <filename>src/data/make_weather.py<gh_stars>1-10
# -*- coding: utf-8 -*-
import os
import sys
import click
import logging
from dotenv import find_dotenv, load_dotenv
from collections import OrderedDict
import pandas as pd
@click.command()
@click.argument('input_filepath', type=click.Path(exists=True))
@click.argumen... | [
1,
529,
9507,
29958,
4351,
29914,
1272,
29914,
5675,
29918,
705,
1624,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5... |
venv1/Lib/site-packages/tensorflow/contrib/saved_model/python/saved_model/signature_def_utils.py | Soum-Soum/Tensorflow_Face_Finder | 0 | 90099 | # Copyright 2016 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/licenses/LICENSE-2.0
#
# Unless required by... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
450,
323,
6073,
17907,
13189,
943,
29889,
2178,
26863,
2538,
9841,
22993,
13,
29937,
30004,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
... |
datatube/test/coerce_dtypes_test.py | eerkela/archivetube | 0 | 37701 | from datetime import datetime, timedelta, timezone
import random
import unittest
import numpy as np
import pandas as pd
from pandas.testing import assert_frame_equal, assert_series_equal
import pytz
if __name__ == "__main__":
from pathlib import Path
import sys
sys.path.insert(0, str(Path(__file__).resolv... | [
1,
515,
12865,
1053,
12865,
29892,
5335,
287,
2554,
29892,
29431,
13,
5215,
4036,
13,
5215,
443,
27958,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
3166,
11701,
29889,
13424,
1053,
4974,
29918,
2557,
29918,
11745,
2... |
helper_functions_class.py | lucaschatham/lambdata | 0 | 14078 | <reponame>lucaschatham/lambdata<filename>helper_functions_class.py
"""
Here are two different functions used for common data cleaning tasks.
You can use these functions to load data into a pandas Dataframe.
"""
import numpy as np
import pandas as pd
from sklearn.utils import shuffle
class CleanData:
... | [
1,
529,
276,
1112,
420,
29958,
29880,
1682,
294,
305,
493,
314,
29914,
29880,
1117,
1272,
29966,
9507,
29958,
20907,
29918,
12171,
29918,
1990,
29889,
2272,
13,
15945,
29908,
13,
10605,
526,
1023,
1422,
3168,
1304,
363,
3619,
848,
5941,
... |
resources/lib/database_tv.py | bradyemerson/plugin.video.showtimeanytime | 0 | 22285 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os.path
from datetime import date, datetime
from sqlite3 import dbapi2 as sqlite
from bs4 import BeautifulSoup
import simplejson as json
import xbmcvfs
import xbmcgui
import common
import connection
import database_common as db_common
def create():
c = _datab... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
2897,
29889,
2084,
13,
3166,
12865,
1053,
2635,
29892,
12865,
13,
3166,
21120,
29941,
1053,
4833,
... |
emmaa/analyze_tests_results.py | pagreene/emmaa | 0 | 1616644 | <reponame>pagreene/emmaa
import logging
import jsonpickle
from collections import defaultdict
from emmaa.model import load_config_from_s3, get_model_stats, \
load_stmts_from_s3
from emmaa.model_tests import load_model_manager_from_s3
from emmaa.util import find_latest_s3_file, find_nth_latest_s3_file, \
strip_o... | [
1,
529,
276,
1112,
420,
29958,
13573,
276,
1600,
29914,
331,
655,
29874,
13,
5215,
12183,
13,
5215,
4390,
23945,
280,
13,
3166,
16250,
1053,
2322,
8977,
13,
3166,
953,
655,
29874,
29889,
4299,
1053,
2254,
29918,
2917,
29918,
3166,
29918... |
randomizer/iso/constants.py | soulweaver91/pokemon-gc-randomizer | 0 | 122067 | <reponame>soulweaver91/pokemon-gc-randomizer<filename>randomizer/iso/constants.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from enum import Enum, IntEnum
class PokemonSpecies(IntEnum):
NONE = 0x000
BULBASAUR = 0x001
IVYSAUR = 0x002
VENUSAUR = 0x003
CHARMANDER = 0x004
CHARMELEON = 0x005
... | [
1,
529,
276,
1112,
420,
29958,
29879,
5059,
705,
12483,
29929,
29896,
29914,
29886,
554,
9857,
29899,
27354,
29899,
8172,
3950,
29966,
9507,
29958,
8172,
3950,
29914,
10718,
29914,
3075,
1934,
29889,
2272,
13,
29937,
14708,
4855,
29914,
210... |
src/examples/cli.py | wdstar/python-examples | 0 | 70289 | #!/usr/bin/env python3
import argparse
import coloredlogs
import logging
import time
import sys
logger = logging.getLogger(__name__)
def log_sample(args: argparse.Namespace):
logger.debug("debug message.")
logger.info("info message.")
logger.warning("warning message.")
logger.error("error message.")
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
5215,
1852,
5510,
13,
5215,
28684,
20756,
13,
5215,
12183,
13,
5215,
931,
13,
5215,
10876,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1... |
tests/functional/test_owsproxy_app.py | bird-house/twitcher | 13 | 177655 | """
Run tests OWSProxy tests with external WPS.
Please start `Emu WPS <https://emu.readthedocs.io/en/latest/>`_ on port 5000:
http://localhost:5000/wps
"""
import pytest
from .base import FunctionalTest
class OWSProxyAppTest(FunctionalTest):
def setUp(self):
super(OWSProxyAppTest, self).setUp()
... | [
1,
9995,
13,
6558,
6987,
438,
7811,
14048,
6987,
411,
7029,
399,
7024,
29889,
13,
13,
12148,
1369,
421,
29923,
2589,
399,
7024,
529,
991,
597,
24425,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
3779,
29952,
29918,... |
backend/ohq/permissions.py | pennlabs/office-hours-queue | 8 | 152144 | from django.db.models import Q
from rest_framework import permissions
from ohq.models import Course, Membership, Question
# Hierarchy of permissions is usually:
# Professor > Head TA > TA > Student > User
# Anonymous Users can't do anything
# Note: everything other than IsSuperuser and CoursePermission is
# scoped t... | [
1,
515,
9557,
29889,
2585,
29889,
9794,
1053,
660,
13,
3166,
1791,
29918,
4468,
1053,
11239,
13,
13,
3166,
9360,
29939,
29889,
9794,
1053,
6325,
344,
29892,
341,
1590,
10475,
29892,
894,
13,
13,
13,
29937,
12433,
12040,
310,
11239,
338,... |
src/clcore.py | ShepardPower/PyMCBuilder | 1 | 9655 | <filename>src/clcore.py
# I'm just the one that executes the instructions!
import sys, math, json, operator, time
import mcpi.minecraft as minecraft
from PIL import Image as pillow
from blockid import get_block
import mcpi.block as block
import functions as pymc
from tqdm import tqdm
import tkinter as tk
# Functions
... | [
1,
529,
9507,
29958,
4351,
29914,
695,
3221,
29889,
2272,
13,
29937,
306,
29915,
29885,
925,
278,
697,
393,
24138,
278,
11994,
29991,
13,
5215,
10876,
29892,
5844,
29892,
4390,
29892,
5455,
29892,
931,
13,
5215,
286,
29883,
1631,
29889,
... |
09.Printing Stars in C Shape.py | Kushal997-das/Pattern_Printing | 27 | 66831 | <filename>09.Printing Stars in C Shape.py
#Printing Stars in 'C' Shape !
'''
****
*
*
*
*
*
****
'''
for row in range(7):
for col in range(5):
if (col==0 and (row!=0 and row!=6)) or (row==0 or row==6) and (col>0):
print('*',end='')
else:
print(end=' ')
print() | [
1,
529,
9507,
29958,
29900,
29929,
29889,
11816,
292,
25435,
297,
315,
1383,
4085,
29889,
2272,
13,
29937,
11816,
292,
25435,
297,
525,
29907,
29915,
1383,
4085,
1738,
13,
12008,
13,
334,
17435,
13,
29930,
13,
29930,
13,
29930,
13,
2993... |
tools/build_rules/gtk_dependent.bzl | Ewpratten/frc_971_mirror | 39 | 13383 | disable_gtk_binaries = True
def gtk_dependent_cc_library(**kwargs):
if not disable_gtk_binaries:
native.cc_library(**kwargs)
def gtk_dependent_cc_binary(**kwargs):
if not disable_gtk_binaries:
native.cc_binary(**kwargs)
| [
1,
11262,
29918,
4141,
29895,
29918,
2109,
4314,
353,
5852,
13,
13,
1753,
330,
11178,
29918,
18980,
29918,
617,
29918,
5258,
29898,
1068,
19290,
1125,
13,
1678,
565,
451,
11262,
29918,
4141,
29895,
29918,
2109,
4314,
29901,
13,
4706,
7531... |
python/paddle/fluid/tests/unittests/test_rnn_cell_api.py | L-Net-1992/Paddle | 11 | 31523 | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29929,
349,
22352,
29925,
22352,
13189,
943,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
... |
ovirt-guest-agent/GuestAgentLinux2.py | edwardbadboy/ovirtagent-ubuntu | 0 | 67318 | #
# Copyright 2010-2012 Red Hat, Inc. and/or its affiliates.
#
# 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,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29900,
29899,
29906,
29900,
29896,
29906,
4367,
25966,
29892,
9266,
29889,
322,
29914,
272,
967,
23736,
1078,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29... |
python-lambda-simple/app.py | hemanthkolla/cdk-templates | 117 | 1609370 | <gh_stars>100-1000
#!/usr/bin/env python3
import os
from aws_cdk import core
from python_lambda_simple.python_lambda_simple_stack import PythonLambdaSimpleStack
app = core.App()
# for production set your Environment to specify the target region and account
# Prod_Env__Ire = env=core.Environment(region="eu-west-1",ac... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
2897,
13,
3166,
25879,
29918,
2252,
29895,
1053,
7136,
13,
3166,
... |
Penrose/generate - 1808.py | kart324/MultiNLP | 0 | 120192 | <filename>Penrose/generate - 1808.py
import re
import string
inp = '''A is a set.
A, B, C are sets.
B is contained in A.
C is contained in B.
C is a set.
C is contained in A.
P is a point.
P is contained in A.
P is not contained in C.
X is a vectorspace.
U is a vector.
V is a vector.
U and V belong to the vectorspace ... | [
1,
529,
9507,
29958,
29925,
264,
17811,
29914,
17158,
448,
29871,
29896,
29947,
29900,
29947,
29889,
2272,
13,
5215,
337,
13,
5215,
1347,
13,
262,
29886,
353,
14550,
29909,
338,
263,
731,
29889,
13,
29909,
29892,
350,
29892,
315,
526,
6... |
pykotor/resource/formats/ssf/io_binary.py | NickHugi/PyKotor | 1 | 184673 | <reponame>NickHugi/PyKotor<gh_stars>1-10
from __future__ import annotations
from typing import Optional
from pykotor.resource.formats.ssf.data import SSF, SSFSound
from pykotor.resource.type import TARGET_TYPES, SOURCE_TYPES, ResourceReader, ResourceWriter
class SSFBinaryReader(ResourceReader):
def __init__(sel... | [
1,
529,
276,
1112,
420,
29958,
29940,
860,
29950,
688,
29875,
29914,
19737,
29968,
327,
272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
3166,
19229,
1053,
283... |
ngraph/frontends/neon/data/ptb.py | NervanaSystems/ngraph-python | 18 | 1608799 | # ******************************************************************************
# Copyright 2017-2018 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.apa... | [
1,
396,
334,
7775,
7775,
7775,
7775,
4189,
2328,
29930,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
29899,
29906,
29900,
29896,
29947,
18555,
15025,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
2... |
ServerInitialisation/vmpackage/serverCreationInitialisation.py | flexiops/Server-Initialisation | 0 | 1601040 | import requests
import json
import time
from serverapi.serverMethods import get_server_state
from serverapi.serverMethods import change_server_status
WAIT_TIME = 30 #seconds
MAX_NO_ATTEMPTS = 5
serverUUID = ""
isVerbose = False
ENDPOINT = "https://cp.sd1.flexiant.net:4442/"
#Login UUID/username/password
customerUUID=... | [
1,
1053,
7274,
13,
5215,
4390,
13,
5215,
931,
13,
3166,
1923,
2754,
29889,
2974,
26112,
1053,
679,
29918,
2974,
29918,
3859,
13,
3166,
1923,
2754,
29889,
2974,
26112,
1053,
1735,
29918,
2974,
29918,
4882,
13,
13,
12982,
1806,
29918,
153... |
climpy/utils/avhrr_utils.py | SeregaOsipov/ClimPy | 6 | 1616699 | from climpy.utils.file_path_utils import get_root_storage_path_on_hpc
import netCDF4
from climpy.utils.diag_decorators import time_interval_selection
# from climpy.utils.time_utils import process_time_range_impl
from climpy.utils.netcdf_utils import generate_netcdf_uniform_time_data
import numpy as np
__author__ = '<N... | [
1,
515,
10784,
2272,
29889,
13239,
29889,
1445,
29918,
2084,
29918,
13239,
1053,
679,
29918,
4632,
29918,
12925,
29918,
2084,
29918,
265,
29918,
29882,
6739,
13,
5215,
7787,
29907,
4037,
29946,
13,
3166,
10784,
2272,
29889,
13239,
29889,
60... |
app/main.py | guhuajun/azwebapp-demo | 0 | 184443 | <filename>app/main.py<gh_stars>0
# -*- coding: utf-8 -*-
# pylint: disable=
from starlette.applications import Starlette
from starlette.responses import JSONResponse
from starlette.routing import Route
import uvicorn
async def index(request):
return JSONResponse({'hello': 'world'})
routes = [
Route('/', inde... | [
1,
529,
9507,
29958,
932,
29914,
3396,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
13,
13,
... |
Lectures_Codes/examples-05/lecture05/lenghts_of_words_example/lengths_of_words.py | MichalKyjovsky/NPRG065_Programing_in_Python | 0 | 46054 | <reponame>MichalKyjovsky/NPRG065_Programing_in_Python
from collections import Counter, defaultdict
from stats import print_histogram_2d
# This is a list of characters that are interpreted as punctuations and thus ignored.
punctuation_chars = ",;:.?!()[]<>/-'\""
trtrable = str.maketrans(punctuation_chars, " " * len(pun... | [
1,
529,
276,
1112,
420,
29958,
14916,
284,
29968,
17472,
586,
7912,
29914,
29940,
10593,
29954,
29900,
29953,
29945,
29918,
9283,
292,
29918,
262,
29918,
11980,
13,
3166,
16250,
1053,
315,
5336,
29892,
2322,
8977,
13,
3166,
22663,
1053,
1... |
recommonmark/parser.py | vale981/recommonmark | 3 | 82835 | <reponame>vale981/recommonmark<gh_stars>1-10
"""Docutils CommonMark parser"""
import sys
from os.path import splitext
from docutils import parsers, nodes
from sphinx import addnodes
from commonmark import Parser
from warnings import warn
if sys.version_info < (3, 0):
from urlparse import urlparse, unquote
else... | [
1,
529,
276,
1112,
420,
29958,
29894,
744,
29929,
29947,
29896,
29914,
276,
9435,
3502,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
14526,
13239,
13103,
9802,
13812,
15945,
29908,
13,
13,
5215,
10876... |
scripts/perf/model_size.py | cclauss/archai | 344 | 70711 | <filename>scripts/perf/model_size.py
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from archai.nas.model_desc import ModelDesc
from archai.common.common import common_init
from archai.nas.model import Model
from archai.algos.petridish.petridish_model_desc_builder import PetridishModelB... | [
1,
529,
9507,
29958,
16713,
29914,
546,
29888,
29914,
4299,
29918,
2311,
29889,
2272,
13,
29937,
14187,
1266,
313,
29883,
29897,
7783,
15025,
22993,
13,
29937,
10413,
21144,
1090,
278,
341,
1806,
19405,
22993,
13,
30004,
13,
3166,
3190,
1... |
htbapi/machines.py | zachhanson94/htb | 0 | 1600064 | """Methods pertaining to machines on HTB.
This module contains classes and methods for working with machines
on HTB.
"""
from . import session
from .models import HTBObject
from typing import List, Optional
import json
class HTBMachine(HTBObject):
"""A machine on HTB
Attributes:
id (int): The ... | [
1,
9995,
26112,
639,
2408,
292,
304,
14884,
373,
3154,
29933,
29889,
13,
13,
4013,
3883,
3743,
4413,
322,
3519,
363,
1985,
411,
14884,
13,
265,
3154,
29933,
29889,
13,
15945,
29908,
13,
13,
13,
3166,
869,
1053,
4867,
13,
3166,
869,
... |
facemask_detector/python_func_test.py | acassemi/socialdistance | 0 | 1600207 | from detect_mask_image_function import detect_mask_complete
from detect_mask_image_function import detect_mask_simplified
# To use the complete version make sure you have the directories created
#if you download the whole git hub structure you are good to go.
#just add the image that you want to analyze in the image... | [
1,
515,
6459,
29918,
13168,
29918,
3027,
29918,
2220,
1053,
6459,
29918,
13168,
29918,
8835,
13,
3166,
6459,
29918,
13168,
29918,
3027,
29918,
2220,
1053,
6459,
29918,
13168,
29918,
3601,
572,
2164,
29871,
13,
13,
13,
29937,
1763,
671,
27... |
tests/compiler/dataflow/test_model_root_cause.py | inmanta/inmanta-core | 6 | 198697 | """
Copyright 2020 Inmanta
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 ... | [
1,
9995,
13,
1678,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
512,
29885,
6949,
13,
13,
1678,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
1678,
366,
112... |
Python/05 - Math/Triangle Quest 2.py | sohammanjrekar/HackerRank | 0 | 84707 | """
Problem:https://www.hackerrank.com/challenges/triangle-quest-2/problem
Author: <NAME>
"""
for i in range(1, int(input()) + 1):
print(((10 ** i) // 9) ** 2)
| [
1,
9995,
30004,
13,
26604,
29901,
991,
597,
1636,
29889,
29882,
28940,
10003,
29889,
510,
29914,
305,
16047,
267,
29914,
26701,
29899,
1119,
29899,
29906,
29914,
17199,
30004,
13,
30004,
13,
13720,
29901,
529,
5813,
3238,
13,
15945,
19451,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.