max_stars_repo_path
stringlengths
4
286
max_stars_repo_name
stringlengths
5
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.03M
content_cleaned
stringlengths
6
1.03M
language
stringclasses
111 values
language_score
float64
0.03
1
comments
stringlengths
0
556k
edu_score
float64
0.32
5.03
edu_int_score
int64
0
5
bfs/scripts/2_generate_params.py
KastnerRG/spector
45
6626751
#!/usr/bin/python # ---------------------------------------------------------------------- # Copyright (c) 2016, The Regents of the University of California All # rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following condition...
#!/usr/bin/python # ---------------------------------------------------------------------- # Copyright (c) 2016, The Regents of the University of California All # rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following condition...
en
0.652881
#!/usr/bin/python # ---------------------------------------------------------------------- # Copyright (c) 2016, The Regents of the University of California All # rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
1.380013
1
vi_lomas_changes/migrations/0012_auto_20200428_2032.py
dymaxionlabs/satlomas-back
1
6626752
<filename>vi_lomas_changes/migrations/0012_auto_20200428_2032.py<gh_stars>1-10 # Generated by Django 3.0.5 on 2020-04-28 20:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('vi_lomas_changes', '0011_auto_20200428_0256'), ] operations = [ migra...
<filename>vi_lomas_changes/migrations/0012_auto_20200428_2032.py<gh_stars>1-10 # Generated by Django 3.0.5 on 2020-04-28 20:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('vi_lomas_changes', '0011_auto_20200428_0256'), ] operations = [ migra...
en
0.773764
# Generated by Django 3.0.5 on 2020-04-28 20:32
1.408985
1
checkout/migrations/0002_auto_20201209_2330.py
sctlcd/pearl-v2
1
6626753
<reponame>sctlcd/pearl-v2 # Generated by Django 3.1.3 on 2020-12-09 23:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('checkout', '0001_initial'), ] operations = [ migrations.AlterField( model_name='order', na...
# Generated by Django 3.1.3 on 2020-12-09 23:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('checkout', '0001_initial'), ] operations = [ migrations.AlterField( model_name='order', name='country', ...
en
0.836889
# Generated by Django 3.1.3 on 2020-12-09 23:30
1.750882
2
2bcmc.py
pxeger/2bcmc
0
6626754
#!/usr/bin/python # © <NAME> <_<EMAIL>> 2021 # Licensed under the Artistic License 2.0 (https://github.com/pxeger/2bcmc/blob/main/LICENCE.txt) # Created for Redwolf Programs' CMC (https://chat.stackexchange.com/transcript/message/59389303#59389303) # a somewhat golf-oriented language with a two bit code page from col...
#!/usr/bin/python # © <NAME> <_<EMAIL>> 2021 # Licensed under the Artistic License 2.0 (https://github.com/pxeger/2bcmc/blob/main/LICENCE.txt) # Created for Redwolf Programs' CMC (https://chat.stackexchange.com/transcript/message/59389303#59389303) # a somewhat golf-oriented language with a two bit code page from col...
en
0.633612
#!/usr/bin/python # © <NAME> <_<EMAIL>> 2021 # Licensed under the Artistic License 2.0 (https://github.com/pxeger/2bcmc/blob/main/LICENCE.txt) # Created for Redwolf Programs' CMC (https://chat.stackexchange.com/transcript/message/59389303#59389303) # a somewhat golf-oriented language with a two bit code page # push lit...
3.297819
3
app/legacy/keras_wrappers.py
rahowa/workzone
1
6626755
<reponame>rahowa/workzone import keras import numpy as np from typing import Union, Any from app.nn_inference import BaseWrapper from app.base_types import Image, Descriptors class KerasBase(BaseWrapper): """ Example wrapper for pure Keras face reсognition system """ def __init__(self, config: Un...
import keras import numpy as np from typing import Union, Any from app.nn_inference import BaseWrapper from app.base_types import Image, Descriptors class KerasBase(BaseWrapper): """ Example wrapper for pure Keras face reсognition system """ def __init__(self, config: Union[str, Any], model: kera...
en
0.373837
Example wrapper for pure Keras face reсognition system
2.495816
2
stores/migrations/0006_auto_20181002_1626.py
fats2005/pma-backend
0
6626756
<gh_stars>0 # -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-10-02 21:26 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('stores', '0005_auto_20181002_1446'), ] operations = [ migrations.Rename...
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-10-02 21:26 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('stores', '0005_auto_20181002_1446'), ] operations = [ migrations.RenameModel( ...
en
0.735872
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-10-02 21:26
1.664494
2
python/bl_gob.py
lihebi/DAG-EQ
5
6626757
import os, sys sys.path.append("/home/jovyan/DAG-EQ/python/pygobnilp") import networkx as nx import matplotlib.pyplot as plt from pygobnilp.gobnilp import Gobnilp m = Gobnilp() epsilon = 0.0001 def optimal_score_is(m,score): return abs(m.learned_scores[0] - score) < epsilon def test_bge(): m.learn('data/g...
import os, sys sys.path.append("/home/jovyan/DAG-EQ/python/pygobnilp") import networkx as nx import matplotlib.pyplot as plt from pygobnilp.gobnilp import Gobnilp m = Gobnilp() epsilon = 0.0001 def optimal_score_is(m,score): return abs(m.learned_scores[0] - score) < epsilon def test_bge(): m.learn('data/g...
none
1
2.584183
3
scripts/generate_gif_jobs.py
weepingwillowben/reward-surfaces
0
6626758
<filename>scripts/generate_gif_jobs.py<gh_stars>0 import torch import numpy as np from reward_surfaces.experiments import generate_plane_data import json import subprocess import argparse from reward_surfaces.utils.surface_utils import filter_normalize from pathlib import Path import random import os def main(): p...
<filename>scripts/generate_gif_jobs.py<gh_stars>0 import torch import numpy as np from reward_surfaces.experiments import generate_plane_data import json import subprocess import argparse from reward_surfaces.utils.surface_utils import filter_normalize from pathlib import Path import random import os def main(): p...
en
0.837593
# reseeds so that random generated directions are the same every time # concatenate all jobs
2.375332
2
yt_concate/logs.py
RobertChienShiba/yt_concate
0
6626759
<reponame>RobertChienShiba/yt_concate import logging def set_log(file_level,stream_level): logger=logging.getLogger(__name__) logger.setLevel(logging.DEBUG) formatter=logging.Formatter('%(asctime)s:%(levelname)s:%(message)s') file_handler=logging.FileHandler('youtube.log') file_handler.setLevel(fi...
import logging def set_log(file_level,stream_level): logger=logging.getLogger(__name__) logger.setLevel(logging.DEBUG) formatter=logging.Formatter('%(asctime)s:%(levelname)s:%(message)s') file_handler=logging.FileHandler('youtube.log') file_handler.setLevel(file_level) file_handler.setFormatte...
none
1
2.627111
3
src/py-opentimelineio/opentimelineio/console/otioconvert.py
michdolan/OpenTimelineIO
0
6626760
#!/usr/bin/env python # # SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the OpenTimelineIO project import argparse import sys import copy import opentimelineio as otio # on some python interpreters, pkg_resources is not available try: import pkg_resources except ImportError: pkg_resources =...
#!/usr/bin/env python # # SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the OpenTimelineIO project import argparse import sys import copy import opentimelineio as otio # on some python interpreters, pkg_resources is not available try: import pkg_resources except ImportError: pkg_resources =...
en
0.431375
#!/usr/bin/env python # # SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the OpenTimelineIO project # on some python interpreters, pkg_resources is not available Python wrapper around OTIO to convert timeline files between \ formats. Available adapters: {} parse commandline arguments with argparse # p...
2.616939
3
Packs/Devo/Integrations/Devo_v2/Devo_v2.py
ddi-danielsantander/content
1
6626761
import demistomock as demisto from CommonServerPython import * ''' IMPORTS ''' import base64 import json import time import devodsconnector as ds import concurrent.futures import tempfile import urllib.parse import re import os from datetime import datetime from devo.sender import Lookup, SenderConfigSSL, Sender from t...
import demistomock as demisto from CommonServerPython import * ''' IMPORTS ''' import base64 import json import time import devodsconnector as ds import concurrent.futures import tempfile import urllib.parse import re import os from datetime import datetime from devo.sender import Lookup, SenderConfigSSL, Sender from t...
en
0.707752
IMPORTS GLOBAL VARS from siem.logtrust.alert.info select eventdate, alertHost, domain, priority, context, category, status, alertId, srcIp, srcPort, srcHost, dstIp, dstPort, dstHost, application, engine, extraData from test.keep.free select ...
1.776865
2
tests/test_consultarstatusoperacional.py
danielgoncalves/satcfe
38
6626762
# -*- coding: utf-8 -*- # # tests/test_consultarstatusoperacional.py # # Copyright 2015 Base4 Sistemas Ltda ME # # 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...
# -*- coding: utf-8 -*- # # tests/test_consultarstatusoperacional.py # # Copyright 2015 Base4 Sistemas Ltda ME # # 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...
en
0.579953
# -*- coding: utf-8 -*- # # tests/test_consultarstatusoperacional.py # # Copyright 2015 Base4 Sistemas Ltda ME # # 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.808927
2
chikn.py
Meshiest/chikn-game
0
6626763
<gh_stars>0 import sys, pygame, time, math, random pygame.init() pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=512) # import my own code from constants import * screen = pygame.display.set_mode([WIDTH, HEIGHT]) #, pygame.RESIZABLE, 32) from feather import * from chicken import * from utils import ...
import sys, pygame, time, math, random pygame.init() pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=512) # import my own code from constants import * screen = pygame.display.set_mode([WIDTH, HEIGHT]) #, pygame.RESIZABLE, 32) from feather import * from chicken import * from utils import * from bot i...
en
0.842833
# import my own code #, pygame.RESIZABLE, 32) # draw the dirt # draw the grass # remove player from living player count # remove player from players with lives # set the last player to current obj, if resetLives == 1, this is the last player # Update grass around this obj # set the player to not living if it is off scr...
2.465173
2
mmd_scripting/scripts_for_gui/file_recompress_images.py
Nuthouse01/PMX-VMD-Scripting-Tools
54
6626764
import os import shutil import mmd_scripting.core.nuthouse01_core as core import mmd_scripting.core.nuthouse01_io as io import mmd_scripting.core.nuthouse01_pmx_parser as pmxlib from mmd_scripting.scripts_for_gui import file_sort_textures _SCRIPT_VERSION = "Script version: Nuthouse01 - v1.07.03 - 8/9/2021" # This co...
import os import shutil import mmd_scripting.core.nuthouse01_core as core import mmd_scripting.core.nuthouse01_io as io import mmd_scripting.core.nuthouse01_pmx_parser as pmxlib from mmd_scripting.scripts_for_gui import file_sort_textures _SCRIPT_VERSION = "Script version: Nuthouse01 - v1.07.03 - 8/9/2021" # This co...
en
0.807956
# This code is free to use and re-distribute, but I cannot be held responsible for damages that it may or may not cause. ##################### # NOTE: i comment this block before compiling the EXE cuz the Pillow library is gigantic & makes the exe version like 200K # print extra messages when certain things fail in cer...
2.100512
2
ajaxuploader/backends/s3.py
ixc/django-ajax-uploader
1
6626765
from multiprocessing import Pool from StringIO import StringIO import boto from django.conf import settings from ajaxuploader.backends.base import AbstractUploadBackend class S3UploadBackend(AbstractUploadBackend): NUM_PARALLEL_PROCESSES = 4 def upload_chunk(self, chunk): self._counter += 1 ...
from multiprocessing import Pool from StringIO import StringIO import boto from django.conf import settings from ajaxuploader.backends.base import AbstractUploadBackend class S3UploadBackend(AbstractUploadBackend): NUM_PARALLEL_PROCESSES = 4 def upload_chunk(self, chunk): self._counter += 1 ...
en
0.907176
# Tie up loose ends, and finish the upload
2.203517
2
tests/test.py
bbitarello/ldpred
89
6626766
""" A test file for LDpred. Examples -------- To run all tests: $ python -m tests.test To run a specific test: $ python -m unittest tests.test.SimpleTests.test_ldpred_inf """ import pickle import filecmp import gzip import h5py from ldpred import coord_genotypes from ldpred import ld from ldpred import sum_stats_par...
""" A test file for LDpred. Examples -------- To run all tests: $ python -m tests.test To run a specific test: $ python -m unittest tests.test.SimpleTests.test_ldpred_inf """ import pickle import filecmp import gzip import h5py from ldpred import coord_genotypes from ldpred import ld from ldpred import sum_stats_par...
en
0.639184
A test file for LDpred. Examples -------- To run all tests: $ python -m tests.test To run a specific test: $ python -m unittest tests.test.SimpleTests.test_ldpred_inf Generator function that walks an hdf5 File or Group object. Args: h5_node: an h5py.File or h5py.Group object key_prefix: the '/' d...
2.84602
3
apfv/utils/mAP.py
anonymous0120/attentional_pervasive_fabricate_vanish_attack
0
6626767
import glob import json import os import shutil import operator import sys import argparse import math import numpy as np import pdb def save_detection_to_file(input_dic, output_file, task): with open(output_file, 'w') as txt_file: if not input_dic: return class_list = input_dic['class...
import glob import json import os import shutil import operator import sys import argparse import math import numpy as np import pdb def save_detection_to_file(input_dic, output_file, task): with open(output_file, 'w') as txt_file: if not input_dic: return class_list = input_dic['class...
en
0.68565
Create a ".temp_files/" and "results/" directory # if it doesn't exist already ground-truth Load each of the ground-truth files into a temporary ".json" file. Create a list of all the class names present in the ground-truth (gt_classes). # get a list with the ground-truth files # dictionary with counter...
2.704206
3
unionchan/main.py
moepoi/union-chan
1
6626768
<reponame>moepoi/union-chan from discord.ext import commands from src.convertdata import sekantung_kata, kata, label, data, net import random import numpy import tflearn import sys args = sys.argv[1] model = tflearn.DNN(net) model.load('./src/model/model.tfl') client = commands.Bot(command_prefix='!union ') global ...
from discord.ext import commands from src.convertdata import sekantung_kata, kata, label, data, net import random import numpy import tflearn import sys args = sys.argv[1] model = tflearn.DNN(net) model.load('./src/model/model.tfl') client = commands.Bot(command_prefix='!union ') global is_on is_on = False @client...
none
1
2.248025
2
tests/test_rrset.py
balabit-deps/balabit-os-6-dnspython
1
6626769
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
en
0.622654
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
2.243012
2
test/test_numpy_binding.py
Saad-K/snowflake-connector-python
1
6626770
<gh_stars>1-10 import datetime import time import numpy as np def test_numpy_datatype_binding(conn_cnx, db_parameters): """ Tests numpy data type binding """ epoch_time = time.time() current_datetime = datetime.datetime.fromtimestamp(epoch_time) current_datetime64 = np.datetime64(current_date...
import datetime import time import numpy as np def test_numpy_datatype_binding(conn_cnx, db_parameters): """ Tests numpy data type binding """ epoch_time = time.time() current_datetime = datetime.datetime.fromtimestamp(epoch_time) current_datetime64 = np.datetime64(current_datetime) all_d...
en
0.26479
Tests numpy data type binding CREATE OR REPLACE TABLE {name} ( c1 integer, -- int8 c2 integer, -- int16 c3 integer, -- int32 c4 integer, -- int64 c5 float, -- float16 c6 float, -- float32 c7 float, -- float64 c8 timestamp_ntz, -- da...
2.496908
2
os.path.py
sicilyChen/python
0
6626771
<reponame>sicilyChen/python<gh_stars>0 import os.path print(os.path.abspath('hello.py'))#用于获取文件或目录的绝对路径 print(os.path.exists('hello.py'),os.path.exists('1.py'))#用于判断文件或目录是否存在,如果存在返回True,否则返回False print(os.path.join('D:\\python程序练习','hello.py'))#将目录与目录或者文件名拼接起来 print(os.path.split('D:\\python程序练习\\hello.py'))#文件名和扩展名 pr...
import os.path print(os.path.abspath('hello.py'))#用于获取文件或目录的绝对路径 print(os.path.exists('hello.py'),os.path.exists('1.py'))#用于判断文件或目录是否存在,如果存在返回True,否则返回False print(os.path.join('D:\\python程序练习','hello.py'))#将目录与目录或者文件名拼接起来 print(os.path.split('D:\\python程序练习\\hello.py'))#文件名和扩展名 print(os.path.basename('D:\\python程序练习\\h...
zh
0.994901
#用于获取文件或目录的绝对路径 #用于判断文件或目录是否存在,如果存在返回True,否则返回False #将目录与目录或者文件名拼接起来 #文件名和扩展名 #分离文件名和扩展名 #从一个路径中提取文件路径,不包括文件名 #用于判断是否为路径
3.413546
3
matminer/featurizers/site.py
AmalieT/matminer
0
6626772
from __future__ import division import copy from functools import lru_cache from matminer.featurizers.utils.grdf import Gaussian, Histogram from matminer.utils.caching import get_nearest_neighbors from matminer.utils.data import MagpieData """ Features that describe the local environment of a single atom. Note that ...
from __future__ import division import copy from functools import lru_cache from matminer.featurizers.utils.grdf import Gaussian, Histogram from matminer.utils.caching import get_nearest_neighbors from matminer.utils.data import MagpieData """ Features that describe the local environment of a single atom. Note that ...
en
0.769248
Features that describe the local environment of a single atom. Note that structural features can be constructed from a combination of site features from every site in the structure. The `featurize` function takes two arguments: struct (Structure): Object representing the structure containing the site of in...
2.250291
2
transform_binary_payload/src-payload-decoders/python/sentrius_rs1xx.py
iot-systems-gmbh/aws-iot-core-lorawan
0
6626773
# Copyright IoT Systems GmbH (www.iot-systems.at). All Rights Reserved. # Affiliate of KaWa commerce GmbH, AWS Consulting Partner (www.kawa-commerce.com) # SPDX-License-Identifier: MIT-0 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation file...
# Copyright IoT Systems GmbH (www.iot-systems.at). All Rights Reserved. # Affiliate of KaWa commerce GmbH, AWS Consulting Partner (www.kawa-commerce.com) # SPDX-License-Identifier: MIT-0 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation file...
en
0.568936
# Copyright IoT Systems GmbH (www.iot-systems.at). All Rights Reserved. # Affiliate of KaWa commerce GmbH, AWS Consulting Partner (www.kawa-commerce.com) # SPDX-License-Identifier: MIT-0 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation file...
1.473445
1
attendees/users/models/user.py
xjlin0/attendees32
0
6626774
<filename>attendees/users/models/user.py from django.conf import settings from django.contrib.auth.models import AbstractUser from django.contrib.postgres.indexes import GinIndex from django.db import models from django.db.models import CharField from django.urls import reverse from django.utils import timezone from dj...
<filename>attendees/users/models/user.py from django.conf import settings from django.contrib.auth.models import AbstractUser from django.contrib.postgres.indexes import GinIndex from django.db import models from django.db.models import CharField from django.urls import reverse from django.utils import timezone from dj...
en
0.768561
# First Name and Last Name do not cover name patterns around the globe. # type: ignore # type: ignore Get url for user's detail view. Returns: str: URL for user detail. # .in_bulk() might take more memory check if user's in correct groups to see other's data without relationships, currently are dat...
2.242209
2
sqli_platform/challenges/sesqli6/views.py
Xistens/SQLi-Sandbox
1
6626775
#!/usr/bin/python3 from flask import ( render_template, Blueprint, current_app, redirect, url_for, session, request, flash ) from sqli_platform import (app, clog, db) from sqli_platform.utils.challenge import (get_flag, get_config, format_query, hash_pwd, login_required, clear_session) ...
#!/usr/bin/python3 from flask import ( render_template, Blueprint, current_app, redirect, url_for, session, request, flash ) from sqli_platform import (app, clog, db) from sqli_platform.utils.challenge import (get_flag, get_config, format_query, hash_pwd, login_required, clear_session) ...
en
0.338871
#!/usr/bin/python3 # Hash password
2.313514
2
tools/livestreamer/librtmp/utils.py
Sparker0i/hotstarsportslivestreamer
2
6626776
from librtmp_ffi.binding import librtmp from librtmp_ffi.ffi import ffi from binascii import hexlify from collections import namedtuple from .aval import AVal from .compat import bytes, str from .exceptions import RTMPError __all__ = ["add_signal_handler", "hash_swf"] def add_signal_handler(): """Adds a signal ...
from librtmp_ffi.binding import librtmp from librtmp_ffi.ffi import ffi from binascii import hexlify from collections import namedtuple from .aval import AVal from .compat import bytes, str from .exceptions import RTMPError __all__ = ["add_signal_handler", "hash_swf"] def add_signal_handler(): """Adds a signal ...
en
0.68131
Adds a signal handler to handle KeyboardInterrupt.
2.217026
2
stock/old/gdr/spreadsheet.py
y-kitamu/stock
0
6626777
<filename>stock/old/gdr/spreadsheet.py """spreadsheet.py Author : <NAME> Create Date : 2021-12-05 11:17:42 Copyright (c) 2019- <NAME> <<EMAIL>> """ from typing import Any, List from stock.gdr import get_service UPLOAD_LOG_SS_GID = "1SRi3cDXctknMSMB1TrEctq4vVeqC4C3ZLEkmY-A1CII" SCOPES = ['https://www.googleapis.com/a...
<filename>stock/old/gdr/spreadsheet.py """spreadsheet.py Author : <NAME> Create Date : 2021-12-05 11:17:42 Copyright (c) 2019- <NAME> <<EMAIL>> """ from typing import Any, List from stock.gdr import get_service UPLOAD_LOG_SS_GID = "1SRi3cDXctknMSMB1TrEctq4vVeqC4C3ZLEkmY-A1CII" SCOPES = ['https://www.googleapis.com/a...
ja
0.428591
spreadsheet.py Author : <NAME> Create Date : 2021-12-05 11:17:42 Copyright (c) 2019- <NAME> <<EMAIL>> `sid`で指定したspreadsheetの末尾に`row`を追記する
2.337913
2
227-basic-calculator-ii/basic-calculator-ii.py
notech/leetcode
0
6626778
# -*- coding:utf-8 -*- # Implement a basic calculator to evaluate a simple expression string. # # The expression string contains only non-negative integers, +, -, *, / operators and empty spaces . The integer division should truncate toward zero. # # You may assume that the given expression is always valid. # # Some...
# -*- coding:utf-8 -*- # Implement a basic calculator to evaluate a simple expression string. # # The expression string contains only non-negative integers, +, -, *, / operators and empty spaces . The integer division should truncate toward zero. # # You may assume that the given expression is always valid. # # Some...
en
0.76103
# -*- coding:utf-8 -*- # Implement a basic calculator to evaluate a simple expression string. # # The expression string contains only non-negative integers, +, -, *, / operators and empty spaces . The integer division should truncate toward zero. # # You may assume that the given expression is always valid. # # Some e...
4.038778
4
tests/resources/selenium/generated_from_requests.py
abstracta/taurus
1
6626779
import unittest import re from time import sleep from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains from s...
import unittest import re from time import sleep from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains from s...
none
1
2.355628
2
supplychain/migrations/0001_initial.py
basp0/Mtech-refresher-DRF-assignment
0
6626780
# Generated by Django 3.2.6 on 2021-08-06 13:41 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Customer', fields=[ ('id', models.BigAutoFi...
# Generated by Django 3.2.6 on 2021-08-06 13:41 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Customer', fields=[ ('id', models.BigAutoFi...
en
0.910747
# Generated by Django 3.2.6 on 2021-08-06 13:41
1.951627
2
extract_reduced.py
sliedes/clang-triage
4
6626781
<reponame>sliedes/clang-triage #!/usr/bin/env python3 from triage_db import TriageDb from sha_file_tree import make_sha_tree def extract_reduced(path): 'Extract all reduced cases to a s/h/sha path.' db = TriageDb() make_sha_tree(path, db.iterateDistinctReduced(), suffix='.cpp', rm_old=...
#!/usr/bin/env python3 from triage_db import TriageDb from sha_file_tree import make_sha_tree def extract_reduced(path): 'Extract all reduced cases to a s/h/sha path.' db = TriageDb() make_sha_tree(path, db.iterateDistinctReduced(), suffix='.cpp', rm_old=False) def main(): extrac...
fr
0.221828
#!/usr/bin/env python3
2.402353
2
tests/testapp/models.py
uniacco-tech/django-admin-searchable-dropdown
5
6626782
<reponame>uniacco-tech/django-admin-searchable-dropdown """Defines the models for the test app.""" from django.db import models class Food(models.Model): name = models.CharField(max_length=100) def __repr__(self): return 'Food#' + str(self.id) def __str__(self): return self.name de...
"""Defines the models for the test app.""" from django.db import models class Food(models.Model): name = models.CharField(max_length=100) def __repr__(self): return 'Food#' + str(self.id) def __str__(self): return self.name def alternate_name(self): return str(self.name).up...
en
0.418418
Defines the models for the test app. #' + str(self.id) #' + str(self.id) # may not be reciprocated #' + str(self.id) # Use this and curated_collections.db_table to set up reverse M2M # See https://code.djangoproject.com/ticket/897 # just for test purposes #' + str(self.isbn)
2.634712
3
makemigrations.py
msukmanowsky/django-naics-scian
1
6626783
#!/usr/bin/env python3 import os import sys from django.core.management import execute_from_command_line if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") args = sys.argv + ["makemigrations", "naics_scian", "naics_tables"] execute_from_command_line(args)
#!/usr/bin/env python3 import os import sys from django.core.management import execute_from_command_line if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") args = sys.argv + ["makemigrations", "naics_scian", "naics_tables"] execute_from_command_line(args)
fr
0.221828
#!/usr/bin/env python3
1.616405
2
test/test_itemcollection.py
jmorton-usgs/sat-stac
61
6626784
<reponame>jmorton-usgs/sat-stac import os import unittest from satstac import ItemCollection, Item from shutil import rmtree testpath = os.path.dirname(__file__) class Test(unittest.TestCase): path = os.path.join(testpath, 'test-item') @classmethod def tearDownClass(cls): """ Remove test files...
import os import unittest from satstac import ItemCollection, Item from shutil import rmtree testpath = os.path.dirname(__file__) class Test(unittest.TestCase): path = os.path.join(testpath, 'test-item') @classmethod def tearDownClass(cls): """ Remove test files """ if os.path.exists(c...
en
0.596018
Remove test files Initialize Scenes with list of Scene objects Save items list Get a collection Attempt to get non-existent collection Get set of properties Print summary of items Get dates of all items Get calendar Download all thumbnails #shutil.rmtree(os.path.join(testpath, 'landsat-8-l1')) Download multiple assets ...
2.727763
3
pyot/utils/decorators.py
bangingheads/Pyot
1
6626785
from functools import wraps class cached_property: """ Decorator that converts a method with a single self argument into a property cached on the instance. A cached property can be made out of an existing method: (e.g. ``url = cached_property(get_absolute_url)``). """ name = None @sta...
from functools import wraps class cached_property: """ Decorator that converts a method with a single self argument into a property cached on the instance. A cached property can be made out of an existing method: (e.g. ``url = cached_property(get_absolute_url)``). """ name = None @sta...
en
0.63286
Decorator that converts a method with a single self argument into a property cached on the instance. A cached property can be made out of an existing method: (e.g. ``url = cached_property(get_absolute_url)``). # pylint: disable=method-hidden Call the function and put the return value in instance.__dict__ so...
3.607502
4
aws-classic-py-aws-load-balancer-controller-helm-release/iam.py
tusharshahrs/pulumi-home
4
6626786
<gh_stars>1-10 import json import pulumi_aws as aws managed_policy_arns = [ "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy", "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy", "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly", ] # Creates a role and attaches the EKS worker node IAM managed pol...
import json import pulumi_aws as aws managed_policy_arns = [ "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy", "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy", "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly", ] # Creates a role and attaches the EKS worker node IAM managed policies def creat...
en
0.857003
# Creates a role and attaches the EKS worker node IAM managed policies # Create RolePolicyAttachment without returning it.
2.227902
2
data/transcoder_evaluation_gfg/python/COUNT_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_1.py
mxl1n/CodeGen
241
6626787
<reponame>mxl1n/CodeGen # Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( n ) : der = [ 0 for i in range ( n + 1 ) ] der [ 0 ] = 1 der [ 1 ] = 0 der ...
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( n ) : der = [ 0 for i in range ( n + 1 ) ] der [ 0 ] = 1 der [ 1 ] = 0 der [ 2 ] = 1 for i in r...
en
0.894477
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # #TOFILL
3.253258
3
1-list.py
omostovyijr/TasksForLecture8
0
6626788
<reponame>omostovyijr/TasksForLecture8<gh_stars>0 ages = [10, 12, 15, 15, 17, 18, 18, 19, 20] first = ages[0] last = ages[-1] ages.insert(0, 11) # Add at the top of array ages.append(22) # Add at the end of array ages.pop(0) # Remove at the top of array ages.pop(-1) # Remove at the end of array print(ages)
ages = [10, 12, 15, 15, 17, 18, 18, 19, 20] first = ages[0] last = ages[-1] ages.insert(0, 11) # Add at the top of array ages.append(22) # Add at the end of array ages.pop(0) # Remove at the top of array ages.pop(-1) # Remove at the end of array print(ages)
en
0.750128
# Add at the top of array # Add at the end of array # Remove at the top of array # Remove at the end of array
3.86519
4
preprocess/body_model.py
xuchen-ethz/snarf
150
6626789
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG), # acting on behalf of its Max Planck Institute for Intelligent Systems and the # Max Planck Institute for Biological Cybernetics. All rights reserved. # # Max-Planck-Gesellschaft zur Förderung der Wissens...
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG), # acting on behalf of its Max Planck Institute for Intelligent Systems and the # Max Planck Institute for Biological Cybernetics. All rights reserved. # # Max-Planck-Gesellschaft zur Förderung der Wissens...
en
0.717916
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG), # acting on behalf of its Max Planck Institute for Intelligent Systems and the # Max Planck Institute for Biological Cybernetics. All rights reserved. # # Max-Planck-Gesellschaft zur Förderung der Wissens...
1.844074
2
tests/test_hessian.py
Juancarlos1983/Pymop
60
6626790
<reponame>Juancarlos1983/Pymop import unittest import autograd.numpy as anp import numpy as np from pymop import Problem class HessianTest(unittest.TestCase): def test_hessian(self): auto_diff = MyProblem() correct = MyProblemWithHessian() np.random.seed(1) X = np.random.rando...
import unittest import autograd.numpy as anp import numpy as np from pymop import Problem class HessianTest(unittest.TestCase): def test_hessian(self): auto_diff = MyProblem() correct = MyProblemWithHessian() np.random.seed(1) X = np.random.random((100, correct.n_var)) ...
none
1
3.014468
3
vaccine_feed_ingest/utils/normalize.py
jeremyschlatter/vaccine-feed-ingest
0
6626791
""" Various tricks for matching source locations to product locations from VIAL """ import re from typing import Optional, Tuple import url_normalize from vaccine_feed_ingest_schema.location import VaccineProvider from .log import getLogger logger = getLogger(__file__) # Add to this list in alphabetical order VACC...
""" Various tricks for matching source locations to product locations from VIAL """ import re from typing import Optional, Tuple import url_normalize from vaccine_feed_ingest_schema.location import VaccineProvider from .log import getLogger logger = getLogger(__file__) # Add to this list in alphabetical order VACC...
en
0.412495
Various tricks for matching source locations to product locations from VIAL # Add to this list in alphabetical order #(\d+)", re.I), #(\d+)", re.I), #\d+ Rx)? #(\d+)", re.I), #\d+ #(\d+)", re.I), #\s*(\d+)", re.I), #(\d+)", re.I), #\d+ #(\d+)", re.I), #?(\d+)", re.I), #(\d+)", re.I), #(\d+)", re.I), #?\d+\s+#(\d+)", re...
2.491071
2
gs_manager/command/config.py
AngellusMortis/game_server_manager
6
6626792
from __future__ import annotations from copy import deepcopy import inspect import os from collections.abc import Iterable from typing import ( Any, Callable, Dict, List, Optional, Tuple, Union, get_type_hints, ) import click import yaml from gs_manager.command.types import Server fro...
from __future__ import annotations from copy import deepcopy import inspect import os from collections.abc import Iterable from typing import ( Any, Callable, Dict, List, Optional, Tuple, Union, get_type_hints, ) import click import yaml from gs_manager.command.types import Server fro...
en
0.558302
# reset all of the instance configs
2.001998
2
webtry.py
gustavo-zsilva/webtry
0
6626793
<filename>webtry.py import requests from time import sleep cabecalho = { 'User-agent' : 'Mozilla/5.0 (X11; Linux x86_64)', 'Referer' : 'https://google.com' } print('Bem-Vindo ao WebTry!') options = '''Que ação deseja realizar? [ 1 ] Acessar 1 URL [ 2 ] Acessar mais de uma URL [ 3 ] Pegar código-fonte de um...
<filename>webtry.py import requests from time import sleep cabecalho = { 'User-agent' : 'Mozilla/5.0 (X11; Linux x86_64)', 'Referer' : 'https://google.com' } print('Bem-Vindo ao WebTry!') options = '''Que ação deseja realizar? [ 1 ] Acessar 1 URL [ 2 ] Acessar mais de uma URL [ 3 ] Pegar código-fonte de um...
pt
0.998447
Que ação deseja realizar? [ 1 ] Acessar 1 URL [ 2 ] Acessar mais de uma URL [ 3 ] Pegar código-fonte de uma página [ 4 ] Sair do programa
3.18535
3
pexdoc/pinspect.py
pmacosta/pexdoc
0
6626794
# pinspect.py # Copyright (c) 2013-2019 <NAME> # See LICENSE for details # pylint: disable=C0103,C0111,C0411,E0012,E0611 # pylint: disable=F0401,R0205,R0912,R0914,R0916,R1710,R1717,W0212,W0631,W1504 # Standard library imports from __future__ import print_function import ast import collections import copy import json i...
# pinspect.py # Copyright (c) 2013-2019 <NAME> # See LICENSE for details # pylint: disable=C0103,C0111,C0411,E0012,E0611 # pylint: disable=F0401,R0205,R0912,R0914,R0916,R1710,R1717,W0212,W0631,W1504 # Standard library imports from __future__ import print_function import ast import collections import copy import json i...
en
0.621668
# pinspect.py # Copyright (c) 2013-2019 <NAME> # See LICENSE for details # pylint: disable=C0103,C0111,C0411,E0012,E0611 # pylint: disable=F0401,R0205,R0912,R0914,R0916,R1710,R1717,W0212,W0631,W1504 # Standard library imports # PyPI imports # pragma: no cover # pragma: no cover # Intra-package imports # pragma: no cove...
2.049369
2
corehq/motech/repeaters/tests/test_repeater.py
shyamkumarlchauhan/commcare-hq
0
6626795
import json import uuid from collections import namedtuple from datetime import datetime, timedelta from django.test import SimpleTestCase, TestCase, override_settings import attr from mock import Mock, patch from casexml.apps.case.mock import CaseBlock, CaseFactory from casexml.apps.case.xform import get_case_ids_f...
import json import uuid from collections import namedtuple from datetime import datetime, timedelta from django.test import SimpleTestCase, TestCase, override_settings import attr from mock import Mock, patch from casexml.apps.case.mock import CaseBlock, CaseFactory from casexml.apps.case.xform import get_case_ids_f...
en
0.786952
<?xml version='1.0' ?> <data xmlns:jrm="http://dev.commcarehq.org/jr/xforms" xmlns="{}"> <woman_name>Alpha</woman_name> <husband_name>Beta</husband_name> <meta> <deviceID>O2XLT0WZW97W1A91E2W1Y0NJG</deviceID> <timeStart>2011-10-01T15:25:18.404-04</timeStart> <timeEnd>2011-10-01T15:26:...
1.414882
1
server.py
brandiny/ncdaily-opensource
4
6626796
""" server.py - Serves the Flask web application for the website """ import json import admintools import credentials from flask import Flask, render_template, request, redirect, url_for, make_response, session import hashlib try: import MySQLdb except Exception as e: import os os.system("pip install ...
""" server.py - Serves the Flask web application for the website """ import json import admintools import credentials from flask import Flask, render_template, request, redirect, url_for, make_response, session import hashlib try: import MySQLdb except Exception as e: import os os.system("pip install ...
en
0.525818
server.py - Serves the Flask web application for the website ADMIN login page If SUBMITTING username and password # Get database SELECT * FROM admin # Get submitted details # Password handling IF first loading the page ADMIN PANEL page - Change holiday intervals - Add days of relief - Remove days of relief ...
2.768677
3
appengine/swarming/swarming_bot/proto_bot/bots_pb2_grpc.py
stefb965/luci-py
0
6626797
<gh_stars>0 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities import bots_pb2 as bots__pb2 import google.protobuf.empty_pb2 as google_dot_protobuf_dot_empty__pb2 class ...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities import bots_pb2 as bots__pb2 import google.protobuf.empty_pb2 as google_dot_protobuf_dot_empty__pb2 class BotsStub(obj...
en
0.605688
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! Constructor. Args: channel: A grpc.Channel.
1.805808
2
web/src/additional_settings/jwt_settings.py
bandirom/django-blog
1
6626798
from datetime import timedelta from os import environ JWT_AUTH_REFRESH_COOKIE = 'refresh' JWT_AUTH_COOKIE = 'jwt-auth' REST_USE_JWT = True REST_SESSION_LOGIN = False CORS_ALLOW_CREDENTIALS = True SIMPLE_JWT = { 'ACCESS_TOKEN_LIFETIME': timedelta(days=1), 'REFRESH_TOKEN_LIFETIME': timedelta(days=2), 'ROTAT...
from datetime import timedelta from os import environ JWT_AUTH_REFRESH_COOKIE = 'refresh' JWT_AUTH_COOKIE = 'jwt-auth' REST_USE_JWT = True REST_SESSION_LOGIN = False CORS_ALLOW_CREDENTIALS = True SIMPLE_JWT = { 'ACCESS_TOKEN_LIFETIME': timedelta(days=1), 'REFRESH_TOKEN_LIFETIME': timedelta(days=2), 'ROTAT...
none
1
1.977694
2
valueIteration.py
RajatBhageria/Reinforcement-Learning
0
6626799
<reponame>RajatBhageria/Reinforcement-Learning from maze import * import numpy as np from value_plot import value_plot numStates = 112 numActions = 4 discount = 0.9 def valueIteration(): env = Maze() initial_state = env.reset() #get the transition proability matrix transitions = np.zeros((numStates,n...
from maze import * import numpy as np from value_plot import value_plot numStates = 112 numActions = 4 discount = 0.9 def valueIteration(): env = Maze() initial_state = env.reset() #get the transition proability matrix transitions = np.zeros((numStates,numActions,numStates),dtype='float') #get t...
en
0.703134
#get the transition proability matrix #get the reward matrix #create the transition and reward matrices #use step function to get the next state #put the reward in the next state #add one to the state transition matrix #standardize the transitions matrix #initialize the value function states as zeros #initialize the po...
3.383985
3
tests/model_options/apps.py
ni-ning/django
61,676
6626800
<reponame>ni-ning/django<gh_stars>1000+ from django.apps import AppConfig class ModelDefaultPKConfig(AppConfig): name = 'model_options' class ModelPKConfig(AppConfig): name = 'model_options' default_auto_field = 'django.db.models.SmallAutoField' class ModelPKNonAutoConfig(AppConfig): name = 'model...
from django.apps import AppConfig class ModelDefaultPKConfig(AppConfig): name = 'model_options' class ModelPKConfig(AppConfig): name = 'model_options' default_auto_field = 'django.db.models.SmallAutoField' class ModelPKNonAutoConfig(AppConfig): name = 'model_options' default_auto_field = 'djan...
none
1
1.956114
2
tqdm/contrib/bells.py
insilications/tqdm-clr
22,617
6626801
""" Even more features than `tqdm.auto` (all the bells & whistles): - `tqdm.auto` - `tqdm.tqdm.pandas` - `tqdm.contrib.telegram` + uses `${TQDM_TELEGRAM_TOKEN}` and `${TQDM_TELEGRAM_CHAT_ID}` - `tqdm.contrib.discord` + uses `${TQDM_DISCORD_TOKEN}` and `${TQDM_DISCORD_CHANNEL_ID}` """ __all__ = ['tqdm', 'trange...
""" Even more features than `tqdm.auto` (all the bells & whistles): - `tqdm.auto` - `tqdm.tqdm.pandas` - `tqdm.contrib.telegram` + uses `${TQDM_TELEGRAM_TOKEN}` and `${TQDM_TELEGRAM_CHAT_ID}` - `tqdm.contrib.discord` + uses `${TQDM_DISCORD_TOKEN}` and `${TQDM_DISCORD_CHANNEL_ID}` """ __all__ = ['tqdm', 'trange...
en
0.317032
Even more features than `tqdm.auto` (all the bells & whistles): - `tqdm.auto` - `tqdm.tqdm.pandas` - `tqdm.contrib.telegram` + uses `${TQDM_TELEGRAM_TOKEN}` and `${TQDM_TELEGRAM_CHAT_ID}` - `tqdm.contrib.discord` + uses `${TQDM_DISCORD_TOKEN}` and `${TQDM_DISCORD_CHANNEL_ID}`
1.841117
2
test/test_mongo_cache.py
ktaragorn/mongo_cache
0
6626802
import unittest from mongo_cache.mongo_cache import MongoCache import time class TestMongoCache(unittest.TestCase): def setUp(self): self.cache = MongoCache() self.cache.clear() self.cache.set("test", 1) self.cache.set("test1", 2) def test_set_get_basic(self): self.assertEqual(self.cache.get("test"), 1) ...
import unittest from mongo_cache.mongo_cache import MongoCache import time class TestMongoCache(unittest.TestCase): def setUp(self): self.cache = MongoCache() self.cache.clear() self.cache.set("test", 1) self.cache.set("test1", 2) def test_set_get_basic(self): self.assertEqual(self.cache.get("test"), 1) ...
en
0.93973
# value still present # value deleted due to expiry # value still present # value deleted due to expiry
2.84459
3
models.py
bogdanovdya/Clients_Lifetime
2
6626803
<reponame>bogdanovdya/Clients_Lifetime from app import db class PortalAuth(db.Model): portal = db.Column(db.CHAR(255), primary_key=True) access_token = db.Column(db.CHAR(255)) refresh_token = db.Column(db.CHAR(255)) event_counter = db.Column(db.INTEGER, default=0) def __init__(self, *args, **kwar...
from app import db class PortalAuth(db.Model): portal = db.Column(db.CHAR(255), primary_key=True) access_token = db.Column(db.CHAR(255)) refresh_token = db.Column(db.CHAR(255)) event_counter = db.Column(db.INTEGER, default=0) def __init__(self, *args, **kwargs): super(PortalAuth, self).__...
none
1
2.024983
2
exercises/storage.py
rattletat/homework-server
1
6626804
<reponame>rattletat/homework-server from django.core.files.storage import FileSystemStorage from django.conf import settings import os class OverwriteStorage(FileSystemStorage): def get_available_name(self, name, max_length=None): # If the filename already exists, remove it as if it was a true file system...
from django.core.files.storage import FileSystemStorage from django.conf import settings import os class OverwriteStorage(FileSystemStorage): def get_available_name(self, name, max_length=None): # If the filename already exists, remove it as if it was a true file system if self.exists(name): ...
en
0.963175
# If the filename already exists, remove it as if it was a true file system
2.274709
2
source/sphinx_extensions/checkpoint.py
antgonza/docs
1
6626805
<reponame>antgonza/docs<gh_stars>1-10 # ---------------------------------------------------------------------------- # Copyright (c) 2016-2019, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ----------...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2019, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
en
0.579473
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2019, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
1.999337
2
MFLH/mflh/train.py
dickie0/mflh-master
0
6626806
import os import argparse import warnings import utils.data_load.image as dataset import utils.model.mflh as model warnings.filterwarnings("ignore", category=DeprecationWarning) warnings.filterwarnings("ignore", category=FutureWarning) os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' param = argparse.ArgumentParser(descripti...
import os import argparse import warnings import utils.data_load.image as dataset import utils.model.mflh as model warnings.filterwarnings("ignore", category=DeprecationWarning) warnings.filterwarnings("ignore", category=FutureWarning) os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' param = argparse.ArgumentParser(descripti...
none
1
1.896192
2
tests/test_selenium_product_check.py
hoelsner/product-database
38
6626807
""" Test suite for the selenium test cases """ import os import pytest import time from django.urls import reverse from tests import BaseSeleniumTest from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as EC from selenium...
""" Test suite for the selenium test cases """ import os import pytest import time from django.urls import reverse from tests import BaseSeleniumTest from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as EC from selenium...
en
0.743427
Test suite for the selenium test cases # open the new Product Check page # the page contains a text field, where the product IDs must be entered # enable optional product migration source selection # open the bulk eol check page # the page contains a text field, where the product IDs must be entered # end session # ope...
2.560027
3
cloudformationLimits.py
leadingzero/LimitMonkey
0
6626808
<filename>cloudformationLimits.py #!/usr/bin/python import boto3 import json from datetime import datetime def json_serial(obj): if isinstance(obj, datetime): serial = obj.isoformat() return serial raise TypeError ("Type not serializable") def get_limit(region): cfn_client = boto3.client('cloudformation', reg...
<filename>cloudformationLimits.py #!/usr/bin/python import boto3 import json from datetime import datetime def json_serial(obj): if isinstance(obj, datetime): serial = obj.isoformat() return serial raise TypeError ("Type not serializable") def get_limit(region): cfn_client = boto3.client('cloudformation', reg...
en
0.23268
#!/usr/bin/python # print "Region: " + region # get_limit(region) # get_actual(region)
2.40586
2
sch_eq/function.py
hudalao/sch_eq
0
6626809
import sys import os #make sure the program can be executable from test file dir_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '.')) sys.path.append(dir_root) import numpy as np import matplotlib.pyplot as plt import math as mt import numpy.polynomial.legendre as legen import cmath #domain is the ra...
import sys import os #make sure the program can be executable from test file dir_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '.')) sys.path.append(dir_root) import numpy as np import matplotlib.pyplot as plt import math as mt import numpy.polynomial.legendre as legen import cmath #domain is the ra...
en
0.877091
#make sure the program can be executable from test file #domain is the range of x and V(x) #c the constant #N the size of the basis set #V the potential energy V(x) ps: the size of V(x) should be same as the size of the basis set #V_const the constant potential energy #the choice of basis set function: 1 ---> the fouri...
2.557897
3
tests/test_consul.py
bspiritxp/jcutils
0
6626810
<filename>tests/test_consul.py from jcutil.consul import ConfigFormat, KvProperty class TestA: name = KvProperty('name') bar = KvProperty('foo', format=ConfigFormat.Yaml, cached=True) def desc(self): print('my name is:', self.name) def test_kvp(): ta = TestA() ta.desc() assert ta.name == 'FooBa...
<filename>tests/test_consul.py from jcutil.consul import ConfigFormat, KvProperty class TestA: name = KvProperty('name') bar = KvProperty('foo', format=ConfigFormat.Yaml, cached=True) def desc(self): print('my name is:', self.name) def test_kvp(): ta = TestA() ta.desc() assert ta.name == 'FooBa...
none
1
2.367403
2
exceptions.py
Ythosa/hokiyomi
9
6626811
class InvalidAttachments(Exception): """Invalid attachments in the message"""
class InvalidAttachments(Exception): """Invalid attachments in the message"""
en
0.54251
Invalid attachments in the message
1.644393
2
secistsploit/core/telnet/telnet_client.py
reneaicisneros/SecistSploit
15
6626812
import telnetlib #Copyright 2018, The RouterSploit Framework (RSF) by Threat9 All rights reserved. from secistsploit.core.exploit.exploit import Exploit from secistsploit.core.exploit.exploit import Protocol from secistsploit.core.exploit.option import OptBool from secistsploit.core.exploit.printer import print_success...
import telnetlib #Copyright 2018, The RouterSploit Framework (RSF) by Threat9 All rights reserved. from secistsploit.core.exploit.exploit import Exploit from secistsploit.core.exploit.exploit import Protocol from secistsploit.core.exploit.option import OptBool from secistsploit.core.exploit.printer import print_success...
en
0.749843
#Copyright 2018, The RouterSploit Framework (RSF) by Threat9 All rights reserved. Telnet Client provides methods to handle communication with Telnet server Telnet client constructor :param str telnet_target: target Telnet server ip address :param int telnet_port: target Telnet server port :para...
2.648813
3
cloud_ui/components/model_view/model.py
flexiblecloud/cloud_ui
2
6626813
<filename>cloud_ui/components/model_view/model.py import logging from abc import abstractmethod from typing import List, Dict from remi import gui as G class Model(object): PK = 'id' ITEMS_PER_PAGE = 10 TABLE_NAME = "undefined" def __init__(self): self._ids = set() self._dirty = set()...
<filename>cloud_ui/components/model_view/model.py import logging from abc import abstractmethod from typing import List, Dict from remi import gui as G class Model(object): PK = 'id' ITEMS_PER_PAGE = 10 TABLE_NAME = "undefined" def __init__(self): self._ids = set() self._dirty = set()...
en
0.321413
:return: [dict(name=field1_name, type=field1_type), ...] returns data amount size :return: int returns all elements ids :return: returns element by id :param id: :return:
2.49612
2
tests/forms_tests/field_tests/test_jsonfield.py
jpmallarino/django
16
6626814
<reponame>jpmallarino/django import json import uuid from django.core.serializers.json import DjangoJSONEncoder from django.forms import ( CharField, Form, JSONField, Textarea, TextInput, ValidationError, ) from django.test import SimpleTestCase class JSONFieldTest(SimpleTestCase): def te...
import json import uuid from django.core.serializers.json import DjangoJSONEncoder from django.forms import ( CharField, Form, JSONField, Textarea, TextInput, ValidationError, ) from django.test import SimpleTestCase class JSONFieldTest(SimpleTestCase): def test_valid(self): field...
en
0.746433
The widget can be overridden with an attribute. Displaying a bound form (typically due to invalid input). The form should not overquote JSONField inputs. # JSONField input is valid, name is too long. # Invalid JSONField.
2.504735
3
cmd/add_audio.py
SubhashPavan/Train-Custom-Speech-Model
54
6626815
<reponame>SubhashPavan/Train-Custom-Speech-Model<filename>cmd/add_audio.py # -*- coding: utf-8 -*- import requests import json import codecs import sys, time from requests.packages.urllib3.exceptions import InsecureRequestWarning import env requests.packages.urllib3.disable_warnings(InsecureRequestWarning) ##########...
# -*- coding: utf-8 -*- import requests import json import codecs import sys, time from requests.packages.urllib3.exceptions import InsecureRequestWarning import env requests.packages.urllib3.disable_warnings(InsecureRequestWarning) ########################################################################## # Add an a...
de
0.602385
# -*- coding: utf-8 -*- ########################################################################## # Add an archive of audio files (wav files) # You can add multiple audio sources to an acousic model ##########################################################################
2.36962
2
blog/migrations/0004_blog_course.py
vollov/django-blog
0
6626816
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-10 15:16 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('blog', '0003_course'), ] operations = [ migr...
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-10 15:16 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('blog', '0003_course'), ] operations = [ migr...
en
0.778212
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-10 15:16
1.57575
2
lib/pymedphys/_experimental/pinnacle/rtstruct.py
guanfada/pymedphys
1
6626817
<filename>lib/pymedphys/_experimental/pinnacle/rtstruct.py # Copyright (C) 2019 South Western Sydney Local Health District, # University of New South Wales # 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...
<filename>lib/pymedphys/_experimental/pinnacle/rtstruct.py # Copyright (C) 2019 South Western Sydney Local Health District, # University of New South Wales # 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...
en
0.796294
# Copyright (C) 2019 South Western Sydney Local Health District, # University of New South Wales # 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...
1.634717
2
datasets/offline_controller_with_small_rotation.py
cspatil8/savn
0
6626818
""" Exhaustive BFS and Offline Controller. """ import importlib from collections import deque import json import copy import time import random import os import platform try: from queue import Queue except ImportError: from Queue import Queue from ai2thor.controller import Controller, distance from .base_con...
""" Exhaustive BFS and Offline Controller. """ import importlib from collections import deque import json import copy import time import random import os import platform try: from queue import Queue except ImportError: from Queue import Queue from ai2thor.controller import Controller, distance from .base_con...
en
0.83211
Exhaustive BFS and Offline Controller. Representation of a simple state of a Thor Agent which includes the position, horizon and rotation. Extracts a state from an event. If we check for exact equality then we get issues. For now we consider this 'close enough'. # self.y == other.y and Get the strin...
2.912344
3
tests/test.py
xumajie/face_recognition
0
6626819
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' @Time : 2019/6/5 13:11 @Author : xumj ''' import face_recognition import os import sys import numpy as np from click.testing import CliRunner from face_recognition import api from face_recognition import face_recognition_cli from face_recognition import face_detect...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' @Time : 2019/6/5 13:11 @Author : xumj ''' import face_recognition import os import sys import numpy as np from click.testing import CliRunner from face_recognition import api from face_recognition import face_recognition_cli from face_recognition import face_detect...
en
0.626251
#!/usr/bin/env python # -*- coding: utf-8 -*- @Time : 2019/6/5 13:11 @Author : xumj # image = face_recognition.load_image_file("test_images/obama.jpg") # face_locations = face_recognition.face_locations(image) # face_landmarks_list = face_recognition.face_landmarks(image) # known_image = face_recognition.load_image...
2.526424
3
android/image/urls.py
gwhong917/A_C_C
0
6626820
<reponame>gwhong917/A_C_C from django.urls import path from . import views app_name = 'image' urlpatterns = [ path('image/', views.PostCreateAPIView.as_view(), name='postcreate'), ]
from django.urls import path from . import views app_name = 'image' urlpatterns = [ path('image/', views.PostCreateAPIView.as_view(), name='postcreate'), ]
none
1
1.663608
2
musor/forms.py
MerlinEmris/eBazar
0
6626821
class ProfileForm(forms.ModelForm): biography = forms.CharField( max_length=2000, widget=forms.Textarea(), help_text='Write here your message!' ) location = forms.CharField( max_length=30, widget=forms.TextInput( attrs={ 'style': 'border-c...
class ProfileForm(forms.ModelForm): biography = forms.CharField( max_length=2000, widget=forms.Textarea(), help_text='Write here your message!' ) location = forms.CharField( max_length=30, widget=forms.TextInput( attrs={ 'style': 'border-c...
en
0.533145
# user = forms.ChoiceField( # choices=[(o.id, str(o)) for o in User.objects.all()], # # widget=forms.HiddenInput(), # ) # def clean(self): # super(ProfileForm, self).full_clean() # cleaned_data = super(ProfileForm, self).clean() # biography = cleaned_data.get('biography') # location = cleaned_data.get('location...
2.547554
3
odo/backends/tests/test_bcolz.py
farukht/odo
844
6626822
from __future__ import absolute_import, division, print_function import pytest pytest.importorskip('bcolz') from odo.backends.bcolz import (append, convert, ctable, carray, resource, discover, drop) from odo.chunks import chunks from odo import append, convert, discover, into import n...
from __future__ import absolute_import, division, print_function import pytest pytest.importorskip('bcolz') from odo.backends.bcolz import (append, convert, ctable, carray, resource, discover, drop) from odo.chunks import chunks from odo import append, convert, discover, into import n...
none
1
2.05971
2
docs/core/examples/stdiodemo.py
neberej/twisted
1
6626823
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Example using stdio, Deferreds, LineReceiver and twisted.web.client. Note that the WebCheckerCommandProtocol protocol could easily be used in e.g. a telnet server instead; see the comments for details. Based on an exam...
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Example using stdio, Deferreds, LineReceiver and twisted.web.client. Note that the WebCheckerCommandProtocol protocol could easily be used in e.g. a telnet server instead; see the comments for details. Based on an exam...
en
0.781507
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. Example using stdio, Deferreds, LineReceiver and twisted.web.client. Note that the WebCheckerCommandProtocol protocol could easily be used in e.g. a telnet server instead; see the comments for details. Based on an example by...
2.70718
3
crslab/model/recommendation/popularity/popularity.py
Xiaolong-Qi/CRSLab
1
6626824
<gh_stars>1-10 # @Time : 2020/12/16 # @Author : <NAME> # @Email : <EMAIL> # UPDATE # @Time : 2020/12/29, 2021/1/4 # @Author : <NAME>, <NAME> # @email : <EMAIL>, <EMAIL> from collections import defaultdict import torch from loguru import logger from crslab.model.base_model import BaseModel class PopularityMo...
# @Time : 2020/12/16 # @Author : <NAME> # @Email : <EMAIL> # UPDATE # @Time : 2020/12/29, 2021/1/4 # @Author : <NAME>, <NAME> # @email : <EMAIL>, <EMAIL> from collections import defaultdict import torch from loguru import logger from crslab.model.base_model import BaseModel class PopularityModel(BaseModel):...
en
0.40266
# @Time : 2020/12/16 # @Author : <NAME> # @Email : <EMAIL> # UPDATE # @Time : 2020/12/29, 2021/1/4 # @Author : <NAME>, <NAME> # @email : <EMAIL>, <EMAIL> Attributes: item_size: A integer indicating the number of items Args: opt (dict): A dictionary record the hyper parameters devic...
2.329537
2
Mybase/solver.py
czyczyyzc/MyForElise
0
6626825
import os import cv2 import pickle import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from collections import defaultdict from .load_weights import * from .optim_utils import * from .yale_utils.make_image import * def get_data(fid): try: a = pickle.load(fid) return...
import os import cv2 import pickle import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from collections import defaultdict from .load_weights import * from .optim_utils import * from .yale_utils.make_image import * def get_data(fid): try: a = pickle.load(fid) return...
en
0.264975
###############################For CLASSIFY################################ def _train_step(self, mtra=None, mtst=None, glb_stp=None): #将简单的运算放在CPU上,只有神经网络的训练过程放在GPU上 with tf.device('/cpu:0'): self.mdl.mod_tra = True GI_tra = GeneratorForImageNet(True, self.dat_...
2.377949
2
tests/test_layers_convolution.py
TomLouisKeller/tensorlayer
1
6626826
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf import tensorlayer as tl from tests.utils import CustomTestCase class Layer_Convolution_1D_Test(CustomTestCase): @classmethod def setUpClass(cls): x = tf.place...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf import tensorlayer as tl from tests.utils import CustomTestCase class Layer_Convolution_1D_Test(CustomTestCase): @classmethod def setUpClass(cls): x = tf.place...
de
0.299006
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################")
2.429809
2
mysite/core/views.py
root121976/ticket
0
6626827
<reponame>root121976/ticket from django.shortcuts import render, redirect, render_to_response from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django...
from django.shortcuts import render, redirect, render_to_response from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import Templa...
en
0.217984
# class Home(TemplateView): # count = User.objects.count() # template_name = 'home.html' # return render(request, 'home.html', { # 'count': count # })
2.076879
2
eigen_update_model.py
vhr121/emotion_AI
0
6626828
<filename>eigen_update_model.py import cv2 import glob import time import random import numpy as np import os #create eigen face recogniser object eigen = cv2.createEigenFaceRecognizer() data = {} #check if a file already exist if not create the file def check_file_exists(folder, file_check): if os.path.exists("...
<filename>eigen_update_model.py import cv2 import glob import time import random import numpy as np import os #create eigen face recogniser object eigen = cv2.createEigenFaceRecognizer() data = {} #check if a file already exist if not create the file def check_file_exists(folder, file_check): if os.path.exists("...
en
0.798397
#create eigen face recogniser object #check if a file already exist if not create the file #create the training and test data #combine data and lable and shuffel used for testing purpose #train the model usin #segregate the data and lables as train and test data 80% train and 20% test
2.991663
3
aries_cloudagent/core/goal_code_registry.py
kuraakhilesh8230/aries-cloudagent-python
4
6626829
"""Handle registration and publication of supported goal codes.""" from typing import Sequence from ..utils.classloader import ClassLoader class GoalCodeRegistry: """Goal code registry.""" def __init__(self): """Initialize a `GoalCodeRegistry` instance.""" self.goal_codes = [] def regi...
"""Handle registration and publication of supported goal codes.""" from typing import Sequence from ..utils.classloader import ClassLoader class GoalCodeRegistry: """Goal code registry.""" def __init__(self): """Initialize a `GoalCodeRegistry` instance.""" self.goal_codes = [] def regi...
en
0.771005
Handle registration and publication of supported goal codes. Goal code registry. Initialize a `GoalCodeRegistry` instance. Add new controllers. Args: controller_sets: Mappings of controller to coroutines Return a list of goal codes matching a query string.
2.613116
3
networkx-d3-v2/lib/appengine_sessions/urls.py
suraj-testing2/Clock_Websites
0
6626830
<filename>networkx-d3-v2/lib/appengine_sessions/urls.py from django.conf.urls.defaults import * from appengine_sessions import views urlpatterns = patterns( '', url(r'^clean-up/$', views.SessionCleanUpCron.as_view(), {}, name='session-clean-up'), )
<filename>networkx-d3-v2/lib/appengine_sessions/urls.py from django.conf.urls.defaults import * from appengine_sessions import views urlpatterns = patterns( '', url(r'^clean-up/$', views.SessionCleanUpCron.as_view(), {}, name='session-clean-up'), )
none
1
1.78249
2
tests/distributions/test_empirical.py
gavincangan/pyro
10
6626831
<filename>tests/distributions/test_empirical.py import pytest import torch from pyro.distributions.empirical import Empirical from tests.common import assert_equal, assert_close @pytest.mark.parametrize("size", [[], [1], [2, 3]]) @pytest.mark.parametrize("dtype", [torch.float32, torch.float64]) def test_unweighted_m...
<filename>tests/distributions/test_empirical.py import pytest import torch from pyro.distributions.empirical import Empirical from tests.common import assert_equal, assert_close @pytest.mark.parametrize("size", [[], [1], [2, 3]]) @pytest.mark.parametrize("dtype", [torch.float32, torch.float64]) def test_unweighted_m...
en
0.797527
# empirical samples with desired shape # +1 for agg dim # initial weight assignment # Value outside support returns -Inf # Vectorized ``log_prob`` raises ValueError
1.901624
2
vistrails/db/versions/v1_0_3/domain/auto_gen.py
celiafish/VisTrails
1
6626832
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: <EMAIL> ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or wi...
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: <EMAIL> ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or wi...
en
0.748124
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: <EMAIL> ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or wit...
0.99918
1
docs/core/examples/echoclient_udp.py
mathieui/twisted
1
6626833
<reponame>mathieui/twisted #!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from __future__ import print_function from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor class EchoClientDatagramProtocol(DatagramProtocol): strings =...
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from __future__ import print_function from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor class EchoClientDatagramProtocol(DatagramProtocol): strings = [ b"Hello, world!"...
en
0.639151
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details.
2.812813
3
manageXML/management/commands/find_duplicates.py
mokha/verdd
5
6626834
from django.core.management.base import BaseCommand, CommandError import io, csv, os from django.db.models import * from django.db.models.functions import * from manageXML.utils import get_duplicate_objects, annotate_objects, obj_to_txt from django.apps import apps import ast class Command(BaseCommand): """ T...
from django.core.management.base import BaseCommand, CommandError import io, csv, os from django.db.models import * from django.db.models.functions import * from manageXML.utils import get_duplicate_objects, annotate_objects, obj_to_txt from django.apps import apps import ast class Command(BaseCommand): """ T...
en
0.542618
This command finds all duplicate items and prints them. Usage: python manage.py find_duplicates -m manageXML.Lexeme -d ; --unique lexeme language --fields id lexeme language pos --filters language='fin' # id__gt=1 # if failed, treat it as a string # for each duplicate values # get the objects that have them # conv...
2.839667
3
t3d/__init__.py
SamDSchofield/t3d
0
6626835
"""Top-level package for T3D.""" __author__ = """<NAME>""" __email__ = '<EMAIL>' __version__ = '0.1.0'
"""Top-level package for T3D.""" __author__ = """<NAME>""" __email__ = '<EMAIL>' __version__ = '0.1.0'
en
0.677947
Top-level package for T3D. <NAME>
0.932157
1
scripts/script.py
thaddywu/RailwayVIS
0
6626836
<gh_stars>0 # -*- coding: utf-8 -*- import csv, json, os from IPython import embed jingwei = [ ('重庆', 106.549, 29.581, 1), ('北京', 116.408, 39.904, 1), ('上海', 121.445, 31.213, 1), ('广州', 113.265, 23.108, 1), ('武汉', 114.279, 30.573, 1), ('济南', 117.009, 36.663, 1), ('深圳', 114.109, 22.544, 2), ('乌鲁木齐', 87.585, 43.781, 1),...
# -*- coding: utf-8 -*- import csv, json, os from IPython import embed jingwei = [ ('重庆', 106.549, 29.581, 1), ('北京', 116.408, 39.904, 1), ('上海', 121.445, 31.213, 1), ('广州', 113.265, 23.108, 1), ('武汉', 114.279, 30.573, 1), ('济南', 117.009, 36.663, 1), ('深圳', 114.109, 22.544, 2), ('乌鲁木齐', 87.585, 43.781, 1), ('兰州', 103....
en
0.391856
# -*- coding: utf-8 -*- # ('拉萨', 91.126, 29.656), # 炸 # ('福州', 119.303, 26.071), # 炸 # ('秦皇岛', 119.601, 39.932), # ('厦门', 118.070, 24.445), # # ('巴东', 110.312, 30.813), # railway上没这个城市 # # ('乐山', 103.747, 29.564), # ('汉中', 107.025, 33.071), # ('宜昌', 111.281, 30.708) # ('天水', 105.709, 34.576), # ('洛阳', 112.361, 34.671...
2.119078
2
wavelet.py
MuAuan/Scipy-Swan
0
6626837
<reponame>MuAuan/Scipy-Swan from swan import pycwt import numpy as np import matplotlib.pyplot as plt import wave from scipy import fromstring, int16 wavfile = './hirakegoma.wav' #wavfile = 'ohayo.wav' wr = wave.open(wavfile, "rb") ch = wr.getnchannels() width = wr.getsampwidth() fr = wr.getframerate() fn = wr.getnfra...
from swan import pycwt import numpy as np import matplotlib.pyplot as plt import wave from scipy import fromstring, int16 wavfile = './hirakegoma.wav' #wavfile = 'ohayo.wav' wr = wave.open(wavfile, "rb") ch = wr.getnchannels() width = wr.getsampwidth() fr = wr.getframerate() fn = wr.getnframes() fs = fn / fr print('c...
ja
0.735401
#wavfile = 'ohayo.wav' # ステレオ前提 > monoral #0.2 #1 #2 #8 # (1) Freqを指定してcwt
2.280029
2
pydfs_lineup_optimizer/__init__.py
raymondhuynh1988/pydfs-lineup-optimizer
1
6626838
from pydfs_lineup_optimizer.version import __version__ from pydfs_lineup_optimizer.constants import Site, Sport from pydfs_lineup_optimizer.player import Player from pydfs_lineup_optimizer.exceptions import LineupOptimizerException, LineupOptimizerIncorrectTeamName, \ LineupOptimizerIncorrectPositionName, LineupOpt...
from pydfs_lineup_optimizer.version import __version__ from pydfs_lineup_optimizer.constants import Site, Sport from pydfs_lineup_optimizer.player import Player from pydfs_lineup_optimizer.exceptions import LineupOptimizerException, LineupOptimizerIncorrectTeamName, \ LineupOptimizerIncorrectPositionName, LineupOpt...
none
1
1.947397
2
tests/test_server.py
CSP197/submission-criteria
112
6626839
#!/usr/bin/env python """Test Server.""" # System import datetime import os # Third Party import requests # First Party from submission_criteria.database_manager import DatabaseManager def fetch_competition(db): now = datetime.datetime.utcnow() return db.competitions.find_one({ "start_date": { ...
#!/usr/bin/env python """Test Server.""" # System import datetime import os # Third Party import requests # First Party from submission_criteria.database_manager import DatabaseManager def fetch_competition(db): now = datetime.datetime.utcnow() return db.competitions.find_one({ "start_date": { ...
en
0.5258
#!/usr/bin/env python Test Server. # System # Third Party # First Party
2.426917
2
ax/models/torch/botorch.py
aerometu/Ax
1
6626840
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from copy import deepcopy from typing import Any, Callable, Dict, List, Optional, Tuple, cast import numpy as np impor...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from copy import deepcopy from typing import Any, Callable, Dict, List, Optional, Tuple, cast import numpy as np impor...
en
0.814017
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. Customizable botorch model. By default, this uses a noisy Expected Improvement acquisition function on top of a...
1.455575
1
spark/spark_main.py
kcrandall/Kaggle_Mercedes_Manufacturing
0
6626841
# imports import pandas as pd import numpy as np import time import os from tabulate import tabulate import sys from operator import add from pyspark import SparkContext from pyspark.sql import SparkSession from pyspark.sql import SQLContext from pyspark.sql import functions as F #https://stackoverflow.com/questions/3...
# imports import pandas as pd import numpy as np import time import os from tabulate import tabulate import sys from operator import add from pyspark import SparkContext from pyspark.sql import SparkSession from pyspark.sql import SQLContext from pyspark.sql import functions as F #https://stackoverflow.com/questions/3...
en
0.39585
# imports #https://stackoverflow.com/questions/39504950/python-pyspark-get-sum-of-a-pyspark-dataframe-column-values #Define your s3 bucket to load and store data #Create a custom logger to log statistics and plots #.config('spark.executor.cores','6') \ # .master("local[*]") \ # .config('spark.cores.max','16') #.master(...
2.629231
3
example.py
park-daeun/onlinehd
0
6626842
<gh_stars>0 from time import time import torch import sklearn.datasets import sklearn.preprocessing import sklearn.model_selection import numpy as np import onlinehd # loads simple mnist dataset def load(): # fetches data x, y = sklearn.datasets.fetch_openml('mnist_784', return_X_y=True) x = x.astype(f...
from time import time import torch import sklearn.datasets import sklearn.preprocessing import sklearn.model_selection import numpy as np import onlinehd # loads simple mnist dataset def load(): # fetches data x, y = sklearn.datasets.fetch_openml('mnist_784', return_X_y=True) x = x.astype(float) y ...
en
0.616775
# loads simple mnist dataset # fetches data # split and normalize # changes data to pytorch's tensors # simple OnlineHD training
2.771677
3
piano_notes.py
bwalsh62/note-recognition
1
6626843
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Mon Aug 5 20:56:26 2019 @author: <NAME> for liloquy Music from: http://theremin.music.uiowa.edu/MISpiano.html Last updated: November 13, 2019 # TO DO # - Expand sound_dict beyone one octave """ #%% Import libraries from pygame import mixer import os import sy...
# -*- coding: utf-8 -*- """ Created on Mon Aug 5 20:56:26 2019 @author: <NAME> for liloquy Music from: http://theremin.music.uiowa.edu/MISpiano.html Last updated: November 13, 2019 # TO DO # - Expand sound_dict beyone one octave """ #%% Import libraries from pygame import mixer import os import sys # Add custom...
en
0.66039
# -*- coding: utf-8 -*- Created on Mon Aug 5 20:56:26 2019 @author: <NAME> for liloquy Music from: http://theremin.music.uiowa.edu/MISpiano.html Last updated: November 13, 2019 # TO DO # - Expand sound_dict beyone one octave #%% Import libraries # Add custom modules to path # from util.music_util import note_to_fr...
1.975472
2
feat/serializers.py
heobu/swe573
1
6626844
from django.contrib.auth.models import User from rest_framework import serializers from feat.models import ConsumerProfile, ProviderProfile, Recipe, Menu, RecipeLike, MenuLike, DailyIntakeFromRecipe class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ('...
from django.contrib.auth.models import User from rest_framework import serializers from feat.models import ConsumerProfile, ProviderProfile, Recipe, Menu, RecipeLike, MenuLike, DailyIntakeFromRecipe class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ('...
none
1
2.078129
2
ukis_pysat/__init__.py
Zajquor/ukis-pysat
0
6626845
<gh_stars>0 __version__ = "1.3.4"
__version__ = "1.3.4"
none
1
1.039236
1
convertDimension.py
vitorpp0/unitsmod
0
6626846
from unitsmod import database as dt from unitsmod.dimensionClass import dimension as dm def compareType(unitFrom, unitTo): for item in unitFrom: same = False for term in unitTo: if(item == term): same = True if not same: return False return True ...
from unitsmod import database as dt from unitsmod.dimensionClass import dimension as dm def compareType(unitFrom, unitTo): for item in unitFrom: same = False for term in unitTo: if(item == term): same = True if not same: return False return True ...
none
1
2.512546
3
back-end/erasmail/emails/migrations/0011_emailheaders_co2.py
SamirM-BE/ErasMail
7
6626847
<reponame>SamirM-BE/ErasMail<gh_stars>1-10 # Generated by Django 3.1.6 on 2021-03-14 10:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('emails', '0010_auto_20210228_1549'), ] operations = [ migrations.AddField( model_name...
# Generated by Django 3.1.6 on 2021-03-14 10:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('emails', '0010_auto_20210228_1549'), ] operations = [ migrations.AddField( model_name='emailheaders', name='co2', ...
en
0.774507
# Generated by Django 3.1.6 on 2021-03-14 10:26
1.56757
2
armi/materials/caH2.py
keckler/armi
162
6626848
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
en
0.742287
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
1.97248
2
Helper/RequestContext.py
amrishAK/DBB_gateway
0
6626849
<reponame>amrishAK/DBB_gateway<filename>Helper/RequestContext.py class RequestContext: def __init__(self,header,path,requestMessage,command): self.Header = header self.Path = path self.RequestMessage = requestMessage self.Command = command def SetResponse(self, statusCode, s...
class RequestContext: def __init__(self,header,path,requestMessage,command): self.Header = header self.Path = path self.RequestMessage = requestMessage self.Command = command def SetResponse(self, statusCode, statusReason, payload): self.ResponseMessage = payload ...
none
1
2.328929
2
main.py
stephanebruckert/GoCrawl
0
6626850
<filename>main.py #!/usr/bin/python import argparse from gocrawl.core import core if __name__ == "__main__": ''' $ python main.py -h usage: main.py [-h] -L LINK [--silent] [-W WAIT] GoCrawl optional arguments: -h, --help show this help message and exit -L LINK, --link LINK...
<filename>main.py #!/usr/bin/python import argparse from gocrawl.core import core if __name__ == "__main__": ''' $ python main.py -h usage: main.py [-h] -L LINK [--silent] [-W WAIT] GoCrawl optional arguments: -h, --help show this help message and exit -L LINK, --link LINK...
en
0.31324
#!/usr/bin/python $ python main.py -h usage: main.py [-h] -L LINK [--silent] [-W WAIT] GoCrawl optional arguments: -h, --help show this help message and exit -L LINK, --link LINK Entry point URL --silent Silent mode -W WAIT, --wait WAIT Minimum wait time i...
2.745485
3