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
fhir/resources/specimendefinition.py
chgl/fhir.resources
0
32852
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/SpecimenDefinition Release: R4 Version: 4.0.1 Build ID: 9346c8cc45 Last updated: 2019-11-01T09:29:23.356+11:00 """ import typing from pydantic import Field, root_validator from pydantic.error_wrappers import ErrorWrapper, ValidationError from...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 13909, 29901, 1732, 597, 4415, 29955, 29889, 990, 29914, 29888, 29882, 381, 29914, 5015, 12425, 14683, 29914, 10299, 19933, 14683, 13, 19...
python/clean_json_step2.py
mfalling/covid19-random_scripts
0
99220
<reponame>mfalling/covid19-random_scripts<gh_stars>0 # FOR USF SAIL # ~ Mihir import csv import pandas as pd import numpy as np import requests import re from bs4 import BeautifulSoup import string import glob import sys import os import signal from requests.exceptions import Timeout #****************...
[ 1, 529, 276, 1112, 420, 29958, 29885, 11950, 292, 29914, 24542, 333, 29896, 29929, 29899, 8172, 29918, 16713, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 15842, 3148, 29943, 16698, 6227, 30004, 13, 29937, 3695, 29281, 381, 3000...
setup.py
yvesf/flask-mediabrowser
21
165849
#!/usr/bin/env python3 from distutils.core import setup setup(name='flask-mediabrowser', version='0.0.1', description='HTTP media browsing and streaming/transcoding', author='<NAME>', author_email='<EMAIL>', url='https://www.xapek.org/git/yvesf/flask-mediabrowser', packages=['media...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 3166, 1320, 13239, 29889, 3221, 1053, 6230, 13, 13, 14669, 29898, 978, 2433, 1579, 1278, 29899, 4210, 370, 8777, 742, 13, 418, 1873, 2433, 29900, 29889, 29900, 29889, 29896, ...
mmtbx/programs/emringer.py
jbeilstenedmands/cctbx_project
0
138522
from __future__ import division, print_function try: from phenix.program_template import ProgramTemplate except ImportError: from libtbx.program_template import ProgramTemplate import os import libtbx.phil from libtbx.utils import Sorry from libtbx import easy_pickle import mmtbx.ringer.emringer # ================...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 8542, 29892, 1596, 29918, 2220, 13, 2202, 29901, 13, 29871, 515, 17292, 861, 29889, 8860, 29918, 6886, 1053, 7835, 6733, 13, 19499, 16032, 2392, 29901, 13, 29871, 515, 619, 3116, 29890, 29916, 29889,...
RobotWorld.py
madalynlmillen/MadalynMillenCapstone
0
192907
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Classes for a simple kinematic robot arm simulation This code used matplotlib for generating graphics for CS 471/510. The MIT License (MIT) Copyright (c) 2015 <NAME> (<EMAIL>) Permission is hereby granted, free of charge, to any person obtaining a copy ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 12008, 13, 29871, 4134, 267, 363, 263, 2560, 19015, 19217, 19964, 5075, 17402, 13, 29871, 910, 775...
examples/ordering.py
F483/easyapi
0
50134
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2015 <NAME> <<EMAIL>> # License: MIT (see LICENSE file) import apigen class Ordering(apigen.Definition): @apigen.command() def first(self): return "first" @apigen.command() def second(self): return "second" @apigen.command(...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29945, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 19245, 29901, ...
pysectprop/general/__init__.py
Pretsdaya/pysectprop
1
153596
from .generalsection import GeneralSection from .materialsection import MaterialSection from .compositesection import CompositeSection from .cripplingsection import CripplingSection from .thinwalledsection import ThinWalledSection from .material import Material
[ 1, 515, 869, 4738, 1435, 428, 1053, 4593, 13438, 13, 3166, 869, 15388, 2042, 1053, 17582, 13438, 13, 3166, 869, 22410, 277, 968, 428, 1053, 24497, 568, 13438, 13, 3166, 869, 699, 407, 1847, 2042, 1053, 315, 374, 407, 1847, 13438, 13, ...
migrations/versions/1e7e4cedd1f1_.py
pavel-yas1405/teamwork
0
1603855
"""empty message Revision ID: 1e7e4cedd1f1 Revises: Create Date: 2022-04-15 15:04:47.007855 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '1e7e4cedd1f1' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
[ 1, 9995, 6310, 2643, 13, 13, 1123, 4924, 3553, 29901, 29871, 29896, 29872, 29955, 29872, 29946, 1133, 29881, 29896, 29888, 29896, 13, 1123, 1730, 267, 29901, 29871, 13, 4391, 4712, 29901, 29871, 29906, 29900, 29906, 29906, 29899, 29900, 299...
instauto/api/actions/structs/friendships.py
marvic2409/instauto
0
29668
from . import common as cmmn import logging import uuid from typing import Optional from instauto.api.structs import Surface logger = logging.getLogger(__name__) class _Base(cmmn.Base): _csrftoken: str = None radio_type: str = 'wifi-none' device_id: str = None _uid: str = None _uuid: str = None ...
[ 1, 515, 869, 1053, 3619, 408, 274, 4317, 29876, 13, 13, 5215, 12183, 13, 5215, 318, 5416, 13, 3166, 19229, 1053, 28379, 13, 3166, 832, 6921, 29889, 2754, 29889, 4984, 29879, 1053, 6298, 2161, 13, 13, 21707, 353, 12183, 29889, 657, 163...
yamanifest/manifest.py
coecms/yamanifest
2
82014
#!/usr/bin/env python """ Copyright 2017 ARC Centre of Excellence for Climate Systems Science author: <NAME> <<EMAIL>> 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/li...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 15945, 29908, 13, 11882, 1266, 29871, 29906, 29900, 29896, 29955, 9033, 29907, 11319, 310, 1222, 3729, 663, 363, 2233, 6490, 23985, 9327, 13, 13, 8921, 29901, 529, 5813, 29958, 3532,...
project/bin/countwords.py
privong/still-magic
0
65943
<filename>project/bin/countwords.py<gh_stars>0 #!/usr/bin/env python ''' Read one or more text files given as command-line arguments, or standard input if no filenames are given, and produce a two-column CSV of words and counts. ''' import sys import re import csv from collections import Counter PUNC = re.compile(...
[ 1, 529, 9507, 29958, 4836, 29914, 2109, 29914, 2798, 9303, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 12008, 13, 6359, 697, 470, 901, 1426, 2066, 2183, 408, ...
REMD_analysis/REMD_tpr_prep.py
wehs7661/REMD_analysis
1
127564
#!/usr/bin/env python import os import sys def main(): s = 'This Python script prepares all files needed to run a replica exchange, including' \ ' .mdp files and .tpr files, given the .gro file(s) and a template .mdp file.' \ ' The .gro file could be only one common .gro file for all the replicas, ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 5215, 2897, 13, 5215, 10876, 13, 13, 1753, 1667, 7295, 13, 1678, 269, 353, 525, 4013, 5132, 2471, 10223, 267, 599, 2066, 4312, 304, 1065, 263, 1634, 10123, 14523, 29892, 3704, 29915, ...
db_interfacer/interfacer.py
VenkatSubramaniam/SDI
0
43758
<reponame>VenkatSubramaniam/SDI #!/usr/bin/env python # coding: utf-8 from typing import Dict import psycopg2 as pg class DBInterfacer: def __init__(self, uname: str, pword: str, db: str, port: str) -> None: self.connection, self.cursor = self._establish_postgres_connection(uname, pword, db, port) ...
[ 1, 529, 276, 1112, 420, 29958, 29963, 5842, 271, 4035, 2572, 273, 2829, 29914, 29903, 4571, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 3166, 19229, 1053, 360, 919, 13, 5...
twitcher/owsproxy.py
Ouranosinc/twitcher
0
64226
""" The owsproxy is based on `papyrus_ogcproxy <https://github.com/elemoine/papyrus_ogcproxy>`_ See also: https://github.com/nive/outpost/blob/master/outpost/proxy.py """ import urllib import requests from pyramid.response import Response from pyramid.settings import asbool from twitcher._compat import urlparse fr...
[ 1, 9995, 13, 1576, 288, 5652, 14701, 338, 2729, 373, 421, 29886, 481, 29646, 29918, 468, 29883, 14701, 529, 991, 597, 3292, 29889, 510, 29914, 20461, 29877, 457, 29914, 29886, 481, 29646, 29918, 468, 29883, 14701, 13885, 29918, 13, 13, ...
experiments/2d_shallowwater/gen.py
flabowski/POD-UQNN
15
13884
<gh_stars>10-100 """POD-NN modeling for 1D, unsteady Burger Equation.""" #%% Imports import sys import os import pickle import numpy as np sys.path.append(os.path.join("..", "..")) from poduqnn.podnnmodel import PodnnModel from poduqnn.mesh import read_multi_space_sol_input_mesh from poduqnn.handling import clean_dir,...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 15945, 29908, 13152, 29928, 29899, 10262, 1904, 292, 363, 29871, 29896, 29928, 29892, 443, 303, 1479, 29891, 6640, 914, 11243, 362, 1213, 15945, 13, 29937...
annotation_data/responsibility.py
levon003/icwsm-cancer-journeys
0
88424
from collections import Counter from tqdm import tqdm import itertools import pandas as pd import numpy as np from db import get_annotation_db from journal import get_journal_text, get_journal_info, get_journal_text_representation responsibility_labels = ["communicating", "info_filtering", "clinical_decisions", "prep...
[ 1, 515, 16250, 1053, 315, 5336, 13, 3166, 260, 29939, 18933, 1053, 260, 29939, 18933, 13, 5215, 4256, 8504, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 13, 3166, 4833, 1053, 679, 29918, 18317, 29918, 2585, 13, 3166, 8...
model/ff.py
nashory/rtic-gcn-pytorch
6
188555
import torch import torch.nn as nn from block import fusions from model.base import ImageEncoderTextEncoderBase class FeatureFusionMethod(ImageEncoderTextEncoderBase): """FeatureFusionMethod""" def __init__(self, cfg, texts): super(FeatureFusionMethod, self).__init__(cfg, texts) ff_type = cf...
[ 1, 1053, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 3166, 2908, 1053, 16451, 1080, 13, 13, 3166, 1904, 29889, 3188, 1053, 7084, 8566, 6119, 1626, 8566, 6119, 5160, 13, 13, 13, 1990, 5169, 1535, 29943, 3958, 406...
videoSources.py
mralext20/neos-video-backend
1
179524
youtubePlaylists = [ "PLxAzjHbHvNcUvcajBsGW2VI6fyIWa4sVl", # ProbablePrime "PLjux6EKYfu0045V_-s5l9biu55fzbWFAO", # Deloious Jax "PLoAvz0_U4_3wuXXrl8IbyJIYZFdeIgyHm", # Frooxius "PLSa764cPPsV9saKq_9Sb_izfwgI9cY-8u", # CuriosVR.. coffee "PLWhfKbDgR4zD-o31sgHqesncjt49Jxou7", # AMoB tutorials "...
[ 1, 366, 29873, 4003, 13454, 21513, 353, 518, 13, 1678, 376, 7390, 29916, 16748, 29926, 29950, 29890, 29950, 29894, 29940, 29883, 29965, 29894, 1113, 29926, 29933, 29879, 29954, 29956, 29906, 18118, 29953, 29888, 29891, 29902, 29956, 29874, 29...
harvester/sharekit/tests/factories.py
surfedushare/search-portal
2
38420
<gh_stars>1-10 import os import factory from datetime import datetime from urllib.parse import quote from django.conf import settings from django.utils.timezone import make_aware from sharekit.models import SharekitMetadataHarvest class SharekitMetadataHarvestFactory(factory.django.DjangoModelFactory): class M...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2897, 13, 5215, 12529, 13, 3166, 12865, 1053, 12865, 13, 3166, 3142, 1982, 29889, 5510, 1053, 14978, 13, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 95...
mergeKsortedlist.py
ZhouLihua/leetcode
2
15645
#Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None import sys class Solution(object): def mergeKLists(self, lists): """ :type lists: List[ListNode] :rtype: ListNode """ temp = ListNode(-1) ...
[ 1, 396, 14683, 363, 1809, 368, 29899, 2324, 287, 1051, 29889, 13, 1990, 2391, 4247, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 921, 1125, 13, 4706, 1583, 29889, 791, 353, 921, 13, 4706, 1583, 29889, 4622, 353, 6...
moulin/yaml_wrapper.py
Deedone/moulin
0
112787
# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 EPAM Systems """ Wrappers for yaml.Node that provide better API """ from typing import Optional, List, Tuple, Iterator, Union from yaml.nodes import MappingNode, ScalarNode, SequenceNode, Node from yaml.constructor import SafeConstructor from yaml.representer imp...
[ 1, 396, 10937, 29928, 29990, 29899, 29931, 293, 1947, 29899, 12889, 29901, 13380, 29899, 29906, 29889, 29900, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29896, 16502, 5194, 23985, 13, 15945, 29908, 13, 29956, 336, 22437, 363, 343, ...
.ycm_extra_conf.py
zaucy/bazel-compilation-database
1
21027
#!/usr/bin/python # Copyright 2018 GRAIL, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29947, 402, 4717, 6227, 29892, 9266, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29...
src/sites/nefilim.py
LAC-Japan/ransomwatch
244
47732
from datetime import datetime import logging from bs4 import BeautifulSoup from db.models import Victim from net.proxy import Proxy from .sitecrawler import SiteCrawler import time class Nefilim(SiteCrawler): actor = "Nefilim" def _handle_page(self, soup): victim_list = soup.find_all("header", ...
[ 1, 515, 12865, 1053, 12865, 13, 5215, 12183, 13, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 13, 3166, 4833, 29889, 9794, 1053, 7229, 326, 13, 3166, 7787, 29889, 14701, 1053, 1019, 3594, 13, 3166, 869, 2746, 29883, 1610, 1358,...
tests/components/synology_dsm/test_config_flow.py
dzmitov/core
1
54375
"""Tests for the Synology DSM config flow.""" import logging from unittest.mock import MagicMock, Mock, patch import pytest from homeassistant import data_entry_flow from homeassistant.components.synology_dsm.const import ( CONF_VOLUMES, DEFAULT_NAME, DEFAULT_PORT, DEFAULT_PORT_SSL, DEFAULT_SSL, ...
[ 1, 9995, 24376, 363, 278, 10829, 3002, 360, 17061, 2295, 4972, 1213, 15945, 13, 5215, 12183, 13, 3166, 443, 27958, 29889, 17640, 1053, 26494, 18680, 29892, 26297, 29892, 13261, 13, 13, 5215, 11451, 1688, 13, 13, 3166, 3271, 465, 22137, ...
test.py
minizon/Mask_RCNN_KP
1
46953
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Mar 11 21:22:59 2018 @author: pami4 """ #CUDA_VISIBLE_DEVICES=0 python from pycocotools.coco import COCO import coco import numpy as np from matplotlib import pyplot as plt import visualize import custom_utils config = coco.CocoConfig() config.GPU_CO...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 8991, 1085, 29871, 29896, 29896, 29871, 29906, 29896, 29901, 29906, ...
preprocessing/her2_split_and_imbalance.py
minotm/NTA
1
143853
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created 2022 @author: <NAME> """ from Levenshtein import distance as levenshtein_distance import pandas as pd import numpy as np from sklearn.model_selection import train_test_split print('Now Executing Trastuzumab Train/Val/Test Splitting...') """ This script serv...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 29871, 29906, 29900, 29906, 29906, 13, 13, 29992, 8921, 29901, 529, 5813...
crops/migrations/0004_crop_gardens.py
LukasBaecker/be-stadtlabor
1
164728
<filename>crops/migrations/0004_crop_gardens.py # Generated by Django 3.1 on 2022-01-18 20:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gardens', '0007_auto_20211231_2258'), ('crops', '0003_auto_20211205_1004'), ] operations = [ ...
[ 1, 529, 9507, 29958, 24077, 567, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29946, 29918, 29883, 1336, 29918, 29887, 538, 575, 29889, 2272, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 373, 29871, 29906, 29900, 29906, 2...
tests/tensor/sum_test.py
kbrodt/tor4
0
29496
from tor4 import tensor def test_tensor_sum(): a = tensor(data=[-1, 1, 2]) a_sum = a.sum() assert a_sum.tolist() == 2 assert not a_sum.requires_grad def test_tensor_sum_backward(): a = tensor(data=[-1, 1, 2.0], requires_grad=True) a_sum = a.sum() a_sum.backward() assert a_sum.tolis...
[ 1, 515, 4842, 29946, 1053, 12489, 13, 13, 13, 1753, 1243, 29918, 20158, 29918, 2083, 7295, 13, 1678, 263, 353, 12489, 29898, 1272, 11759, 29899, 29896, 29892, 29871, 29896, 29892, 29871, 29906, 2314, 13, 1678, 263, 29918, 2083, 353, 263, ...
zapi/views.py
zyn777/7pi
0
56981
import logging from django.contrib import auth from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.shortcuts import render from zapi.forms import LoginForm logger = logging.getLogger(__name__) def index(request): return render(request, "index.html"...
[ 1, 1053, 12183, 13, 13, 3166, 9557, 29889, 21570, 1053, 4817, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 19557, 4097, 1053, 6464, 29918, 12403, 13, 3166, 9557, 29889, 1124, 1053, 9056, 5103, 24735, 13, 3166, 9557, 29889, 12759, 758...
Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/ManageAttachments.py
aspose-email/Aspose.Email-for-Java
24
3464
<gh_stars>10-100 # To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. #if __name__ == "__main__": # print "Hello World" from ProgrammingEmail import ManageAttachments import jpype import os.pat...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 1763, 1735, 445, 19405, 4839, 29892, 6755, 19245, 12252, 414, 297, 8010, 21582, 29889, 13, 29937, 1763, 1735, 445, 4472, 934, 29892, 6755, 27564, ...
example/train.py
prodmodel/prodmodel
53
135154
from sklearn import tree def train(X, y): clf = tree.DecisionTreeClassifier(max_depth=10, random_state=0) clf = clf.fit(X, y) return clf
[ 1, 515, 2071, 19668, 1053, 5447, 13, 13, 13, 1753, 7945, 29898, 29990, 29892, 343, 1125, 13, 29871, 1067, 29888, 353, 5447, 29889, 6185, 2459, 9643, 2385, 3709, 29898, 3317, 29918, 19488, 29922, 29896, 29900, 29892, 4036, 29918, 3859, 299...
sarcopenia_ai/apps/slice_detection/predict.py
notmatthancock/sarcopenia-ai
9
102791
<filename>sarcopenia_ai/apps/slice_detection/predict.py<gh_stars>1-10 import SimpleITK as sitk import cv2 from sarcopenia_ai.apps.slice_detection.utils import place_line_on_img, decode_slice_detection_prediction, \ preprocess_sitk_image_for_slice_detection, adjust_detected_position_spacing from sarcopenia_ai.core....
[ 1, 529, 9507, 29958, 29879, 5666, 3150, 423, 29918, 1794, 29914, 13371, 29914, 18337, 29918, 29881, 2650, 428, 29914, 27711, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 12545, 1806, 29968, 408, ...
scrape.py
shuaibi27/uiuc-course-scraper
1
94106
<filename>scrape.py import argparse, requests, json from bs4 import BeautifulSoup parser = argparse.ArgumentParser() parser.add_argument("--subject") args = parser.parse_args() data = requests.get('http://catalog.illinois.edu/courses-of-instruction/' + str(args.subject)) if data.status_code >= 400: print('Status...
[ 1, 529, 9507, 29958, 1557, 336, 412, 29889, 2272, 13, 5215, 1852, 5510, 29892, 7274, 29892, 4390, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 13, 16680, 353, 1852, 5510, 29889, 15730, 11726, 580, 13, 16680, 29889, 1202, 29918, ...
{{cookiecutter.directory_name}}/apps/core/querysets/soft_delete.py
zurek11/django-project-template
0
90801
from django.db.models import QuerySet from django.utils import timezone class SoftDeleteQuerySet(QuerySet): def delete(self): return super(SoftDeleteQuerySet, self).update(deleted_at=timezone.now(), is_deleted=True) def hard_delete(self): return super(SoftDeleteQuerySet, self).delete() d...
[ 1, 515, 9557, 29889, 2585, 29889, 9794, 1053, 13641, 2697, 13, 3166, 9557, 29889, 13239, 1053, 29431, 13, 13, 13, 1990, 1105, 615, 12498, 3010, 2697, 29898, 3010, 2697, 1125, 13, 1678, 822, 5217, 29898, 1311, 1125, 13, 4706, 736, 2428, ...
code/tokenization.py
kcarnold/counterfactual-lm
2
1610577
import re import string from nltk.tokenize import RegexpTokenizer, PunktSentenceTokenizer WORD_RE = re.compile(r'\w+(?:[\',:]\w+)*') END_PUNCT = set('.,?!:') def token_spans(text): for match in re.finditer(r'[^-/\s]+', text): start, end = match.span() token_match = WORD_RE.search(text, start, end)...
[ 1, 1053, 337, 13, 5215, 1347, 13, 3166, 302, 1896, 29895, 29889, 6979, 675, 1053, 2169, 4548, 6066, 3950, 29892, 349, 11087, 29903, 296, 663, 6066, 3950, 13, 13, 17013, 29918, 1525, 353, 337, 29889, 12198, 29898, 29878, 12764, 29893, 29...
mars/core/entity/core.py
chineking/mars
1
196835
# Copyright 1999-2021 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 by applicable law or a...
[ 1, 396, 14187, 1266, 29871, 29896, 29929, 29929, 29929, 29899, 29906, 29900, 29906, 29896, 319, 1982, 5363, 6431, 21771, 292, 19806, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900,...
home/admin.py
abdulshak1999/notes
2
155122
<filename>home/admin.py from django.contrib import admin from home.models import Note class NoteAdmin(admin.ModelAdmin): prepopulated_fields = { 'slug': ('title', ) } admin.site.register(Note, NoteAdmin)
[ 1, 529, 9507, 29958, 5184, 29914, 6406, 29889, 2272, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 3166, 3271, 29889, 9794, 1053, 3940, 13, 13, 13, 1990, 3940, 12754, 29898, 6406, 29889, 3195, 12754, 1125, 13, 1678, 758, 7323, 7964, 299...
qiskit/chemistry/drivers/fcidumpd/dumper.py
sorin-bolos/qiskit-aqua
2
65742
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 910, 775, 338, 760, 310, 660, 3873, 277, 29889, 13, 29937, 13, 29937, 313, 29907, 29897, 14187, 1266, 27955, 29871, 29906, 29900, 29906, 29900...
super_laser_gui.py
hemmerlinglab/Prehistoric-Data-Acquisition
0
93855
<filename>super_laser_gui.py import sys, os, serial, datetime, time import numpy as np from configparser import ConfigParser import scipy from scipy.interpolate import interp1d import fileinput from simple_pid import PID from wlm import * # shouldn't need this -> from Fiber import * from PyQt5.QtWidgets import * from...
[ 1, 529, 9507, 29958, 9136, 29918, 3333, 261, 29918, 23569, 29889, 2272, 13, 5215, 10876, 29892, 2897, 29892, 7797, 29892, 12865, 29892, 931, 13, 5215, 12655, 408, 7442, 13, 3166, 2295, 16680, 1053, 12782, 11726, 13, 5215, 4560, 2272, 13, ...
wwwdccn/proceedings/migrations/0001_initial.py
lfpratik/dccnsys
16
191605
# Generated by Django 2.2.4 on 2019-10-01 15:05 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('submissions', '0006_auto_20190905_1746'), ('conferences', '0014_artifactdescriptor_mandatory'), ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29946, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29896, 29900, 29899, 29900, 29896, 29871, 29896, 29945, 29901, 29900, 29945, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
visualize_code_vec.py
sonoisa/code2vec
22
172361
<filename>visualize_code_vec.py import torch from tensorboardX import SummaryWriter vec_path = "./output/code.vec" writer = SummaryWriter() with open(vec_path, "r", encoding="utf-8") as f: labels = [] vectors = [] first = True for line in f.readlines(): if first: first = False ...
[ 1, 529, 9507, 29958, 20119, 675, 29918, 401, 29918, 2003, 29889, 2272, 13, 5215, 4842, 305, 13, 3166, 12489, 3377, 29990, 1053, 6991, 5219, 10507, 13, 13, 2003, 29918, 2084, 353, 376, 6904, 4905, 29914, 401, 29889, 2003, 29908, 13, 13, ...
fastestimator/backend/cast.py
hanskrupakar/fastestimator
57
68066
# Copyright 2019 The FastEstimator Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29929, 450, 23786, 12787, 326, 1061, 13189, 943, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, ...
amp_reconstruct_betterRes.py
kseetharam/genPolaron
0
100273
<filename>amp_reconstruct_betterRes.py<gh_stars>0 import numpy as np import xarray as xr import pf_dynamic_sph as pfs from timeit import default_timer as timer import time import os # import matplotlib # import matplotlib.pyplot as plt if __name__ == "__main__": # ---- INITIALIZE GRIDS ---- (Lx, Ly, Lz) = (...
[ 1, 529, 9507, 29958, 1160, 29918, 276, 11433, 29918, 6878, 357, 1666, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 12655, 408, 7442, 13, 5215, 921, 2378, 408, 921, 29878, 13, 5215, 282, 29888, 29918, 16626, 29918, ...
algorithms/maths/chinese_remainder_theorem.py
hbqdev/algorithms
22,426
7072
<reponame>hbqdev/algorithms<filename>algorithms/maths/chinese_remainder_theorem.py from algorithms.maths.gcd import gcd from typing import List def solve_chinese_remainder(num : List[int], rem : List[int]): """ Computes the smallest x that satisfies the chinese remainder theorem for a system of equations. ...
[ 1, 529, 276, 1112, 420, 29958, 29882, 29890, 29939, 3359, 29914, 9564, 12404, 29966, 9507, 29958, 9564, 12404, 29914, 755, 29879, 29914, 305, 8233, 29918, 1745, 475, 672, 29918, 14648, 29889, 2272, 13, 3166, 14009, 29889, 755, 29879, 29889,...
subcommands/play_category.py
brunomateus/open_source_android_apps
2
93199
"""Scrape Google Play category data from Google Play.""" import argparse import json import logging import os from lxml.html import html5parser import requests from util.parse import parse_package_details __log__ = logging.getLogger(__name__) PLAY_STORE_LINK = 'https://play.google.com/store/apps/details?id={}' C...
[ 1, 9995, 4421, 336, 412, 5087, 7412, 7663, 848, 515, 5087, 7412, 1213, 15945, 13, 13, 5215, 1852, 5510, 13, 5215, 4390, 13, 5215, 12183, 13, 5215, 2897, 13, 13, 3166, 301, 3134, 29889, 1420, 1053, 3472, 29945, 16680, 13, 5215, 7274, ...
Freshmen.bundle/Contents/Code/__init__.py
OmicronTheta/pgma
0
76223
<reponame>OmicronTheta/pgma # Freshmen.net Plex Agent import re, os, platform, urllib from difflib import SequenceMatcher #Fix HTTPS errors when connecting to Facebox (neural.vigue.me) and Thumbor CDN (cdn.vigue.me) import certifi import requests PLUGIN_LOG_TITLE = 'Freshmen' # Log Title VERSION_NO = '2019.03.11.1'...
[ 1, 529, 276, 1112, 420, 29958, 5673, 293, 1617, 17458, 29914, 4061, 655, 13, 29937, 383, 3781, 1527, 29889, 1212, 349, 2506, 28330, 13, 5215, 337, 29892, 2897, 29892, 7481, 29892, 3142, 1982, 13, 3166, 2923, 1982, 1053, 922, 3910, 9652,...
GEOS_Util/coupled_diagnostics/verification/HadCRUT3/__init__.py
GEOS-ESM/GMAO_Shared
1
49882
<reponame>GEOS-ESM/GMAO_Shared import os import netCDF4 as nc import scipy as sp from g5lib import dset __all__=['ctl'] class Ctl(dset.NCDset): def __init__(self): name='HadCRUT3' flist=['/discover/nobackup/projects/gmao/oceanval/verification/HadCRUT3/HadCRUT3.nc'] f=nc.Dataset(f...
[ 1, 529, 276, 1112, 420, 29958, 1692, 3267, 29899, 2890, 29924, 29914, 29954, 1529, 29949, 29918, 21741, 13, 5215, 2897, 13, 5215, 7787, 29907, 4037, 29946, 408, 302, 29883, 13, 5215, 4560, 2272, 408, 805, 13, 3166, 330, 29945, 1982, 105...
.venv/Lib/site-packages/pdoc/cli.py
JohanK91/MethodDice
0
22707
#!/usr/bin/env python3 """pdoc's CLI interface and helper functions.""" import argparse import ast import importlib import inspect import os import os.path as path import json import re import sys import warnings from contextlib import contextmanager from functools import lru_cache from http.server import BaseHTTPRequ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 15945, 29908, 29886, 1514, 29915, 29879, 24492, 5067, 322, 16876, 3168, 1213, 15945, 13, 13, 5215, 1852, 5510, 13, 5215, 8717, 13, 5215, 1053, 1982, 13, 5215, 16096, 13, 5215, 2...
application/model/_base.py
keysona/blog
0
5785
<gh_stars>0 from flask_sqlalchemy import SQLAlchemy, Model # class BaseModel(Model): # def save(self): # db.session.add(self) # db.session.commit(self) # def delete(self): # db.session. db = SQLAlchemy()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 29784, 29918, 2850, 284, 305, 6764, 1053, 3758, 2499, 305, 6764, 29892, 8125, 13, 13, 29937, 770, 7399, 3195, 29898, 3195, 1125, 13, 13, 29937, 822, 4078, 29898, 1311, 1125, 13, ...
Project-2/Ishan Pandey/main_gui.py
Mercury1508/IEEE-LEAD-2.0
1
180159
<filename>Project-2/Ishan Pandey/main_gui.py from tkinter import * from PIL import ImageTk import PIL.Image import os root = Tk() root.title("Main GUI") root.geometry("800x550") root.configure(background='white') def google_search(): os.system('python google_search.py') def job_search(): os.system("python j...
[ 1, 529, 9507, 29958, 7653, 29899, 29906, 29914, 29902, 845, 273, 349, 4182, 29891, 29914, 3396, 29918, 23569, 29889, 2272, 13, 3166, 18883, 1639, 1053, 334, 13, 3166, 349, 6227, 1053, 7084, 29911, 29895, 13, 5215, 349, 6227, 29889, 2940, ...
InterpretationTechniques/featureExamination/iceForPredictor.py
HelenaMaria112/PredictionInterpreter
1
24454
<gh_stars>1-10 ''' Created on 04.10.2019 @author: areb ''' import pycebox.ice as pIce from Connections.predictor import * import matplotlib.pyplot as plt from InterpretationTechniques.PlotAndShow import * # https://github.com/AustinRochford/PyCEbox/blob/master/pycebox/ice.py def plotIce(data, pr): ''' :param ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 12008, 13, 20399, 373, 29871, 29900, 29946, 29889, 29896, 29900, 29889, 29906, 29900, 29896, 29929, 13, 13, 29992, 8921, 29901, 526, 29890, 13, 12008, 13, 5215, 11451, ...
examples/exp_neurips19_MRM.py
xyguo/trimmedEM
0
105911
<reponame>xyguo/trimmedEM<gh_stars>0 import sys import numpy as np from trimmedEM import TrimmedEM from utils.grader import MRMGrader from utils.data_gen import regression_mixture, add_outliers # Experiment for Mixture of Regression Model epsilons = [0, 0.05, 0.1, 0.15, 0.2] # epsilons = [0] n_samples = 2000 mrm_sigma...
[ 1, 529, 276, 1112, 420, 29958, 3594, 2543, 29877, 29914, 15450, 2168, 12665, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 10876, 13, 5215, 12655, 408, 7442, 13, 3166, 17151, 2168, 12665, 1053, 1605, 326, 2168, 12665, 13, 3166, ...
datahub_core/printable.py
grovesy/datahub
67
40886
<reponame>grovesy/datahub<filename>datahub_core/printable.py from pprint import pformat class Printable: def __repr__(self): return "<" + type(self).__name__ + "> " + pformat(vars(self), indent=4, width=1)
[ 1, 529, 276, 1112, 420, 29958, 17170, 1960, 29891, 29914, 1272, 29882, 431, 29966, 9507, 29958, 1272, 29882, 431, 29918, 3221, 29914, 2158, 519, 29889, 2272, 13, 3166, 282, 2158, 1053, 282, 4830, 13, 13, 1990, 13905, 519, 29901, 13, 167...
src/zope/app/content/__init__.py
zopefoundation/zope.app.content
0
8270
<reponame>zopefoundation/zope.app.content<filename>src/zope/app/content/__init__.py ############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # ...
[ 1, 529, 276, 1112, 420, 29958, 29920, 2300, 11940, 362, 29914, 29920, 2300, 29889, 932, 29889, 3051, 29966, 9507, 29958, 4351, 29914, 29920, 2300, 29914, 932, 29914, 3051, 29914, 1649, 2344, 26914, 2272, 13, 13383, 13383, 13383, 13383, 7346...
serial_for_humans/utils.py
PeterMitrano/SerialForHumans
0
182525
<reponame>PeterMitrano/SerialForHumans<gh_stars>0 from asciimatics.event import KeyboardEvent from asciimatics.widgets import Frame, TextBox, Text class MyTextBox(TextBox): def __init__(self, height, label=None, name=None, as_string=False, on_change=None): super(TextBox, self...
[ 1, 529, 276, 1112, 420, 29958, 23686, 29924, 277, 12776, 29914, 9125, 2831, 29950, 398, 550, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 408, 455, 15840, 1199, 29889, 3696, 1053, 7670, 3377, 2624, 13, 3166, 408, 455, 15840, ...
migrations/versions/dd503a5987b5_.py
atwh0405/miniblog
0
40362
<reponame>atwh0405/miniblog """empty message Revision ID: dd503a5987b5 Revises: <KEY> Create Date: 2016-08-30 16:48:54.954000 """ # revision identifiers, used by Alembic. revision = 'dd503a5987b5' down_revision = '<KEY>' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated...
[ 1, 529, 276, 1112, 420, 29958, 271, 1332, 29900, 29946, 29900, 29945, 29914, 1195, 747, 1188, 13, 15945, 29908, 6310, 2643, 13, 13, 1123, 4924, 3553, 29901, 24488, 29945, 29900, 29941, 29874, 29945, 29929, 29947, 29955, 29890, 29945, 13, ...
src/payu_payment/serializers.py
wilantury/payu_integration_backend
0
60895
<filename>src/payu_payment/serializers.py from rest_framework import serializers from .models import LogPurchase class LogPurchaseSerializer(serializers.ModelSerializer): class Meta: model = LogPurchase fields = '__all__'
[ 1, 529, 9507, 29958, 4351, 29914, 10472, 29884, 29918, 27825, 29914, 15550, 19427, 29889, 2272, 13, 13, 3166, 1791, 29918, 4468, 1053, 7797, 19427, 13, 3166, 869, 9794, 1053, 4522, 29925, 27574, 13, 13, 13, 1990, 4522, 29925, 27574, 17679...
product/views/classy_views.py
bootandy/flask-sample
2
157199
<gh_stars>1-10 from flask import Flask, render_template from flask.ext.classy import FlaskView from product import app from product.models import * class UserView(FlaskView): def index(self): users = User.objects() return render_template('users/index.html', users=users) def get(self, id): ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 29784, 1053, 2379, 1278, 29892, 4050, 29918, 6886, 13, 3166, 29784, 29889, 1062, 29889, 1990, 29891, 1053, 2379, 1278, 1043, 13, 13, 3166, 3234, 1053, 623, 13, ...
FortressOfSolitude/_FortressOfSolitude/NeutrinoKey/models.py
BDD16/FortressOfSolitude
0
27852
""" DBA 1337_TECH, AUSTIN TEXAS © MAY 2020 Proof of Concept code, No liabilities or warranties expressed or implied. """ # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from datetime import datetime from .cryptoutils import CryptoTools from base64 import b64encode, b64dec...
[ 1, 9995, 13, 4051, 29909, 29871, 29896, 29941, 29941, 29955, 29918, 4330, 3210, 29892, 319, 17321, 1177, 323, 5746, 3289, 29871, 30211, 14861, 29979, 29871, 29906, 29900, 29906, 29900, 13, 28116, 310, 1281, 1547, 775, 29892, 1939, 619, 1161...
tests/test_json_to_mako.py
melexis/json-to-mako
0
186121
<filename>tests/test_json_to_mako.py from unittest import TestCase from mlx.json_to_mako import json_to_mako_wrapper class TestJsonToMako(TestCase): def test_help(self): with self.assertRaises(SystemExit) as ex: json_to_mako_wrapper(['--help']) self.assertEqual(0, ex.exception.code) ...
[ 1, 529, 9507, 29958, 21150, 29914, 1688, 29918, 3126, 29918, 517, 29918, 29885, 4614, 29889, 2272, 13, 3166, 443, 27958, 1053, 4321, 8259, 13, 3166, 286, 29880, 29916, 29889, 3126, 29918, 517, 29918, 29885, 4614, 1053, 4390, 29918, 517, 2...
setup.py
goude/thxtime
0
149857
<filename>setup.py from setuptools import setup, find_packages setup( name="thxtime", version="2.0.0", packages=find_packages(), )
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 14669, 29898, 13, 1678, 1024, 543, 386, 486, 603, 613, 13, 1678, 1873, 543, 29906, 29889, 29900, 29889, 29900, 613, 13, 1678,...
mcml_convolution.py
harveyiliu/mcml-photon-scattering-python
3
79345
<filename>mcml_convolution.py import numpy as np from scipy import integrate import mcml_photon_scattering class Beam: """Beam class - incident light beam class Parameters to describe a photon beam. Pencil: infinitely narrow beam. This is default for the beam from the mcml output. ...
[ 1, 529, 9507, 29958, 14047, 828, 29918, 535, 4068, 29889, 2272, 13, 13, 5215, 12655, 408, 7442, 13, 3166, 4560, 2272, 1053, 22782, 13, 5215, 286, 29883, 828, 29918, 561, 327, 265, 29918, 1557, 2620, 292, 13, 13, 1990, 1522, 314, 29901...
data/studio21_generated/introductory/3172/starter_code.py
vijaykumawat256/Prompt-Summarization
0
75442
<filename>data/studio21_generated/introductory/3172/starter_code.py def parse_fen(string):
[ 1, 529, 9507, 29958, 1272, 29914, 12073, 29906, 29896, 29918, 13525, 29914, 23333, 2199, 706, 29914, 29941, 29896, 29955, 29906, 29914, 303, 4254, 29918, 401, 29889, 2272, 13, 1753, 6088, 29918, 11350, 29898, 1807, 1125, 13, 12, 2 ]
tests/rest_t/app_t/test_security.py
maxfischer2781/tardis
4
104728
from tardis.exceptions.tardisexceptions import TardisError from tardis.rest.app.security import ( create_access_token, check_authorization, check_authentication, get_algorithm, get_secret_key, get_user, hash_password, TokenData, ) from tardis.utilities.attributedict import AttributeDict ...
[ 1, 515, 11364, 275, 29889, 11739, 29879, 29889, 29873, 538, 275, 11739, 29879, 1053, 323, 538, 275, 2392, 13, 3166, 11364, 275, 29889, 5060, 29889, 932, 29889, 8926, 1053, 313, 13, 1678, 1653, 29918, 5943, 29918, 6979, 29892, 13, 1678, ...
Codeup/6068.py
lkc263/Algorithm_Study_Python
0
171366
score = int(input()) if score >= 90: print("A") elif score >= 70: print("B") elif score >= 40: print("C") else: print("D")
[ 1, 29871, 13, 13628, 353, 938, 29898, 2080, 3101, 13, 13, 361, 8158, 6736, 29871, 29929, 29900, 29901, 13, 1678, 1596, 703, 29909, 1159, 13, 23681, 8158, 6736, 29871, 29955, 29900, 29901, 13, 1678, 1596, 703, 29933, 1159, 13, 23681, 815...
ambari-server/src/test/python/stacks/test_ambari_configuration.py
thaibui/ambari
0
1616463
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
[ 1, 9995, 13, 29931, 293, 21144, 304, 278, 13380, 18540, 10606, 313, 3289, 29943, 29897, 1090, 697, 13, 272, 901, 17737, 3406, 19405, 8571, 4110, 29889, 29871, 2823, 278, 6058, 12107, 934, 13, 5721, 7541, 411, 445, 664, 363, 5684, 2472, ...
eclcli/network/v2/fic_service.py
hanasuke/eclcli
32
1605159
<reponame>hanasuke/eclcli from eclcli.common import command from eclcli.common import utils from ..networkclient.common import utils as to_obj class ListFICService(command.Lister): def get_parser(self, prog_name): parser = super(ListFICService, self).get_parser(prog_name) return parser def ta...
[ 1, 529, 276, 1112, 420, 29958, 5403, 294, 29884, 446, 29914, 687, 29880, 11303, 13, 3166, 321, 695, 11303, 29889, 9435, 1053, 1899, 13, 3166, 321, 695, 11303, 29889, 9435, 1053, 3667, 29879, 13, 3166, 6317, 11618, 4645, 29889, 9435, 105...
tools/debug/run_role.py
cheretbe/ansible-playbooks
0
62777
#!/usr/bin/env python3 import sys import os import types import subprocess import json import yaml import shutil def run_dialog(parameters): dialog_cmd = ["dialog"] + parameters dialog_env = os.environ.copy() # By default dialog returns 255 on ESC. It gets mixed up with error code -1 # converted to un...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 10876, 13, 5215, 2897, 13, 5215, 4072, 13, 5215, 1014, 5014, 13, 5215, 4390, 13, 5215, 343, 8807, 13, 5215, 528, 4422, 13, 13, 1753, 1065, 29918, 15901, 29898, 16744...
Flo et toto/Exercices/Commande.py
geverartsdev/TechnofuturTIC
0
1609242
<gh_stars>0 print---- imprimmer int---- entier float---- décimal str---- texte bool---- booléen if...(true/false):----Si elif...():----Si autres else :----Autres input()----Entre while()----Tant que len()----Longueur upper()----Minuscules -> Majuscules lower()----Majuscules -> Minuscules dict----Dictionnaire import----...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 2158, 807, 527, 9469, 1050, 13, 524, 807, 875, 631, 13, 7411, 807, 4224, 3039, 13, 710, 807, 19696, 371, 13, 11227, 807, 6120, 29948, 264, 13, 361, 856, 29898, 3009, 29914, 4541, 11...
azure/functions/_abc.py
DalavanCloud/azure-functions-python-worker
1
181437
import abc import typing T = typing.TypeVar('T') class Out(abc.ABC, typing.Generic[T]): @abc.abstractmethod def set(self, val: T) -> None: pass @abc.abstractmethod def get(self) -> T: pass class Context(abc.ABC): @property @abc.abstractmethod def invocation_id(self) ...
[ 1, 1053, 25638, 13, 5215, 19229, 13, 13, 13, 29911, 353, 19229, 29889, 1542, 9037, 877, 29911, 1495, 13, 13, 13, 1990, 4451, 29898, 10736, 29889, 19658, 29892, 19229, 29889, 15809, 29961, 29911, 29962, 1125, 13, 13, 1678, 732, 10736, 29...
scvelo/logging.py
saksham219/scvelo
0
1611908
"""Logging and Profiling """ from . import settings from datetime import datetime from time import time as get_time from platform import python_version _VERBOSITY_LEVELS_FROM_STRINGS = {'error': 0, 'warn': 1, 'info': 2, 'hint': 3} def info(*args, **kwargs): return msg(*args, v='info', **kwargs) def error(*ar...
[ 1, 9995, 3403, 3460, 322, 23202, 292, 13, 15945, 29908, 13, 13, 3166, 869, 1053, 6055, 13, 3166, 12865, 1053, 12865, 13, 3166, 931, 1053, 931, 408, 679, 29918, 2230, 13, 3166, 7481, 1053, 3017, 29918, 3259, 13, 13, 13, 29918, 5348, ...
spider/bookinfo/items.py
leitelyaya/Broadview-analysing-sales-figures
5
65250
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class BookinfoItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() coverImage = scrapy.Field() #"cover.jp...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 22402, 1244, 278, 4733, 363, 596, 885, 2390, 287, 4452, 13, 29937, 13, 29937, 2823, 5106, 297, 29901, 13, 29937, 1732, 597, 1514, 29889, 155...
search_engine/worker.py
Dhruvacube/search-engine
0
29121
import importlib from uvicorn.workers import UvicornWorker class DynamicUvicornWorker(UvicornWorker): """ This class is called `DynamicUvicornWorker` because it assigns values according to the module available Union['asyncio', 'uvloop'] It also set `lifespan` to `off` :) """ spam_spec = impo...
[ 1, 1053, 1053, 1982, 13, 13, 3166, 318, 26311, 1398, 29889, 1287, 414, 1053, 501, 26311, 1398, 16164, 13, 13, 13, 1990, 27747, 29965, 26311, 1398, 16164, 29898, 29965, 26311, 1398, 16164, 1125, 13, 1678, 9995, 13, 1678, 910, 770, 338, ...
randstrip.py
itec78/fumcaso
0
74929
<reponame>itec78/fumcaso<filename>randstrip.py #!/usr/bin/python3 from PIL import Image from PIL import ImageFont from PIL import ImageDraw import csv import random import os import json fileDir = os.path.dirname(os.path.abspath(__file__)) def replaceText(text,config): """This function replace $WILDCARD with a word...
[ 1, 529, 276, 1112, 420, 29958, 568, 29883, 29955, 29947, 29914, 29888, 398, 9398, 29877, 29966, 9507, 29958, 9502, 17010, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 29941, 13, 3166, 349, 6227, 1053, 7084, 13, 3166, 349...
mass/tensorflow_nets/naive-fusion/naive_fusion_net.py
pquochuy/xsleepnet
15
129514
import tensorflow as tf from nn_basic_layers import * from filterbank_shape import FilterbankShape from ops import * class Naive_Fusion_Net(object): def __init__(self, config): # Placeholders for input, output and dropout self.config = config self.input_x1 = tf.placeholder(tf.float32,shape...
[ 1, 1053, 26110, 408, 15886, 13, 3166, 302, 29876, 29918, 16121, 29918, 29277, 1053, 334, 13, 3166, 4175, 9157, 29918, 12181, 1053, 19916, 9157, 24111, 13, 3166, 288, 567, 1053, 334, 13, 13, 1990, 4465, 573, 29918, 29943, 3958, 29918, 67...
support.py
Soarxyn/PEF-Structural-Analysis
4
38358
<reponame>Soarxyn/PEF-Structural-Analysis from typing import Tuple from enum import Enum from auxiliary.algebra import Vector3, psin, pcos # this is an auxiliary class used for initializing the Support class's members' values class SupportType(Enum): SIMPLE: Tuple = (1, 0) # tuple values are the number PINNED: Tupl...
[ 1, 529, 276, 1112, 420, 29958, 6295, 279, 29916, 948, 29914, 4162, 29943, 29899, 19560, 3631, 29899, 21067, 4848, 13, 3166, 19229, 1053, 12603, 552, 13, 3166, 14115, 1053, 1174, 398, 13, 3166, 29587, 653, 29889, 15742, 1053, 16510, 29941,...
tests/conftest.py
starlinglab/integrity-backend
1
125048
import pytest @pytest.fixture def reverse_geocode_mocker(mocker): def patch(return_value): mocker.patch( "integritybackend.geocoder.Geocoder.reverse_geocode", lambda *_: return_value, ) return patch
[ 1, 1053, 11451, 1688, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 1753, 11837, 29918, 24756, 401, 29918, 29885, 8658, 29898, 29885, 8658, 1125, 13, 1678, 822, 13261, 29898, 2457, 29918, 1767, 1125, 13, 4706, 286, 8658, 29889, ...
stocks/helper.py
arminbhy/stock-market-analysis
1
190933
<reponame>arminbhy/stock-market-analysis #!/usr/bin/env python import numpy import pystache def _direction_to_str(direction): if direction == 1: return "Positive" if direction == -1: return "Negative" return "None" def _direction(a,b): if a > b: return 1 if a == b: ...
[ 1, 529, 276, 1112, 420, 29958, 279, 1195, 29890, 5819, 29914, 17712, 29899, 28549, 29899, 15916, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 5215, 12655, 13, 5215, 282, 858, 1829, 13, 13, 1753, 903, 20845, 29918, 517, 29...
src/discriminator_cnn_ver.py
samirsahoo007/Conditional-SeqGAN-Tensorflow
51
46765
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ discriminator.py ] # Synopsis [ Discriminator model ] # Author [ <NAME> (Andi611) ] # Copyright [ Copyleft(c), NTUEE, NTU, Taiwan ] """*********************...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 396, 13, 15945, 29908, 7775, 7775, 7775, 7775, 7775, 4189, 2328, 29930, 15945, 29908, 13, 29937, 259, 3497, 1170, 268, 518, 2313, 20386, 1061, 29889, 2272, 4...
template/__init__.py
khanhcsc/tts-bot
0
172512
<gh_stars>0 from template.bot import Bot from template.context import Context from template.handle import handle
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 4472, 29889, 7451, 1053, 11273, 13, 3166, 4472, 29889, 4703, 1053, 15228, 13, 3166, 4472, 29889, 8411, 1053, 4386, 13, 2 ]
statuspage_io.py
spyder007/pi-monitoring
0
20606
<reponame>spyder007/pi-monitoring import logging import statuspage_io_client import configuration from enums import OpLevel logger = logging.getLogger(__name__) class Incident: """Incident Class This class represents the details about a Statuspage.io incident Attributes: name: The incident name...
[ 1, 529, 276, 1112, 420, 29958, 1028, 29891, 672, 29900, 29900, 29955, 29914, 1631, 29899, 3712, 2105, 292, 13, 5215, 12183, 13, 5215, 4660, 3488, 29918, 601, 29918, 4645, 13, 5215, 5285, 13, 3166, 427, 6762, 1053, 6461, 10108, 13, 13, ...
AR_Proxies.py
maquinolopez/ProxyUQ
0
114906
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 12 11:00:26 2022 @author: jac """ from numpy import array from pandas import read_csv, unique from ProxyUQ import ProxyUQ from pyplotfuncmc import PlotSolnsMC cat = read_csv("AtmosphericRivers/AR_Cat.csv") ARivers = [] for y in unique(cat['Yea...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 15050, 2627, 29871, 29896, 29906, 29871, 29896, 29896, 29901, 29900, ...
flask_sspi/_common.py
ceprio/flask-sspi
0
122944
import sspi, sspicon import win32api import base64 import logging logger = logging.getLogger(__name__) from flask import Response from flask import _request_ctx_stack as stack from flask import make_response from flask import request, session, g import threading from functools import wraps from socket impo...
[ 1, 1053, 269, 1028, 29875, 29892, 269, 1028, 4144, 30004, 13, 5215, 5401, 29941, 29906, 2754, 30004, 13, 5215, 2967, 29953, 29946, 30004, 13, 5215, 12183, 30004, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 8443, 13, 30004,...
app/improving_agent/src/template_queries/drug_may_treat_disease.py
suihuanglab/evidARA
0
69481
<reponame>suihuanglab/evidARA<filename>app/improving_agent/src/template_queries/drug_may_treat_disease.py from improving_agent.models import Edge, EdgeBinding, NodeBinding, Result from improving_agent.src.biolink.spoke_biolink_constants import SPOKE_LABEL_COMPOUND from improving_agent.exceptions import TemplateQuerySpe...
[ 1, 529, 276, 1112, 420, 29958, 29879, 1481, 6905, 574, 8205, 29914, 5750, 333, 1718, 29909, 29966, 9507, 29958, 932, 29914, 326, 771, 1747, 29918, 14748, 29914, 4351, 29914, 6886, 29918, 339, 6358, 29914, 29881, 11124, 29918, 13029, 29918, ...
src/sellers/migrations/0002_rename_description_seller_descr.py
evis-market/web-interface-backend
2
61431
# Generated by Django 3.2.7 on 2021-10-03 15:09 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sellers', '0001_initial'), ] operations = [ migrations.RenameField( model_name='seller', old_name='description', ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29941, 29889, 29906, 29889, 29955, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29896, 29900, 29899, 29900, 29941, 29871, 29896, 29945, 29901, 29900, 29929, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
src/utils/auto_node_create.py
MoD-i/data-exchange-backend
0
95033
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # created_on: 2018-07-27 21:37 """ auto_node_create.py AIM: Automatically: 1. Install Multichain 2. Check/Use or Create new Node 3. Connect Node with MoD-i Blockchain Pre-requisites: 1. OS: Linux(Debian) or Windows 2. `sud...
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 325, 326, 29901, 29888, 3977, 29922, 9420, 29899, 29947, 13, 29937, 2825, 29918, 265, ...
src/terial/web/views/classifier_views.py
keunhong/photoshape
81
69563
<reponame>keunhong/photoshape import logging import math import subprocess import json from collections import defaultdict from pathlib import Path import aiohttp_jinja2 import uuid from aiohttp import web import numpy as np from multidict import MultiDict import toolbox.web from terial import config, models, contr...
[ 1, 529, 276, 1112, 420, 29958, 446, 348, 29882, 549, 29914, 561, 15788, 14443, 13, 5215, 12183, 13, 5215, 5844, 13, 5215, 1014, 5014, 13, 5215, 4390, 13, 3166, 16250, 1053, 2322, 8977, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 5215, ...
stve/application/__init__.py
TE-ToshiakiTanaka/stve
0
182245
from stve.application.stvetestrunner import StveTestRunner
[ 1, 515, 380, 345, 29889, 6214, 29889, 303, 5990, 342, 27492, 1053, 624, 345, 3057, 16802, 13, 2 ]
meiduo_mall/apps/carts/views.py
wuhaogithub/wuhao_project_2019_10
0
168457
import json from django.http import JsonResponse from django.shortcuts import render # Create your views here. from django.views import View from django_redis import get_redis_connection from apps.goods.models import SKU from utils.response_code import RETCODE """ 1. 如果用户未登录,可以实现添加购物车的功能. 如果用户登录,也可以实现添加购物车的功能. ...
[ 1, 1053, 4390, 13, 13, 3166, 9557, 29889, 1124, 1053, 14355, 5103, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 13, 13, 29937, 6204, 596, 8386, 1244, 29889, 13, 3166, 9557, 29889, 7406, 1053, 4533, 13, 3166, 9557, 29918, 1127,...
mlsriracha/deploy.py
awcchungster/mlsriracha
0
49078
<filename>mlsriracha/deploy.py<gh_stars>0 from mlsriracha.plugins.azureml.deploy import AzureMlDeploy from mlsriracha.plugins.gcpvertex.deploy import GcpVertexDeploy from mlsriracha.plugins.awssagemaker.deploy import AwsSageMakerDeploy class DeployAdapter: def __init__(self, provider: str): self.provider_n...
[ 1, 529, 9507, 29958, 828, 29879, 374, 336, 5815, 29914, 16519, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 286, 3137, 374, 336, 5815, 29889, 12800, 29889, 17688, 828, 29889, 16519, 1053, 12634, 29924, 29880, 8498, ...
kcsd/utility_functions.py
mczerwinski/kCSD-python
0
151846
<gh_stars>0 # -*- coding: utf-8 -*- """ These are some useful functions used in CSD methods, They include CSD source profiles to be used as ground truths, placement of electrodes in 1D, 2D and 3D., etc These scripts are based on Grzegorz Parka's, Google Summer of Code 2014, INFC/pykCSD This was written by : <NAME>, <NA...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 1349, 968, 526, 777, 5407, 3168, 1304, 297, 315, 7230, 3519, 29892, 13, 15597, 3160, ...
Examples/AdvancedUsage/LoadingOptions/ViewProtectedDocument.py
groupdocs-viewer-cloud/groupdocs-viewer-cloud-python-samples
0
84375
<filename>Examples/AdvancedUsage/LoadingOptions/ViewProtectedDocument.py # Import modules import groupdocs_viewer_cloud from Common import Common # This example demonstrates how to render password-protected documents class ViewProtectedDocument: @classmethod def Run(cls): apiInstance = groupdocs_view...
[ 1, 529, 9507, 29958, 1252, 9422, 29914, 3253, 16858, 27573, 29914, 23456, 5856, 29914, 1043, 1184, 371, 2954, 6268, 29889, 2272, 13, 29937, 16032, 10585, 13, 5215, 2318, 2640, 29918, 29894, 15580, 29918, 9274, 13, 3166, 13103, 1053, 13103, ...
tests/init.py
Animenosekai/yuno
1
19482
<filename>tests/init.py import inspect import pathlib import sys import yuno # CONSTANTS TEST_OBJECT = { "a": 1, "b": 2, "c": 3, "test_dict": { "a": 1, "b": 2, "c": 3 }, "float": 1.1, "int": 1, "test_list": [1, 2, 3], "null": None, "string": "test", ...
[ 1, 529, 9507, 29958, 21150, 29914, 2344, 29889, 2272, 13, 5215, 16096, 13, 5215, 2224, 1982, 13, 5215, 10876, 13, 13, 5215, 343, 9447, 13, 13, 29937, 8707, 1254, 2190, 9375, 13, 13, 18267, 29918, 14824, 17637, 353, 426, 13, 1678, 376,...
picosb/soc/cpu.py
mwbrown/picorv-sandbox
0
114017
from amaranth import * from .bus import NativeBusMaster class PicoRV32(NativeBusMaster): def __init__(self) -> None: super().__init__() self.rv_trap = Signal() def elaborate(self, platform): m = super().elaborate(platform) m.submodules += Instance("picorv32", p...
[ 1, 29871, 13, 3166, 626, 279, 9716, 1053, 334, 13, 3166, 869, 8262, 1053, 19042, 16890, 19203, 13, 13, 1990, 349, 1417, 29934, 29963, 29941, 29906, 29898, 11024, 16890, 19203, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29897, 159...
mjt/mjt/report/lot_wise_production_summary/lot_wise_production_summary.py
hamzaali15/mjt
0
188291
# Copyright (c) 2013, earthians and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe def execute(filters=None): columns = get_columns() data = get_data(filters) return columns, data def get_columns(): columns = [ { "fieldname": "lot_no", ...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29941, 29892, 8437, 5834, 322, 17737, 29560, 13, 29937, 1152, 19405, 2472, 29892, 3113, 1074, 19405, 29889, 3945, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918,...
check_data_integrity/__init__.py
mpmuc84/helper-scripts
4
79200
""" This package contains the modules for both the script checking for data inconsistencies in an opencast instance as well as for the script for fixing some of those inconsistencies and modules shared by both scripts. """
[ 1, 9995, 13, 4013, 3577, 3743, 278, 10585, 363, 1716, 278, 2471, 8454, 363, 848, 22435, 8244, 2478, 297, 385, 1722, 4384, 13, 8758, 408, 1532, 408, 363, 278, 2471, 363, 27826, 777, 310, 1906, 22435, 8244, 2478, 322, 10585, 7258, 491, ...
relancer-exp/original_notebooks/wenruliu_adult-income-dataset/decision-tree-f1-98-acc-99-auc-99.py
Chenguang-Zhu/relancer
1
91073
#!/usr/bin/env python # coding: utf-8 # # Import Base Packages # In[ ]: import pandas as pd import numpy as np import warnings warnings.filterwarnings('ignore') # # Interface function to feature engineering data # In[ ]: from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import Standard...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 29937, 396, 16032, 7399, 18744, 1179, 13, 13, 29937, 512, 29961, 4514, 29901, 13, 13, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 40...
sdk/python/pulumi_azure/core/get_resources.py
apollo2030/pulumi-azure
0
137009
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class GetRes...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 18610, 399, 25614, 29901, 445, 934, 471, 5759, 491, 278, 27477, 15547, 20839, 689, 16230, 313, 13264, 1885, 29897, 21704, 29889, 18610, 13, 29937, 18610, 1938, 451, 3863, 491, 1361, 652...
LiveFeedPythonScripts/FeedFromOtherDevice/Share PC Screen With Android/screenshot.py
viveksb007/LiveFeed
10
176527
import time import cv2 import pyscreenshot as ImageGrab import numpy as np class Screenshot(object): def get_frame(self): img = np.array(ImageGrab.grab().convert('RGB'), dtype=np.uint8) img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR) ret2, jpeg = cv2.imencode('.jpg', img) return jpeg.tos...
[ 1, 1053, 931, 13, 5215, 13850, 29906, 13, 5215, 282, 952, 24546, 8711, 408, 7084, 29954, 4201, 13, 5215, 12655, 408, 7442, 13, 13, 1990, 317, 24546, 8711, 29898, 3318, 1125, 13, 1678, 822, 679, 29918, 2557, 29898, 1311, 1125, 13, 4706...
sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py
tzhanl/azure-sdk-for-python
1
7092
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 29899, 13, 29937, 14187, 1266, 313, 29883, 29897, 7783, 15025, 29889, 2178, 10462, 21676, 29889, 13, 29937, 10413, 21144, 1090, 278, 341, 1806, 19245, ...