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 |
|---|---|---|---|---|---|
sdk/python/pulumi_azure_native/relay/v20170401/_inputs.py | pulumi-bot/pulumi-azure-native | 31 | 64732 | <filename>sdk/python/pulumi_azure_native/relay/v20170401/_inputs.py
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping... | [
1,
529,
9507,
29958,
15348,
29914,
4691,
29914,
29886,
352,
15547,
29918,
17688,
29918,
11487,
29914,
2674,
388,
29914,
29894,
29906,
29900,
29896,
29955,
29900,
29946,
29900,
29896,
19891,
2080,
29879,
29889,
2272,
13,
29937,
14137,
29922,
9... |
parameter_prediction/models/mlp.py | mdenil/parameter_prediction | 7 | 113210 | import theano.tensor as T
from pylearn2.models import mlp
from pylearn2.space import VectorSpace
from pylearn2.utils import sharedX
from pylearn2.utils import safe_zip
from pylearn2.linear.matrixmul import MatrixMul
from collections import OrderedDict
class MLP(mlp.MLP):
def inv_prop(self, state_above):
se... | [
1,
1053,
278,
1562,
29889,
20158,
408,
323,
13,
3166,
282,
1508,
2753,
29906,
29889,
9794,
1053,
286,
22833,
13,
3166,
282,
1508,
2753,
29906,
29889,
3493,
1053,
16510,
14936,
13,
3166,
282,
1508,
2753,
29906,
29889,
13239,
1053,
7258,
... |
tests/pydevtest/test_iput_options.py | cyverse/irods | 0 | 161159 | import os
import re
import sys
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
import configuration
from resource_suite import ResourceBase
import lib
class Test_iPut_Options(ResourceBase, unittest.TestCase):
def setUp(self):
super(Test_iPut_Options, self).setUp... | [
1,
1053,
2897,
13,
5215,
337,
13,
5215,
10876,
13,
13,
361,
10876,
29889,
3259,
29918,
3888,
529,
313,
29906,
29892,
29871,
29955,
1125,
13,
1678,
1053,
443,
27958,
29906,
408,
443,
27958,
13,
2870,
29901,
13,
1678,
1053,
443,
27958,
... |
crawler_her_sel_old.py | OliverWisn/mishmash_tao | 0 | 111297 | # crawler_her_sel.py
# -*- coding: utf-8 -*-
import time
from selenium.webdriver import Firefox
from selenium.webdriver.firefox.options import Options
from bs4 import BeautifulSoup
options = Options()
options.add_argument("--headless")
driver = Firefox(options=options)
driver.get("https://www.flashscore.... | [
1,
396,
29349,
1358,
29918,
2276,
29918,
2838,
29889,
2272,
30004,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
30004,
13,
5215,
931,
30004,
13,
30004,
13,
3166,
18866,
29889,
29813,
1053,
... |
meter/connector/master.py | anbo225/docklet | 273 | 123606 | <reponame>anbo225/docklet<gh_stars>100-1000
#!/usr/bin/python3
import socket, select, errno, threading, os
class master_connector:
tcp_port = 1727
max_minions = 256
conn = {}
epoll_fd = select.epoll()
def establish_vswitch(ovsname):
os.system('ovs-vsctl del-br ovs-%s >/dev/null 2>&1' % ovsname)
os.syst... | [
1,
529,
276,
1112,
420,
29958,
273,
833,
29906,
29906,
29945,
29914,
29881,
1698,
1026,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
... |
server/routines/urls.py | IvanGelo1/thesis-project | 2 | 1602190 | <reponame>IvanGelo1/thesis-project<filename>server/routines/urls.py<gh_stars>1-10
from django.urls import path, include
from .views import RoutinesView
urlpatterns = [
path('api/routines/getAll', RoutinesView.as_view()),
] | [
1,
529,
276,
1112,
420,
29958,
29902,
3703,
29954,
7078,
29896,
29914,
26533,
29899,
4836,
29966,
9507,
29958,
2974,
29914,
14608,
1475,
29914,
26045,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
... |
cloudentries/fusioncompute/lifecycles/fc_rest_client/storage/volumes.py | CloudChef/CloudEntries | 0 | 50233 | # Copyright (c) 2021 Qianyun, Inc. All rights reserved.
from ..common import FusionComputeBase
from cloudify import ctx
class VolumesClient(FusionComputeBase):
IDENTIFIER = 'volumes'
def list(self, urn, limit=100, offset=0):
uri_prefix = '/'.join([self.urn2uri(urn), self.IDENTIFIER])
paginat... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29896,
660,
713,
29891,
348,
29892,
9266,
29889,
2178,
10462,
21676,
29889,
13,
13,
3166,
6317,
9435,
1053,
383,
3958,
20606,
29872,
5160,
13,
3166,
9570,
1598,
1053,
128... |
python/ccxt/tprexchange.py | ThePeoplesReserve/ccxt | 0 | 40574 | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import BadRequest
from ccxt.base.e... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
349,
14063,
11662,
6058,
11488,
3446,
3235,
24080,
29892,
13315,
8519,
402,
1430,
1001,
3040,
29928,
5300,
399,
24071,
20700,
438,
5348,
9980,
... |
raw_data_euzi.py | thiagolcmelo/benchmark | 0 | 113750 | <reponame>thiagolcmelo/benchmark<gh_stars>0
# coding: utf-8
# In[37]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.spatial.distance import cdist
from sklearn.preprocessing import StandardScaler
plt.rcParams['figure.figsize'] = 14, 8
# In[76]:
n = 6
files = np.load('res_numer... | [
1,
529,
276,
1112,
420,
29958,
386,
29875,
351,
324,
4912,
7078,
29914,
1785,
16580,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
29937,
512,
29961,
29941,
29955,
5387,
13,
13,
... |
common/responses.py | mungujn/pick-a-seat-backend-py | 0 | 112306 | <filename>common/responses.py<gh_stars>0
from flask import jsonify
import common.logger as log
def respondInternalServerError(message='Internal server error', error=None):
'''Returns an object which flask will parse and transform into a 500 response'''
log.info('Responding internal server error')
log.info... | [
1,
529,
9507,
29958,
9435,
29914,
26679,
267,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
29784,
1053,
4390,
1598,
13,
5215,
3619,
29889,
21707,
408,
1480,
13,
13,
13,
1753,
10049,
16491,
6004,
2392,
29898,
4906,
... |
test_nn.py | eric93/sceneparsing | 0 | 194985 | import run
import scipy.misc
import matplotlib.pyplot as plt
import numpy as np
im = scipy.misc.imread("sampleData/images/ADE_val_00000003.jpg")
ima = scipy.misc.imread("sampleData/annotations/ADE_val_00000003.png")
imnn = run.run_nn(im)
#imnn = run.run_nn_full(im)
print np.sum(imnn == ima),"/",len(ima) * len(ima[0... | [
1,
1053,
1065,
13,
5215,
4560,
2272,
29889,
29885,
10669,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
326,
353,
4560,
2272,
29889,
29885,
10669,
29889,
326,
949,
703,
11249,
1469,
29914,
8346,
299... |
ShotgunORM/SgScriptFields.py | TheThirdFloor/python-shotgunorm | 19 | 157126 | <filename>ShotgunORM/SgScriptFields.py
# Copyright (c) 2013, <NAME> - NFXPlugins
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyri... | [
1,
529,
9507,
29958,
2713,
327,
28798,
12054,
29914,
29903,
29887,
4081,
14256,
29889,
2272,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29941,
29892,
529,
5813,
29958,
448,
405,
26753,
3247,
8385,
13,
29937,
2178... |
PONG_GAME.py | espr3so/Python | 0 | 43687 | <filename>PONG_GAME.py<gh_stars>0
# Pong Game in Codeskulptor
import simpleguitk as simplegui
import random
WIDTH = 600
HEIGHT = 400
BALL_RADIUS = 20
PAD_WIDTH = 8
PAD_HEIGHT = 80
HALF_PAD_WIDTH = PAD_WIDTH / 2
HALF_PAD_HEIGHT = PAD_HEIGHT / 2
LEFT = False
RIGHT = True
score1 = 0
score2 = 0
paddle1_pos = 0
pad... | [
1,
529,
9507,
29958,
29925,
20614,
29918,
12739,
2303,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
349,
549,
8448,
297,
315,
2631,
29895,
14185,
272,
13,
13,
5215,
2560,
2543,
277,
29895,
408,
2560,
23569,
13,
... |
files/metacentrum.py | crocs-muni/rtt-deployment | 2 | 1613738 | <gh_stars>1-10
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import logging
import os
import time
import hashlib
import subprocess
import sys
logger = logging.getLogger(__name__)
JOB_TEMPLATE = """#!/bin/bash
# set a handler to clean the SCRATCHDIR once finished
trap "clean_scratch" TERM EXIT
expor... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
1852,
5510,
13,
... |
accounts/models.py | connorpekovic/djangox | 0 | 1608861 | <reponame>connorpekovic/djangox
import uuid
from django.contrib.auth.models import AbstractUser
from django.db import models
# User ID needs to be UUID
class CustomUser(AbstractUser):
id = models.UUIDField(primary_key=True,
default=uuid.uuid4,
editable=False)
... | [
1,
529,
276,
1112,
420,
29958,
13082,
272,
412,
9756,
293,
29914,
19776,
574,
2251,
13,
5215,
318,
5416,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
25513,
2659,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
13,
29937,
... |
ros/env_measurement_module/scripts/run_env_measurement.py | MikhailBertrand/AN-BME280-IG | 0 | 197106 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy
from std_msgs.msg import String, Float32
from env_measurement_module.BME280 import BME280
class EnvMeasurement(object):
"""
Use AN-301 for measuring environment information
"""
def __init__(self):
self.__device = BME280()
self.... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
696,
1028,
29891,
13,
3166,
3659,
29918,
1516,
3174,
29889,
7645,
1053,
1714,
29892,
27842,
29941,... |
src/data/make_dataset.py | chorus12/TimeSeriesWorkshop | 1 | 1605754 | # -*- coding: utf-8 -*-
import pandas as pd
from pathlib import Path
import os
from datetime import datetime
import sys
def main():
""" Runs data processing scripts to turn raw data from (../raw) into
cleaned data ready to be analyzed (saved in ../processed).
"""
df = pd.read_csv(os.path.join(proj... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
11701,
408,
10518,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
2897,
13,
3166,
12865,
1053,
12865,
13,
5215,
10876,
13,
13,
13,
1753,
1667,
7295... |
FOP.py | LagSeeN/thai-ads-filter | 32 | 175359 | #!/usr/bin/env python3
""" FOP
Filter Orderer and Preener
Copyright (C) 2011 Michael
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at yo... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
15945,
29908,
383,
4590,
13,
1678,
19916,
8170,
261,
322,
4721,
759,
13,
1678,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29896,
5765,
13,
13,
1678,
910,
1824,
... |
dispatch/flags.py | harrybrwn/dispatch | 0 | 133038 | <gh_stars>0
import sys
from typing import Dict, Optional
from collections.abc import Iterable
from dataclasses import is_dataclass
from .exceptions import DeveloperException
from ._meta import _FunctionMeta, _GroupMeta, _CliMeta
class Option:
__slots__ = ('name', 'type', 'shorthand', 'help', '_value',
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
10876,
13,
3166,
19229,
1053,
360,
919,
29892,
28379,
13,
3166,
16250,
29889,
10736,
1053,
20504,
519,
13,
3166,
848,
13203,
1053,
338,
29918,
1272,
1990,
13,
13,
3166,
869,
11739... |
django_blog/blog/models.py | lidysun/test1 | 0 | 37694 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from time import timezone
from django.db import models
# Create your models here.
class UserInfo(models.Model):
user= models.CharField(max_length = 30)
pwd = models.CharField(max_length = 30)
# class Publisher(models.Model):
# name = models... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
30004,
13,
3166,
931,
1053,
29431,
30004,
13,
3166,
9557,
29889,
2585,
1053,
4733,
... |
runtests.py | humantech/django-ext_fields | 2 | 177529 | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.utils.functional import empty
from django.test.utils import get_runner
if __name__ == "__main__":
def run_tests(subtest):
test_module = 'tests.' + subtest
os.environ['DJANGO_SETTINGS_MODULE'] =... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
5215,
9557,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
13239,
29889,
2220,
284,
1053,
4069,
13,
3166,
9557,
29889,
1688,
29889... |
sthima/todo/tests/test_models.py | bratomes/work-at-sthima | 0 | 1601204 | from django.test import TestCase
from django.contrib.auth.models import User
from model_mommy import mommy
from todo.models import Task
class TaskTest(TestCase):
"""
Test case of Task model
"""
def setUp(self):
"""
Set up all the tests
"""
self.user = mommy.make(User... | [
1,
515,
9557,
29889,
1688,
1053,
4321,
8259,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
4911,
13,
13,
3166,
1904,
29918,
29885,
290,
1357,
1053,
16823,
1357,
13,
13,
3166,
10481,
29889,
9794,
1053,
9330,
13,
13,
13,
... |
jojo/jojo.py | ExtremeTea/Coffee | 0 | 168592 | from discord.ext import commands
import random
import discord
class jojo:
def __init__(self, bot):
self.bot = bot
@commands.command(pass_context=True)
async def jojo(self, context, member: discord.Member):
"""Give someone <NAME>!"""
author = context.message.author.mentio... | [
1,
515,
2313,
536,
29889,
1062,
1053,
8260,
30004,
13,
5215,
4036,
30004,
13,
5215,
2313,
536,
30004,
13,
30004,
13,
1990,
2958,
2212,
29901,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
9225,
1125,
30004,
13,
4706,
1583,
29889... |
api/utils/input/__init__.py | mmangione/alcali | 306 | 53422 | from shlex import split
import json
class RawCommand:
def __init__(self, command, client="local", posix=True, inline=False):
# TODO: check shlex.quote, raw string, etc..
if inline:
self.command = split(command, posix=posix)
else:
self.command = split(command, posix=... | [
1,
515,
528,
2506,
1053,
6219,
13,
5215,
4390,
13,
13,
13,
1990,
22038,
6255,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1899,
29892,
3132,
543,
2997,
613,
926,
861,
29922,
5574,
29892,
10583,
29922,
8824,
1125,
13,
4706,
3... |
aiida_vasp/workchains/verify.py | muhrin/aiida-vasp | 0 | 38088 | """
Verify workchain.
-----------------
Indented to be used to verify a calculation, perform corrections in inputs files and
restart depending on physical principles etc. E.g. issues that are outside the Calculators awereness,
or not currently checked in it. This workchain does currently nothing.
"""
# pylint: disabl... | [
1,
9995,
13,
6565,
1598,
664,
14153,
29889,
13,
13,
2683,
29899,
13,
2568,
14927,
304,
367,
1304,
304,
11539,
263,
13944,
29892,
2189,
14515,
1953,
297,
10970,
2066,
322,
13,
5060,
442,
8679,
373,
9128,
18671,
2992,
29889,
382,
29889,
... |
search/linear/linear_rawan.py | ra1ski/python-data-structures-and-algorithms | 0 | 188153 | <filename>search/linear/linear_rawan.py
# Linear search algorithm
# @ra1ski
def linear_search(item, _list):
index = None
for idx, val in enumerate(_list):
if val == item:
index = idx
break
return index
if __name__ == '__main__':
_list = ['chrome', 'firefox', 'opera'... | [
1,
529,
9507,
29958,
4478,
29914,
10660,
29914,
10660,
29918,
1610,
273,
29889,
2272,
13,
29937,
22985,
2740,
5687,
13,
29937,
732,
336,
29896,
2574,
13,
13,
13,
1753,
5608,
29918,
4478,
29898,
667,
29892,
903,
1761,
1125,
13,
1678,
238... |
custom_components/sleep_as_android/const.py | Antoni-Czaplicki/HA-SleepAsAndroid | 0 | 198439 | <filename>custom_components/sleep_as_android/const.py
import voluptuous as vol
DOMAIN = "sleep_as_android"
DEVICE_MACRO: str = "%%%device%%%"
DEFAULT_NAME = "SleepAsAndroid"
DEFAULT_TOPIC_TEMPLATE = "SleepAsAndroid/%s" % DEVICE_MACRO
DEFAULT_QOS = 0
| [
1,
529,
9507,
29958,
6341,
29918,
14036,
29914,
17059,
29918,
294,
29918,
2843,
29914,
3075,
29889,
2272,
13,
5215,
1700,
21245,
17269,
408,
1700,
13,
13,
3970,
29032,
353,
376,
17059,
29918,
294,
29918,
2843,
29908,
13,
2287,
19059,
2991... |
atcoder/corp/code-festival-2017-qualc_a.py | knuu/competitive-programming | 1 | 151812 | <filename>atcoder/corp/code-festival-2017-qualc_a.py
def main() -> None:
S = input()
print("Yes" if "AC" in [S[i:i+2] for i in range(len(S)-1)] else "No")
if __name__ == '__main__':
main()
| [
1,
529,
9507,
29958,
271,
29883,
6119,
29914,
2616,
29886,
29914,
401,
29899,
29888,
6074,
29899,
29906,
29900,
29896,
29955,
29899,
15380,
29883,
29918,
29874,
29889,
2272,
13,
1753,
1667,
580,
1599,
6213,
29901,
13,
1678,
317,
353,
1881,
... |
mars/dataframe/datasource/date_range.py | haijohn/mars | 1 | 194386 | <reponame>haijohn/mars
# Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# 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... | [
1,
529,
276,
1112,
420,
29958,
2350,
823,
6547,
29914,
29885,
1503,
13,
29937,
14187,
1266,
29871,
29896,
29929,
29929,
29929,
29899,
29906,
29900,
29906,
29900,
319,
1982,
5363,
6431,
21771,
292,
19806,
29889,
13,
29937,
13,
29937,
10413,
... |
python_concurrency/simulationExample_multiprocessing.py | karthik/berkeley | 106 | 165292 | import numpy as np
import time
from multiprocessing import Pool, cpu_count
import sys
sys.path.append('..')
from numpyVectorization.motion_gauss import simulateParticles_loop
# How do we pass multiple arguments via pool? Use wrapper functions! Note:
# lambda functions will NOT work for this purpose
def wrapper_fun(ar... | [
1,
1053,
12655,
408,
7442,
13,
5215,
931,
13,
3166,
6674,
307,
985,
292,
1053,
28625,
29892,
26403,
29918,
2798,
13,
5215,
10876,
13,
9675,
29889,
2084,
29889,
4397,
877,
636,
1495,
13,
3166,
12655,
12877,
2133,
29889,
29885,
8194,
2991... |
vnegmas/backend/src/nnegmas/my_factory_managers.py | YueNing/vnegmas | 3 | 135794 | <gh_stars>1-10
import itertools
# from negmas.helpers import ConfigReader, LoggerMixin
import logging
from abc import ABC, abstractmethod
from collections import defaultdict
from negmas import (AgentMechanismInterface, Breach, Contract, MechanismState,
Negotiator, RenegotiationRequest, UtilityFunct... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
4256,
8504,
13,
29937,
515,
3480,
8247,
29889,
3952,
6774,
1053,
12782,
6982,
29892,
28468,
29924,
861,
262,
13,
5215,
12183,
13,
3166,
25638,
1053,
16417,
2989... |
ocd_backend/models/definitions/person.py | aolieman/open-raadsinformatie | 0 | 182919 | """The classes in this person module are derived from and described by:
http://www.w3.org/ns/person#
"""
import foaf
from ocd_backend.models.definitions import Opengov, Schema, Foaf, Rdfs, \
Dcterms, Bio, Vcard, Person as PersonNS, Meeting
from ocd_backend.models.properties import StringProperty, URLProperty, Date... | [
1,
9995,
1576,
4413,
297,
445,
2022,
3883,
526,
10723,
515,
322,
5439,
491,
29901,
13,
1124,
597,
1636,
29889,
29893,
29941,
29889,
990,
29914,
1983,
29914,
10532,
29937,
13,
15945,
29908,
13,
13,
5215,
1701,
2142,
13,
3166,
288,
2252,
... |
ofa/imagenet_codebase/utils/pytorch_modules.py | twice154/ofa-pytorch | 9 | 149841 | # Once for All: Train One Network and Specialize it for Efficient Deployment
# <NAME>, <NAME>, <NAME>, <NAME>, <NAME>
# International Conference on Learning Representations (ICLR), 2020.
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
def make_divisible(v, divi... | [
1,
396,
9038,
363,
2178,
29901,
28186,
3118,
8527,
322,
12630,
675,
372,
363,
382,
4543,
10034,
22812,
13,
29937,
529,
5813,
10202,
529,
5813,
10202,
529,
5813,
10202,
529,
5813,
10202,
529,
5813,
29958,
13,
29937,
4623,
16377,
373,
292... |
vunit/com/codec_vhdl_package.py | nordicneurolab/vunit | 1 | 71488 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2014-2020, <NAME> <EMAIL>
"""
Module containing the CodecVHDLPackage class.
"""
from string import Tem... | [
1,
396,
910,
7562,
5920,
3812,
338,
4967,
304,
278,
4958,
310,
278,
18129,
2911,
5236,
13,
29937,
19245,
29892,
325,
29889,
29871,
29906,
29889,
29900,
29889,
960,
263,
3509,
310,
278,
341,
7390,
471,
451,
13235,
411,
445,
934,
29892,
... |
pyga/candidate_factory/bit_string.py | Eyjafjallajokull/pyga | 0 | 141669 | from .candidate_factory import CandidateFactory
from ..candidate import Candidate
class BitStringFactory(CandidateFactory):
"""
Generates candidates with data represented by fixed-length binary strings.
:param random: Random number generator
:param size: int length of strings to generate
"""
... | [
1,
515,
869,
29883,
5380,
403,
29918,
14399,
1053,
315,
5380,
403,
5126,
13,
3166,
6317,
29883,
5380,
403,
1053,
315,
5380,
403,
13,
13,
13,
1990,
18531,
1231,
5126,
29898,
29907,
5380,
403,
5126,
1125,
13,
1678,
9995,
13,
1678,
3251,... |
src/WatchDbg/core/watch.py | Tekiter/WatchDBG-IDA | 42 | 181990 | from WatchDbg.common import EventHandler
NEXT_ID = 0
def get_next_id():
global NEXT_ID
ret = NEXT_ID
NEXT_ID += 1
return ret
class WatchListItem():
nextid = 0
def __init__(self, address, wtype):
self.address = address
self.type = wtype
self.name = ""
self._i... | [
1,
515,
24274,
10234,
29887,
29889,
9435,
1053,
6864,
4598,
13,
13,
29940,
12194,
29918,
1367,
353,
29871,
29900,
13,
13,
13,
1753,
679,
29918,
4622,
29918,
333,
7295,
13,
1678,
5534,
405,
12194,
29918,
1367,
13,
1678,
3240,
353,
405,
... |
renishawWiRE/wdfReader.py | lovaulonze/py-wdf-reader | 3 | 123398 | # Renishaw wdf Raman spectroscopy file reader
# Code inspired by Henderson, Alex DOI:10.5281/zenodo.495477
from __future__ import print_function
import struct
import numpy
import io
from .types import LenType, DataType, MeasurementType
from .types import ScanType, UnitType, DataType
from .types import Offsets, ExifTags... | [
1,
396,
7493,
728,
1450,
281,
2176,
8292,
273,
6683,
307,
1557,
2270,
934,
9591,
13,
29937,
5920,
20603,
491,
17973,
1330,
29892,
4827,
11662,
29902,
29901,
29896,
29900,
29889,
29945,
29906,
29947,
29896,
29914,
2256,
8144,
29889,
29946,
... |
meiduo_mall/apps/orders/urls.py | MarioKarting/Django_meiduo_project | 0 | 19716 | # !/usr/bin/env python
# _*_ coding:utf-8 _*_
from django.conf.urls import url
from . import views
urlpatterns = [
# 1. 结算订单 orders/settlement/
url(r'^orders/settlement/$', views.OrdersSettlementView.as_view(), name='settlement'),
# 2. orders/commit/ 提交订单
url(r'^orders/commit/$', views.OrdersCo... | [
1,
396,
1738,
29914,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
903,
29930,
29918,
14137,
29901,
9420,
29899,
29947,
903,
29930,
29918,
13,
13,
13,
3166,
9557,
29889,
5527,
29889,
26045,
1053,
3142,
13,
13,
3166,
869,
1053,
8386,
... |
MAX40080/src/torque_test_stand/src/torque_tester.py | MilosRasic98/Orbweaver-Rover | 1 | 36369 | <reponame>MilosRasic98/Orbweaver-Rover
#!/usr/bin/env python3
import rospy
import serial
from std_msgs.msg import Float32
tt_arduino = serial.Serial("/dev/ttyUSB0", 9600)
rospy.init_node('torque_test_stand', anonymous = False)
pub = rospy.Publisher('/test_equipment/measured_torque', Float32, queue_size=10)
r = rospy... | [
1,
529,
276,
1112,
420,
29958,
29316,
359,
29934,
294,
293,
29929,
29947,
29914,
2816,
29890,
705,
12483,
29899,
29934,
957,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
696,
1028,
29891,
13,
5215,
7797,
... |
solution/10828(스택).py | OMEGA-Y/Baekjoon-sol | 0 | 119204 | import sys
input = sys.stdin.readline
N = int(input())
stack = []
for _ in range(N):
data = list(input().strip().split())
if data[0] == 'push':
stack.append(data[1])
elif data[0] == 'top':
if stack:
print(stack[-1])
else:
print(-1)
elif data[0] == 'size'... | [
1,
1053,
10876,
13,
2080,
353,
10876,
29889,
4172,
262,
29889,
949,
1220,
13,
13,
29940,
353,
938,
29898,
2080,
3101,
13,
1429,
353,
5159,
13,
13,
1454,
903,
297,
3464,
29898,
29940,
1125,
13,
1678,
848,
353,
1051,
29898,
2080,
2141,
... |
tests/framework/test_bmi_var_units.py | mwtoews/pymt | 38 | 173649 | <gh_stars>10-100
import pytest
import numpy as np
from gimli import IncompatibleUnitsError, UnitNameError
from numpy.testing import assert_array_equal
from pymt.framework.bmi_bridge import BmiTimeInterpolator, GridMapperMixIn, _BmiCap
class SimpleBmi:
def get_output_var_names(self):
return ("elevation",... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
11451,
1688,
13,
13,
5215,
12655,
408,
7442,
13,
3166,
330,
326,
492,
1053,
512,
23712,
2525,
1169,
2392,
29892,
13223,
1170,
2392,
13,
3166,
12... |
api_blog/serializers.py | poya-kob/BiaBegard | 0 | 52571 | from rest_framework.serializers import HyperlinkedModelSerializer, ModelSerializer
from rest_framework import serializers
from .models import Blog, BlogCategory, Comments
class CategorySerializer(ModelSerializer):
class Meta:
model = BlogCategory
exclude = ['id']
class BlogListSerializer(Hyperl... | [
1,
515,
1791,
29918,
4468,
29889,
15550,
19427,
1053,
26078,
2324,
287,
3195,
17679,
29892,
8125,
17679,
13,
3166,
1791,
29918,
4468,
1053,
7797,
19427,
13,
13,
3166,
869,
9794,
1053,
350,
1188,
29892,
350,
1188,
10900,
29892,
461,
29879,... |
tesseract.py | Swarnava-Sadhukhan/Vehicle-Reg.-Details-using-Number-Plate | 0 | 166638 | from PIL import Image
import pytesseract
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"
image = Image.open(your_image)
image_to_text = pytesseract.image_to_string(image, lang='eng')
print(image_to_text)
| [
1,
515,
349,
6227,
1053,
7084,
13,
5215,
282,
3637,
16136,
627,
13,
13,
2272,
29873,
16136,
627,
29889,
2272,
29873,
16136,
627,
29889,
29873,
16136,
627,
29918,
9006,
353,
364,
29908,
29907,
3583,
9283,
12745,
29905,
29911,
16136,
627,
... |
test.py | Mrphase/transformer | 0 | 86945 | # -*- coding: utf-8 -*-
#/usr/bin/python2
'''
Feb. 2019 by <NAME>.
<EMAIL>.
https://www.github.com/kyubyong/transformer
Inference
'''
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # 这一行注释掉就是使用cpu,不注释就是使用gpu
import tensorflow as tf
from data_load import get_batch
from model import Transformer
from hparams impo... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
29914,
4855,
29914,
2109,
29914,
4691,
29906,
13,
12008,
13,
29943,
774,
29889,
29871,
29906,
29900,
29896,
29929,
491,
529,
5813,
15513,
13,
29966,... |
xcx_interface/route/menu_r.py | linjingheng-dev/python_service | 8 | 55635 | from django.urls import path
from xcx_interface.controller.menu.menu_msg import getMenuList
urlpatterns = [
# 获取菜单列表
path('getMenuList', getMenuList, name='getMenuList')
]
| [
1,
515,
9557,
29889,
26045,
1053,
2224,
13,
3166,
921,
18904,
29918,
13248,
29889,
8299,
29889,
6510,
29889,
6510,
29918,
7645,
1053,
679,
6823,
1293,
13,
13,
2271,
11037,
29879,
353,
518,
13,
1678,
396,
29871,
31024,
30683,
31854,
31166,... |
config.py | mpsiva89/protean | 0 | 83918 | <gh_stars>0
import os
from protean.utils import (
CommandProcessing,
EventProcessing,
IdentityStrategy,
IdentityType,
)
class Config:
DEBUG = True
# Parse domain directory and autoload domain modules
AUTOLOAD_DOMAIN = True
# A secret key for this particular Protean installation. Use... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2897,
13,
13,
3166,
3279,
273,
29889,
13239,
1053,
313,
13,
1678,
10516,
7032,
292,
29892,
13,
1678,
6864,
7032,
292,
29892,
13,
1678,
27486,
26910,
29892,
13,
1678,
27486,
1542,
... |
prediction.py | NII-Kobayashi/Linear_Regression | 0 | 87098 | <reponame>NII-Kobayashi/Linear_Regression
# Author: <NAME>
#
# For license information, see LICENSE.txt
"""
Function for predicting the number of retweets in a future period
References
----------
.. *<NAME>, ICWSM, pp. 191-200, 2016; <NAME>, Communication of the ACM 53, pp.80-88, 2010; Zhao et al., KDD, pp. 1513-1522... | [
1,
529,
276,
1112,
420,
29958,
29940,
2687,
29899,
29968,
711,
388,
18321,
29914,
12697,
29918,
4597,
23881,
13,
29937,
13361,
29901,
529,
5813,
29958,
13,
29937,
13,
29937,
1152,
19405,
2472,
29892,
1074,
365,
2965,
1430,
1660,
29889,
39... |
runesanalyzer/data.py | clemsciences/runes-analyzer | 5 | 96840 | <reponame>clemsciences/runes-analyzer<filename>runesanalyzer/data.py
"""
Sources:
- Viking Language 1 by <NAME> 2013
Unicode: 16A0–16FF
Swedish runic inscriptions
http://runes.verbix.com/index.html
http://runes.verbix.com/vikingage/Uppland.html
"""
import json
from runesanalyzer.runes import RunicAlphabetName, Rune,... | [
1,
529,
276,
1112,
420,
29958,
2841,
1516,
455,
2063,
29914,
3389,
267,
29899,
24209,
3298,
29966,
9507,
29958,
3389,
267,
24209,
3298,
29914,
1272,
29889,
2272,
13,
15945,
29908,
13,
29903,
2863,
29901,
13,
29899,
18503,
292,
17088,
2987... |
window_resize.py | manya1712/eye-care | 0 | 148195 |
import pyautogui as pag
alert = 0
class changes():
def __init__(self):
self.last = 35
def change(i, obj):
last = obj.last
if i > 0 and i < 31:
if last > 0 and last < 31:
pass
else:
pag.hotkey('ctrl', '-')
elif i > 30 and i < 51:
if last > 3... | [
1,
29871,
13,
5215,
11451,
1300,
468,
1481,
408,
10203,
13,
13,
12888,
353,
29871,
29900,
13,
13,
13,
1990,
3620,
7295,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
4230,
353,
29871,
29941,
29945,
13,
13,
... |
restAPI/serializers.py | GarlandQ/project-2-photoshare-api | 0 | 99915 | <filename>restAPI/serializers.py
from rest_framework import serializers
from users.models import Profile
from feed.models import Post, Comment
from django.shortcuts import get_object_or_404
class ProfileSerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(
view_na... | [
1,
529,
9507,
29958,
5060,
8787,
29914,
15550,
19427,
29889,
2272,
13,
3166,
1791,
29918,
4468,
1053,
7797,
19427,
13,
3166,
4160,
29889,
9794,
1053,
20802,
13,
3166,
8343,
29889,
9794,
1053,
4918,
29892,
461,
13,
3166,
9557,
29889,
12759... |
finances/migrations/0002_auto_20210119_1120.py | ericmuh/recruitment-system | 2 | 63858 | # Generated by Django 3.1.5 on 2021-01-19 08:20
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('fina... | [
1,
396,
3251,
630,
491,
15337,
29871,
29941,
29889,
29896,
29889,
29945,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29896,
29899,
29896,
29929,
29871,
29900,
29947,
29901,
29906,
29900,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
... |
src/__init__.py | chompomonim/python-graphql-example | 0 | 34856 | from sanic import Sanic
from sanic.response import json, text
from sanic_graphql import GraphQLView
from api import schema, setup
app = Sanic()
@app.route("/")
async def root(request):
return text("Welcome! Call me via POST with graphql query in body.")
@app.route("/", methods=['POST'])
async def post_root(req... | [
1,
515,
9753,
293,
1053,
3087,
293,
13,
3166,
9753,
293,
29889,
5327,
1053,
4390,
29892,
1426,
13,
3166,
9753,
293,
29918,
4262,
1519,
1053,
12367,
2239,
1043,
13,
13,
3166,
7882,
1053,
10938,
29892,
6230,
13,
13,
932,
353,
3087,
293,... |
multilstm_tensorpack/tensorpack/dataflow/dataset/ilsvrc.py | neale/A4C | 1 | 1615864 | <filename>multilstm_tensorpack/tensorpack/dataflow/dataset/ilsvrc.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: ilsvrc.py
# Author: <NAME> <<EMAIL>>
import os
import tarfile
import cv2
import six
import numpy as np
import xml.etree.ElementTree as ET
from ...utils import logger
from ...utils.loadcaffe import... | [
1,
529,
9507,
29958,
4713,
16613,
29885,
29918,
20158,
4058,
29914,
20158,
4058,
29914,
1272,
1731,
29914,
24713,
29914,
2719,
29894,
2214,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
1... |
metafilter/webserve.py | exhuma/metafilter | 0 | 68424 | <reponame>exhuma/metafilter
from flask import (
Flask,
g,
render_template,
request,
redirect,
make_response,
url_for,
jsonify)
from metafilter.model import Node, Query, Session, Tag, set_dsn
from metafilter.model import queries, nodes, tags as tag_model
im... | [
1,
529,
276,
1112,
420,
29958,
735,
29882,
10859,
29914,
7299,
4572,
13,
3166,
29784,
1053,
313,
13,
4706,
2379,
1278,
29892,
13,
4706,
330,
29892,
13,
4706,
4050,
29918,
6886,
29892,
13,
4706,
2009,
29892,
13,
4706,
6684,
29892,
13,
... |
src/datasets/transformer_name_replacer.py | elangovana/large-scale-ptm-ppi | 1 | 101018 | <gh_stars>1-10
import logging
from typing import List, Dict
class TransformerNameReplacer:
"""
Replaces named entity mentions in text with custom names
"""
@property
def _logger(self):
return logging.getLogger(__name__)
def __call__(self, text: str, entities: List[Dict]) -> str:
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
12183,
13,
3166,
19229,
1053,
2391,
29892,
360,
919,
13,
13,
13,
1990,
4103,
24784,
1170,
5612,
433,
2265,
29901,
13,
1678,
9995,
13,
1678,
10088,
6048,
4257,... |
main.py | KuanS/DL_template | 0 | 55831 | from utils.initLog import initLog
def main_function():
logger = initLog('dev', '/home/kuan/DL_template')
logger.critical('CRITICAL')
logger.fatal('FATAL')
logger.error('ERROR')
logger.warning('WARNING')
logger.info('INFO')
logger.debug('DEBUG')
if __name__ == '__main__':
main_function()
| [
1,
515,
3667,
29879,
29889,
2344,
3403,
1053,
2069,
3403,
13,
13,
13,
1753,
1667,
29918,
2220,
7295,
13,
29871,
17927,
353,
2069,
3403,
877,
3359,
742,
8207,
5184,
29914,
2120,
273,
29914,
19558,
29918,
6886,
1495,
13,
13,
29871,
17927,... |
resseg/parcellation.py | fepegar/resseg | 3 | 107667 | from pathlib import Path
import numpy as np
import pandas as pd
import nibabel as nib
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
color_tables_dir = Path(__file__).parent
class Parcellation:
def __init__(self, parcellation_path):
self.parcellation_path = Path(parcellation_path)
... | [
1,
515,
2224,
1982,
1053,
10802,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
302,
747,
1107,
408,
302,
747,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
22889,
29889,
29873,
6541,
408,
286,
2466... |
tilecloud/store/redis.py | wendymhelson/tilecloud | 0 | 87660 | from __future__ import absolute_import
import logging
import os
import socket
from c2cwsgiutils import stats
import redis.sentinel
from tilecloud import TileStore
from tilecloud.store.queue import decode_message, encode_message
STREAM_GROUP = "tilecloud"
CONSUMER_NAME = socket.gethostname() + "-" + str(os.getpid())... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
13,
5215,
12183,
13,
5215,
2897,
13,
5215,
9909,
13,
13,
3166,
274,
29906,
29883,
5652,
3146,
13239,
1053,
22663,
13,
5215,
29825,
29889,
29879,
15440,
295,
13,
13,
3166,
2... |
src/app/domains/user.py | hap0n/employee-management-system | 0 | 148238 | from dataclasses import dataclass
from enum import Enum
from typing import Optional
class Role(str, Enum):
user = "user"
hr = "hr"
admin = "admin"
@dataclass
class User:
username: str
password_hash: str
id: Optional[int] = None
role: Role = Role.user
| [
1,
515,
848,
13203,
1053,
848,
1990,
13,
3166,
14115,
1053,
1174,
398,
13,
3166,
19229,
1053,
28379,
13,
13,
13,
1990,
1528,
280,
29898,
710,
29892,
1174,
398,
1125,
13,
1678,
1404,
353,
376,
1792,
29908,
13,
1678,
22157,
353,
376,
... |
tools/telemetry/telemetry/core/chrome/desktop_browser_finder.py | pozdnyakov/chromium-crosswalk | 0 | 142845 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Finds desktop browsers that can be controlled by telemetry."""
import logging
import os
import subprocess
import sys
from telemetry.core import brows... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29906,
450,
678,
456,
1974,
13189,
943,
29889,
2178,
10462,
21676,
29889,
13,
29937,
4803,
310,
445,
2752,
775,
338,
4095,
287,
491,
263,
350,
7230,
29899,
3293,
19405,
... |
leetcode/python/medium/p017_letterCombinations.py | kefirzhang/algorithms | 0 | 149190 | class Solution:
key_map = {
"1": [""],
"2": ['a', 'b', 'c'],
"3": ['d', 'e', 'f'],
"4": ['g', 'h', 'i'],
"5": ['j', 'k', 'l'],
"6": ['m', 'n', 'o'],
"7": ['p', 'q', 'r', 's'],
"8": ['t', 'u', 'v'],
"9": ['w', 'x', 'y', 'z']
}
def lette... | [
1,
770,
24380,
29901,
13,
1678,
1820,
29918,
1958,
353,
426,
13,
4706,
376,
29896,
1115,
6796,
12436,
13,
4706,
376,
29906,
1115,
6024,
29874,
742,
525,
29890,
742,
525,
29883,
7464,
13,
4706,
376,
29941,
1115,
6024,
29881,
742,
525,
... |
dom/metadata.py | Starwort/domgen | 0 | 37316 | import functools
from .base_classes import Container, Void
class BaseURL(Void):
"""The HTML `<base>` element specifies the base URL to use for *all*
relative URLs in a document. There can be only one `<base>` element in a
document.
"""
__slots__ = ()
tag = "base"
Base = BaseURL
class Ext... | [
1,
1053,
2090,
312,
8789,
13,
13,
3166,
869,
3188,
29918,
13203,
1053,
21679,
29892,
29434,
13,
13,
13,
1990,
7399,
4219,
29898,
29963,
3398,
1125,
13,
1678,
9995,
1576,
4544,
14935,
3188,
13885,
1543,
1580,
11057,
278,
2967,
3988,
304,... |
parse.py | tochilkinva/parse_and_save_xlsx | 0 | 132858 | <reponame>tochilkinva/parse_and_save_xlsx<gh_stars>0
import re
from bs4 import BeautifulSoup
from selenium import webdriver
URL_HH = '''https://hh.ru/search/vacancy?area=1&fromSearchLine
=true&st=searchVacancy&text=Python+junior&from=suggest_post'''
def get_page(url):
"""Получаем HTML одной страницы с указанног... | [
1,
529,
276,
1112,
420,
29958,
517,
305,
309,
9089,
1564,
29914,
5510,
29918,
392,
29918,
7620,
29918,
20267,
29916,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
337,
13,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
13,
... |
src/egl/generate/gen_egl_dispatch.py | thermasol/mesa3d | 0 | 136938 | <gh_stars>0
#!/usr/bin/env python
# (C) Copyright 2016, NVIDIA CORPORATION.
# 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 restriction, including without li... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
29937,
313,
29907,
29897,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
29892,
405,
13044,
10764,
315,
1955,
29925,
1955,
8098,... |
Chapter02/computation_graph.py | PacktPublishing/Caffe2-Quick-Start-Guide | 8 | 58885 | <reponame>PacktPublishing/Caffe2-Quick-Start-Guide<filename>Chapter02/computation_graph.py
#!/usr/bin/env python2
"""Create a network that perfoms some mathematical operations.
Run inference on this network."""
from caffe2.python import workspace, model_helper
import numpy as np
# Initialize Caffe2
workspace.GlobalI... | [
1,
529,
276,
1112,
420,
29958,
16638,
29873,
21076,
1674,
292,
29914,
29907,
3470,
29872,
29906,
29899,
2182,
860,
29899,
4763,
29899,
9485,
680,
29966,
9507,
29958,
1451,
3314,
29900,
29906,
29914,
12097,
362,
29918,
4262,
29889,
2272,
13,... |
DSA/backtracking/totalNQueens.py | lance-lh/Data-Structures-and-Algorithms | 1 | 1616321 | '''
The n-queens puzzle is the problem of placing n queens on an n×n chessboard
such that no two queens attack each other.
Given an integer n, return the number of distinct solutions to the n-queens puzzle.
Example:
Input: 4
Output: 2
Explanation: There are two distinct solutions to the 4-queens puzzle as shown belo... | [
1,
14550,
13,
1576,
302,
29899,
802,
575,
20285,
280,
338,
278,
1108,
310,
24421,
302,
712,
575,
373,
385,
302,
30122,
29876,
521,
404,
3377,
13,
14565,
393,
694,
1023,
712,
575,
5337,
1269,
916,
29889,
13,
13,
29954,
5428,
385,
604... |
tests/quality/service_catalog/test_service_catalog.py | opentelekomcloud-infra/test-scenarios | 1 | 113740 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | [
1,
396,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
366,
1122,
13,
29937,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
887,
1122,
4017,
1... |
aiolookin/__init__.py | bachya/aiolookin | 0 | 8420 | """Define the aiolookin package."""
from .device import async_get_device # noqa
| [
1,
9995,
3206,
457,
278,
7468,
324,
2550,
262,
3577,
1213,
15945,
13,
3166,
869,
10141,
1053,
7465,
29918,
657,
29918,
10141,
29871,
396,
694,
25621,
13,
2
] |
appconf/forms.py | flixgithub/adminset | 0 | 1600767 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from django.forms.widgets import *
from .models import Product, Project, AppOwner, AuthInfo, Product_Detail
class AuthInfoForm(forms.ModelForm):
class Meta:
model = AuthInfo
exclude = ("id",)
widgets = {
... | [
1,
396,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
9557,
1053,
7190,
13,
3166,
9557,
29889,
9514,
29889,
8030,
29879,
1053,
334,
13,
... |
src/bbdata/endpoint/output/objects.py | big-building-data/bbdata-python | 0 | 11421 | import requests
from bbdata.config import output_api_url
from bbdata.util import handle_response
class Objects:
base_path = "/objects"
auth = None
def __init__(self, auth):
self.auth = auth
def get_all(self, tags=None, search=None, page=None, per_page=None,
writable=False):
... | [
1,
1053,
7274,
13,
3166,
289,
29890,
1272,
29889,
2917,
1053,
1962,
29918,
2754,
29918,
2271,
13,
3166,
289,
29890,
1272,
29889,
4422,
1053,
4386,
29918,
5327,
13,
13,
13,
1990,
4669,
29879,
29901,
13,
13,
1678,
2967,
29918,
2084,
353,
... |
src/config/settings.py | d3dmenu/crypto-master | 0 | 120566 | <gh_stars>0
import os
import sys
import environ
env = environ.Env()
# API Coin market cap
API_KEY = env.str('API_KEY', '6cf06008-f1d3-45b2-9555-3ff76eec016e')
# Base url path data forex realtime scraping
urls = {
'forex-market': 'https://scanner.tradingview.com/forex/scan',
'coin-market-all': 'https://pro-a... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
5215,
12471,
13,
13,
6272,
353,
12471,
29889,
21745,
580,
13,
13,
29937,
3450,
3189,
262,
9999,
2117,
13,
8787,
29918,
10818,
353,
8829,
29889,
71... |
apps/plugins/__init__.py | jiangyx3915/-graph-bed | 10 | 108103 | <gh_stars>1-10
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
__author__= 'jiangyixin'
__time__ = 2019/2/25 22:11
"""
from .smms import SmPlugin
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
1649,
8921,
1649... |
tests/validation_suite/automation_framework/work_order_submit/work_order_submit_utility.py | manojsalunke85/avalon0.6_automaiton | 0 | 123973 | <reponame>manojsalunke85/avalon0.6_automaiton
# Copyright 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | [
1,
529,
276,
1112,
420,
29958,
1171,
29877,
1315,
284,
348,
446,
29947,
29945,
29914,
7712,
265,
29900,
29889,
29953,
29918,
17405,
1249,
265,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
18555,
15025,
13,
29937,
13,
29937,
... |
tests/app/timeout_test.py | paraguz1/voila | 0 | 161055 | import pytest
import os
@pytest.fixture
def voila_notebook(notebook_directory):
return os.path.join(notebook_directory, 'sleep.ipynb')
@pytest.fixture
def voila_args_extra():
return ['--VoilaExecutePreprocessor.timeout=1', '--KernelManager.shutdown_wait_time=0.1']
@pytest.mark.gen_test
def test_timeout(h... | [
1,
1053,
11451,
1688,
13,
13,
5215,
2897,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
13,
1753,
992,
4233,
29918,
1333,
19273,
29898,
1333,
19273,
29918,
12322,
1125,
13,
1678,
736,
2897,
29889,
2084,
29889,
7122,
29898,
1333,
19... |
windows_packages_gpu/torch/nn/intrinsic/qat/modules/linear_relu.py | codeproject/DeepStack | 353 | 8207 | from __future__ import absolute_import, division, print_function, unicode_literals
import torch.nn.qat as nnqat
import torch.nn.intrinsic
import torch.nn.functional as F
class LinearReLU(nnqat.Linear):
r"""
A LinearReLU module fused from Linear and ReLU modules, attached with
FakeQuantize modules f... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
29892,
29104,
29918,
20889,
1338,
30004,
13,
5215,
4842,
305,
29889,
15755,
29889,
29939,
271,
408,
302,
29876,
29939,
271,
30004,
13,
5215,
... |
src/model/gmf.py | AmazingDD/IF4RecSys | 2 | 161324 | import torch
from tools.engine import Engine
from tools.config import use_cuda
class GMF(torch.nn.Module):
def __init__(self, config):
super(GMF, self).__init__()
self.num_users = config['num_users']
self.num_items = config['num_items']
self.latent_dim = config['latent_dim']
... | [
1,
1053,
4842,
305,
13,
3166,
8492,
29889,
10599,
1053,
10863,
13,
3166,
8492,
29889,
2917,
1053,
671,
29918,
29883,
6191,
13,
13,
1990,
402,
29924,
29943,
29898,
7345,
305,
29889,
15755,
29889,
7355,
1125,
13,
1678,
822,
4770,
2344,
12... |
tool/plugins/database/__init__.py | eherr/motion_preprocessing_tool | 10 | 63547 | <reponame>eherr/motion_preprocessing_tool
import os
import json
from tool.plugins.database.constants import DB_URL
from tool.core.editor_window import EditorWindow
from tool.core.application_manager import ApplicationManager
from tool.constants import CONFIG_FILE
if os.path.isfile(CONFIG_FILE):
from tool.plugins.da... | [
1,
529,
276,
1112,
420,
29958,
29872,
21205,
29914,
29885,
8194,
29918,
1457,
19170,
29918,
10154,
13,
5215,
2897,
13,
5215,
4390,
13,
3166,
5780,
29889,
12800,
29889,
9803,
29889,
3075,
1934,
1053,
6535,
29918,
4219,
13,
3166,
5780,
2988... |
src/Record.py | Progitiel/Slideways | 0 | 163248 | <reponame>Progitiel/Slideways<filename>src/Record.py
import numpy as np
import time
import os
from Config import *
class Record():
def __init__(self, app):
"""Initialise les données d'un enregistrement"""
self.app = app
self.recording = False
self.allBoards = None
self.cur... | [
1,
529,
276,
1112,
420,
29958,
1184,
5559,
709,
29914,
29903,
7459,
1994,
29966,
9507,
29958,
4351,
29914,
9182,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
5215,
931,
13,
5215,
2897,
13,
13,
3166,
12782,
1053,
334,
13,
13,
1990,
141... |
scripts/view/view_image.py | fdesjardins/surface-estimation-and-image-relighting | 9 | 93599 | <gh_stars>1-10
import os
import sys
import numpy as np
from OpenGL.arrays import vbo
from OpenGL.arrays import ArrayDatatype as ADT
from OpenGL.GL.ARB.vertex_buffer_object import *
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
from scipy.spatial import Delaunay
from Image import open
def ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
12655,
408,
7442,
13,
3166,
29508,
29889,
2378,
29879,
1053,
325,
833,
13,
3166,
29508,
29889,
2378,
29879,
1053,
4398,
16390,
... |
LC/188.py | szhu3210/LeetCode_Solutions | 2 | 68511 | class Solution(object):
def maxProfit(self, k, prices):
"""
:type k: int
:type prices: List[int]
:rtype: int
"""
if not prices:
return 0
n=len(prices)
if k>n//2:
return sum([prices[i+1]-prices[i] if prices[i+1]>prices[i] else 0 ... | [
1,
770,
24380,
29898,
3318,
1125,
13,
1678,
822,
4236,
1184,
9202,
29898,
1311,
29892,
413,
29892,
26094,
1125,
13,
4706,
9995,
13,
4706,
584,
1853,
413,
29901,
938,
13,
4706,
584,
1853,
26094,
29901,
2391,
29961,
524,
29962,
13,
4706,
... |
backend/gsr_booking/management/commands/load_gsrs.py | pennlabs/penn-mobile | 2 | 38738 | <filename>backend/gsr_booking/management/commands/load_gsrs.py
import csv
from django.core.management.base import BaseCommand
from gsr_booking.models import GSR
class Command(BaseCommand):
def handle(self, *args, **kwargs):
with open("gsr_booking/data/gsr_data.csv") as data:
reader = csv.re... | [
1,
529,
9507,
29958,
27852,
29914,
3174,
29878,
29918,
2909,
292,
29914,
21895,
29914,
26381,
29914,
1359,
29918,
3174,
2288,
29889,
2272,
13,
5215,
11799,
13,
13,
3166,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
13,
... |
test/solution_tests/CHK/test_checkout.py | DPNT-Sourcecode/CHK-qvhh01 | 0 | 131182 | from lib.solutions.CHK import checkout_solution
class TestSkus():
def test_skus_should_created(self):
skus_a = checkout_solution.Skus(product_name='A', price=10.0)
assert skus_a.get_product_name() == 'A'
assert skus_a.get_price() == 10.0
assert skus_a.get_number_of_items() ==... | [
1,
515,
4303,
29889,
2929,
17925,
29889,
3210,
29968,
1053,
24808,
29918,
2929,
918,
30004,
13,
30004,
13,
1990,
4321,
15797,
375,
7295,
30004,
13,
1678,
822,
1243,
29918,
808,
375,
29918,
9344,
29918,
11600,
29898,
1311,
1125,
30004,
13,... |
test/test_second_order_warnings.py | maryamhgf/backpack | 0 | 103584 | <gh_stars>0
"""Checks wether backpack correctly recognizes when 2nd order backprop would fail.
Failure cases include
- the loss if not the output of a torch.nn module
- using unsupported parameters of the loss
"""
import pytest
import torch
from torch.nn import CrossEntropyLoss, MSELoss
import backpack.extensions as... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
5596,
29879,
281,
1979,
1250,
4058,
5149,
5936,
7093,
746,
29871,
29906,
299,
1797,
1250,
7728,
723,
4418,
29889,
13,
13,
24155,
4251,
3160,
13,
29899,
278,
6410,
565,
451... |
openprocurement/auctions/dgf/tests/award.py | openprocurement/openprocurement.auctions.dgf | 2 | 193715 | <reponame>openprocurement/openprocurement.auctions.dgf
# -*- coding: utf-8 -*-
import unittest
from datetime import timedelta
from openprocurement.auctions.core.utils import get_now
from openprocurement.auctions.core.tests.award import (
AuctionLotAwardResourceTestMixin,
Auction2LotAwardResourceTestMixin,
... | [
1,
529,
276,
1112,
420,
29958,
3150,
15439,
545,
358,
29914,
3150,
15439,
545,
358,
29889,
585,
1953,
29889,
20726,
29888,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
443,
27958,
13,
13,
... |
netrd/reconstruction/marchenko_pastur.py | Carromattsson/netrd | 0 | 97371 | """
marchenko_pastur.py
--------------
Graph reconstruction algorithm based on <NAME>., & <NAME>. (1967).
Distribution of eigenvalues for some sets of random matrices. Matematicheskii
Sbornik, 114(4), 507-536.
author: <NAME>
Submitted as part of the 2019 NetSI Collabathon.
"""
from .base import BaseReconstructor
i... | [
1,
9995,
13,
29885,
1279,
264,
2901,
29918,
29886,
579,
332,
29889,
2272,
13,
9072,
489,
13,
13,
9527,
17789,
4080,
5687,
2729,
373,
529,
5813,
29958,
1696,
669,
529,
5813,
15513,
313,
29896,
29929,
29953,
29955,
467,
29871,
13,
13398,
... |
tests/test_pool.py | rsumner31/ngraph | 1 | 72229 | # ----------------------------------------------------------------------------
# Copyright 2016 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | [
1,
396,
448,
2683,
2683,
2683,
2683,
1378,
5634,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
405,
6972,
1648,
23985,
9266,
29889,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313... |
amazon/__init__.py | gutfeeling/python-amazon-paapi | 0 | 134861 | <reponame>gutfeeling/python-amazon-paapi
"""Amazon Product Advertising API wrapper for Python"""
__version__ = '3.2.0'
__author__ = '<NAME>'
| [
1,
529,
276,
1112,
420,
29958,
29887,
329,
1725,
14067,
29914,
4691,
29899,
17260,
29899,
3274,
2754,
13,
15945,
29908,
29909,
655,
6626,
10969,
2087,
1765,
5921,
3450,
14476,
363,
5132,
15945,
29908,
13,
13,
1649,
3259,
1649,
353,
525,
... |
taobao/old_version/taobao_ver2.py | HowardHowonYu/taobao_crawler | 0 | 92694 | import time
import sys
class ProductCrawler():
def __get_proxy__(self):
from selenium import webdriver
co = webdriver.ChromeOptions()
co.add_argument("log-level=3")
co.add_argument("--headless")
driver = webdriver.Chrome('./chromedriver', options=co)
driver.get... | [
1,
1053,
931,
13,
5215,
10876,
13,
13,
1990,
10969,
29907,
1610,
1358,
7295,
13,
268,
13,
1678,
822,
4770,
657,
29918,
14701,
12035,
1311,
1125,
13,
4706,
515,
18866,
1053,
1856,
9465,
13,
13,
4706,
1302,
353,
1856,
9465,
29889,
1451,... |
common/src/stack/mq/clients/channel-ctrl.py | khanfluence/stacki-cumulus-switch | 0 | 77253 | <reponame>khanfluence/stacki-cumulus-switch
#! /opt/stack/bin/python3
#
# @copyright@
# Copyright (c) 2006 - 2018 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
import sys
import getopt
import stack.mq
import json
import zmq
try:
o... | [
1,
529,
276,
1112,
420,
29958,
29895,
5403,
25044,
663,
29914,
1429,
29875,
29899,
29883,
398,
14999,
29899,
15123,
13,
29937,
29991,
847,
3670,
29914,
1429,
29914,
2109,
29914,
4691,
29941,
13,
29937,
13,
29937,
732,
8552,
1266,
29992,
1... |
ukz/midi/writer.py | clauderichard/Ultrakazoid | 0 | 118119 | <gh_stars>0
import math
from .byteutil import *
from .config import MidiConfig
################################################
# Note: There are 24 MIDI clocks per quarter-note, apparently...
################################################
class EventCategory:
TIMESIGNATURE = 0
TEMPOCHANGE = 1
PROGRAM... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
5844,
13,
3166,
869,
10389,
4422,
1053,
334,
13,
3166,
869,
2917,
1053,
341,
8819,
3991,
13,
13,
13383,
13383,
13383,
13,
13,
29937,
3940,
29901,
1670,
526,
29871,
29906,
29946,
... |
mailbag/emailModel.py | UAlbanyArchives/mailbag | 19 | 181860 | from jsonmodels import models, fields, errors, validators
class Email(models.Base):
"""EmailModel - model class for email formats"""
Message_ID = fields.StringField(required=True)
Email_Folder = fields.StringField()
Original_Filename = fields.StringField()
Date = fields.StringField()
From = fie... | [
1,
515,
4390,
9794,
1053,
4733,
29892,
4235,
29892,
4436,
29892,
2854,
4097,
13,
13,
1990,
22608,
29898,
9794,
29889,
5160,
1125,
13,
1678,
9995,
9823,
3195,
448,
1904,
770,
363,
4876,
21971,
15945,
29908,
13,
1678,
7777,
29918,
1367,
3... |
examples/photovoltaic/PVProfileInitialization.py | noah80/tsib | 14 | 1615256 | <reponame>noah80/tsib
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.4.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %% [markdown]
# # Test weathe... | [
1,
529,
276,
1112,
420,
29958,
1217,
801,
29947,
29900,
29914,
1372,
747,
13,
29937,
11474,
13,
29937,
432,
786,
25547,
29901,
13,
29937,
259,
432,
786,
29891,
726,
29901,
13,
29937,
268,
1426,
29918,
276,
26081,
29901,
13,
29937,
539,
... |
Utils.py | MartinEngen/NaiveBayesianClassifier | 0 | 5131 | <filename>Utils.py
import os
import re
def get_subfolder_paths(folder_relative_path: str) -> list:
"""
Gets all subfolders of a given path
:param folder_relative_path: Relative path of folder to find subfolders of
:return: list of relative paths to any subfolders
"""
return [f.path for f in os... | [
1,
529,
9507,
29958,
12177,
29889,
2272,
13,
5215,
2897,
13,
5215,
337,
13,
13,
13,
1753,
679,
29918,
1491,
12083,
29918,
24772,
29898,
12083,
29918,
22925,
29918,
2084,
29901,
851,
29897,
1599,
1051,
29901,
13,
1678,
9995,
13,
1678,
40... |
app/migrations/0002_participant.py | mma22-git/woc3.0-eventmanager-Meet_Mungra | 0 | 166715 | <gh_stars>0
# Generated by Django 3.1.5 on 2021-01-19 09:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Participant',
fields=[
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
3251,
630,
491,
15337,
29871,
29941,
29889,
29896,
29889,
29945,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29896,
29899,
29896,
29929,
29871,
29900,
29929,
29901,
29946,
29... |
zfused_maya/zfused_maya/tool/animation/studiolibrary/packages/mutils/gui/__init__.py | zhoulh0322/zfused_outsource_old | 1 | 190273 | <reponame>zhoulh0322/zfused_outsource_old<gh_stars>1-10
# Copyright 2016 by <NAME>. All Rights Reserved.
#
# Permission to use, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both ... | [
1,
529,
276,
1112,
420,
29958,
17599,
5059,
29882,
29900,
29941,
29906,
29906,
29914,
29920,
29888,
3880,
29918,
449,
4993,
29918,
1025,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14187,
1266,
29871,
29906,
... |
controller/school.py | YunYinORG/social | 4 | 96473 | <gh_stars>1-10
#!/usr/bin/env python
# coding=utf-8
import web
import lib.user as user
class nku(object):
"""南开"""
def GET(self):
userinfo=user.getUser()
render = web.template.render ('templates/school/',base="layout")
if userinfo:
return render.nku(userinfo)
else:
return rende... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
5215,
1856,
13,
5215,
4303,
29889,
1792,
408,
1404,
13,
13,
1990,... |
EXC/CW2/task1/reducer.py | easyCZ/UoE-Projects | 0 | 125450 | #!/usr/bin/python
# reducer.py
import sys
word_counter = 0
last_word = None
word_documents = []
def write(keyword, total, documents):
docs = ", ".join(["(%s, %d)" % (doc, count) for doc, count in documents])
docs = "{%s}" % docs
print("{0} : {1} : {2}".format(keyword, total, docs))
# Input is sorted pri... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
3724,
2265,
29889,
2272,
13,
5215,
10876,
13,
13,
1742,
29918,
11808,
353,
29871,
29900,
13,
4230,
29918,
1742,
353,
6213,
13,
1742,
29918,
3225,
29879,
353,
5159,
13,
13,
13,
1753,
... |
metadyn.py | schneiderfelipe/scripts | 0 | 77802 | #!/usr/bin/python3
"""Analyse metadynamics trajectories from xtb."""
import argparse
import numpy as np
import matplotlib.pyplot as plt
import MDAnalysis as mda
import MDAnalysis.analysis.pca as pca
from MDAnalysis.lib import distances
from scipy.constants import calorie
from scipy.constants import kilo
from scipy.c... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
29941,
13,
13,
15945,
29908,
2744,
14997,
344,
1539,
328,
2926,
1199,
23324,
3842,
515,
29871,
486,
29890,
1213,
15945,
13,
13,
5215,
1852,
5510,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,... |
django-rest-framework-api/artists/tasks.py | mattd429/django-rest-framework-musicbrainz-api | 1 | 76103 | <reponame>mattd429/django-rest-framework-musicbrainz-api
# Django
from django.utils.text import slugify
# Celery
from celery import shared_task
# Local
from artists.models import Artist, Album, Track
# Musicbrainz
import musicbrainzngs as mb
mb.set_useragent('Mbrown - <EMAIL>', version='1.0.1')
@shared_task
def get_... | [
1,
529,
276,
1112,
420,
29958,
29885,
1131,
29881,
29946,
29906,
29929,
29914,
14095,
29899,
5060,
29899,
4468,
29899,
23596,
2634,
262,
29920,
29899,
2754,
13,
29937,
15337,
13,
3166,
9557,
29889,
13239,
29889,
726,
1053,
2243,
688,
1598,
... |
sdk/boost_1_30_0/libs/python/test/str.py | acidicMercury8/xray-1.0 | 2 | 42413 | """
>>> from str_ext import *
>>> def printer(*args):
... for x in args: print x,
... print
...
>>> work_with_string(printer)
['this', 'is', 'a', 'demo', 'string']
['this', 'is', 'a', 'demo string']
this<->is<->a<->demo<->string
This is a demo string
[ this is a demo string ]
2
this is a dem... | [
1,
9995,
30004,
13,
6778,
29958,
515,
851,
29918,
1062,
1053,
334,
30004,
13,
6778,
29958,
822,
23028,
10456,
5085,
1125,
30004,
13,
856,
268,
363,
921,
297,
6389,
29901,
1596,
921,
11167,
13,
856,
268,
1596,
30004,
13,
856,
30004,
13... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.