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 |
|---|---|---|---|---|---|
ekmap_core/qgs_symbology_parser/categories_symbol_parser.py | eKMap/ekmap-publisher-for-qgis | 4 | 173321 | from .symbology_parser import SymbologyParser
class CategoriesSymbolParser(SymbologyParser):
def parse(self, renderer, exporter):
styles = []
selectedProperty = renderer.classAttribute()
# Find else conditions:
otherValues = self.__getDetailOtherValues(renderer.dump())
els... | [
1,
515,
869,
11967,
29890,
3002,
29918,
16680,
1053,
10667,
29890,
3002,
11726,
13,
13,
1990,
315,
14404,
14730,
11726,
29898,
25548,
29890,
3002,
11726,
1125,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
4050,
261,
29892,
1518,
9555,
112... |
demos/instance_occlsegm/examples/synthetic2d/legacy/train_mrcnn.py | pazeshun/jsk_apc | 0 | 148928 | <reponame>pazeshun/jsk_apc
#!/usr/bin/env python
from __future__ import division
import argparse
import datetime
import os
import os.path as osp
import random
import socket
os.environ['MPLBACKEND'] = 'Agg' # NOQA
# import cv2 # FIXME: cv2 should be imported first to avoid segfault.
import chainer
from chainer im... | [
1,
529,
276,
1112,
420,
29958,
29886,
834,
12094,
348,
29914,
29926,
808,
29918,
481,
29883,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
13,
5215,
1852,
5510,
13,
5215,
... |
sb/base/sb_config.py | xyhuangjinfu/pytools | 0 | 1613346 | import json
import os
class SBConfig:
def __init__(self):
config_file_path = os.path.split(os.path.realpath(__file__))[0] + '/sb_config.json'
f = open(config_file_path)
self.config = json.load(f)
if __name__ == '__main__':
print(os.path.split(os.path.realpath(__file__))[0])
| [
1,
1053,
4390,
13,
5215,
2897,
13,
13,
13,
1990,
317,
29933,
3991,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2295,
29918,
1445,
29918,
2084,
353,
2897,
29889,
2084,
29889,
5451,
29898,
359,
29889,
2084,
29889,
6370,... |
ClassFiles/OOP/Encapsulation.py | minefarmer/Comprehensive-Python | 0 | 100893 | <reponame>minefarmer/Comprehensive-Python
''' Encapsulation : Part 1
Encapsulation is the process of restricting access to methods and variables in a class in order to prevent direct data modification so that it prevents accidental data modification.
Encapsulation basically allows the internal represent... | [
1,
529,
276,
1112,
420,
29958,
24669,
15641,
1050,
29914,
1523,
1457,
29882,
6270,
29899,
11980,
13,
12008,
462,
11346,
2547,
2785,
584,
3455,
29871,
29896,
13,
8566,
2547,
2785,
338,
278,
1889,
310,
9250,
292,
2130,
304,
3519,
322,
365... |
onmt/Utils.py | KTH1234/deep_summ | 0 | 49209 | <filename>onmt/Utils.py<gh_stars>0
import torch
from torch.autograd import Variable
def aeq(*args):
"""
Assert all arguments have the same value
"""
arguments = (arg for arg in args)
first = next(arguments)
assert all(arg == first for arg in arguments), \
"Not all arguments have the sam... | [
1,
529,
9507,
29958,
265,
4378,
29914,
12177,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
29889,
1300,
468,
3665,
1053,
28736,
13,
13,
1753,
263,
1837,
10456,
5085,
1125,
13,
1678... |
python/worldkit/placer.py | Angew/WorldKit | 0 | 118329 | <reponame>Angew/WorldKit
import math
import pyglet
import random
import sys
import xml.etree.ElementTree as xmltree
class Point:
components = ('x', 'y')
dimension = 2
eps = 1e-6
def __init__(self, *args, **kwargs):
data = [0.0] * 2
for i in range(min(len(args), self.dimension)):
data[i] = args[i]
for c... | [
1,
529,
276,
1112,
420,
29958,
2744,
9396,
29914,
14058,
13117,
13,
5215,
5844,
13,
5215,
19484,
1026,
13,
5215,
4036,
13,
5215,
10876,
13,
5215,
4903,
29889,
300,
929,
29889,
2642,
9643,
408,
4903,
8336,
13,
13,
13,
13,
1990,
8984,
... |
tests/gen/test_tca_multithreading.py | PontusHultkrantz/tcapy | 0 | 116683 | <reponame>PontusHultkrantz/tcapy
"""Tests more involved functionality of TCA such as multithreading (and checks computations are
the same as single threaded - note that if there are gaps in market data, there could be differences) and also if there
are multiple requests made at same time (stress testing).
Note for the... | [
1,
529,
276,
1112,
420,
29958,
29925,
609,
375,
29950,
499,
12748,
424,
29920,
29914,
29873,
5030,
29891,
13,
15945,
29908,
24376,
901,
9701,
9863,
310,
323,
5454,
1316,
408,
1773,
389,
19715,
313,
392,
12747,
2912,
800,
526,
13,
1552,
... |
saleor/order/migrations/0072_django_price_2.py | elwoodxblues/saleor | 19 | 11987 | # Generated by Django 2.2.4 on 2019-08-14 09:13
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("order", "0071_order_gift_cards")]
operations = [
migrations.RenameField(
model_name="order",
old... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29906,
29889,
29946,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29947,
29899,
29896,
29946,
29871,
29900,
29929,
29901,
29896,
29941,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
... |
tests/datatypes/test_datatypes.py | ambv/edgedb-python | 214 | 1614136 | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2016-present MagicStack Inc. and the EdgeDB authors.
#
# 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... | [
1,
396,
13,
29937,
910,
2752,
934,
338,
760,
310,
278,
21086,
4051,
1722,
2752,
2060,
29889,
13,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
29899,
6338,
26494,
7264,
9266,
29889,
322,
278,
21086,
4051,
15717,
29889,... |
find_offset.py | psdon/bufferoverflow_scripts | 0 | 120977 | <gh_stars>0
import argparse
from pwn import cyclic_metasploit_find
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"-a", "--address", type=str, required=True, help="EIP hex value"
)
parser.add_argument(
"-c",
"--prepend_cmd",
type=str,... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
1852,
5510,
13,
13,
3166,
282,
1233,
1053,
5094,
28746,
29918,
2527,
4692,
417,
277,
29918,
2886,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1381... |
sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_limit_settings.py | dubiety/azure-sdk-for-python | 1 | 84261 | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from marshmallow import fields, post_load
from azure.ai.ml.constants import AutoMLConstants
from azure.ai.ml._schema import PatchedSchemaMe... | [
1,
396,
448,
2683,
2683,
2683,
1378,
13,
29937,
14187,
1266,
313,
29883,
29897,
7783,
15025,
29889,
2178,
10462,
21676,
29889,
13,
29937,
448,
2683,
2683,
2683,
1378,
13,
13,
3166,
1766,
845,
29885,
9536,
1053,
4235,
29892,
1400,
29918,
... |
tests/test_general.py | MichaelRazum/cachier | 0 | 154719 | """Non-core-specific tests for cachier."""
import os
from cachier.core import (
MAX_WORKERS_ENVAR_NAME,
DEFAULT_MAX_WORKERS,
_max_workers,
_set_max_workers,
_get_executor
)
def test_max_workers():
"""Just call this function for coverage."""
try:
del os.environ[MAX_WORKERS_ENVAR_N... | [
1,
9995,
12283,
29899,
3221,
29899,
14940,
6987,
363,
274,
496,
631,
1213,
15945,
13,
13,
5215,
2897,
13,
13,
3166,
274,
496,
631,
29889,
3221,
1053,
313,
13,
1678,
18134,
29918,
11686,
29968,
23598,
29918,
25838,
1718,
29918,
5813,
298... |
heroku_py/__init__.py | AnthonyAniobi/heroku-py | 5 | 49230 | <gh_stars>1-10
from .heroku_client import HerokuClient
__version__ = "1.2.0"
__all__ = ["HerokuClient"]
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
869,
2276,
9154,
29918,
4645,
1053,
2439,
9154,
4032,
13,
13,
1649,
3259,
1649,
353,
376,
29896,
29889,
29906,
29889,
29900,
29908,
13,
13,
1649,
497,
1649,
3... |
VideoSearchWithAutoMLVision/parser/ParserAPI/app.py | nikkiconley/media-services-video-indexer | 54 | 187556 | import os
from typing import Dict, List
import uvicorn
from dotenv import load_dotenv
from fastapi import FastAPI, Security, Depends, HTTPException
from fastapi.security.api_key import APIKeyHeader, APIKey
from impl import extractor
from pydantic import BaseModel
from starlette.status import HTTP_403_FORBIDDEN
load_d... | [
1,
1053,
2897,
13,
3166,
19229,
1053,
360,
919,
29892,
2391,
13,
13,
5215,
318,
26311,
1398,
13,
3166,
8329,
6272,
1053,
2254,
29918,
6333,
6272,
13,
3166,
5172,
2754,
1053,
23786,
8787,
29892,
14223,
29892,
10034,
1975,
29892,
7331,
24... |
start_project/src/start_project.py | pdminimal/sandbox | 0 | 170619 | from fs import enums, errors, osfs
from self_print import SelfPrint
class StartProject:
def __init__(self, name, fs=None):
self.sp = SelfPrint(leading="- ")
self.name = name
if fs is None:
fs = osfs.OSFS(".")
self.fs = fs
def warning(self, text):
print("War... | [
1,
515,
18920,
1053,
427,
6762,
29892,
4436,
29892,
2897,
5847,
13,
3166,
1583,
29918,
2158,
1053,
21782,
11816,
13,
13,
13,
1990,
7370,
7653,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
18920,
29922,
8516,
1125,
... |
Discord Bots/Galaxy Studio/cogs/money/commands.py | LUNA761/Code-Archive | 1 | 1613932 | <filename>Discord Bots/Galaxy Studio/cogs/money/commands.py
import discord, time, asyncio, os, random, json
from discord.ext import commands, tasks
from discord.ext.commands import has_permissions, cooldown, MissingPermissions, check, Cog
from discord.utils import get
def is_wiggle_or_luna(ctx):
return ctx.author.... | [
1,
529,
9507,
29958,
4205,
16090,
350,
1862,
29914,
29954,
284,
26825,
7448,
29914,
29883,
12099,
29914,
29885,
4992,
29914,
26381,
29889,
2272,
13,
5215,
2313,
536,
29892,
931,
29892,
408,
948,
3934,
29892,
2897,
29892,
4036,
29892,
4390,
... |
new_pro/shorten/models.py | Lavkushmani/URL_SHORTNER | 1 | 185483 | from django.db import models
# Create your models here.
class bitly(models.Model):
user = models.CharField(max_length=15, null=True)
long_url = models.URLField(null=False)
shortcode = models.CharField(max_length=6,unique=True)
created_date = models.DateTimeField(auto_now_add=True)
updated = models... | [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
13,
13,
29937,
6204,
596,
4733,
1244,
29889,
13,
1990,
2586,
368,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1404,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29945,
29892,
... |
python/tests/test_insertion_sort.py | bjgman12/data-structures-and-algorithms | 0 | 131371 | from code_challenges.insertion_sort.insertion_sort import insert_sort
def test_sorting_functionality():
test_list = [8,4,23,42,16,15]
actual = insert_sort(test_list)
expected = [4,8,15,16,23,42]
assert actual == expected
| [
1,
515,
775,
29918,
305,
16047,
267,
29889,
7851,
291,
29918,
6605,
29889,
7851,
291,
29918,
6605,
1053,
4635,
29918,
6605,
13,
13,
1753,
1243,
29918,
6605,
292,
29918,
2220,
2877,
7295,
13,
1678,
1243,
29918,
1761,
353,
518,
29947,
298... |
testing/onQuest/longClusters/m67/OLD-analyseEBLSSTm67.py | andrewbowen19/ClusterEclipsingBinaries | 0 | 2429 | #########################
#########################
# Need to account for limit in input period
#########################
#########################
# Baseline M67 long script -- NO crowding
# New script copied from quest - want to take p and ecc from each population (all, obs, rec) and put them into separate file
# Do... | [
1,
835,
13383,
4136,
2277,
13,
13383,
7346,
29937,
13,
29937,
20768,
304,
3633,
363,
4046,
297,
1881,
3785,
13,
13383,
7346,
29937,
13,
13383,
7346,
29937,
13,
13,
29937,
4886,
5570,
341,
29953,
29955,
1472,
2471,
1192,
11698,
11660,
84... |
examples/pest_query.py | vpreston/jetyak-parsing | 0 | 189401 | <filename>examples/pest_query.py<gh_stars>0
#!/usr/env/python
'''
This is an example in which all CTD and Optode data is compiled for PEST deployments.
Maintainer: vpreston-at-{whoi, mit}-dot-edu
'''
import numpy as np
import jetyak
import sensors
import jviz
import shapefile
import matplotlib
import gpxpy
import pa... | [
1,
529,
9507,
29958,
19057,
29914,
29886,
342,
29918,
1972,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
6272,
29914,
4691,
13,
13,
12008,
13,
4013,
338,
385,
1342,
297,
607,
599,
315,
24495,
... |
Examples/tools/display_tremolo.py | apohl79/AudioTK | 10 | 137669 | <gh_stars>1-10
#!/usr/bin/env python
from ATK.Core import DoubleInPointerFilter, DoubleOutPointerFilter
from ATK.Tools import DoubleCachedSinusGeneratorFilter, DoubleApplyGainFilter
import matplotlib.pyplot as plt
sample_rate = 96000
import sys, os
sys.path.append(os.path.dirname(os.path.realpath(__file__))+"/..")
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
15531,
29968,
29889,
9203,
1053,
11599,
797,
14516,
5072,
29892,
11599,
3744,
14516,
5072,
13,
3166,
... |
test_spmm.py | binfoo1993/torchdgl | 0 | 79108 | <reponame>binfoo1993/torchdgl
import argparse, time, math
import numpy as np
import networkx as nx
import torch as th
import torch.nn as nn
import torch.nn.functional as F
import dgl
import dgl.function as fn
from dgl.data import register_data_args
from dgl.data import CoraGraphDataset, CiteseerGraphDataset, PubmedGrap... | [
1,
529,
276,
1112,
420,
29958,
2109,
5431,
29896,
29929,
29929,
29941,
29914,
7345,
305,
29881,
3820,
13,
5215,
1852,
5510,
29892,
931,
29892,
5844,
13,
5215,
12655,
408,
7442,
13,
5215,
3564,
29916,
408,
302,
29916,
13,
5215,
4842,
305... |
Sample/PyWebApi.IIS/json_fmtr.py | DataBooster/PyWebApi | 6 | 39252 | # -*- coding: utf-8 -*-
"""json_fmtr.py
This module implements a MediaTypeFormatter with JSON response.
This module was originally shipped as an example code from https://github.com/DataBooster/PyWebApi, licensed under the MIT license.
Anyone who obtains a copy of this code is welcome to modify it for any... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
3126,
29918,
24826,
509,
29889,
2272,
13,
13,
1678,
910,
3883,
10703,
263,
8213,
1542,
18522,
411,
4663,
2933,
29889,
13,
13,
1678,
910,
... |
web1.py | Riddhikshah21/whyec2 | 0 | 120007 | <filename>web1.py
from flask import Flask
from flask import request
import random
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!!!!"
def randomNumber(rnum):
sumran=0
for i in range(int(rnum)):
sumran += random.randint(0,int(rnum))
return sumran
@app.route("/r")
def... | [
1,
529,
9507,
29958,
2676,
29896,
29889,
2272,
13,
3166,
29784,
1053,
2379,
1278,
13,
3166,
29784,
1053,
2009,
13,
13,
5215,
4036,
13,
932,
353,
2379,
1278,
22168,
978,
1649,
29897,
13,
13,
29992,
932,
29889,
13134,
11974,
1159,
13,
1... |
src/sima/simo/blueprints/simplewirecoupling.py | SINTEF/simapy | 0 | 124214 | <filename>src/sima/simo/blueprints/simplewirecoupling.py
#
# Generated with SimpleWireCouplingBlueprint
from dmt.blueprint import Blueprint
from dmt.dimension import Dimension
from dmt.attribute import Attribute
from dmt.enum_attribute import EnumAttribute
from dmt.blueprint_attribute import BlueprintAttribute
from .s... | [
1,
529,
9507,
29958,
4351,
29914,
29879,
2946,
29914,
3601,
29877,
29914,
9539,
2158,
29879,
29914,
12857,
22376,
16589,
10335,
29889,
2272,
13,
29937,
29871,
13,
29937,
3251,
630,
411,
12545,
29956,
533,
29907,
283,
10335,
21319,
2158,
13,... |
heroes/heroes/apps.py | devrishik/Heroes | 0 | 106563 | <reponame>devrishik/Heroes
from django.apps import AppConfig
class HeroesConfig(AppConfig):
name = 'heroes.heroes'
verbose_name = "Heroes"
| [
1,
529,
276,
1112,
420,
29958,
3359,
29878,
728,
638,
29914,
29950,
1489,
267,
13,
3166,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
13,
1990,
22167,
267,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
525,
29882,
1489,
267,
29... |
visfbpic/static.py | georgeholt1/visfbpic | 1 | 119787 | <gh_stars>1-10
# Author: <NAME>
# License: MIT
# Version: 0.1.0
"""
Part of VISFBPIC.
Contains methods for creating static visualisations of the FBPIC data.
"""
import os
import sys
import importlib.util
import numpy as np
import matplotlib.pyplot as plt
plt.style.use(os.path.join(
os.path.split(__file__)[0], '_m... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
13361,
29901,
529,
5813,
29958,
13,
29937,
19245,
29901,
341,
1806,
13,
29937,
10079,
29901,
29871,
29900,
29889,
29896,
29889,
29900,
13,
15945,
29908,
13,
7439... |
python/rhinoscripts/example_csv_loading.py | tasbolat1/hmv-s16 | 1 | 15414 | <gh_stars>1-10
"""Example code for importing a single rigid body trajectory into Rhino from a Optitrack CSV file.
Copyright (c) 2016, <NAME>. All rights reserved. Licensed under the terms
of the BSD 3-clause license as included in LICENSE.
Example code for generating a path of Rhino 'planes' (e.g. coordinate frame)
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
14023,
775,
363,
28348,
263,
2323,
12912,
333,
3573,
23324,
706,
964,
7861,
1789,
515,
263,
20693,
277,
22282,
16874,
934,
29889,
13,
13,
11882,
1266,
... |
models/attention_ensemble_diff_layers.py | tlatkowski/attention-ensemble-gene-expression | 0 | 35479 | import tensorflow as tf
from layers.attention_layers import attention_layer
from layers.common_layers import init_inputs
from layers.feed_forward_layers import feed_forward_diff_features, feed_forward_diff_layers
from utils.hyperparams import Hyperparams as hp
class AttentionBasedEnsembleNets:
def __init__(self... | [
1,
1053,
26110,
408,
15886,
13,
13,
3166,
15359,
29889,
1131,
2509,
29918,
29277,
1053,
8570,
29918,
13148,
13,
3166,
15359,
29889,
9435,
29918,
29277,
1053,
2069,
29918,
2080,
29879,
13,
3166,
15359,
29889,
18798,
29918,
11333,
29918,
2927... |
kmip/services/results.py | ondrap/PyKMIP | 179 | 78665 | # Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29946,
450,
1861,
1983,
20727,
11335,
3014,
29914,
2052,
2957,
29837,
16715,
7606,
13,
29937,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,... |
ARC033/ARC033b.py | VolgaKurvar/AtCoder | 0 | 127167 | na, nb = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
a = set(a)
b = set(b)
t = len(a & b)
t2 = len(a.union(b))
print(t/t2)
| [
1,
1055,
29892,
302,
29890,
353,
2910,
29898,
524,
29892,
1881,
2141,
5451,
3101,
13,
29874,
353,
1051,
29898,
1958,
29898,
524,
29892,
1881,
2141,
5451,
22130,
13,
29890,
353,
1051,
29898,
1958,
29898,
524,
29892,
1881,
2141,
5451,
22130... |
8_Mixins/post/views.py | LIkelion-at-KOREATECH/LikeLion_Django_Study_Summary | 28 | 1607694 | <gh_stars>10-100
# 데이터 처리 대상 : 모델, Serializer import 시키기
from .models import Post
from .serializer import PostSerializer
from rest_framework import generics
from rest_framework import mixins
class PostList(mixins.ListModelMixin,
mixins.CreateModelMixin,
generics.GenericAPIView):
# 쿼리... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
29871,
238,
144,
179,
30393,
31856,
29871,
239,
181,
155,
30826,
29871,
30890,
31158,
584,
29871,
31962,
238,
144,
187,
29892,
18896,
3950,
1053,
... |
modules/utils/module_user.py | Fogapod/KiwiBot | 18 | 115772 | from objects.modulebase import ModuleBase
from objects.permissions import PermissionEmbedLinks, PermissionExternalEmojis
from utils.funcs import find_user, _get_last_user_message_timestamp
from datetime import datetime
import discord
STATUS_EMOTES = {
'online': '<:online:427209268240973854>',
'idle': ... | [
1,
515,
3618,
29889,
5453,
3188,
1053,
15591,
5160,
13,
3166,
3618,
29889,
17858,
6847,
1053,
20894,
2333,
6026,
2580,
6595,
29879,
29892,
20894,
2333,
25865,
6026,
3848,
275,
13,
13,
3166,
3667,
29879,
29889,
7692,
2395,
1053,
1284,
2991... |
apps/blog/templatetags/template_library.py | gurnitha/2022-django-blog-magazine-cbv | 0 | 183825 | <filename>apps/blog/templatetags/template_library.py
# apps/blog/templatetags/menu_tags.py
# Django modules
from django import template
# Locals
from apps.blog.models import Category
# Template library
register = template.Library()
# Register your template here
@register.inclusion_tag('shared/tpl/menu_tpl.html')
d... | [
1,
529,
9507,
29958,
13371,
29914,
7312,
29914,
1356,
572,
271,
300,
810,
29914,
6886,
29918,
5258,
29889,
2272,
13,
29937,
11446,
29914,
7312,
29914,
1356,
572,
271,
300,
810,
29914,
6510,
29918,
11338,
29889,
2272,
13,
13,
29937,
15337,... |
yolov5/temp.py | shuyansy/A-detection-and-recognition-pipeline-of-complex-meters-in-wild | 17 | 31295 | <gh_stars>10-100
import os
import cv2
import numpy as np
from utils.augmentations import Albumentations, augment_hsv, copy_paste, letterbox
from models.common import DetectMultiBackend
from utils.datasets import IMG_FORMATS, VID_FORMATS, LoadImages, LoadStreams
from utils.general import (LOGGER, check_file, check_img_s... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
2897,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
3166,
3667,
29879,
29889,
2987,
358,
800,
1053,
16197,
942,
800,
29892,
18765,
29918... |
src/polyswarm/formatters/text.py | polyswarm/polyswarm-cli | 2 | 50641 | from __future__ import absolute_import, unicode_literals
import sys
import functools
import json
import click
from polyswarm.formatters import base
def is_grouped(fn):
@functools.wraps(fn)
def wrapper(self, text):
return self._depth*'\t'+fn(self, text)
return wrapper
class TextOutput(base.Bas... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
29104,
29918,
20889,
1338,
13,
5215,
10876,
13,
5215,
2090,
312,
8789,
13,
5215,
4390,
13,
13,
5215,
2828,
13,
13,
3166,
1248,
952,
29893,
2817,
29889,
4830,
2153,
1053,
... |
examples/elementtree/pickle.py | Thhhza/sqlalchemy | 2 | 109050 | <filename>examples/elementtree/pickle.py<gh_stars>1-10
"""illustrates a quick and dirty way to persist an XML document expressed using ElementTree and pickle.
This is a trivial example using PickleType to marshal/unmarshal the ElementTree
document into a binary column. Compare to explicit.py which stores the individu... | [
1,
529,
9507,
29958,
19057,
29914,
5029,
8336,
29914,
23945,
280,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
453,
4627,
1078,
263,
4996,
322,
26616,
982,
304,
24379,
385,
6560,
1842,
... |
usermanagementorg/views_group_insert_user.py | shagun30/djambala-2 | 0 | 164681 | <reponame>shagun30/djambala-2<gh_stars>0
# -*- coding: utf-8 -*-
"""
/dms/usermanagementorg/views_group_insert_user.py
.. loescht User mit dem entsprechenden User-Namen
Django content Management System
<NAME>
<EMAIL>
Die Programme des dms-Systems koennen frei genutzt und den spezifischen
Beduerfnissen entsp... | [
1,
529,
276,
1112,
420,
29958,
845,
351,
348,
29941,
29900,
29914,
19776,
1117,
2883,
29899,
29906,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,... |
house_robber.py | tusharsadhwani/leetcode | 6 | 119426 | class Solution:
def rob(self, nums: list[int]) -> int:
if len(nums) == 0:
return 0
max_loot: list[int] = [0 for _ in nums]
for index, num in enumerate(nums):
if index == 0:
max_loot[index] = num
elif index == 1:
max_loot[in... | [
1,
770,
24380,
29901,
13,
1678,
822,
10832,
29898,
1311,
29892,
954,
29879,
29901,
1051,
29961,
524,
2314,
1599,
938,
29901,
13,
4706,
565,
7431,
29898,
1949,
29879,
29897,
1275,
29871,
29900,
29901,
13,
9651,
736,
29871,
29900,
13,
13,
... |
registrobrepp/domain/eppcreatebrdomain.py | ivcmartello/registrobrepp | 0 | 77680 | <gh_stars>0
from eppy.doc import EppDoc
class EppCreateBrDomain(EppDoc):
_path = ('brdomain:create', )
def __init__(self, organization: str, flag1: str = None, flag2: str = None, flag3: str = None, autorenew: bool = False):
rpf = None
if flag1 or flag2 or flag3:
rpf = {'@flag1': f... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
321,
23717,
29889,
1514,
1053,
382,
407,
14526,
13,
13,
13,
1990,
382,
407,
4391,
12432,
15951,
29898,
29923,
407,
14526,
1125,
13,
1678,
903,
2084,
353,
6702,
1182,
7247,
29901,
... |
universal_portfolio/util/process_data.py | jehung/universal_portfolio | 14 | 1615928 | import os
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
datapath = '../util/stock_dfs/'
def get_ticker(x):
return x.split('/')[-1].split('.')[0]
def ret(x, y):
return np.log(y/x)
def get_zscore(x):
return (x -x.mean())/x.std()
def make_inputs(filepath):
D = pd.read_cs... | [
1,
1053,
2897,
13,
5215,
11701,
408,
10518,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
13,
13,
4130,
481,
493,
353,
525,
6995,
4422,
29914,
17712,
29918,
29069,
22208,
13,
13,
13,
1753,
679,
... |
ui/mext.py | szymonkaliski/nott | 25 | 15140 | <filename>ui/mext.py
# FIXME: fix all "happy paths coding" issues
import liblo
from threading import Thread
class Mext(object):
device = None
def __init__(self, device_port=5000):
self.device_receiver = liblo.ServerThread(device_port)
self.device_receiver.add_method("/monome/grid/key", "iii... | [
1,
529,
9507,
29958,
1481,
29914,
1004,
486,
29889,
2272,
13,
29937,
383,
6415,
2303,
29901,
2329,
599,
376,
29882,
14862,
10898,
14137,
29908,
5626,
13,
13,
5215,
4303,
417,
13,
3166,
3244,
292,
1053,
10480,
13,
13,
13,
1990,
341,
10... |
tests/settings/test_custom_metrics.py | proknow/proknow-python | 2 | 27193 | import pytest
import re
from proknow import Exceptions
def test_create(app, custom_metric_generator):
pk = app.pk
# Verify returned CustomMetricItem
params, custom_metric = custom_metric_generator()
assert custom_metric.name == params["name"]
assert custom_metric.context == params["context"]
... | [
1,
1053,
11451,
1688,
13,
5215,
337,
13,
13,
3166,
410,
28385,
1053,
8960,
29879,
13,
13,
1753,
1243,
29918,
3258,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
... |
apps/libro/urls.py | ernestoaguaysol/mysite | 0 | 173249 | <reponame>ernestoaguaysol/mysite<filename>apps/libro/urls.py
from django.urls import path
from .views import crearAutor,listarAutor
urlpatterns = [
path('crear_autor/', crearAutor, name = 'crear_autor'),
path('listar_autor/', listarAutor, name = 'listar_autor')
] | [
1,
529,
276,
1112,
420,
29958,
824,
4778,
10617,
1036,
324,
29914,
5781,
568,
29966,
9507,
29958,
13371,
29914,
1982,
307,
29914,
26045,
29889,
2272,
13,
3166,
9557,
29889,
26045,
1053,
2224,
13,
3166,
869,
7406,
1053,
907,
279,
29909,
... |
app/viewsets.py | mvargas33/Tablero_digital | 1 | 167341 | from rest_framework import viewsets, status, serializers, mixins, filters
from rest_framework.exceptions import NotFound
from rest_framework.decorators import action
from rest_framework.response import Response
from .models import PostIt, Board, WorkIn, VoteIn
from django.core.exceptions import ObjectDoesNotExist
from ... | [
1,
515,
1791,
29918,
4468,
1053,
1776,
7224,
29892,
4660,
29892,
7797,
19427,
29892,
6837,
1144,
29892,
18094,
13,
3166,
1791,
29918,
4468,
29889,
11739,
29879,
1053,
2216,
9692,
13,
3166,
1791,
29918,
4468,
29889,
19557,
4097,
1053,
3158,
... |
testing/example.py | gndctrl2mjrtm/dkeras | 195 | 93559 | # Ideas
"""
server = dkeras.DataServer()
model1.link(model3)
model1.postprocess = lambda z: np.float16(z)
server = model1 + model2 + model3
server.add(camera1, dest=('m1', 'm2'))
server.add_address('192.168.1.42')
"""
| [
1,
396,
13001,
294,
13,
15945,
29908,
13,
2974,
353,
270,
3946,
294,
29889,
1469,
6004,
580,
13,
13,
4299,
29896,
29889,
2324,
29898,
4299,
29941,
29897,
13,
13,
4299,
29896,
29889,
2490,
5014,
353,
14013,
503,
29901,
7442,
29889,
7411,... |
tests/test_models.py | mgierm/djangocms_semantic_ui | 3 | 88550 | # -*- coding: utf-8 -*-
from django.test import TestCase
from djangocms_semantic_ui.models import Segment
class SegmentTestCase(TestCase):
def setUp(self):
pass
def test_models(self):
segment = Segment.objects.create(
label='Test',
color='green',
inverted... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
9557,
29889,
1688,
1053,
4321,
8259,
13,
13,
3166,
270,
29926,
574,
542,
1516,
29918,
12846,
7716,
29918,
1481,
29889,
9794,
1053,
6667,
358,
13,
... |
django_covid19/spider/nCoV/spiders/dxy.py | zhangguoyuanshuai/Python-Covid19API | 0 | 1611140 | """丁香园数据源"""
import json
import scrapy
import logging
from scrapy.selector import Selector
from .. import items
from django.core.cache import cache
from django.utils.timezone import datetime, make_aware
logger = logging.getLogger()
PROVINCE_CODES = {
"黑龙江": "HLJ",
"香港": "XG",
"青海": "QH",
"陕西": "SX"... | [
1,
9995,
31968,
31113,
232,
158,
176,
30354,
30763,
31193,
15945,
29908,
13,
13,
5215,
4390,
13,
5215,
24559,
2272,
13,
5215,
12183,
13,
3166,
24559,
2272,
29889,
14357,
1053,
7605,
272,
13,
13,
3166,
6317,
1053,
4452,
13,
13,
3166,
9... |
src/utility/get_data.py | mtsu-data-science/non-profit-categorization | 1 | 150359 | import pandas as pd
import os
import urllib.request
def download_project_maslow_files():
"""The purpose of this function is to handle getting the nonprofit.txt and nonprofit_text.txt
files. This functin will create a data directory, add a .gitignore file so
source control does not pick up the txt files, ... | [
1,
1053,
11701,
408,
10518,
13,
5215,
2897,
13,
5215,
3142,
1982,
29889,
3827,
13,
13,
13,
1753,
5142,
29918,
4836,
29918,
8247,
677,
29918,
5325,
7295,
13,
1678,
9995,
1576,
6437,
310,
445,
740,
338,
304,
4386,
2805,
278,
1661,
771,
... |
molecule/centos/tests/test_icinga_satclient.py | dverhelst/icinga2 | 3 | 195202 | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('icinga2satclient')
def test_sat_client_config(host):
""" basic configuration checks
"""
with host.sudo():
# Check if zone is config... | [
1,
1053,
2897,
13,
5215,
1243,
7192,
336,
29889,
13239,
29889,
550,
1821,
29918,
27492,
13,
13,
1688,
7192,
336,
29918,
23525,
353,
1243,
7192,
336,
29889,
13239,
29889,
550,
1821,
29918,
27492,
29889,
2744,
1687,
16802,
29898,
13,
1678,
... |
project_template.py | dvillega/scripts | 0 | 175242 | <gh_stars>0
#!/usr/bin/env python
"""
Creates a base directory structure ala Project Template (from R)
author - <NAME>
2013/08/19
"""
import argparse
import errno
import os
import sys
def make_sure_path_exists(path):
try:
os.makedirs(path)
except OSError as exception:
if exception.errno != er... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
9832,
1078,
263,
2967,
3884,
3829,
394,
29874,
8010,
25663,
313,
3166,
390,
29897,
13,
8921,
448,
529,
5813,
29... |
setup.py | akhiilkasare/end-to-end-macine-learning-pipeline-with-mlops-tools | 0 | 176040 | <reponame>akhiilkasare/end-to-end-macine-learning-pipeline-with-mlops-tools
from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='End to End Machine Learning Pipeline with MLOps tools',
author='<NAME>',
license='MIT',
)
| [
1,
529,
276,
1112,
420,
29958,
557,
2918,
309,
29895,
294,
598,
29914,
355,
29899,
517,
29899,
355,
29899,
8628,
457,
29899,
21891,
29899,
13096,
5570,
29899,
2541,
29899,
29885,
417,
567,
29899,
8504,
13,
3166,
731,
21245,
8789,
1053,
... |
main/migrations/0005_auto_20180603_0449.py | OpenHumans/jupyter-gallery | 10 | 115732 | # Generated by Django 2.0.6 on 2018-06-03 04:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0004_auto_20180601_2005'),
]
operations = [
migrations.AlterField(
model_name='sharednotebook',
name='create... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
29889,
29953,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29900,
29953,
29899,
29900,
29941,
29871,
29900,
29946,
29901,
29946,
29929,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
... |
tests/ea/mutation/mutator/test_mutate.py | stevenbennett96/stk | 21 | 41317 | from tests.utilities import is_equivalent
def test_mutate(case_data):
"""
Test :meth:`mutate`.
Parameters
----------
case_data : :class:`.CaseData`
A test case. Holds the mutator to test and the correct mutation
record.
Returns
-------
None : :class:`NoneType`
""... | [
1,
515,
6987,
29889,
4422,
1907,
1053,
338,
29918,
1686,
27445,
13,
13,
13,
1753,
1243,
29918,
6149,
403,
29898,
4878,
29918,
1272,
1125,
13,
1678,
9995,
13,
1678,
4321,
584,
29885,
621,
18078,
6149,
403,
1412,
13,
13,
1678,
12662,
26... |
tests/test_general.py | haku-kiro/flaskCRUD | 0 | 44677 | """
General unit tests
"""
class TestClass:
def test_base(self):
assert 42 == 42
| [
1,
9995,
13,
15263,
5190,
6987,
13,
15945,
29908,
13,
13,
13,
1990,
4321,
2385,
29901,
13,
13,
1678,
822,
1243,
29918,
3188,
29898,
1311,
1125,
13,
4706,
4974,
29871,
29946,
29906,
1275,
29871,
29946,
29906,
13,
2
] |
fourtynine.py | glennandreph/learnpython | 1 | 37106 | def my_function_with_args(username, greeting):
print("Hello, %s , From My Function! I wish you %s" %(username, greeting))
| [
1,
822,
590,
29918,
2220,
29918,
2541,
29918,
5085,
29898,
6786,
29892,
1395,
15133,
1125,
30004,
13,
1678,
1596,
703,
10994,
29892,
1273,
29879,
1919,
3645,
1619,
6680,
29991,
306,
6398,
366,
1273,
29879,
29908,
1273,
29898,
6786,
29892,
... |
micropub/renderer/element.py | HakierGrzonzo/microPub | 0 | 189501 | <reponame>HakierGrzonzo/microPub
from bs4 import BeautifulSoup as Soup
from bs4 import Tag
from micropub.renderer.text import Text
class Element:
def __init__(self, tag, renderer, parent = None):
self.renderer = renderer
self.parent = parent
self.tag = tag
self.children = list()
... | [
1,
529,
276,
1112,
420,
29958,
29950,
557,
631,
3338,
6626,
2502,
29914,
29885,
2357,
21076,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
408,
317,
1132,
13,
3166,
24512,
29946,
1053,
10522,
13,
3166,
20710,
1336,
431,
29889,
9482,
... |
unit_test.py | ksaper/CloudShell_LDAP_Integration | 0 | 78044 | from ldap_user_mgmt import ldapimport
test_runner = ldapimport()
error_log = []
t_user = 'unit_test_user'
user_created = 0
# Get user list from CloudShell
try:
master_list = test_runner.load_cloudshell_users()
print 'CloudShell User List'
print master_list
except:
error_log.append('Fail... | [
1,
515,
301,
29881,
481,
29918,
1792,
29918,
29885,
29887,
4378,
1053,
301,
29881,
481,
5215,
30004,
13,
30004,
13,
1688,
29918,
27492,
353,
301,
29881,
481,
5215,
26471,
13,
2704,
29918,
1188,
353,
5159,
30004,
13,
29873,
29918,
1792,
... |
create_bq_table.py | timurk1234/bqstream | 0 | 133463 | #!/usr/bin/env python
import webapp2
from bqloader import BQLoader
class MainHandler(webapp2.RequestHandler):
def get(self):
bq_loader = BQLoader()
bq_loader.create_table()
self.response.write('ok')
app = webapp2.WSGIApplication([
('/tasks/create_bq_table', MainHandler)
], debug=... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
1856,
932,
29906,
13,
3166,
289,
29939,
12657,
1053,
350,
2239,
29877,
1664,
13,
13,
13,
1990,
4241,
4598,
29898,
2676,
932,
29906,
29889,
3089,
4598,
1125,
13,
1678,
822,
... |
deepchem/feat/molecule_featurizers/coulomb_matrices.py | deloragaskins/deepchem | 3,782 | 13183 | """
Generate coulomb matrices for molecules.
See Montavon et al., _New Journal of Physics_ __15__ (2013) 095003.
"""
import numpy as np
from typing import Any, List, Optional
from deepchem.utils.typing import RDKitMol
from deepchem.utils.data_utils import pad_array
from deepchem.feat.base_classes import MolecularFeat... | [
1,
9995,
13,
5631,
403,
3581,
29880,
3424,
13516,
363,
13206,
21337,
29889,
13,
13,
13393,
4526,
485,
265,
634,
394,
1696,
903,
4373,
8237,
310,
29837,
29918,
4770,
29896,
29945,
1649,
313,
29906,
29900,
29896,
29941,
29897,
29871,
29900,... |
multiuploader/management/commands/clean_uploads.py | SharmaVinayKumar/django-multiuploader | 5 | 32904 | from __future__ import print_function, unicode_literals
import os
from datetime import timedelta
import multiuploader.default_settings as DEFAULTS
from django.conf import settings
from django.core.management.base import BaseCommand
from django.utils.timezone import now
from multiuploader.models import MultiuploaderFi... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
29892,
29104,
29918,
20889,
1338,
13,
13,
5215,
2897,
13,
3166,
12865,
1053,
5335,
287,
2554,
13,
13,
5215,
2473,
9009,
261,
29889,
4381,
29918,
11027,
408,
22236,
29903,
13,
316... |
Python/ConkyServerStatus/conkyserverstatus.py | abergman/API | 12 | 168107 | <filename>Python/ConkyServerStatus/conkyserverstatus.py<gh_stars>10-100
#!/usr/bin/python
# -*- coding: utf-8 -*-
# coding: UTF-8
import json, codecs, os, sys, datetime
import xml.etree.ElementTree as ET
import httplib2
import ConfigParser
config = ConfigParser.ConfigParser()
config.readfp(open('glesys.conf'))
__AP... | [
1,
529,
9507,
29958,
11980,
29914,
1168,
3459,
6004,
5709,
29914,
535,
3459,
2974,
4882,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
299... |
test/module/test_null_values.py | dmorel/cfn-python-lint | 1 | 68112 | <reponame>dmorel/cfn-python-lint<gh_stars>1-10
"""
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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 restricti... | [
1,
529,
276,
1112,
420,
29958,
29881,
12257,
295,
29914,
6854,
29876,
29899,
4691,
29899,
27854,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
29871,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
... |
german_experiment.py | laurensalvarez/Fooling-LIME-SHAP | 55 | 164317 | <filename>german_experiment.py<gh_stars>10-100
"""
The experiment MAIN for GERMAN.
"""
import warnings
warnings.filterwarnings('ignore')
from adversarial_models import *
from utils import *
from get_data import *
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
... | [
1,
529,
9507,
29958,
29887,
3504,
29918,
735,
15362,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
15945,
29908,
13,
1576,
7639,
14861,
1177,
363,
402,
1001,
27616,
29889,
13,
15945,
29908... |
mytrading/configs.py | joeledwardson/betfair-browser | 3 | 59020 | from typing import List, Dict, Optional
from myutils.registrar import Registrar
from myutils import dictionaries
import os, yaml
from os import path
import json
from .exceptions import FeatureConfigException
reg_plots = Registrar()
reg_features = Registrar()
KEY_SAMPLE = 'smp'
KEY_AVERAGE = 'avg'
KEY_TICKS = 'tck'
K... | [
1,
515,
19229,
1053,
2391,
29892,
360,
919,
29892,
28379,
13,
3166,
590,
13239,
29889,
29238,
279,
1053,
2169,
2132,
279,
13,
3166,
590,
13239,
1053,
21503,
4314,
13,
5215,
2897,
29892,
343,
8807,
13,
3166,
2897,
1053,
2224,
13,
5215,
... |
simulation/model/sim_model.py | fladdimir/csa-simulation-based-sc-forecast | 2 | 75393 | from typing import Any, Dict, List
from model.blocks.delivery import Delivery
from model.blocks.order_creation import OrderCreation
from model.blocks.order_ingest import OrderIngest
from model.blocks.order_material import OrderMaterial
from model.blocks.production import Production
from model.blocks.wait_for_material ... | [
1,
515,
19229,
1053,
3139,
29892,
360,
919,
29892,
2391,
13,
13,
3166,
1904,
29889,
1271,
29879,
29889,
29881,
27657,
1053,
360,
27657,
13,
3166,
1904,
29889,
1271,
29879,
29889,
2098,
29918,
1037,
362,
1053,
8170,
9832,
362,
13,
3166,
... |
tests/functional/modules/test_zos_tso_command.py | IBM/zos-core-collection-ftp | 4 | 23698 | from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os
import sys
import warnings
import ansible.constants
import ansible.errors
import ansible.utils
import pytest
from pprint import pprint
# The positive path test
def test_zos_tso_command_listuser(ansible_adhoc):
hosts ... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
13,
13,
1649,
2527,
562,
605,
1649,
353,
1134,
13,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
18116,
13,
13,
5215,
385,
1687,
29889,
3075... |
deeposlandia/datagen.py | Oslandia/Streetscene_CNN | 53 | 140452 | """Main method to generate new datasets
Example of program call:
* generate 64*64 pixel images from Shapes dataset, 10000 images in the training
set, 100 in the validation set, 1000 in the testing set::
python deeposlandia/datagen.py -D shapes -s 64 -t 10000 -v 100 -T 1000
"""
import argparse
import os
impo... | [
1,
9995,
6330,
1158,
304,
5706,
716,
20035,
13,
13,
14023,
310,
1824,
1246,
29901,
13,
13,
29930,
5706,
29871,
29953,
29946,
29930,
29953,
29946,
15526,
4558,
515,
1383,
11603,
8783,
29892,
29871,
29896,
29900,
29900,
29900,
29900,
4558,
... |
Section 12/12.4-download-img.py | magnusmel/The-Modern-Python-Challenge-v | 3 | 189256 | import requests
def get_image(url, filename):
target = requests.get(url)
ext = '.png'
open(filename + ext, 'wb').write(target.content)
print(f"{filename}{ext} downloaded")
url = "https://www.python.org/static/img/python-logo@2x.png"
get_image(url,'py-logo')
| [
1,
1053,
7274,
30004,
13,
30004,
13,
1753,
679,
29918,
3027,
29898,
2271,
29892,
10422,
1125,
30004,
13,
1678,
3646,
353,
7274,
29889,
657,
29898,
2271,
8443,
13,
1678,
1294,
353,
15300,
2732,
29915,
30004,
13,
1678,
1722,
29898,
9507,
... |
examples/tornado/myapp/__init__.py | s-shin/wswrapper | 2 | 26895 | # -*- coding: utf-8 -*-
def setup_argparser(parser):
"""コマンドパーサーのセットアップ。
パーサーは共有されるので、被らないように上手く調整すること。
:param parser: ``argparse.ArgumentParser`` のインスタンス。
"""
pass
def setup_app(args):
"""コマンドパース後のセットアップ。
:param args: ``parser.arg_parse()`` の戻り値。
"""
pass
def on_open(... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
1753,
6230,
29918,
1191,
16680,
29898,
16680,
1125,
13,
1678,
9995,
30459,
30388,
30203,
30335,
30715,
30185,
30615,
30185,
30199,
30885,
30317,
30279,
... |
python/pointcloud/lidaroverview.py | NLeSC/pointcloud-benchmark | 9 | 158016 | <filename>python/pointcloud/lidaroverview.py
#!/usr/bin/env python
################################################################################
# Created by <NAME> #
# <EMAIL> #
###################################... | [
1,
529,
9507,
29958,
4691,
29914,
3149,
9274,
29914,
29880,
333,
279,
957,
1493,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13383,
13383,
13383,
13383,
13383,
13,
29937,
1678,
6760,
630,
491,
529,
5813,
29958... |
paccmann_proteomics/data/datasets/seq_clf.py | xueeinstein/paccmann_proteomics | 28 | 35753 | import os
import time
from dataclasses import dataclass, field
from enum import Enum
from typing import List, Optional, Union
import torch
from filelock import FileLock
from transformers import PreTrainedTokenizer, RobertaTokenizer, RobertaTokenizerFast, XLMRobertaTokenizer
from transformers.data.datasets import GlueDa... | [
1,
1053,
2897,
13,
5215,
931,
13,
3166,
848,
13203,
1053,
848,
1990,
29892,
1746,
13,
3166,
14115,
1053,
1174,
398,
13,
3166,
19229,
1053,
2391,
29892,
28379,
29892,
7761,
13,
5215,
4842,
305,
13,
3166,
934,
908,
1053,
3497,
16542,
13... |
lianjia_fetch/proxy/mutilprocess_fetch_proxy.py | lxyangfan/lianjia_fetch | 0 | 77446 | <filename>lianjia_fetch/proxy/mutilprocess_fetch_proxy.py
# ! -*- encoding:utf8 -*-
import multiprocessing as MP
from multiprocessing import Manager, Queue, Value, Lock
import time
def task(url, v):
print 'Url is:', url
v.value += 1
return url
def apply_pool_test():
url = 'http://sh.lianjia.com/d'
... | [
1,
529,
9507,
29958,
492,
273,
29926,
423,
29918,
9155,
29914,
14701,
29914,
29885,
4422,
5014,
29918,
9155,
29918,
14701,
29889,
2272,
13,
29937,
1738,
448,
29930,
29899,
8025,
29901,
9420,
29947,
448,
29930,
29899,
13,
5215,
6674,
307,
... |
ThinkPython/chap9/ex9.py | sokolowskik/Tutorials | 0 | 22353 | <gh_stars>0
def is_reverse(i, j):
"""
Convert 2-digit numbers to strings and check if they are palindromic.
If one of the numbers has less then 2 digits, fill with zeros.
"""
str_i = str(i)
str_j = str(j)
if len(str_i) < 2:
str_i = str_i.zfill(2)
if len(str_j) < 2:
str_j ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
1753,
338,
29918,
24244,
29898,
29875,
29892,
432,
1125,
13,
1678,
9995,
13,
1678,
14806,
29871,
29906,
29899,
26204,
3694,
304,
6031,
322,
1423,
565,
896,
526,
5112,
513,
456,
293,
298... |
websauna/utils/psql.py | highPriestLOL/websauna | 286 | 165264 | <reponame>highPriestLOL/websauna
"""PostgreSQL helpers."""
# Use pgcrypto, instead of uuid-ossp
# Also create a function uuid_generate_v4 for backward compatibility
UUID_SUPPORT_STMT = """CREATE EXTENSION IF NOT EXISTS "pgcrypto";
CREATE OR REPLACE FUNCTION uuid_generate_v4()
RETURNS uuid
AS '
BEGIN
RETURN gen_random_... | [
1,
529,
276,
1112,
420,
29958,
9812,
29925,
374,
342,
3927,
29931,
29914,
2676,
4977,
4347,
13,
15945,
29908,
6747,
7979,
4176,
1371,
414,
1213,
15945,
13,
13,
29937,
4803,
23822,
29883,
17929,
29892,
2012,
310,
318,
5416,
29899,
359,
1... |
cardboard/cards/sets/saviors_of_kamigawa.py | Julian/cardboard | 5 | 71238 | <reponame>Julian/cardboard
from cardboard import types
from cardboard.ability import (
AbilityNotImplemented, spell, activated, triggered, static
)
from cardboard.cards import card, common, keywords, match
@card("Hidetsugu's Second Rite")
def hidetsugus_second_rite(card, abilities):
def hidetsugus_second_rit... | [
1,
529,
276,
1112,
420,
29958,
27501,
713,
29914,
7543,
3377,
13,
3166,
5881,
3377,
1053,
4072,
13,
3166,
5881,
3377,
29889,
3097,
1053,
313,
13,
1678,
1976,
1793,
3664,
1888,
2037,
287,
29892,
24779,
29892,
5039,
630,
29892,
19799,
298... |
apps/blog/migrations/0005_blogentry_is_active.py | deniskrumko/deniskrumko | 2 | 87584 | # Generated by Django 2.0.5 on 2018-09-03 09:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0004_auto_20180828_2007'),
]
operations = [
migrations.AddField(
model_name='blogentry',
name='is_active',
... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
29889,
29945,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29900,
29929,
29899,
29900,
29941,
29871,
29900,
29929,
29901,
29945,
29929,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
... |
tools/ghc-paths/defs.bzl | guibou/rules_haskell | 222 | 197238 | <filename>tools/ghc-paths/defs.bzl
load("@bazel_skylib//lib:paths.bzl", "paths")
def _add_data_impl(ctx):
(_, extension) = paths.split_extension(ctx.executable.executable.path)
executable = ctx.actions.declare_file(
ctx.label.name + extension,
)
ctx.actions.symlink(
output = executable,... | [
1,
529,
9507,
29958,
8504,
29914,
12443,
29883,
29899,
24772,
29914,
1753,
29879,
29889,
29890,
29920,
29880,
13,
1359,
29475,
27975,
295,
29918,
7912,
1982,
458,
1982,
29901,
24772,
29889,
29890,
29920,
29880,
613,
376,
24772,
1159,
13,
13... |
record_types.py | droberson/greylost | 13 | 140771 | """ DNS Record Types """
# https://en.wikipedia.org/wiki/List_of_DNS_record_types
DNS_RECORD_TYPES = {
1: "A",
28: "AAAA",
18: "AFSDB",
42: "APL",
257: "CAA",
60: "CDNSKEY",
59: "CDS",
37: "CERT",
5: "CNAME",
62: "CSYNC",
49: "DHCID",
32769: "DLV",
39: "DNAME",
4... | [
1,
9995,
16332,
14164,
28025,
9995,
13,
13,
29937,
2045,
597,
264,
29889,
6011,
29889,
990,
29914,
4594,
29914,
1293,
29918,
974,
29918,
29928,
3059,
29918,
11651,
29918,
8768,
13,
29928,
3059,
29918,
1525,
29907,
25593,
29918,
15631,
29925... |
tests/integration/test_jwt_authorization.py | ONSdigital/ras-frontstage | 8 | 130934 | <reponame>ONSdigital/ras-frontstage<filename>tests/integration/test_jwt_authorization.py
import unittest
from unittest import mock
from uuid import uuid4
from jose import JWTError
from frontstage import app
from frontstage.common.authorisation import jwt_authorization
from frontstage.common.session import Session
fro... | [
1,
529,
276,
1112,
420,
29958,
1164,
29903,
7501,
2410,
29914,
3417,
29899,
8862,
19190,
29966,
9507,
29958,
21150,
29914,
27925,
29914,
1688,
29918,
29926,
14554,
29918,
8921,
2133,
29889,
2272,
13,
5215,
443,
27958,
13,
3166,
443,
27958,
... |
komoog/paths.py | benmaier/komoog | 2 | 49658 | # -*- coding: utf-8 -*-
"""
Path handling
"""
import pathlib
from pathlib import Path
import simplejson as json
customdir = Path.home() / ".komoog"
def _prepare():
customdir.mkdir(exist_ok=True)
cred_file = customdir / "komoot.json"
if not cred_file.exists():
data = {
"email"... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
2605,
11415,
13,
15945,
29908,
13,
13,
5215,
2224,
1982,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
2560,
3126,
408,
4390,
13,
13,
... |
GettingStarted/gettingstarted.py | rohitp934/roadtoadatascientist | 0 | 11960 | #importing necessary modules
from sklearn.linear_model import Perceptron
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
import numpy as np
# Data and labels
Xtrain = [[182, 80, 34], [176, 70, 33], [161, 60, 28], [154, 55, 27], [166, 63, 30], [189, 90, 36], [175, 63, 28], ... | [
1,
396,
5215,
292,
5181,
10585,
13,
3166,
2071,
19668,
29889,
10660,
29918,
4299,
1053,
2431,
1547,
1617,
13,
3166,
2071,
19668,
29889,
484,
1141,
29890,
943,
1053,
476,
8139,
1141,
29890,
943,
2385,
3709,
13,
3166,
2071,
19668,
29889,
... |
hard-gists/2787060/snippet.py | jjhenkel/dockerizeme | 21 | 172782 | <reponame>jjhenkel/dockerizeme<filename>hard-gists/2787060/snippet.py<gh_stars>10-100
# -*- coding:UTF8 -*-
#1.概念:
# 正则表达式(或 RE)是一种小型的、高度专业化的编程语言,
# (在Python中)它内嵌在Python中,并通过 re 模块实现。使用这个小型语言,
# 你可以为想要匹配的相应字符串集指定规则;该字符串集可能包含英文语句、email
# 地址、TeX命令或任何你想搞定的东西。然后你可以问诸如“这个字符串匹配
# 该模式吗?”或“在这个字符串中是否有部分匹配... | [
1,
529,
276,
1112,
420,
29958,
29926,
29926,
3169,
10265,
29914,
14695,
466,
2004,
29966,
9507,
29958,
6800,
29899,
29887,
2879,
29914,
29906,
29955,
29947,
29955,
29900,
29953,
29900,
29914,
29879,
1240,
7988,
29889,
2272,
29966,
12443,
2991... |
instagram/admin.py | James19stack/instagram-copy_cat | 0 | 4868 | <reponame>James19stack/instagram-copy_cat<filename>instagram/admin.py
from django.contrib import admin
from .models import Images,Comments,Profile
# Register your models here.
class CommentInline(admin.TabularInline):
model=Comments
extra=3
class ImageInline(admin.ModelAdmin):
fieldsets=[
(Non... | [
1,
529,
276,
1112,
420,
29958,
29470,
29896,
29929,
1429,
29914,
2611,
14442,
29899,
8552,
29918,
4117,
29966,
9507,
29958,
2611,
14442,
29914,
6406,
29889,
2272,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
3166,
869,
9794,
1053,
1954,
... |
tests/sentry/event_manager/interfaces/test_debug_meta.py | uandco/sentry | 2 | 67931 | <filename>tests/sentry/event_manager/interfaces/test_debug_meta.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import pytest
from sentry.models import Event
from sentry.event_manager import EventManager
@pytest.fixture
def make_debug_meta_snapshot(insta_snapshot):
def inner(data):
mg... | [
1,
529,
9507,
29958,
21150,
29914,
29879,
8269,
29914,
3696,
29918,
12847,
29914,
1639,
8726,
29914,
1688,
29918,
8382,
29918,
7299,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
31... |
wsgi.py | nadeengamage/flaskee | 0 | 41200 | """
The Flaskee is an Open Source project for Microservices.
Develop By <NAME> | https://nadeengamage.com | <EMAIL>
"""
from werkzeug.serving import run_simple
from werkzeug.middleware.dispatcher import DispatcherMiddleware
from flaskee import api
app = api.create_app()
application = DispatcherMiddleware(app)
if _... | [
1,
9995,
13,
1576,
2379,
294,
23137,
338,
385,
4673,
7562,
2060,
363,
20140,
9916,
29889,
13,
21956,
2648,
529,
5813,
29958,
891,
2045,
597,
1056,
311,
996,
314,
482,
29889,
510,
891,
529,
26862,
6227,
29958,
13,
15945,
29908,
13,
13,... |
flink-libraries/flink-streaming-python/src/test/python/org/apache/flink/streaming/python/api/utils/pygeneratorbase.py | Silven1117/flink | 9 | 115211 | ################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this... | [
1,
835,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
29937,
29871,
10413,
21144,
304,
278,
13380,
18540,
10606,
313,
3289,
29943,
29897,
1090,
697,
13,
29937,
29871,
470,
901,
17737,
3406,
19405,
8571,
4110,
29889,
29871,
2823,
278,
... |
divedownload.py | AmoghRRao/Game-Recommendation-System | 0 | 105365 | <filename>divedownload.py<gh_stars>0
from google_drive_downloader import GoogleDriveDownloader as gdd
gdd.download_file_from_google_drive(file_id='14LXxwldPTV5K1EmrDr-HQc1svBhMKDvT',
dest_path='./similarity.pkl',
unzip=False)
| [
1,
529,
9507,
29958,
29881,
2347,
776,
1359,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
5386,
29918,
21594,
29918,
10382,
261,
1053,
5087,
29928,
4401,
6767,
12657,
408,
330,
1289,
13,
13,
13,
29887,
1289,
29889,... |
lib/clean_npy.py | L0SG/Liver_segmentation | 0 | 198041 | import skimage
from skimage.measure import label, regionprops
import matplotlib.pyplot as plt
import cv2
import numpy as np
import os
from imageio import imwrite
# following previous labeling method
lesion_class_label = 0
def convert(warped_mask):
bboxes = []
if warped_mask.max() == 1:
mask_contour, ... | [
1,
1053,
2071,
3027,
13,
3166,
2071,
3027,
29889,
26658,
1053,
3858,
29892,
5120,
11030,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
5215,
2897,
13,
3166,
1967,
601,
1053,
527,... |
logs/on_member_unban.py | DiscordHackers/BetterBot-1.0.2.2 | 0 | 123586 | import disnake as discord
from disnake.ext import commands
from datetime import datetime
from api.server import base, main
class OnMemberUnBan(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_member_unban(self, guild, user):
if base.gui... | [
1,
1053,
766,
21040,
408,
2313,
536,
13,
3166,
766,
21040,
29889,
1062,
1053,
8260,
13,
3166,
12865,
1053,
12865,
13,
3166,
7882,
29889,
2974,
1053,
2967,
29892,
1667,
13,
13,
1990,
1551,
13404,
2525,
29933,
273,
29898,
26381,
29889,
29... |
scripts/example_basic_classifier.py | nicolasigor/sleep-stage | 0 | 199018 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import matplotlib.pyplot as plt
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.utils import shuffle
from sklearn.metrics import confusion_matrix
from sklearn.uti... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
10876,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770... |
jexam/argparser.py | chrispyles/jexam | 1 | 22825 | <reponame>chrispyles/jexam
#################################
##### jExam Argument Parser #####
#################################
import argparse
def get_parser():
"""
Creates and returns the argument parser for jExam
Returns:
``argparse.ArgumentParser``: the argument parser for jExam
"""
... | [
1,
529,
276,
1112,
420,
29958,
305,
3780,
2272,
793,
29914,
29926,
735,
314,
13,
13383,
13383,
29937,
13,
4136,
29937,
432,
1252,
314,
23125,
1459,
643,
16101,
13,
13383,
13383,
29937,
13,
13,
5215,
1852,
5510,
13,
13,
1753,
679,
2991... |
abc/abc189/abc189d-1.py | c-yan/atcoder | 1 | 70082 | N, *S = open(0).read().split()
t = 1
f = 1
for s in S:
if s == 'AND':
f = t + f * 2
elif s == 'OR':
t = t * 2 + f
print(t)
| [
1,
405,
29892,
334,
29903,
353,
1722,
29898,
29900,
467,
949,
2141,
5451,
580,
13,
13,
29873,
353,
29871,
29896,
13,
29888,
353,
29871,
29896,
13,
1454,
269,
297,
317,
29901,
13,
1678,
565,
269,
1275,
525,
9468,
2396,
13,
4706,
285,
... |
formato_python/calendario_formato.py | kurokirasama/webies | 0 | 1616107 | <gh_stars>0
#!/usr/bin/env python
# coding: utf-8
# In[18]:
get_ipython().system('pip install unidecode')
# In[37]:
file = open("calendario/calendario.txt", "r")
for line in file:
datos = line.split(" : ")
info = datos[0].replace("iÃ","í").replace("³","o").replace("Ã","í").replace("í©","e").replace("í¡",... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
29937,
512,
29961,
29896,
29947,
5387,
13,
13,
13,
657,
29918,
666,
1656,
2141,
... |
tests/unit/injector/test_injector.py | pauleveritt/predico | 0 | 75358 | <filename>tests/unit/injector/test_injector.py
from dataclasses import dataclass, field
import pytest
from predico.field_types import injected
from predico.injector import inject, InvalidInjectable
@dataclass
class Shoe:
size: int = 77
@dataclass
class Athlete:
shoe: Shoe = Shoe()
def test_injector_prop... | [
1,
529,
9507,
29958,
21150,
29914,
5441,
29914,
21920,
272,
29914,
1688,
29918,
21920,
272,
29889,
2272,
13,
3166,
848,
13203,
1053,
848,
1990,
29892,
1746,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
4450,
1417,
29889,
2671,
29918,
8768,
... |
dialog/apps.py | asmadotgh/neural_chat_web | 26 | 149973 | <reponame>asmadotgh/neural_chat_web
from django.apps import AppConfig
class DialogConfig(AppConfig):
name = 'dialog'
| [
1,
529,
276,
1112,
420,
29958,
11625,
328,
327,
12443,
29914,
484,
3631,
29918,
13496,
29918,
2676,
13,
3166,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
1990,
18878,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
525,
15901,
299... |
tech_project/lib/python2.7/site-packages/djangocms_picture/migrations/0007_fix_alignment.py | priyamshah112/Project-Descripton-Blog | 0 | 121481 | <reponame>priyamshah112/Project-Descripton-Blog<filename>tech_project/lib/python2.7/site-packages/djangocms_picture/migrations/0007_fix_alignment.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from djangocms_picture.models import PICTURE_ALIGNMENT
class M... | [
1,
529,
276,
1112,
420,
29958,
29886,
374,
29891,
314,
845,
801,
29896,
29896,
29906,
29914,
7653,
29899,
4002,
924,
265,
29899,
29933,
1188,
29966,
9507,
29958,
11345,
29918,
4836,
29914,
1982,
29914,
4691,
29906,
29889,
29955,
29914,
2746... |
music_site/mongoServices/services.py | UVG-Teams/music-space | 0 | 24391 | from pymongo import MongoClient
client = MongoClient()
db = client.music_space
def print_collection(collection):
print("/" * 75)
for x in db[collection].find():
print(x)
print("/" * 75)
def save_sales_on_mongo(collection, data):
for i in range(len(data['sales'])):
data['sales'][i]['to... | [
1,
515,
282,
962,
7443,
1053,
18294,
4032,
13,
13,
4645,
353,
18294,
4032,
580,
13,
2585,
353,
3132,
29889,
23596,
29918,
3493,
13,
13,
1753,
1596,
29918,
10855,
29898,
10855,
1125,
13,
1678,
1596,
11974,
29908,
334,
29871,
29955,
29945... |
pc-policy-status.py | sgordon46/pc-toolbox | 0 | 1611028 | from __future__ import print_function
try:
input = raw_input
except NameError:
pass
import argparse
import pc_lib_general
import pc_lib_api
# --Execution Block-- #
# --Parse command line arguments-- #
parser = argparse.ArgumentParser(prog='rltoolbox')
parser.add_argument(
'-u',
'--username',
type... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
2202,
29901,
13,
1678,
1881,
353,
10650,
29918,
2080,
13,
19499,
4408,
2392,
29901,
13,
1678,
1209,
13,
5215,
1852,
5510,
13,
5215,
22844,
29918,
1982,
29918,
17492,
13,
5215... |
natlas-agent/config.py | m4rcu5/natlas | 0 | 1801 | import os
from dotenv import load_dotenv
class Config:
# Current Version
NATLAS_VERSION = "0.6.10"
BASEDIR = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(BASEDIR, '.env'))
def get_int(self, varname):
tmp = os.environ.get(varname)
if tmp:
return int(tmp)
return None
def get_bo... | [
1,
1053,
2897,
13,
3166,
8329,
6272,
1053,
2254,
29918,
6333,
6272,
13,
13,
13,
1990,
12782,
29901,
13,
13,
12,
29937,
9626,
10079,
13,
12,
29940,
1299,
29931,
3289,
29918,
16358,
353,
376,
29900,
29889,
29953,
29889,
29896,
29900,
2990... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.