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 |
|---|---|---|---|---|---|
tools/prepare_macaque_data/split_trainval.py | MeowMeowLady/Towards-Neuro-Seg-Macaque-Brain | 1 | 172353 | <reponame>MeowMeowLady/Towards-Neuro-Seg-Macaque-Brain<gh_stars>1-10
# -*- coding: utf-8 -*-
"""
Created on 19-7-31 下午6:02
IDE PyCharm
@author: <NAME>
this script is used to split training and validation sets by generating list-txt.
"""
from os.path import join as opj
import random
from glob import glob
import os
t... | [
1,
529,
276,
1112,
420,
29958,
6816,
340,
6816,
340,
29931,
3714,
29914,
29911,
340,
3163,
29899,
8139,
2192,
29899,
17669,
29899,
29924,
11989,
802,
29899,
22097,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937... |
productdb/testing/unittests/products.py | tspycher/python-productdb | 0 | 38248 | from . import BasicTestCase
class ProductsTestCase(BasicTestCase):
def test_basic(self):
rv = self.client.get('/')
assert rv.status_code == 200
data = self.parseJsonResponse(rv)
assert '_links' in data
def test_get_all_products(self):
rv = self.client.get('/product')... | [
1,
515,
869,
1053,
19219,
3057,
8259,
13,
13,
1990,
10969,
29879,
3057,
8259,
29898,
16616,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
16121,
29898,
1311,
1125,
13,
4706,
364,
29894,
353,
1583,
29889,
4645,
29889,
657,
11219,
149... |
core/cdag/node/sub.py | prorevizor/noc | 84 | 16518 | # ----------------------------------------------------------------------
# SubNode
# ----------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# Python modules
from ... | [
1,
396,
448,
2683,
2683,
2683,
2683,
23648,
13,
29937,
3323,
4247,
13,
29937,
448,
2683,
2683,
2683,
2683,
23648,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29900,
29955,
29899,
29906,
29900,
29906,
29900,
450,
11698,
... |
kubeflow/utils/kaggle.py | GalaxyIT/kubeflow-utils | 0 | 172939 | <filename>kubeflow/utils/kaggle.py
import json
from pathlib import Path
class Kaggle:
def login(self, username, apikey):
kaggle_json = Kaggle.__generate_kaggle_json_string(username, apikey)
Kaggle.__save_kaggle_json(kaggle_json)
@staticmethod
def __generate_kaggle_json_string(username, ap... | [
1,
529,
9507,
29958,
29895,
431,
1389,
677,
29914,
13239,
29914,
29895,
351,
6234,
29889,
2272,
13,
5215,
4390,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
13,
1990,
476,
351,
6234,
29901,
13,
1678,
822,
6464,
29898,
1311,
29892,
8952,
... |
all_raspi_code_backup/DriveTesting.py | lord-pradhan/SnowBot | 2 | 15482 | <reponame>lord-pradhan/SnowBot<gh_stars>1-10
"""
Program: DriveTesting.py
Revised On: 12/01/2019
"""
### Library Imports
from DriveArduino import DriveArduino
import numpy as np
from time import sleep
from sys import exit
from signal import signal, SIGINT
###
### CTRL + C Signal Handler & Resource Cleanup
def s... | [
1,
529,
276,
1112,
420,
29958,
29880,
536,
29899,
558,
328,
5403,
29914,
29903,
3707,
29933,
327,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
9283,
29901,
268,
22850,
3057,
292,
29889,
2272,
13... |
waterbutler/providers/dropbox/settings.py | laurenrevere/waterbutler | 0 | 149895 | <reponame>laurenrevere/waterbutler
try:
from waterbutler import settings
except ImportError:
settings = {}
config = settings.get('DROPBOX_PROVIDER_CONFIG', {})
BASE_URL = config.get('BASE_URL', 'https://api.dropbox.com/1/')
BASE_CONTENT_URL = config.get('BASE_CONTENT_URL', 'https://api-content.dropbox.com/1/... | [
1,
529,
276,
1112,
420,
29958,
433,
10732,
276,
9359,
29914,
13405,
4187,
1358,
13,
2202,
29901,
13,
1678,
515,
4094,
4187,
1358,
1053,
6055,
13,
19499,
16032,
2392,
29901,
13,
1678,
6055,
353,
6571,
13,
13,
2917,
353,
6055,
29889,
65... |
restrictive_growth_strings.py | oversj96/PyKabe | 1 | 36889 | """restrictive_growth_strings.py: Constructs the lexicographic
restrictive growth string representation of all the way to partition a set,
given the length of the set."""
__author__ = "<NAME>"
__copyright__ = "oversj96.github.io"
def set_to_zero(working_set, index):
"""Given a set and an index, set all element... | [
1,
9995,
5060,
4146,
573,
29918,
29887,
798,
386,
29918,
19651,
29889,
2272,
29901,
1281,
4984,
29879,
278,
19566,
293,
12122,
13,
9250,
573,
14321,
1347,
8954,
310,
599,
278,
982,
304,
8877,
263,
731,
29892,
13,
2183,
278,
3309,
310,
... |
tests/test_inchi.py | ginkgobioworks/pychemy | 3 | 25988 | <filename>tests/test_inchi.py
from __future__ import print_function
import unittest
import six
from pychemy.inchi import InChI
class InchiTest(unittest.TestCase):
def test_unicode_inchi(self):
inchi_str = six.u('InChI=1S/C14H18O8/c1-20-9-4-7(5-15)2-3-8(9)21-14-13(19)12(18)11(17)10(6-16)22-14/h2-5,10-14,16-19H... | [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
262,
4161,
29889,
2272,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
443,
27958,
13,
13,
5215,
4832,
13,
3166,
282,
3376,
6764,
29889,
262,
4161,
1053,
512,
... |
aser/server/cli.py | HKUST-KnowComp/CSKB-Population | 13 | 170992 | <gh_stars>10-100
def main():
from aser.server import ASERServer
from aser.utils.config import get_server_args_parser
parser = get_server_args_parser()
args = parser.parse_args()
ASERServer(args)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
1753,
1667,
7295,
13,
1678,
515,
408,
261,
29889,
2974,
1053,
3339,
1001,
6004,
13,
1678,
515,
408,
261,
29889,
13239,
29889,
2917,
1053,
679,
29918,
... |
order/models/customers.py | fbsamples/cp_reference | 2 | 26310 | <reponame>fbsamples/cp_reference
# Copyright 2004-present, Facebook. All Rights Reserved.
from django.db import models
from core.models import BaseModel
class Customer(BaseModel):
"""Represent a single customer instance
fields:
store: the store this customer belongs to
full_name: customer full name
... | [
1,
529,
276,
1112,
420,
29958,
29888,
5824,
9422,
29914,
6814,
29918,
5679,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29900,
29946,
29899,
6338,
29892,
13327,
29889,
2178,
26863,
2538,
9841,
29889,
13,
3166,
9557,
29889,
2585,
1053,
4733... |
pysoundcloud/client.py | omarcostahamido/PySoundCloud | 4 | 14144 | <filename>pysoundcloud/client.py
import re
import requests
from typing import Union
from pysoundcloud.soundcloudplaylists import SoundCloudPlaylists
from pysoundcloud.soundcloudsearchresults import SoundCloudSearchResults
from pysoundcloud.soundcloudlikedtracks import SoundCloudLikedTracks
from pysoundcloud.s... | [
1,
529,
9507,
29958,
29886,
952,
618,
9274,
29914,
4645,
29889,
2272,
13,
5215,
337,
30004,
13,
5215,
7274,
30004,
13,
30004,
13,
3166,
19229,
1053,
7761,
30004,
13,
30004,
13,
3166,
282,
952,
618,
9274,
29889,
29802,
9274,
1456,
21513,... |
app/api/handler/PersonSearch.py | jormanfernandez/crud | 0 | 110207 | import falcon
import json
from data.operators.PersonOperator import PersonOperator
from utils.logger import Log
from utils.form.fields import Fields
fields = Fields()
class PersonSearchHandler(object):
"""
It handles the request to no specific persons
Args:
object (object): No info
"""
de... | [
1,
1053,
11092,
535,
13,
5215,
4390,
13,
3166,
848,
29889,
3372,
4097,
29889,
7435,
26486,
1053,
5196,
26486,
13,
3166,
3667,
29879,
29889,
21707,
1053,
4522,
13,
3166,
3667,
29879,
29889,
689,
29889,
9621,
1053,
8989,
29879,
13,
13,
96... |
taut_euler_class.py | henryseg/Veering | 2 | 7614 | <reponame>henryseg/Veering
#
# taut_euler_class.py
#
from file_io import parse_data_file, write_data_file
from taut import liberal, isosig_to_tri_angle
from transverse_taut import is_transverse_taut
from sage.matrix.constructor import Matrix
from sage.modules.free_module_element import vector
from sage.arith.misc im... | [
1,
529,
276,
1112,
420,
29958,
3169,
719,
10199,
29914,
29963,
29872,
3241,
13,
29937,
13,
29937,
260,
1300,
29918,
29872,
8584,
29918,
1990,
29889,
2272,
13,
29937,
13,
13,
13,
3166,
934,
29918,
601,
1053,
6088,
29918,
1272,
29918,
144... |
tests/test_utils.py | nhoffman/static_html_demo | 0 | 104010 | <filename>tests/test_utils.py<gh_stars>0
"""
Test utils module.
"""
import logging
from static_html_demo.utils import opener
from __init__ import TestBase, get_testfile
log = logging.getLogger(__name__)
class TestOpener(TestBase):
def setUp(self):
with open(get_testfile('lorem.txt')) as f:
... | [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
13239,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
3057,
3667,
29879,
3883,
29889,
13,
15945,
29908,
13,
13,
5215,
12183,
13,
13,
3166,
2294,
29918,
1420... |
src/scout_apm/core/cli/core_agent_manager.py | tim-schilling/scout_apm_python | 60 | 168454 | <gh_stars>10-100
# coding=utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import logging
from scout_apm.core import CoreAgentManager
logger = logging.getLogger(__name__)
def main(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument(
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
29892,
29104,
... |
retry_requests.py | cube3x3x3/get_radio | 0 | 197518 | import logging
import unittest
import requests
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
def custom_session(
retries=5,
backoff_factor=0.5,
status_forcelist=(500, 502, 504),
session=None,
):
session = session or requests.Session()
retry = requests.packages.... | [
1,
1053,
12183,
30004,
13,
5215,
443,
27958,
30004,
13,
5215,
7274,
30004,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
8443,
13,
21707,
29889,
842,
10108,
29898,
21027,
29889,
11690,
8443,
13,
30004,
13,
1753,
2888,
29918,... |
janny/utils.py | icyphox/janny | 5 | 117830 | import json
import re
from datetime import timedelta
from types import SimpleNamespace
from janny.config import API_HOST
from janny.auth import SESSION
def get(path: str) -> SimpleNamespace:
"""Convert a JSON response into a Python object"""
s = SESSION
data = s.get(API_HOST + path).content
obj = jso... | [
1,
1053,
4390,
13,
5215,
337,
13,
3166,
12865,
1053,
5335,
287,
2554,
13,
3166,
4072,
1053,
12545,
23335,
13,
13,
3166,
432,
14763,
29889,
2917,
1053,
3450,
29918,
20832,
13,
3166,
432,
14763,
29889,
5150,
1053,
3725,
13507,
13,
13,
1... |
w11-functional-programming/teach-sort-lambda/pupils.py | carloswm85/2021-cs111-programming-with-functions | 0 | 145744 | import csv
# Each row in the pupils.csv file contains three elements.
# These are the indexes of the elements in each row.
GIVEN_NAME_INDEX = 0
SURNAME_INDEX = 1
BIRTHDATE_INDEX = 2
def main():
path = "E:/GitHub/2021-cs111-programming-with-functions/w11-functional-programming/teach-sort/pupils.csv"
# Call t... | [
1,
1053,
11799,
13,
13,
13,
29937,
7806,
1948,
297,
278,
23449,
2719,
29889,
7638,
934,
3743,
2211,
3161,
29889,
13,
29937,
4525,
526,
278,
18111,
310,
278,
3161,
297,
1269,
1948,
29889,
13,
29954,
5667,
1430,
29918,
5813,
29918,
27992,... |
chaban/bots/telegram_bot.py | ibrag8998/botchaban | 1 | 92335 | import typing as typ
import httpx
from chaban.config import global_settings, settings
from chaban.core.exceptions import HttpMethodNotAllowed, TelegramAPIError
from chaban.handlers.base import mh_registry
from chaban.utils import MetaSingleton
from .telegram_methods import TelegramMethodsMixin
class TelegramBot(Te... | [
1,
1053,
19229,
408,
2393,
13,
13,
5215,
1732,
29916,
13,
13,
3166,
521,
10910,
29889,
2917,
1053,
5534,
29918,
11027,
29892,
6055,
13,
3166,
521,
10910,
29889,
3221,
29889,
11739,
29879,
1053,
9056,
4062,
3664,
15930,
287,
29892,
9699,
... |
tests/build_feedstock_test.py | jayfurmanek/open-ce-builder | 0 | 1609967 | <gh_stars>0
# *****************************************************************
# (C) Copyright IBM Corp. 2020, 2021. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
334,
7775,
7775,
7775,
7775,
13,
29937,
313,
29907,
29897,
14187,
1266,
27955,
2994,
29886,
29889,
29871,
29906,
29900,
29906,
29900,
29892,
29871,
29906,
29900,
29906,
29896,
29889,
... |
resources/migrations/0021_change_image_file_to_char.py | City-of-Helsinki/berth-reservations | 3 | 65894 | <reponame>City-of-Helsinki/berth-reservations
# Generated by Django 3.1 on 2020-10-05 12:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("resources", "0020_change_berth_number_to_char"),
]
operations = [
migrations.AlterField(
... | [
1,
529,
276,
1112,
420,
29958,
16885,
29899,
974,
29899,
29950,
1379,
682,
29875,
29914,
495,
386,
29899,
690,
6972,
800,
13,
29937,
3251,
630,
491,
15337,
29871,
29941,
29889,
29896,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29896,
... |
examples/DogsVsCats.py | YiweiLi4/tensorbay-python-sdk | 0 | 130343 | <filename>examples/DogsVsCats.py
#!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
# pylint: disable=wrong-import-position
# pylint: disable=wrong-import-order
# pylint: disable=not-callable
# pylint: disable=ungrouped-imports
# pylint: disable=import-error
# pylint: disable=pointless-st... | [
1,
529,
9507,
29958,
19057,
29914,
29928,
12099,
29963,
29879,
29907,
1446,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
4989,
29894,
4812,
... |
django_storage_url/base.py | hoopoe/django-storage-url | 2 | 117242 | <reponame>hoopoe/django-storage-url
from django.conf import settings
from django.utils.functional import LazyObject
import furl
from .backends import get_storage_class
from .backends.not_implemented import NotImplementedStorage
class _DSNConfiguredStorage(LazyObject):
def _setup(self):
dsn = getattr(set... | [
1,
529,
276,
1112,
420,
29958,
1251,
459,
7297,
29914,
14095,
29899,
12925,
29899,
2271,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
13239,
29889,
2220,
284,
1053,
19575,
29891,
2061,
13,
13,
5215,
285,
2271,
13,
13,... |
grpclib/server.py | panaetov/grpclib | 0 | 12979 | import abc
import socket
import logging
import asyncio
import warnings
import h2.config
import h2.exceptions
from .utils import DeadlineWrapper
from .const import Status
from .stream import send_message, recv_message
from .stream import StreamIterator
from .metadata import Metadata, Deadline
from .protocol import H2P... | [
1,
1053,
25638,
13,
5215,
9909,
13,
5215,
12183,
13,
5215,
408,
948,
3934,
13,
5215,
18116,
13,
13,
5215,
298,
29906,
29889,
2917,
13,
5215,
298,
29906,
29889,
11739,
29879,
13,
13,
3166,
869,
13239,
1053,
16992,
1220,
15646,
13,
3166... |
pg_dicreate.py | zhuyeaini9/pytorch_test | 0 | 23677 | <reponame>zhuyeaini9/pytorch_test<filename>pg_dicreate.py
import torch
import torch.nn.functional as F
import torch.nn as nn
import gym
from gym import spaces
import torch.optim as optim
from torch.distributions import Categorical
import random
import numpy as np
class Net(nn.Module):
def __init__(self, input_spa... | [
1,
529,
276,
1112,
420,
29958,
29920,
6905,
4099,
475,
29875,
29929,
29914,
2272,
7345,
305,
29918,
1688,
29966,
9507,
29958,
4061,
29918,
27774,
3015,
29889,
2272,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,... |
boo/dataframe/canonic.py | AirVetra/boo | 1 | 47840 | import numpy
import pandas as pd
from boo.columns import SHORT_COLUMNS
from boo.errors import UnclassifiableCodeError
QUOTE_CHAR = '"'
EMPTY = int(0)
NUMERIC_COLUMNS = SHORT_COLUMNS.numeric
def adjust_rub(df, cols=NUMERIC_COLUMNS):
rows = (df.unit == "385")
df.loc[rows, cols] = df.loc[rows, cols].multiply(1... | [
1,
1053,
12655,
13,
5215,
11701,
408,
10518,
13,
3166,
1045,
29877,
29889,
13099,
1053,
24972,
8476,
29918,
15032,
5005,
3059,
13,
3166,
1045,
29877,
29889,
12523,
1053,
853,
1990,
28677,
3399,
2392,
13,
13,
13,
13356,
2891,
29923,
29918,... |
src/obmak_debug.py | jeppeter/py-obcode | 0 | 44426 | #! /usr/bin/env python
import sys
import os
import extargsparse
import re
import time
##importdebugstart
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
from strparser import *
from filehdl import *
from fmthdl import *
from extract_ob import *
from obmaklib import *
##importdebugend
REPLACE_IMPORT_LIB=1... | [
1,
396,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
1294,
5085,
5510,
13,
5215,
337,
13,
5215,
931,
13,
13,
2277,
5215,
8382,
2962,
13,
9675,
29889,
2084,
29889,
4397,
29898,
359,
... |
snmn/nmn.py | jiangycTarheel/NMN-MultiHopQA | 20 | 86347 | <filename>snmn/nmn.py<gh_stars>10-100
import numpy as np
import tensorflow as tf
from tensorflow import convert_to_tensor as to_T, newaxis as ax
from tensorflow.python.ops import tensor_array_ops, control_flow_ops
from my.tensorflow.ops import bi_cudnn_rnn_encoder
from snmn.config import cfg
from snmn.util.cnn import ... | [
1,
529,
9507,
29958,
16586,
23521,
29914,
22882,
29876,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
12655,
408,
7442,
13,
5215,
26110,
408,
15886,
13,
3166,
26110,
1053,
3588,
2991... |
bhr_site/urls.py | amerck/bhr-site | 23 | 172853 | from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic.base import RedirectView
from django.contrib.auth import views as auth_views
urlpatterns = [
# Examples:
# url(r'^$', 'bhr_site.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'... | [
1,
515,
9557,
29889,
5527,
29889,
26045,
1053,
3160,
29892,
3142,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
29889,
7406,
29889,
19206,
29889,
3188,
1053,
4367,
1088,
1043,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
8... |
NVIDIA/benchmarks/ssd/implementations/pytorch/utils.py | goswamig/training_results_v0.7 | 48 | 24705 | <gh_stars>10-100
# MIT License
#
# Copyright (c) 2018 kuangliu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, m... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
341,
1806,
19245,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29947,
413,
29884,
574,
492,
29884,
13,
29937,
... |
world_creator/objects.py | lilSpeedwagon/zaWRka-project | 1 | 48455 | <gh_stars>1-10
#!/usr/bin/env python3
from data_structures import *
import copy
import logging as log
import converter
import math as m
from enum import Enum
import os
APP_VERSION = 1.0
class SignsTypes(Enum):
STOP = "stop sign"
ONLY_FORWARD = "only forward sign"
ONLY_RIGHT = "only right sign"
ONLY_LE... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
3166,
848,
29918,
4984,
1973,
1053,
334,
13,
5215,
3509,
13,
5215,
12183,
408,
1480,
13,
5215,
29105,
... |
main project.py | Kshitijkrishnadas/haribol | 0 | 139569 | import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',passwd='<PASSWORD>',database='electronic_shop')
cur=conn.cursor()
if conn.is_connected:
print(' ELECTRONIC SHOP SYSTEM')
print(' 1.Admin')
print... | [
1,
1053,
5749,
29889,
11958,
2801,
408,
4576,
13,
13082,
29922,
2850,
29889,
6915,
29898,
3069,
2433,
7640,
742,
1792,
2433,
4632,
742,
3364,
9970,
2433,
29966,
25711,
17013,
29958,
742,
9803,
2433,
15436,
1617,
293,
29918,
19032,
1495,
1... |
gooey/gui/processor.py | Jacke/Gooey | 13,430 | 1610714 | import os
import re
import subprocess
import sys
from functools import partial
from threading import Thread
from gooey.gui import events
from gooey.gui.pubsub import pub
from gooey.gui.util.casting import safe_float
from gooey.gui.util.taskkill import taskkill
from gooey.util.functional import unit, bind
... | [
1,
1053,
2897,
30004,
13,
5215,
337,
30004,
13,
5215,
1014,
5014,
30004,
13,
5215,
10876,
30004,
13,
3166,
2090,
312,
8789,
1053,
7687,
30004,
13,
3166,
3244,
292,
1053,
10480,
30004,
13,
30004,
13,
3166,
748,
29877,
1032,
29889,
23569,... |
thermo/property_package_constants.py | RoryKurek/thermo | 380 | 117506 | <filename>thermo/property_package_constants.py
# -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2018, 2019 <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation f... | [
1,
529,
9507,
29958,
721,
4346,
29914,
6799,
29918,
5113,
29918,
3075,
1934,
29889,
2272,
13,
29871,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
12008,
1451,
331,
936,
22557,
12037,
9538,
313,
1451,
3... |
mlcomp/parallelm/common/buff_to_lines.py | lisapm/mlpiper | 7 | 172185 |
class BufferToLines(object):
def __init__(self):
self._acc_buff = ""
self._last_line = ""
self._in_middle_of_line = False
def add(self, buff):
self._acc_buff += buff.decode()
self._in_middle_of_line = False if self._acc_buff[-1] == '\n' else True
def lines(self):
... | [
1,
29871,
13,
1990,
16534,
1762,
20261,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
3032,
5753,
29918,
28040,
353,
5124,
13,
4706,
1583,
3032,
4230,
29918,
1220,
353,
5124,
13,
4706,
1583,
3032,
262,... |
motion_detection.py | udelblue/cv | 0 | 165772 | import cv2
import numpy as np
def main():
#window_name="Cam feed"
#cv2.namedWindow(window_name)
cap=cv2.VideoCapture(0)
#filename = 'F:\sample.avi'
#codec=cv2.VideoWriter_fourcc('X','V','I','D')
#framerate=30
#resolution = (500,500)
# VideoFileOutput = cv2.VideoWriter(filename,codec... | [
1,
1053,
13850,
29906,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
1753,
1667,
7295,
30004,
13,
259,
396,
7165,
29918,
978,
543,
14353,
8343,
19451,
13,
259,
396,
11023,
29906,
29889,
17514,
5907,
29898,
7165,
29918,
978,
8443,
13,
25... |
leetcode/389.py | GihwanKim/Baekjoon | 0 | 187508 | """
File: 389.py
Title: Find the Difference
Difficulty: Easy
URL: https://leetcode.com/problems/find-the-difference/
"""
import unittest
class Solution:
def findTheDifference(self, s: str, t: str) -> str:
sorted_s = list(sorted(s))
sorted_t = list(sorted(t))
for i in range... | [
1,
9995,
13,
1678,
3497,
29901,
29871,
29941,
29947,
29929,
29889,
2272,
13,
1678,
18527,
29901,
10987,
278,
360,
17678,
13,
1678,
360,
2593,
3953,
29891,
29901,
382,
8995,
13,
1678,
3988,
29901,
2045,
597,
280,
300,
401,
29889,
510,
29... |
parser/reader/__init__.py | cheery/better_web_language | 136 | 56597 | from stream import CStream
from tokenizer import L2
from data import Expr, Literal, Position
#import space
#table = {
# u'(': u'lp', u')': u'rp',
# u'[': u'lb', u']': u'rb',
# u'{': u'lc', u'}': u'rc',
# u'and': u'and', u'or': u'or', u'not': u'not',
# u'=': u'let', u':=': u'set',
# u'<': u'chain',
# ... | [
1,
515,
4840,
1053,
315,
3835,
13,
3166,
5993,
3950,
1053,
365,
29906,
13,
3166,
848,
1053,
1222,
558,
29892,
5449,
284,
29892,
20627,
13,
29937,
5215,
2913,
13,
13,
29937,
2371,
353,
426,
13,
29937,
1678,
318,
29915,
877,
29901,
318,... |
testfixtures/tests/test_roundcomparison.py | Alexhuszagh/XLDiscoverer | 0 | 17953 | # Copyright (c) 2014 Simplistix Ltd
# See license.txt for license details.
from decimal import Decimal
from testfixtures import RoundComparison as R, compare, ShouldRaise
from unittest import TestCase
from ..compat import PY2, PY3
class Tests(TestCase):
def test_equal_yes_rhs(self):
self.assertTrue(0.1... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29946,
3439,
572,
391,
861,
19806,
13,
29937,
2823,
19405,
29889,
3945,
363,
19405,
4902,
29889,
13,
13,
3166,
13677,
1053,
3826,
3039,
13,
3166,
1243,
7241,
486,
1973,
... |
benchmarks/solve.py | Kludex/di | 0 | 187816 | """Run this file like python benchmarks/solve.py
It will print out results to the console and open web browser windows.
"""
import anyio
from pyinstrument.profiler import Profiler
from benchmarks.utils import GraphSize, SleepTimes, generate_dag
from di import Container, Dependant, Depends
from di.executors import Con... | [
1,
9995,
6558,
445,
934,
763,
3017,
23513,
29879,
29914,
2929,
345,
29889,
2272,
13,
13,
3112,
674,
1596,
714,
2582,
304,
278,
2991,
322,
1722,
1856,
4714,
5417,
29889,
13,
15945,
29908,
13,
5215,
738,
601,
13,
3166,
11451,
2611,
1546... |
djl10n/views.py | ralkan/django-l10n | 1 | 61672 | <gh_stars>1-10
import json
from django.conf import settings
from django.template import Context, Template
from django.http import HttpResponse
from .helpers import get_translations
js_catalog_template = r"""
{% autoescape off %}
(function (globals) {
String.prototype.toTitleCase = function() {
return this.rep... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
4390,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
6886,
1053,
15228,
29892,
25663,
13,
3166,
9557,
29889,
1124,
1053,
9056,
5103,
13,
... |
tests/__init__.py | jdeepe/Dynamodb-ORM-Demo | 0 | 121281 | from api.dataset.models import DataSchema, Dataset
def verify_settings(model, p_key, settings):
details = eval(model).get(p_key)
for key, setting in settings.items():
print(getattr(details, key), setting)
setting = setting if setting else None
assert getattr(details, key) == setting
... | [
1,
515,
7882,
29889,
24713,
29889,
9794,
1053,
3630,
12763,
29892,
13373,
24541,
13,
13,
13,
1753,
11539,
29918,
11027,
29898,
4299,
29892,
282,
29918,
1989,
29892,
6055,
1125,
13,
1678,
4902,
353,
19745,
29898,
4299,
467,
657,
29898,
298... |
lib/base_folder.py | collinahn/file_name_changer | 1 | 1613963 | # working dir 를 저장하는 싱글턴 클래스
from dataclasses import (
dataclass,
field
)
class MetaSingleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super().__call__(*args, **kwargs)
return cls._instances[cls]
@dat... | [
1,
396,
1985,
4516,
29871,
31517,
29871,
239,
163,
131,
31299,
30944,
31081,
29871,
239,
142,
180,
237,
187,
131,
240,
135,
183,
29871,
240,
132,
183,
238,
161,
155,
30784,
13,
13,
3166,
848,
13203,
1053,
313,
13,
1678,
848,
1990,
2... |
changelogger/urls.py | zhelyabuzhsky/changelogger | 1 | 45431 | from django.conf.urls import include
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import path
urlpatterns = [
path("", include("changelogs.urls")),
path("admin/", admin.site.urls),
path("accounts/", include("django.contrib.auth.urls")),
path("log... | [
1,
515,
9557,
29889,
5527,
29889,
26045,
1053,
3160,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
8386,
408,
4817,
29918,
7406,
13,
3166,
9557,
29889,
26045,
1053,
2224,
13,
13,
2271,
11037,
... |
rnafbinv/mutator.py | matandro/RNAsfbinv | 3 | 137545 | <filename>rnafbinv/mutator.py
#!/usr/bin/env python3
'''
enter description
'''
import random
from rnafbinv import IUPAC, tree_aligner
from typing import Dict, Any
import enum
'''
1) select motif? / select index -> identify motif? (single / double on stem)
2) identify sequence constrains ( / missing constraints)
3) se... | [
1,
529,
9507,
29958,
29878,
1056,
29888,
2109,
29894,
29914,
6149,
1061,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
12008,
13,
5893,
6139,
13,
12008,
13,
13,
5215,
4036,
13,
3166,
364,
1056,
29888,
2... |
skp_edu_docker/code/cluster/preprocess/pre_node_feed_text2fasttext.py | TensorMSA/hoyai_docker | 8 | 104401 | from cluster.preprocess.pre_node_feed import PreNodeFeed
import os,h5py
import numpy as np
class PreNodeFeedText2FastText(PreNodeFeed):
"""
"""
def run(self, conf_data):
"""
override init class
"""
super(PreNodeFeedText2FastText, self).run(conf_data)
self._init_node... | [
1,
515,
9867,
29889,
1457,
5014,
29889,
1457,
29918,
3177,
29918,
18798,
1053,
4721,
4247,
29737,
13,
5215,
2897,
29892,
29882,
29945,
2272,
13,
5215,
12655,
408,
7442,
13,
13,
1990,
4721,
4247,
29737,
1626,
29906,
29943,
579,
1626,
29898... |
source/NVDAObjects/IAccessible/adobeFlash.py | SWEN-712/screen-reader-brandonp728 | 0 | 63706 | <reponame>SWEN-712/screen-reader-brandonp728
#NVDAObjects/IAccessible/adobeFlash.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2009 NVDA Contributors <http://www.nvda-project.org/>
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import winUser
import olea... | [
1,
529,
276,
1112,
420,
29958,
23066,
1430,
29899,
29955,
29896,
29906,
29914,
10525,
29899,
16950,
29899,
1182,
9214,
29886,
29955,
29906,
29947,
13,
29937,
29940,
29963,
7698,
12724,
29914,
29902,
6638,
1821,
29914,
328,
16945,
8754,
1161,
... |
utils.py | nhh1501/E2E_MLT_VN | 0 | 59579 | #!/usr/bin/python
# encoding: utf-8
import torch
import albumentations as A
import torch.nn as nn
from torch.autograd import Variable
from torch.utils.data import Dataset
import collections
from PIL import Image, ImageFilter
import matplotlib.pyplot as plt
import math
import random
import numpy as np
import cv2
import... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
8025,
29901,
23616,
29899,
29947,
13,
13,
5215,
4842,
305,
13,
5215,
27234,
942,
800,
408,
319,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
3166,
4842,
305,
29889,
1300,
... |
nnef/fold_os.py | lahplover/nnef | 2 | 37534 | import numpy as np
import pandas as pd
import torch
from physics.protein_os import Protein
import options
from utils import write_pdb, write_pdb_sample, transform_profile, load_protein
from physics.anneal import AnnealCoords, AnnealFrag
# from physics.move import SampleICNext
from physics.grad_minimizer import *
from p... | [
1,
1053,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
4842,
305,
13,
3166,
17558,
29889,
14676,
262,
29918,
359,
1053,
14409,
262,
13,
5215,
3987,
13,
3166,
3667,
29879,
1053,
2436,
29918,
29886,
2585,
29892,
2436,
29918,
29... |
seatsvotes/cvtools.py | ljwolf/seatsvotes | 0 | 45282 | <filename>seatsvotes/cvtools.py
import numpy as np
import statsmodels as __sm
import pandas as pd
sm = __sm.api
def leverage(results):
"""
Compute the leverage matrix from a WLS model:
H = W^.5 X(X'WX)^-1X'W^.5
where W^.5 is the scalar square root.
"""
if isinstance(results.model, sm.WLS):
... | [
1,
529,
9507,
29958,
344,
1446,
29894,
4769,
29914,
11023,
8504,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
5215,
22663,
9794,
408,
4770,
3844,
13,
5215,
11701,
408,
10518,
13,
13,
3844,
353,
4770,
3844,
29889,
2754,
13,
13,
1753,
4... |
org.beerware.empty.app/assets/axp.py | pmp-p/projects | 0 | 27484 |
from android import *
print(widget.Button)
from android.widget import TextView
| [
1,
29871,
13,
3166,
1442,
1053,
334,
13,
13,
13,
2158,
29898,
8030,
29889,
3125,
29897,
13,
13,
13,
3166,
1442,
29889,
8030,
1053,
19633,
13,
2
] |
Lecture 12/Lecture12HWAssignment2.py | AtharvaJoshi21/PythonPOC | 1 | 127065 | # WAP to accept an unsorted list of integers from user and sort it using
# a. Bubble Sort
# b. Insertion Sort
def BubbleSort(inputList):
listCount = len(inputList)
for x in range(listCount - 1):
alreadySorted = True
print('Iteration', x)
for y in range(x+1, listCount - 1):
... | [
1,
396,
399,
3301,
304,
3544,
385,
443,
24582,
1051,
310,
11920,
515,
1404,
322,
2656,
372,
773,
29871,
13,
29937,
29871,
12,
29874,
29889,
350,
23232,
20025,
13,
29937,
29871,
12,
29890,
29889,
24505,
291,
20025,
13,
13,
1753,
350,
2... |
1-100/1-10/6-zigZagConversion/zigZagConversion.py | xuychen/Leetcode | 0 | 44831 | <reponame>xuychen/Leetcode<gh_stars>0
import operator
class Solution(object):
def convert(self, s, numRows):
"""
:type s: str
:type numRows: int
:rtype: str
"""
if numRows == 1:
return s
period = (numRows - 1) * 2
result = ""
end... | [
1,
529,
276,
1112,
420,
29958,
29916,
8631,
2724,
29914,
3226,
300,
401,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
5455,
13,
13,
1990,
24380,
29898,
3318,
1125,
13,
1678,
822,
3588,
29898,
1311,
29892,
269,
29892,
954,
106... |
testtube/renderer.py | blaix/testtube | 0 | 95743 | <filename>testtube/renderer.py
"""Renderer that outputs formatted messaging for end users."""
import sys
from termcolor import colored
from testtube.conf import Settings
# For python3 support, we must use print as a function rather than a statement
class Renderer(object):
"""Utility that outputs formatted mes... | [
1,
529,
9507,
29958,
1688,
29873,
4003,
29914,
9482,
261,
29889,
2272,
13,
15945,
29908,
21323,
393,
14391,
20917,
4473,
6751,
363,
1095,
4160,
1213,
15945,
13,
5215,
10876,
13,
13,
3166,
1840,
2780,
1053,
28684,
13,
13,
3166,
1243,
298... |
pipelinePhase.py | armbrustsamuel/PythonPipelineEmulator | 0 | 166917 | # PIPELINE PHASES
import re
import miscellaneous as misc
import calculator as calc
instructionMemory = []
# Search phase
# @param program counter
# @return a instruction such as "dadd","daddi","dsub" ...
def search(pc):
# Retrieve next instruction in memory
instruction = misc.readInstructions("inputfile.txt")
... | [
1,
396,
259,
349,
29902,
4162,
18521,
349,
29950,
8127,
29903,
13,
13,
5215,
337,
13,
5215,
3984,
3729,
23584,
408,
3984,
29883,
13,
5215,
3408,
1061,
408,
22235,
13,
13,
2611,
4080,
16015,
353,
5159,
13,
13,
29937,
11856,
8576,
13,
... |
awstin/dynamodb/orm.py | k2bd/awstin | 1 | 5047 | <reponame>k2bd/awstin
import uuid
from abc import ABC, abstractmethod
from collections import defaultdict
from typing import Union
from boto3.dynamodb.conditions import Attr as BotoAttr
from boto3.dynamodb.conditions import Key as BotoKey
from awstin.dynamodb.utils import from_decimal, to_decimal
class NotSet:
... | [
1,
529,
276,
1112,
420,
29958,
29895,
29906,
6448,
29914,
1450,
303,
262,
13,
5215,
318,
5416,
13,
3166,
25638,
1053,
16417,
29892,
9846,
5696,
13,
3166,
16250,
1053,
2322,
8977,
13,
3166,
19229,
1053,
7761,
13,
13,
3166,
289,
3747,
2... |
tests/testapp/urls.py | matthiask/django-keyed-urls | 0 | 105180 | <reponame>matthiask/django-keyed-urls
from django.conf.urls import include, patterns, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += i18n_patterns(
'',
... | [
1,
529,
276,
1112,
420,
29958,
2922,
386,
29875,
1278,
29914,
14095,
29899,
1989,
287,
29899,
26045,
13,
3166,
9557,
29889,
5527,
29889,
26045,
1053,
3160,
29892,
15038,
29892,
3142,
13,
3166,
9557,
29889,
5527,
29889,
26045,
29889,
29875,
... |
LED2Net/Projection/Cube2Equirec.py | zhigangjiang/LED2-Net | 57 | 96369 | import os
import sys
import cv2
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import scipy.misc as sic
class Cube2Equirec(nn.Module):
def __init__(self, cube_length, equ_h):
super().__init__()
self.cube_length =... | [
1,
1053,
2897,
13,
5215,
10876,
13,
5215,
13850,
29906,
13,
5215,
5844,
13,
5215,
12655,
408,
7442,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383... |
favicons/_constants.py | checktheroads/favicons | 7 | 197913 | <filename>favicons/_constants.py<gh_stars>1-10
"""Static values for one way import."""
SUPPORTED_FORMATS = (".svg", ".jpeg", ".jpg", ".png", ".tiff", ".tif")
HTML_LINK = '<link rel="{rel}" type="{type}" href="{href}" />'
ICON_TYPES = (
{"image_fmt": "ico", "rel": None, "dimensions": (64, 64), "prefix": "favicon"... | [
1,
529,
9507,
29958,
29888,
485,
27078,
19891,
3075,
1934,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
17046,
1819,
363,
697,
982,
1053,
1213,
15945,
13,
13,
29903,
4897,
15082,
3352,
... |
unittest/buildtool/util_test.py | rantav/spinnaker | 0 | 140841 | <gh_stars>0
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
5087,
9266,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
2... |
notebooks/bqml/track_meta.py | roannav/learntools | 359 | 32140 | # See also examples/example_track/track_meta.py for a longer, commented example
track = dict(
author_username='dansbecker',
course_name='Machine Learning',
course_url='https://www.kaggle.com/learn/intro-to-machine-learning'
)
lessons = [
dict(
topic='Your First BiqQuery ML Model',
... | [
1,
396,
2823,
884,
6455,
29914,
4773,
29918,
11294,
29914,
11294,
29918,
7299,
29889,
2272,
363,
263,
5520,
29892,
19952,
1342,
13,
11294,
353,
9657,
29898,
13,
1678,
4148,
29918,
6786,
2433,
29881,
550,
915,
4937,
742,
13,
1678,
3236,
... |
Exercicios/068-ParouImparV2.py | LuisDjay/Python-Curso-em-Video | 0 | 61669 | <filename>Exercicios/068-ParouImparV2.py
print('=====Desafio 068=====')
from random import randint
cont = 0
while True:
jog = int(input('Diga Um valor: '))
resp = str(input('Par ou Ímpar? [P/I] ').upper())
comp = randint(0, 10)
result = jog + comp
result2 = result % 2
if result2 == 0 and resp =... | [
1,
529,
9507,
29958,
1252,
6269,
19382,
29914,
29900,
29953,
29947,
29899,
2177,
283,
1888,
862,
29963,
29906,
29889,
2272,
13,
2158,
877,
2751,
29922,
4002,
2142,
601,
29871,
29900,
29953,
29947,
2751,
29922,
1495,
13,
3166,
4036,
1053,
... |
page/playground_page.py | fnrcum/pytest_playwright_framework | 0 | 1608143 | from playwright.sync_api import Page
class PlaygroundPage:
def __init__(self, page: Page):
self.page = page
@property
def bad_button(self):
return self.page.wait_for_selector("#badButton") | [
1,
515,
1708,
29893,
1266,
29889,
16593,
29918,
2754,
1053,
9305,
13,
13,
13,
1990,
7412,
2057,
5074,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1813,
29901,
9305,
1125,
13,
4706,
1583,
29889,
3488,
353,
1813,
13,
13,
1... |
api/authentication/tests.py | app-generator/api-server-django-sample | 2 | 76597 | from django.urls import reverse
from rest_framework.test import APITestCase
from rest_framework import status
class AuthenticationTest(APITestCase):
base_url_register = reverse("api-users:register-list")
base_url_login = reverse("api-users:login-list")
base_url_logout = reverse("api-users:logout-list")
... | [
1,
515,
9557,
29889,
26045,
1053,
11837,
13,
3166,
1791,
29918,
4468,
29889,
1688,
1053,
12279,
1806,
342,
8259,
13,
3166,
1791,
29918,
4468,
1053,
4660,
13,
13,
13,
1990,
27241,
3057,
29898,
3301,
1806,
342,
8259,
1125,
13,
1678,
2967,... |
thuum/__main__.py | nickcoutsos/thuum | 0 | 40802 | import argparse
import functools
import sys
from tornado import (
httpclient,
ioloop,
)
def add_package_to_path():
if not (__name__ == "__main__" and __package__ == ""):
return
import os
sys.path.append(os.path.abspath(os.path.join(
os.path.abspath(__file__),
"..",
... | [
1,
1053,
1852,
5510,
13,
5215,
2090,
312,
8789,
13,
5215,
10876,
13,
13,
3166,
10146,
912,
1053,
313,
13,
1678,
1732,
4645,
29892,
13,
1678,
474,
3543,
459,
29892,
13,
29897,
13,
13,
1753,
788,
29918,
5113,
29918,
517,
29918,
2084,
... |
silica/transformations/replace_symbols.py | leonardt/fsm_dsl | 0 | 195340 | <reponame>leonardt/fsm_dsl
import ast
from copy import deepcopy
class SymbolReplacer(ast.NodeTransformer):
def __init__(self, symbol_table, ctx):
self.symbol_table = symbol_table
self.ctx = ctx
def visit_Name(self, node):
if node.id in self.symbol_table:
if self.ctx is Non... | [
1,
529,
276,
1112,
420,
29958,
280,
265,
538,
29873,
29914,
29888,
3844,
29918,
29881,
2536,
13,
5215,
8717,
13,
3166,
3509,
1053,
6483,
8552,
13,
13,
13,
1990,
23858,
5612,
433,
2265,
29898,
579,
29889,
4247,
13372,
261,
1125,
13,
16... |
1701-1800/1711-1720/1711-countGoodMeals/countGoodMeals.py | xuychen/Leetcode | 0 | 27963 | <gh_stars>0
from collections import defaultdict
class Solution(object):
def countPairs(self, deliciousness):
"""
:type deliciousness: List[int]
:rtype: int
"""
max_sum = max(deliciousness) * 2
count = 0
dictionary = defaultdict(int)
for value in del... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
16250,
1053,
2322,
8977,
13,
13,
1990,
24380,
29898,
3318,
1125,
13,
1678,
822,
2302,
29925,
7121,
29898,
1311,
29892,
628,
14803,
2264,
1125,
13,
4706,
9995,
13,
4706,
584,
1853,... |
modin/pandas/datetimes.py | alclol/modin | 0 | 68697 | <reponame>alclol/modin
# Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "L... | [
1,
529,
276,
1112,
420,
29958,
284,
695,
324,
29914,
1545,
262,
13,
29937,
10413,
21144,
304,
3382,
262,
14650,
8583,
1090,
697,
470,
901,
17737,
3406,
19405,
8571,
4110,
29889,
13,
29937,
2823,
278,
6058,
12107,
934,
13235,
411,
445,
... |
tests/test_gpreg.py | cdgreenidge/gdec | 0 | 12283 | <filename>tests/test_gpreg.py
"""Test gpreg.py."""
from typing import Tuple
import numpy as np
import pytest
from gdec import gpreg, npgp
@pytest.fixture(scope="module")
def dataset() -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]:
np.random.seed(42)
amplitude = 1.0
lengthscale = 12
sigma ... | [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
29887,
1457,
29887,
29889,
2272,
13,
15945,
29908,
3057,
330,
1457,
29887,
29889,
2272,
1213,
15945,
13,
3166,
19229,
1053,
12603,
552,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
11451,
1688,... |
evaluate.py | OlinSTEP/silent_speech | 0 | 144329 | import sys
import os
import logging
import torch
from torch import nn
from transduction_model import test, save_output, Model
from read_emg import EMGDataset
from asr import evaluate
from data_utils import phoneme_inventory, print_confusion
from absl import flags
FLAGS = flags.FLAGS
flags.DEFINE_list('models', [], '... | [
1,
1053,
10876,
13,
5215,
2897,
13,
5215,
12183,
13,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
1053,
302,
29876,
13,
13,
3166,
1301,
700,
428,
29918,
4299,
1053,
1243,
29892,
4078,
29918,
4905,
29892,
8125,
13,
3166,
1303,
29918,
331,... |
RNAPuzzles/RNAPuzzles/settings.py | whinyadventure/RNA-Puzzles | 0 | 174781 | """
Django settings for RNAPuzzles project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
... | [
1,
9995,
13,
29928,
5364,
6055,
363,
390,
29940,
3301,
18813,
793,
2060,
29889,
13,
13,
24565,
491,
525,
14095,
29899,
6406,
1369,
4836,
29915,
773,
15337,
29871,
29906,
29889,
29906,
29889,
13,
13,
2831,
901,
2472,
373,
445,
934,
29892... |
python/depthcharge/register/cp.py | youssefms/depthcharge | 0 | 61757 | # SPDX-License-Identifier: BSD-3-Clause
# Depthcharge: <https://github.com/nccgroup/depthcharge>
"""
Implements FDTCrashRegisterReader
"""
from ..operation import Operation
from .data_abort import DataAbortRegisterReader
class CpCrashRegisterReader(DataAbortRegisterReader):
"""
This is a :py:class:`~.DataAb... | [
1,
396,
10937,
29928,
29990,
29899,
29931,
293,
1947,
29899,
12889,
29901,
350,
7230,
29899,
29941,
29899,
20216,
1509,
13,
29937,
10034,
386,
23367,
29901,
529,
991,
597,
3292,
29889,
510,
29914,
29876,
617,
2972,
29914,
19488,
23367,
2995... |
Day01-15/code/Day15/excel1.py | EngrSaad2/Python-100-Days | 6 | 44704 | <reponame>EngrSaad2/Python-100-Days<gh_stars>1-10
"""
创建Excel文件
Version: 0.1
Author: 骆昊
Date: 2018-03-26
"""
from openpyxl import Workbook
from openpyxl.worksheet.table import Table, TableStyleInfo
workbook = Workbook()
sheet = workbook.active
data = [
[1001, '白元芳', '男', '13123456789'],
[1002, '白洁', '女', '132... | [
1,
529,
276,
1112,
420,
29958,
2369,
629,
17618,
328,
29906,
29914,
11980,
29899,
29896,
29900,
29900,
29899,
25991,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
31441,
30886,
22926,
30333,
30631,
... |
playsound.py | Tony1527/playsound | 2 | 89492 | <reponame>Tony1527/playsound
class PlaysoundException(Exception):
pass
def _playsoundWin(sound, block = True):
'''
Utilizes windll.winmm. Tested and known to work with MP3 and WAVE on
Windows 7 with Python 2.7. Probably works with more file formats.
Probably works on Windows XP thru Windows 10. Pro... | [
1,
529,
276,
1112,
420,
29958,
29911,
2592,
29896,
29945,
29906,
29955,
29914,
12922,
618,
13,
1990,
1858,
1036,
618,
2451,
29898,
2451,
1125,
13,
1678,
1209,
13,
13,
1753,
903,
12922,
618,
17734,
29898,
29802,
29892,
2908,
353,
5852,
1... |
stage2/models/FuseNet.py | YU-Zhiyang/WEVI | 14 | 193019 | import torch
import torch.nn as nn
from models.baseModule import FuseBlock, BaseNet, Interp
class FuseNet(BaseNet):
def __init__(self):
super(FuseNet, self).__init__()
self.ConvIn = nn.Conv2d(in_channels=512, out_channels=512, kernel_size=1, stride=1, bias=False)
self.AADBlk1 = FuseBlock(c... | [
1,
1053,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
3166,
4733,
29889,
3188,
7355,
1053,
383,
1509,
7445,
29892,
7399,
6779,
29892,
4124,
29886,
13,
13,
13,
1990,
383,
1509,
6779,
29898,
5160,
6779,
1125,
13,
1... |
Tutorial 6 - Ptychography/ePIE_code/ptycho_recon/postProcess.py | paradimdata/Cornell_EM_SummerSchool_2021 | 8 | 112593 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 1 23:29:40 2021
@author: <NAME>
Converted from Yi Jiang's 'postProcess.m''
"""
import numpy as np
from skimage.transform import rotate, rescale
def sind(x):
return np.sin(x * np.pi / 180)
def cosd(x):
return np.cos(x * np.pi / 180)
def removePhaseRamp(input, d... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
323,
434,
8378,
259,
29896,
29871,
29906,
29941,
29901,
29906,
29929,
29901,
29946,
29900,
29871,
29906,
29900,
29906,
29896,
... |
data_sqlalchemy/word.py | natter1/estonian_learner | 0 | 29159 | import datetime
from data_sqlalchemy.modelbase import SqlAlchemyBase
import sqlalchemy as sa
class Word(SqlAlchemyBase):
__tablename__ = "words"
# id = sa.Column(sa.Integer, primary_key=True, autoincrement=True)
id = sa.Column(sa.String, primary_key=True)
created_date = sa.Column(sa.DateTime, default... | [
1,
1053,
12865,
13,
13,
3166,
848,
29918,
2850,
284,
305,
6764,
29889,
4299,
3188,
1053,
13093,
2499,
305,
6764,
5160,
13,
5215,
4576,
284,
305,
6764,
408,
872,
13,
13,
13,
1990,
10803,
29898,
10520,
2499,
305,
6764,
5160,
1125,
13,
... |
src/features/junjie_features.py | davidjurgens/prosocial-conversation-forecasting | 3 | 41252 | import os
import pandas as pd
import datetime
from genderperformr import GenderPerformr
from agreementr import Agreementr
from politenessr import Politenessr
from supportr import Supportr
import enchant
import requests
import json
from googleapiclient import discovery
from enchant.checker import SpellChecker
from encha... | [
1,
1053,
2897,
13,
5215,
11701,
408,
10518,
13,
5215,
12865,
13,
3166,
23346,
19826,
29878,
1053,
402,
1581,
5894,
689,
29878,
13,
3166,
17327,
29878,
1053,
4059,
276,
882,
29878,
13,
3166,
2832,
18543,
29878,
1053,
2043,
3537,
404,
298... |
social_auth/fields.py | thesealion/django-social-auth | 0 | 67994 | <reponame>thesealion/django-social-auth
import json
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.encoding import smart_unicode
class SubfieldBase(type):
"""
A metaclass for custom Field subclasses. This ensures the model's attribute
has the descriptor p... | [
1,
529,
276,
1112,
420,
29958,
386,
968,
20235,
29914,
14095,
29899,
24911,
29899,
5150,
13,
5215,
4390,
13,
13,
3166,
9557,
29889,
3221,
29889,
11739,
29879,
1053,
15758,
362,
2392,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
95... |
pages/admin.py | nnscr/nnscr.de | 0 | 100200 | <reponame>nnscr/nnscr.de
from django.contrib import admin
from django import forms
from . import models
from nnmarkdown.form import MarkdownWidget
from nnscr.admin import site
class PageAdminForm(forms.ModelForm):
class Meta:
model = models.Page
exclude = ("slug",)
widgets = {
... | [
1,
529,
276,
1112,
420,
29958,
15755,
10526,
29914,
15755,
10526,
29889,
311,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
1053,
7190,
13,
3166,
869,
1053,
4733,
13,
3166,
302,
29876,
3502,
3204,
29889,
689,
1053,
4485,
320... |
imageclassification/training/session.py | aisosalo/CIFAR-10 | 4 | 30637 | <gh_stars>1-10
import sys
import os
import time
import random
import numpy as np
from termcolor import colored
from functools import partial
from tensorboardX import SummaryWriter
import torch
from torch.utils.data import DataLoader
from torchvision import transforms as tv_transforms
import solt.transforms as sl... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
931,
13,
5215,
4036,
13,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
1840,
2780,
1053,
28684,
13,
13,
3166,
2090,
312,
8789,
... |
OneTrack/MAIN/UI/Widget/__init__.py | aragubas/OneTrack | 0 | 126759 | <reponame>aragubas/OneTrack
#!/usr/bin/python3.7
# Copyright 2020 Aragubas
#
# 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
#
# U... | [
1,
529,
276,
1112,
420,
29958,
279,
351,
431,
294,
29914,
6716,
17936,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
29889,
29955,
13,
29937,
259,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
24350,
431,
294,
13,
29937,
13,
... |
model/model.py | shubhMaheshwari/NeuralTracking | 1 | 158319 | <filename>model/model.py<gh_stars>1-10
import sys,os
import torch
import torch.nn as nn
import numpy as np
from timeit import default_timer as timer
import math
import kornia
from timeit import default_timer as timer
from decimal import Decimal
import options as opt
import utils.query as query
from utils.nnutils import... | [
1,
529,
9507,
29958,
4299,
29914,
4299,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
10876,
29892,
359,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
12655,... |
datasets/nhse_stats/topics/msa.py | nhsengland/publish-o-matic | 0 | 198135 | """ Scrapes the data at http://www.england.nhs.uk/statistics/statistical-work-areas/mixed-sex-accommodation/msa-data/ """
import calendar
import datetime
import re
from lxml.html import fromstring, tostring
import requests
import slugify
from publish.lib.helpers import to_markdown, anchor_to_resource
TITLE_ROOT =... | [
1,
9995,
2522,
2390,
267,
278,
848,
472,
1732,
597,
1636,
29889,
996,
1049,
29889,
29876,
9499,
29889,
2679,
29914,
6112,
6765,
29914,
6112,
391,
936,
29899,
1287,
29899,
598,
294,
29914,
29885,
11925,
29899,
14167,
29899,
562,
510,
1545,... |
test/test_ostool.py | JukeboxPipeline/jukebox-core | 2 | 139610 | from jukeboxcore import ostool
def test_detect_sys():
""" Detect Platform
:returns: None
:rtype: None
:raises: None
"""
ostool.detect_sys()
def test_get_interface():
""" Get PlatformInterface for your Platform
:returns: None
:rtype: None
:raises: None
"""
ostool.get... | [
1,
515,
3623,
446,
1884,
3221,
1053,
14750,
1507,
13,
13,
13,
1753,
1243,
29918,
4801,
522,
29918,
9675,
7295,
13,
1678,
9995,
5953,
522,
28096,
13,
13,
1678,
584,
18280,
29901,
6213,
13,
1678,
584,
29878,
1853,
29901,
6213,
13,
1678,... |
wxnat/tests/__init__.py | pauldmccarthy/wxnatpy | 1 | 56129 | <gh_stars>1-10
#!/usr/bin/env python
#
# __init__.py - unit tests for wxnatpy
#
# Author: <NAME> <<EMAIL>>
#
import time
import wx
def run_with_wx(func, *args, **kwargs):
propagateRaise = kwargs.pop('propagateRaise', True)
startingDelay = kwargs.pop('startingDelay', 500)
finishingDelay = kwargs.pop(... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
13,
29937,
4770,
2344,
26914,
2272,
448,
5190,
6987,
363,
26437,
8924,
2272,
13,
29937,
13,
29937,
1336... |
examples/test_yield_8.py | MateuszG/django_auth | 2 | 9014 | import pytest
@pytest.yield_fixture
def passwd():
print ("\nsetup before yield")
f = open("/etc/passwd")
yield f.readlines()
print ("teardown after yield")
f.close()
def test_has_lines(passwd):
print ("test called")
assert passwd
| [
1,
1053,
11451,
1688,
13,
13,
29992,
2272,
1688,
29889,
29891,
969,
29918,
7241,
15546,
13,
1753,
1209,
9970,
7295,
13,
1678,
1596,
4852,
29905,
29876,
14669,
1434,
7709,
1159,
13,
1678,
285,
353,
1722,
11974,
7070,
29914,
3364,
9970,
1... |
examples/Oscillators/MallsOscillator/plotresults.py | doublefloyd/beluga | 20 | 174838 | from beluga.utils import load
import matplotlib.pyplot as plt
data = load('data.beluga')
sol_set = data['solutions']
traj = sol_set[-1][-1]
continuation = sol_set[-1]
L = len(continuation)
plt.figure()
for ind, sol in enumerate(continuation):
plt.plot(sol.y[:, 0], sol.y[:, 1], linestyle='-', color=(1*(ind/L), 0,... | [
1,
515,
1339,
26281,
29889,
13239,
1053,
2254,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
1272,
353,
2254,
877,
1272,
29889,
6596,
26281,
1495,
13,
13,
2929,
29918,
842,
353,
848,
1839,
2929,
17925,
2033,
13,
3018,
29926,
... |
src/lib/earlystopping.py | dreizehnutters/pcapae | 0 | 34665 | from os import path, makedirs, walk ,remove, scandir, unlink
from numpy import inf
from torch import save as t_save
from lib.utils import sort_human, BOLD, CLR
class EarlyStopping:
def __init__(self, log_path, patience=7, model=None, verbose=False, exp_tag=""):
"""Early stops the training if validation ... | [
1,
515,
2897,
1053,
2224,
29892,
2136,
287,
12935,
29892,
6686,
1919,
5992,
29892,
885,
392,
381,
29892,
443,
2324,
13,
13,
3166,
12655,
1053,
3041,
13,
3166,
4842,
305,
1053,
4078,
408,
260,
29918,
7620,
13,
13,
3166,
4303,
29889,
13... |
ccn/graph_data.py | noahtren/Cooperative-Communication-Networks | 13 | 102389 | <reponame>noahtren/Cooperative-Communication-Networks
"""Representing trees as a subset of graph data structures, where all
information is provided as TensorFlow tensors during training time.
"""
import os
import random
import code
from typing import Dict
import tensorflow as tf
import numpy as np
from graphviz impor... | [
1,
529,
276,
1112,
420,
29958,
1217,
29874,
400,
1267,
29914,
7967,
3372,
1230,
29899,
5261,
2523,
362,
29899,
13724,
29879,
13,
15945,
29908,
1123,
6338,
292,
10697,
408,
263,
11306,
310,
3983,
848,
12286,
29892,
988,
599,
13,
19678,
3... |
week_1/prime_num.py | Ashutosh781/QSTP-Kratos_electronics-Solutions | 0 | 109823 | <reponame>Ashutosh781/QSTP-Kratos_electronics-Solutions
#! /usr/bin/env python
#Asking for input until a list of 10 integers given
while True:
num = input("Enter a list of 10 integers separated by a ',' : ").split(',')
l = len(num)
try:
for i in range(l):
num[i] = int(num[i])
p ... | [
1,
529,
276,
1112,
420,
29958,
29909,
845,
329,
10578,
29955,
29947,
29896,
29914,
29984,
1254,
29925,
29899,
29968,
3605,
359,
29918,
15436,
1617,
1199,
29899,
13296,
17925,
13,
29937,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
13,
... |
TWT/apps/challenges/views/__init__.py | avibn/twtcodejam.net | 0 | 49488 | from .home import HomeView
from .logout import LogoutView
from .new import NewChallengeView
from .view import DetailView
from .test import TestView
from .end import EndView
from .start import StartView
from .stop_team import StopTeams
from .start_submission import StartSubmission
from .stop_submission import StopSubmis... | [
1,
515,
869,
5184,
1053,
8778,
1043,
13,
3166,
869,
1188,
449,
1053,
4522,
449,
1043,
13,
3166,
869,
1482,
1053,
1570,
1451,
11768,
1043,
13,
3166,
869,
1493,
1053,
5953,
737,
1043,
13,
3166,
869,
1688,
1053,
4321,
1043,
13,
3166,
8... |
active_reward_learning/common/constants.py | david-lindner/idrl | 9 | 146690 | <gh_stars>1-10
import os
from collections import defaultdict, namedtuple
PLOTS_FOLDER = "plots"
ENV_FOLDER = "envs"
MODELS_FOLDER = "models"
BASE_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..")
PLOTS_PATH = os.path.join(BASE_PATH, PLOTS_FOLDER)
ENV_PATH = os.path.join(BASE_PATH, ENV_FOLDE... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
2897,
13,
3166,
16250,
1053,
2322,
8977,
29892,
4257,
23583,
13,
13,
7390,
2891,
29903,
29918,
29943,
5607,
8032,
353,
376,
26762,
29908,
13,
25838,
29918,
2994... |
evaluation/lcnn/postprocess.py | mlpc-ucsd/LETR | 90 | 24271 | import numpy as np
def pline(x1, y1, x2, y2, x, y):
px = x2 - x1
py = y2 - y1
dd = px * px + py * py
u = ((x - x1) * px + (y - y1) * py) / max(1e-9, float(dd))
dx = x1 + u * px - x
dy = y1 + u * py - y
return dx * dx + dy * dy
def psegment(x1, y1, x2, y2, x, y):
px = x2 - x1
py =... | [
1,
1053,
12655,
408,
7442,
13,
13,
13,
1753,
715,
457,
29898,
29916,
29896,
29892,
343,
29896,
29892,
921,
29906,
29892,
343,
29906,
29892,
921,
29892,
343,
1125,
13,
1678,
282,
29916,
353,
921,
29906,
448,
921,
29896,
13,
1678,
11451,
... |
config/users/views.py | sitepoint-editors/Django-photo-app | 0 | 25890 | from django.views.generic import CreateView
from django.contrib.auth import authenticate, login
from django.contrib.auth.views import LoginView
from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse_lazy
class SignUpView(CreateView):
template_name = 'users/signup.html'
... | [
1,
515,
9557,
29889,
7406,
29889,
19206,
1053,
6204,
1043,
13,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
15585,
403,
29892,
6464,
13,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
7406,
1053,
19130,
1043,
13,
13,
3166,
9557,
... |
test_project/products/example.py | SzatmariA/CharmFL-dev | 0 | 140648 | <reponame>SzatmariA/CharmFL-dev<gh_stars>0
# This is a simple example script for FL
# It should represent a webshop, or at least part of it
cart = {}
def addToCart(product):
if(product not in cart.keys()):
cart[str(product)] = 1
else:
cart[str(product)] = cart[(str(product))] + 2 # bug -> sho... | [
1,
529,
276,
1112,
420,
29958,
29903,
22046,
29885,
1306,
29909,
29914,
1451,
2817,
10536,
29899,
3359,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
910,
338,
263,
2560,
1342,
2471,
363,
383,
29931,
13,
29937,
739,
881,
2755,
... |
PopUp.py | Bogiasdroid/BackMeUp | 0 | 173676 | import sys
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text... | [
1,
1053,
10876,
30004,
13,
30004,
13,
3166,
10772,
17303,
29946,
1053,
14705,
9203,
29892,
14705,
28707,
30004,
13,
30004,
13,
2202,
29901,
30004,
13,
1678,
903,
3166,
29965,
13264,
29947,
353,
14705,
9203,
29889,
29984,
1231,
29889,
3166,
... |
main.py | guysoft/kivy-external-storage-permission | 1 | 22019 | import kivy
from kivy.app import App
from kivy.uix.button import Button
import android
import os
import time
from android.permissions import Permission, request_permission, check_permission
from kivy.clock import Clock
class MyApp(App):
def second_thread(self, data):
print("starting second thread")
... | [
1,
1053,
413,
440,
29891,
13,
13,
3166,
413,
440,
29891,
29889,
932,
1053,
2401,
13,
3166,
413,
440,
29891,
29889,
29884,
861,
29889,
3092,
1053,
11025,
13,
5215,
1442,
13,
5215,
2897,
13,
5215,
931,
13,
3166,
1442,
29889,
17858,
6847... |
concepttordf/betydningsbeskrivelse.py | jimjyang/concepttordf | 0 | 1605641 | <filename>concepttordf/betydningsbeskrivelse.py<gh_stars>0
from abc import ABC
from enum import Enum
class RelationToSource(Enum):
sitatFraKilde = "quoteFromSource"
basertPåKilde = "basedOnSource"
egendefinert = "noSource"
class Betydningsbeskrivelse(ABC):
def __init__(self, b: dict = None):
... | [
1,
529,
9507,
29958,
535,
1547,
29873,
536,
29888,
29914,
6878,
2941,
11753,
5707,
29895,
374,
955,
344,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
25638,
1053,
16417,
13,
3166,
14115,
1053,
1174,
398,
13,
13,
... |
ClassicFunction.py | gr0mph/SpringChallenge2020 | 0 | 93927 | import sys, copy, heapq
import math, random, time
import numpy as np
# Class
from Challenge import Pacman
def init_pacman_from_list(kanban_node, PACMAN_LIST):
for d1 in PACMAN_LIST:
pacman_new = Pacman(None)
pacman_new.mine, pacman_new.x, pacman_new.y = d1[1], d1[2], d1[3]
pacman_new.type... | [
1,
1053,
10876,
29892,
3509,
29892,
16947,
29939,
13,
5215,
5844,
29892,
4036,
29892,
931,
13,
13,
5215,
12655,
408,
7442,
13,
13,
29937,
4134,
13,
3166,
27211,
1053,
9790,
1171,
13,
13,
1753,
2069,
29918,
29886,
562,
1171,
29918,
3166,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.