blob_id
stringlengths
40
40
content_id
stringlengths
40
40
repo_name
stringlengths
5
114
path
stringlengths
5
318
language
stringclasses
5 values
extension
stringclasses
12 values
length_bytes
int64
200
200k
license_type
stringclasses
2 values
content
stringlengths
143
200k
f335530aa62e663186f814d8d7e3a6947dd80213
2db327b321e2aeccf3dd40045d05ec754fa5a772
StevenSalazarM/Apache-Spark-Scalability-Analysis
/test_m5_2xlarge/plot_multiple_queries.py
Python
py
2,998
no_license
import matplotlib.pyplot as plt import sys from matplotlib.font_manager import FontProperties path = "~/logs/" queries = [1, 2, 3, 4, 5, 6, 7, 8, 9] average_overall_time = [0,0,0,0,0,0,0,0,0] average_read_time = [0,0,0,0,0,0,0,0,0] average_stage0_time = [0,0,0,0,0,0,0,0,0] for q in range(9): file_ovnc = open("Multi...
5a3623f0cfc677af55c7e404e27fafc9fe765cf1
b92b8131dd53591da32ec7de097680db193bc552
dmirikwa/Outputs_for_Day_one
/car_lab.py
Python
py
720
no_license
class Car(object): speed = 0 def __init__(self, name='General', model='GM', vehicle_type=None): self.name = name self.model = model self.vehicle_type = vehicle_type if self.name in ['Porshe', 'Koenigsegg']: self.num_of_doors = 2 else: self.num_of_doors = 4 if se...
fb468a39821dbb28c55f833412f0056849bd0fc9
4d97ccc9fe0e0eb3441a0d38211d127e7bf40146
reppets/wikipetan-bot
/src/wikipedia.py
Python
py
5,856
permissive
import httplib2 import re from urllib.parse import quote,unquote from xml.parsers import expat _HTML_TAG_PATTERN = re.compile(r'<.*?>') _HTML_TAG_MULTILINE_PATTERN = re.compile(r'<.*?>',re.MULTILINE|re.DOTALL) _HTML_SINGLE_REF_TAG_PATTERN = re.compile(r'<[Rr][Ee][Ff][^/>]*/>') _HTML_REF_TAG_PATTERN = re.compile(r'<[Rr...
f346bd80b9a72a9dd09ce7841cdce0d90d7a90e3
6f85027737f2b960669519f2980bffb60649db18
owlieee/Tiling
/modeling/scratch/scratch_store_set.py
Python
py
1,183
no_license
import pandas as pd from tile_generator import TileSample, load_ranges import matplotlib.pyplot as plt import matplotlib import numpy as np responder_t_changes = {'CDKN2A', 'NOTCH1', 'EGFR', 'IDH1', 'KRAS', 'SMARCB1', 'APC', 'GNA11', 'PIK3CA'} responder_touch_t_changes = {'HRAS', 'SMO'} responder_rand_changes = {'ABL1...
c7ee60010d7d52bf09f1eabe402b339ac159c865
7fbc04f6843a2735158aac08a58fbcad68d91f55
CompSec-2019/CompSec
/Lab3_Botnets_and_malwares/see/hooks/disk.py
Python
py
9,630
permissive
# Copyright 2015-2017 F-Secure # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You may # obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, ...
4728bc1597aa759f586bebb9db2193f992d8c9db
8a0f1f307767fe44434cf7f3e4e11313d90f881b
realbad/pystarter
/exceltest.py
Python
py
662
no_license
import xlrd path = ('17级分班.xlsx') workbook = xlrd.open_workbook(path) sheet_name = workbook.sheet_names() #sheet = workbook.sheet_by_index() #sheet = workbook.sheets() #print(sheet_name) for sheet in workbook.sheets(): print('\n') print(sheet.name) for row in range(sheet.nrows): print() fo...
dbeb9f2ac2c4ca944fe9408d8dfd263acea90573
295794c01379cfbb60ccf0f94b83e1896485448c
yolomachine/CodeforcesYoink
/yoink/enums.py
Python
py
4,063
no_license
from enum import Enum, unique, auto class AutoName(Enum): def _generate_next_value_(name, start, count, last_values) -> str: return str(name) class ProgrammingLanguageEnum(Enum): def _generate_next_value_(name, start, count, last_values) -> str: __language_map = { 'GCC': 'G...
39bd83868977a7072126e72f1c71072210b33053
8514d29d1a210e17a4a2cddfe20cbc6b8ac4e9c3
howardandlili/pythonFullStack
/Day03/内置函数.py
Python
py
1,310
no_license
#!/user/bin/env python # __author__ = 'Howie' # date : 2017/11/30 # str1 = ['a', 'b', 'c', 'd'] # # # def fun1(s): # if s != 'a': # return s # # # ret = filter(fun1, str1) # filter(),是把一个可迭代的对象放到一个函数里面去过滤 # # print(list(ret)) # ret是一个迭代器对象 # str2 = [1,2,3,4] # # def fun2(s): # # return s + 1 # # re...
c5ce0ca06f2aae906bf3d2e16c04697d61ee8d20
cf7f554b0f8ac0813369cd21b1d7b3017bb68cca
daviduarte/DeepLearningDBT
/ConeDeepLearningCT2/teste_mat.py
Python
py
1,374
permissive
import re import sys import numpy as np import math file_handle = open( "phantoms/lowdose/projMat.txt", 'r' ) file_contents = file_handle.read() file_handle.close() regex = re.compile( r"@\s\d*\n([\d.]+)\s+([\d.]+)\n([\d\-.E]+)\s+([\d\-.E]+)\s+([\d\-.E]+)\s+([\d\-.E]+)\s+\n([\d\-.E]+)\s+([\d\-.E]+)\s+([\d\-.E]+)\s+([...
b81cc1256745116c58b6968eb9e583c3e8bd1ab1
a91dee964a267fe803fcce08425d75039fd03d92
suwenyu/SQuAD-sequential-model
/code/attention.py
Python
py
2,574
no_license
import time import logging import os import sys import numpy as np import tensorflow as tf class BasicAttn(tf.keras.Model): def __init__(self, dropout_rate, key_vec_size, value_vec_size): super().__init__() self.dropout_rate = dropout_rate self.key_vec_size = key_vec_size self.valu...
ae09f1fba48bce5b35e0592fa596b35b6c2f6730
8c7b1f5e4587aa64e9b7bda36b206f616f5c35c7
mexumeng/searchvideo
/test.py
Python
py
1,920
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "xumeng" __date__ = "2018/12/23 22:23" import re from selenium.webdriver.firefox.options import Options from selenium.webdriver import Firefox from urllib import parse li = ['<h2>\n\t\t\t\t\t<a href="//tv.sohu.com/item/MTIxNDg5Mg==.html" title="虎啸龙吟" target="_b...
89401304fce5c6972412cd033e12695f9cca0d75
778ac17978befe42b666ee00bedb7cecfa598ffb
kunalbose/reviserAi
/dashboard.py
Python
py
4,760
no_license
import streamlit as st import os import speech_recognition as sr from pydub import AudioSegment from pydub.silence import split_on_silence from scipy.io import wavfile import nltk from nltk.corpus import stopwords from nltk.tokenize import word_tokenize, sent_tokenize from question_generator.questiongenerator import Q...
798f0b2e1e81469ca74f63907f605617a472f32f
02708add27eb16dc23b599c94f241b0b9188e5f6
hyungkwonko/2021-winter-seminar
/A6/vae.py
Python
py
19,225
no_license
from __future__ import print_function import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import numpy as np import torch import torch.utils.data from torch import nn, optim from torch.autograd import Variable from torch.nn import functional as F from torchvision import datasets, transforms from torc...
f1da5450fb2eaf9745aa40c4241688531b55bc0d
2c5796280d859a71787c6eddc44779c605c0bd3f
bhaktimp02/hello_django
/covid_blog/urls.py
Python
py
388
no_license
from django.urls import path from . import views app_name = "covid_blog" urlpatterns = [ path('', views.index, name='index'), path('<int:article_id>/', views.detail, name='details'), path('submit-article-form/', views.submit_article_form, name='submit_article'), path('success/', views.success, name='success')...
8e4269829c070296e0578aab06f3c28736682d8b
bb425260bcf154c809d0c1a53469f48f63543a53
dobesv/pip
/pip/vcs/__init__.py
Python
py
12,195
permissive
"""Handles all VCS (version control) support""" from __future__ import absolute_import import errno import logging import os import shutil from pip._vendor.six.moves.urllib import parse as urllib_parse from pip.exceptions import BadCommand from pip.utils import (display_path, backup_dir, call_subprocess, ...
e9d5aed18c92668930594593fe3810eb1448154b
6c9042f49d9a9ad1e1f4cb3a0066035ffa4f3575
alejoso76/Comunicaciones
/cambioTemporal2.py
Python
py
317
permissive
import sympy as sym sym.init_printing() t=sym.symbols('t', real=True) class rect(sym.Function): @classmethod def eval(cls, arg): return sym.Heaviside(arg+1/2) - sym.Heaviside(arg-1/2) x=rect(t-1/2) + (2/3)*rect(t-3/2) + (1/3)*rect(t-5/2) sym.plot(x, (t, -1, 5), ylim=[-0.2, 1.2], ylabel=r'$x(t)$')
584c4dda8f159d8c1f48d00c37000acdaeefd358
e2261313b0538ffba098d62d014f45e6dfe20ee5
imlasky/LightMap
/LightMap/KeyController.py
Python
py
1,615
no_license
# -*- coding: utf-8 -*- ''' Class: COP4331C (Summer 2017) Group: G13 projectImage for LightMap ''' import pygame from pygame.locals import * #class to control projection. #Escape, x, q quit display #Space pause/start display class KeyController: def __init__(self,screen): self.s...
5cad77ceb0030044d9bc8ca134343f3566515fff
fd356bab69e97b09aa7c435070df4518155dedf0
devenmoga/openerp-extra-6.1
/l10n_br_account/res_company.py
Python
py
6,575
no_license
# -*- encoding: utf-8 -*- ################################################################################# # # # Copyright (C) 2009 Renato Lima - Akretion # # ...
8d1efa12db4b7bd7f36545531b8fa83583883891
65c753d4dbf49d5cf0a56de3ae25d8e6f0c4009e
cyliangtw/mbed-os-tools
/src/mbed_os_tools/test/host_tests_logger/__init__.py
Python
py
670
permissive
# Copyright (c) 2018, Arm Limited and affiliates. # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
5d81cd8f3e0cfd48eaac9a3641c11d4c9b12e7a6
b14d20028dec1225352c50bd9e40082620fb6444
DeeZhack/premium-2
/premium.py
Python
py
47,196
no_license
#!/usr/bin/python3 #-*-coding:utf-8-*- # Created By Dapunta # Thanks To My Teacher Who Has Perfected This Script (Angga Kurniawan & Muh Rizal Fiansyah) # GOKIL LU BRO BISA JEBOLIN FILENYA!! # JANGAN GANTI BOT FOLLOWERNYA YA!! KALAU MAU NAMBAH BOLEH. import requests,mechanize,bs4,sys,os,subprocess,uuid,random,ti...
df12c85637b38513fa96d450561776fbb41bf91f
3696ffc000ad3ef5b393edef04629baabc7b737d
jmrichardson/tmo
/rf/enable_sriov.py
Python
py
589
no_license
def enable_sriov(rfo, enable="Enabled", api=1, unit=1): """Enable SRIOV Parameters: rfo (object): Redfish login session enable (str): Enabled, Disabled api (int): API Value unit (int): Unit Value Returns: str: iLO response status """ body = dict() body["Attributes"] = dict(...
8c60e60fa21e6d4aa8bc84fb644868e4458a8ac0
b3eec98d83e3855f3c35a4054fe0d750e6d890d7
deepakmarathe/whirlwindtourofpython
/operators/identity_and_membership_operators.py
Python
py
496
no_license
# identity and membership operators # a is b true if a and b are identical objects # a is not b true if a and b are not identical objects # a in b true if a is a member of b # a is not b true if a is not a member of b # Identity operators # Object identity a = [1,2,3] b = [1,2,3] print "a == b : ", a == b print...
6aafb3f35e3f41a8dd1693139dd70a506e6afc3d
33eed512299d53e11b2e41f50204d680162c6edb
webknjaz/aiohttp
/aiohttp/multipart.py
Python
py
34,311
permissive
import base64 import binascii import json import re import uuid import warnings import zlib from collections import deque from types import TracebackType from typing import ( TYPE_CHECKING, Any, AsyncIterator, Deque, Dict, Iterator, List, Mapping, Optional, Sequence, Tuple, ...
654c28b46475db58de276c1c5861703459ddf694
a36bea395f76b6306d4c58e7e58de5ce8c57e11e
PrashantRBhargude/Python
/Loops and Iterations.py
Python
py
789
no_license
# For Loop myList=[1,2,3,4] print('displaying odd numbers') for num in myList: if num%2==0: #checks if it is an even number continue #skips the next statement and coninues the next iteration of the loop print(num) print('break example') for num in myList: if num%2==0: break print(num)...
466aa4b687cb5e886c880da8db4220e20db877b0
ff3ebfca0bc37f52875a0c32000da52dcbbb20a8
arnabs542/Leetcode-38
/Python/127.py
Python
py
880
no_license
from collections import deque class Solution: def ladderLength(self, beginWord: str, endWord: str, wordList: List[str]) -> int: words = set(wordList) if endWord not in words: return 0 count = 0 queue = deque() queue.append(beginWord) alpha = "abcdefghijklm...
a216fbf4aa625d1757a49601103f015e5ef27ed2
aadec4839c1ab8aaa23979d34a8b9a8e83e98d0e
adrienemery/auv-control-pi
/auv_control_pi/components/rc_controller.py
Python
py
5,736
permissive
import asyncio import logging import time from autobahn.asyncio.wamp import ApplicationSession from navio.rcinput import RCInput logger = logging.getLogger(__name__) RC_LOW = 999 # the lower limit of rc input vlaues RC_HIGH = 1999 # the upper limit of rc input values # the stop range sets the width within the rc...
374128cd8a9623bddad6a0b5b785260a75a562e6
3fa86f014820f81d00b32cfb18aabc20c4c156e5
tylere/DeforestationAnalysisTool
/src/packages/ee/__init__.py
Python
py
5,377
no_license
# Copyright 2012 Google Inc. All Rights Reserved. """The EE Javascript library.""" import logging import re import urllib import urllib2 import oauth2client.client # pylint: disable-msg=C6203 import data import algorithms # We're explictly importing the objects so they become available in this. # pylint: disable...
c521c50f267280bfd11b45472f2e7993fa965158
b4d0994e5b8a1c6b4f42b81f7880df1a01cadacc
Folarin93/Duofacts
/default_settings.py
Python
py
823
no_license
import os class Config(object): # SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://postgres:{os.getenv('DB_PASSWORD')}@localhost:5432/duofacts" SQLALCHEMY_TRACK_MODIFICATIONS = False @property def SQLALCHEMY_DATABASE_URI(self): value = os.getenv("DB_URI") if not value: ra...
5de3249018479354adf9704d3304a404f509e33d
f1096e862b26c22a445b9172154dde8a3d6756c8
BreezeKitten/multi_robots_network
/anima_multi_robot_network.py
Python
py
13,800
no_license
# -*- coding: utf-8 -*- """ Created on Thu Jul 23 11:14:57 2020 @author: BreezeCat """ import time as TIME import tensorflow.compat.v1 as tf import json import random import numpy as np import math import matplotlib.pyplot as plt import datetime import copy import file_manger import state_load as SL import os import A...
f2bb558f4f775d11227eefef8feb1b96fa1cb4a1
c9741db2074db2858b4ee7e738d763f7dda960de
hamling-ling/GuChiPa
/research/caffe_examples_guchipa/showimagedata.py
Python
py
932
no_license
import sys import caffe import numpy as np from PIL import Image as image import lmdb import os CAFFE_ROOT = os.environ['CAFFE_ROOT'] db_path = CAFFE_ROOT + '/examples/guchipa/train_lmdb' #db_path = CAFFE_ROOT + '/examples/guchipa/test_lmdb' lmdb_env = lmdb.open(db_path) lmdb_txn = lmdb_env.begin() lmdb_cursor = lmd...
de37ba219ede779f6ef97cd2bf4a0951b4832365
598bf533fefd21ed58eb1ea34d27970951a14799
Myfour/Fluent_Python_Study
/Chapter17/flags_threadpool.py
Python
py
510
no_license
from concurrent import futures from flags import save_flag, get_flag, show, main MAX_WORKS = 20 def download_one(cc): image = get_flag(cc) show(cc) save_flag(image, cc.lower() + '.gif') return cc def download_many(cc_list): workers = min(MAX_WORKS, len(cc_list)) with futures.ThreadPoolExecut...
cc8bd7122eee6768a1acf299b399221b094496c8
e3f60a5717df322c35a7d8b541fb7db582ff5fa1
Aryan-Garg/ML_Algorithms
/Scripts/b19153_la5.py
Python
py
8,524
no_license
''' Aryan Garg B19153 Lab Assignment 5 ''' # Modules import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.preprocessing import PolynomialFeatures from sklearn.metrics impo...
5ce4db74da0cb2b3ac3d4da02ef520ad5c72e454
666a8d84a486b9414bf53b48c36637d3dc520e95
goldenspider/scfcli
/tcfcli/libs/utils/cos_client.py
Python
py
29,855
permissive
# -*- coding: utf-8 -*- from qcloud_cos import CosConfig from qcloud_cos import CosS3Client from tcfcli.common.user_config import UserConfig from tcfcli.common.user_exceptions import UploadToCosFailed from qcloud_cos.cos_comm import * from tcfcli.common.operation_msg import Operation from qcloud_cos.cos_auth import Co...
ba87d5fa274965cf0437b671d938a994825f4632
01aba27e4fa7779fea6db162cca727ea63da177b
visit-dav/visit
/src/visitpy/visit_utils/tests/test_property_tree.py
Python
py
4,173
permissive
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ file: test_property_tree.py author: Cyrus Harrison (cyrush@llnl.gov) created: 4/15/2010 des...
78dea9e9cebe31e76742467ddffae3bc8b577ea1
c96f8f6b7c2bf0efa436e27850589e8ce5161255
woodledoodle/BudgetBuddies
/budgetapp/leadbudget/budget/urls.py
Python
py
322
no_license
from rest_framework import routers from .api import BudgetViewSet, RecordView router = routers.DefaultRouter() router.register('api/budget', BudgetViewSet, 'budget') # router.register('api/budget', BudgetViewSet.as_view({'get': 'retrieve'})) router.register('api/record', RecordView, 'record') urlpatterns = router.ur...
20c9c43f408f837e3dba3890e09ce171cc605371
985c19fddd9daa72eb06f6ff64bf6995e09bd20a
suo/pytorch
/test/fx2trt/passes/test_multi_fuse_trt.py
Python
py
1,884
permissive
# Owner(s): ["oncall: aiacc"] import torch import torch.fx.experimental.fx_acc.acc_ops as acc_ops from torch.testing._internal.common_fx2trt import AccTestCase from parameterized import parameterized from torch.fx.experimental.fx2trt.passes.fuse_pass import ( fuse_permute_linear, trt_transposed_linear, fus...
e43b0badb1e738d60a93d37a5e41e652837ab874
0bb3b151797218af5fcd3ef27c6a7a6d71285702
GeraldoM/Pr-tica-05---Calculadora
/servidor.py
Python
py
1,917
no_license
import socket from math import sqrt def is_float(valor): try: float(valor) return True except ValueError: return False #Variaveis de apoio HOST = socket.gethostbyname('localhost') PORT = 3000 #Instanciando transporte TCP/IP tcp_server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #Associacao ...
cbae2eaa5fc8ebd19d2762a8e849534b2c099657
c507aae33e329e0c92bc90ee462b60420c0f31d8
fedejimenez/tv-shows-python
/series/migrations/0012_auto_20190217_2132.py
Python
py
1,616
no_license
# Generated by Django 2.1.7 on 2019-02-17 21:32 from django.db import migrations, models import series.validators class Migration(migrations.Migration): dependencies = [ ('series', '0011_auto_20190217_2042'), ] operations = [ migrations.RemoveField( model_name='tvshow', ...
733015ecbe9bc0a2b1b2562b5472c7b15fbf4aac
cada66fd85a8e46269c8ccbac07c51c93cf76ae4
winsongin/manufacturing_inventory
/inventory.py
Python
py
15,099
no_license
from tkinter import * from tkinter.ttk import * import tkinter.messagebox import mysql.connector import itertools import login import testing import shipping import receiving import accounting import admin import inventory import assembly_class class Inventory: def __init__(self, master): self.master = mas...
39e8aed099114aa9f56eb5bc9ea1a7d1d030b3e9
8a84a605f73b247cf436ac1996f8fb0a74a11844
wuyudd/CS165_Project
/mnist_for_labelshift.py
Python
py
18,501
no_license
from __future__ import print_function import torch.utils.data as data from PIL import Image import os import os.path import errno import numpy as np import torch import codecs from torchvision import datasets class MNIST_SHIFT(data.Dataset): """`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset. Args: ...
fb8eb2ec2b236dd13d84cef6fcf816fd15395e5c
b04d52d5a8c121fdd80c3c156a5ccb92bff7b36d
Shant23/Final-Project-_-Group7
/Shant-Ayanian-Individual-project/Code/resnet9MSE.py
Python
py
5,002
no_license
import matplotlib from typing import List import logging from typing import Optional from functools import partial from typing import Tuple from typing import Union from glob import glob from sklearn.model_selection import train_test_split from sklearn.metrics import roc_auc_score from sklearn.metrics import ...
1ce83c72dab1d84a62afb0f4362fc5f3afdc6033
5111ea6c8709e16f736d05034f83412ded0e75a6
Meltem-Karaagac/Django_todo_app
/src/todo/views.py
Python
py
1,381
no_license
from django.shortcuts import get_object_or_404, redirect, render from .forms import TodoAddForm, TodoUpdateForm from .models import Todo def home(request): return render(request, "todo/home.html") def todo_list(request): todos = Todo.objects.all() context = { 'todos': todos } return ren...
570f4f593db2f6a719ed41033471d78b3de7d0a6
81309a86d38e8a418e2960974f24dc84aa6818fc
Fizzadar/pyinfra-prometheus
/setup.py
Python
py
337
no_license
from setuptools import find_packages, setup if __name__ == '__main__': setup( version='0.1', name='pyinfra-prometheus', description='Install & bootstrap prometheus clusters with pyinfra.', packages=find_packages(), install_requires=('pyinfra>=0.5'), include_package_...
4a0e06c8e2d4e979345985252790aa322f0f511c
f364c0056d4ba97146018c5a5334e5634a2d03de
namtran1151997/PythonProject
/LSB/main.py
Python
py
1,513
no_license
import bitarray import base64 from PIL import Image msg = "YourVerySecret" encoded_msg = base64.b64encode(msg) # print encode_msg ba = bitarray.bitarray() ba.frombytes(encoded_msg.encode('utf-8')) bit_array = [int(i) for i in ba] # im = Image.open("spongebob.png") im.save("lsb_spongebob.png") im = Image.open("lsb_s...
9fd6ca4fabaea49f0e3ea3f22789a7426798bad4
e2bba15214e9c8822f3e4515827a70dae7a6184d
sr-murthy/networkx
/networkx/algorithms/tests/test_clique.py
Python
py
10,518
permissive
import pytest import networkx as nx from networkx import convert_node_labels_to_integers as cnlti class TestCliques: def setup_method(self): z = [3, 4, 3, 4, 2, 4, 2, 1, 1, 1, 1] self.G = cnlti(nx.generators.havel_hakimi_graph(z), first_label=1) self.cl = list(nx.find_cliques(self.G)) ...
3fa3afad9ab5bce99957913ef977f9862caf423d
154685b2c1c732fdc0c7fd717d91830532410320
doovy0806/portfolio
/19-1 컴퓨터비전/CVassignment2/practice.py
Python
py
884
no_license
n = int(input()) alist = input() alist = alist.split() numlist = [] plist = {} for i in alist: numlist.append(int(i)) for i in range(len(numlist)): for j in range(i, len(numlist)): if i == j: plist[(i, j)] = numlist[i] else: cur_p = 1 for k in range(i, j + 1):...
e476fe67114a9c33d641fee5cd1a91538daa8f00
c3b2f39b83298448026cab52e4cf2a8043d07b15
arfsz/Python
/Python projects (Beginner)/Cf.py
Python
py
960
no_license
#Calculator prototype 2! #This time its a bit more complicated #The reason for this is cause I will be using functions #If you feel that there is a need to improve, please do say so #Anyways lets begin: #First we will be making the main functions for the operations #It is important to remember that if you want ...
8a60c4889a9c2e1a62a1e1f6baa408dcf6701588
8033aafc4694d941dd155c5ce995c3d68ce5033b
MartyMacGyver/CryptoAuth-explorations
/AT88CK590/fw/Libraries/ecc108_library/doc/updateDistro.py
Python
py
5,094
permissive
""" Updates the distribution folder for the ECC108 library. """ import os import sys from shutil import copy # For now, this script only generates documentation for the library, # not for the example. example_path = "../../../LibraryExamples/ECC108" example_path_avr8 = example_path + "/AtmelStudio6/ecc108" ...
dba2ffe81d6db5df8c4cc263bfeb4d25701b3032
322fa64c82165686f15f2040ea43ee1e4f3a1a1f
tzuyingyeh/sc-projects
/stanCode_Projects/stanCodeshop/stanCodoshop.py
Python
py
4,680
permissive
""" File: stanCodoshop.py ---------------------------------------------- SC101_Assignment3 Adapted from Nick Parlante's Ghost assignment by Jerry Liao. ----------------------------------------------- TODO: """ import os import sys from simpleimage import SimpleImage def get_pixel_dist(pixel, red, green, blue): ...
bf8ecb3716bb296f89df20d4795d2de50ff1decd
53bf2ff3c9c10eff659d2e8c13c2540ace4c0758
SpicyIslandFruits/heapoverflow
/manage.py
Python
py
632
no_license
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'heapoverflow.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise I...
5e3643434df7ff76e21fa4dfbeba281198500f80
0f88291957241b87ebcabe021f27d60679228158
NiceBlueChai/Spiders
/jingdong/jd2(完整版).py
Python
py
3,034
permissive
#!/usr/bin/python # -*- coding: utf-8 -*- #json string: import urllib3 import random import execjs #安装 pip install PyExecJS import json import re def GET_Data(sku='8461492'): #获取数据并保存 HTTP=urllib3.PoolManager() # Goods_ID=Random_Num() #随机生成的商品ID # Goods_ID = '5556351' Goods_ID = sku Token=Cre_Token...
485e095f59f902a4fd02be0e22621195de9c917d
bde40a7ef6d53d175812694622de38da55834b71
tomagalan/GIG
/TP5_GIG/sea2.py
Python
py
3,278
no_license
import bpy import math pool_length = 100 unit_size = 0.2 def newColor(col, name): mat = bpy.data.materials.get(name) if mat == None: mat = bpy.data.materials.new(name) mat.diffuse_color = col def cleanAll(): bpy.ops.object.select_all(action='SELECT') bpy.ops.object.delete(use_global=False...
6460c0f1fd7bb3c99b16f0d880a2e246c0da20a3
e5919e811e381477aaa9fcc1d08488ea712c92aa
serinchu/bob_filesystem
/mbr/mbr.py
Python
py
2,139
no_license
# BoB 7기 보안제품개발 트랙 이세린 # mbr.py import sys import struct def read_sectors(fd, sector, count = 1): fd.seek(sector * 512) return fd.read(count * 512) def check_boot_record(data): if data[-2] != 0x55 and data[-1] != 0xAA: print("이 파티션은 Boot Record가 아닙니다.") return -1 filename =...
2802aa2efdc49cf4bc18dcd702d0adb452ebea98
ddf55fffb809b34d3e6202184ac08628063e83cd
NilsNoreyson/mopidy
/tests/core/test_playlists.py
Python
py
8,020
permissive
from __future__ import unicode_literals import mock import unittest from mopidy import backend, core from mopidy.models import Playlist, Track class PlaylistsTest(unittest.TestCase): def setUp(self): self.backend1 = mock.Mock() self.backend1.uri_schemes.get.return_value = ['dummy1'] self...
eba2d90a562a35740e7c50eb97ba5077b715bf52
ea7c9f68b7e491e3d3367905aa63c7b18c34dfe5
jk-ozlabs/op-test-framework
/common/OpTestASM.py
Python
py
5,531
permissive
#!/usr/bin/env python2 # encoding=utf8 # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: op-test-framework/common/OpTestASM.py $ # # OpenPOWER Automated Test Project # # Contributors Listed Below - COPYRIGHT 2017 # [+] International Business Machines Corp. # # # Licensed under the Apache ...
788b61ab7d9c888d6885625d9481f4fa9aa334fb
5dce3f2fa39d93ec29b0558bc81c98934d81191d
smitgajjar/sympy
/sympy/vector/implicitregion.py
Python
py
16,155
permissive
from sympy.core.numbers import Rational from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.complexes import sign from sympy.functions.elementary.miscellaneous import sqrt from sympy.polys.polytools import gcd from sympy.sets.sets import Complement from sympy.core im...
5a336cae6277276d1bc3c2f3a9d755981610670f
083af43ddc06d1a30bdf7c95d624c5145fc93b74
cassidylaidlaw/ReColorAdv
/recoloradv/mister_ed/utils/checkpoints.py
Python
py
11,860
permissive
""" Code for saving/loading pytorch models and batches of adversarial images CHECKPOINT NAMING CONVENTIONS: <unique_experiment_name>.<architecture_abbreviation>.<6 digits of epoch number>path.tar e.g. fgsm_def.resnet32.20180301.120000.path.tar All checkpoints are stored in CHECKPOINT_DIR Checkpoints are stat...
b3db40d81f397b353f9bd8111fb8e6986a57aa7d
fe9301e2960c80db6d4bc25fc4043854aaac54ff
merll/docker-map
/dockermap/map/config/main.py
Python
py
28,497
permissive
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import Counter import itertools import six from six.moves import map, zip from ... import DEFAULT_PRESET_NETWORKS from ...functional import resolve_value from ...utils import merge_list from .. import DictMap, DefaultDictMap from ..inpu...
55baccd0d2e5ad74dbeec196a7fa9ec66f95ea7a
32d10ea7414b56cfcca115d8a752252c3b32ed8d
ralexstokes/py-evm
/eth/vm/forks/frontier/state.py
Python
py
6,859
permissive
from typing import Type from eth_hash.auto import keccak from eth_utils import ( encode_hex, ) from eth.abc import ( AccountDatabaseAPI, ComputationAPI, SignedTransactionAPI, MessageAPI, TransactionContextAPI, TransactionExecutorAPI, ) from eth.constants import CREATE_CONTRACT_ADDRESS from...
b0629113481d87e34e632aa382c08ac3132f1be8
bb5fba57ae960d9819998d52beac38fa63253f91
ingatesystems/ingatesdk
/utils/cli2python.py
Python
py
18,687
permissive
#!/usr/bin/python # -*- coding: utf-8 -*- # MIT License # Copyright (c) 2018 Ingate Systems AB # 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 limita...
3a0c87f386fe79036195f65f721da53dbc3e8b77
a5fddcd1f2acdc1b7c226273030daac94ba44c4b
danielbom/tpp-compiler.py
/tpp/Semantic/Tree.py
Python
py
6,565
permissive
class SemanticTypes: PROGRAM = "program" VARIABLE = "variable" EMPTY = "empty" VARS_DECLARATION = "vars_declaration" FUNCTION_DECLARATION = "function_declaration" IF_ELSE_DECLARATION = "if_else_declaration" REPEAT_DECLARATION = "repeat_declaration" RETURN_DECLARATION = "return_declarati...
3eba96b0f2a239010463c9ffdf1719dafdc84c1e
d478aba5451e19fac81c30c31fa05ae0e540b554
adu013/project-management-system
/pmssite/project/migrations/0001_initial.py
Python
py
1,394
no_license
# Generated by Django 2.1.7 on 2019-02-27 18:13 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
45b25e3c468326fb254e5c55e7b7fa7eaee9868f
4489ef350cacd53150610069df3d727c8ca2a2ae
ArushiSinghal/Weather_mapping
/scrapper_stat.py
Python
py
2,762
no_license
#!/usr/bin/python import urllib2 from bs4 import BeautifulSoup import requests # specify the url thislist = ['https://energyplus.net/weather-region/africa_wmo_region_1', 'https://energyplus.net/weather-region/asia_wmo_region_2', 'https://energyplus.net/weather-region/south_america_wmo_region_3', 'https://energyplus.ne...
02a1fb694e9d2450a6039e0e092d2763edb3faf0
ba22653f86a24ec90ffc5fd22cfd45fa4ce45940
cash2one/xai
/xai/brain/wordbase/otherforms/_departs.py
Python
py
222
permissive
#calss header class _DEPARTS(): def __init__(self,): self.name = "DEPARTS" self.definitions = depart self.parents = [] self.childen = [] self.properties = [] self.jsondata = {} self.basic = ['depart']
09391066dfd23b6b6df6b38d70a987b17bb1ae80
5ffeeb4edf0deb5f10141699195ead753bcc7aed
nlebang/OpalApiControl
/OpalApiControl/examples/wecc301_run.py
Python
py
512
no_license
from run import run_model import logging logging.basicConfig(level=logging.DEBUG) if __name__ == "__main__": localhost = 'tcp://127.0.0.1:5678' cui_aw = 'tcp://10.129.132.192:9999' cui = 'tcp://160.36.59.189:5000' kirsten = 'tcp://160.36.56.211:9898' ehsan = 'tcp://10.129.132.192:8801' run_mo...
1e456e4e9098b3efbcdf7fd2a967e296793d963e
90aa19db14d26079844608620f7f293541a82093
kaviramsv/PasswdApp
/main.py
Python
py
9,820
no_license
from flask import Flask,Flask, render_template,redirect,url_for from flask import render_template,url_for,flash,redirect,request,Blueprint from flask_login import login_user, current_user, logout_user, login_required from forms import RegistrationForm, AddEntryForm, UpdateEntryForm, AddtoCat from models import db from...
812d2fa51e28a9bd8696593ab84c780faf41d534
fda73700d614d6e8bc2638e851caa6161566c745
liujon-mvla/COM-Server
/src/com_server/api_server.py
Python
py
15,291
permissive
# /usr/bin/env python3 # -*- coding: utf-8 -*- """ This file contains the implementation to the HTTP server that serves the web API for the Serial port. """ import typing as t import flask import flask_restful import waitress from . import base_connection, connection # for typing class EndpointExistsException(Ex...
16911c8f245fe143cb89fe689293aba1974814de
219393ec60e3e4536ad83a3f973b8923811ca339
joseaki/MULTIDIGIT-SVHN
/model.py
Python
py
6,802
no_license
# -*- coding: utf-8 -*- """ Created on Fri Apr 10 10:15:20 2020 Model adapted from https://github.com/pytorch/vision/blob/master/torchvision/models/vgg.py @author: josea """ import torch import torch.nn as nn class VGG(nn.Module): def __init__(self, features, num_classes=11, init_weights=True): super(VGG, ...
0bc61d40f7e2d1f5f4ce630ac44d8207b6bf1d61
9e0bd311c947822f67dd5aab2b712c56f3f11770
USF-ML2/Yahoooooooo-
/scripts-Kirk/runtime_jaccard_sims.py
Python
py
1,325
no_license
from collections import defaultdict from function_library import * from itertools import combinations from pyspark import SparkContext from random import sample import matplotlib import matplotlib.pyplot as plt import numpy as np import time sc = SparkContext() sc._jsc.hadoopConfiguration().set("fs.s3n.awsAccessKe...
20a97176ec665bb078d6cedebd11a73fff041943
d997f806f594b705817d117d9da15afa32fb1012
pyro-ppl/pyro
/pyro/distributions/omt_mvn.py
Python
py
3,176
permissive
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.distributions import constraints from pyro.distributions.torch import MultivariateNormal from pyro.distributions.u...
b74073257fb00cc327cd801785402280a7488d5b
6767493a3c1fd04fd2b11a4a27f72e225ba40e8f
info2soft/i2up-python-sdk
/info2soft/distributor/test/v20200727/DistributorSystemTest.py
Python
py
10,775
no_license
# -*- coding: utf-8 -*- # flake8: noqa import sys sys.path.append(r'/Users/chengl/Desktop/sdk/python-sdk/') import unittest from info2soft import DistributorSystem # from info2soft.distributor.v20200722.DistributorSystem import DistributorSystem from info2soft import Auth from info2soft.fileWriter import wr...
f820e9bcf0974461a02a67bb41acabac90e1e2fc
8c03b6b2ab43e79deddaff06db47da30abd88ba1
CCHaynes112/portfolio_site_old
/portfolio/forms.py
Python
py
536
no_license
from django import forms class EmailForm(forms.Form): name = forms.CharField(required="True", label="Name", max_length="30", widget=forms.TextInput( attrs={'class': 'form-control', 'placeholder': 'Name'})) email = forms.EmailField(required="True", label="Email", max_length="50", widget=forms.TextInput...
a8f0a0168114eff5e2b363a5f2f51bad59d0dbad
d14197ac80328497e5f3db23eb39ecb1e2d06689
wouterkessels/PREDICTFastr
/PREDICT/imagefeatures/vessel_features.py
Python
py
3,941
permissive
#!/usr/bin/env python # Copyright 2011-2017 Biomedical Imaging Group Rotterdam, Departments of # Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
31d6835517dc003e99b7f606e914b58f797db06c
1af124e73883ec24c49e95eac55d81285fc2b319
lightsuner/iit_labs
/lab_2/src/search_engine.py
Python
py
1,376
no_license
from collections import deque import re from ak_parser import AKParser from tfidf import TfIdf class SearchEngine: def __init__(self): self.tfidf = TfIdf() def load_documents(self, documents): for doc in documents: name = doc.name text = self.doc_to_text(doc) ...
094f76891debbdd8da9bc452f10a632bcf38da5a
741a782a32be78aa43a3bdfb99db52246a4afefb
ismacaulay/qtcwatchdog
/qtcwatchdog/file.py
Python
py
1,954
permissive
import os, threading class QtcFile(object): def __init__(self, path, validator): self._writer = FileWriter(path) self._validator = validator self._path = path def write(self, path): if self._validator.is_valid(path): self._writer.write(path) def remove(self, p...
10847035221e3e2a78cf768161a98dc2ce2980b1
ea3a5ce7cd21e85b794d1672f2c08665b299b8d6
psrajoria/DataScienceProject
/src/products/migrations/0001_initial.py
Python
py
793
no_license
# Generated by Django 3.2.4 on 2021-06-25 19:00 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Product', fields=[ ('id', models.BigAutoFie...
eb65807aa7204576f5008cdf298386dbd6ba3473
37243dc1512d9109828d91346c5070eb5b98b833
anderportela/Learning--Python3--Curso_em_Video
/Dicionários em Python.py
Python
py
573
no_license
from time import sleep historico = dict() print('-='*65) print(f'{"SERÁ QUE VOCÊ FOI APROVADO?":^120}') print('-='*65) historico['nome'] = str(input('Digite o nome: ')) historico['media'] = float(input(f'Média de {historico["nome"]}: ')) if historico['media'] >= 7: historico['situacao'] = 'aprovado(a)!' elif 5 <= h...
56448ac892562b973c817541cb1fb7bd8c179a8e
bdc7a5196fecd4dce3e723f97bdb0a34552fb63e
rucpata/WagtailWebsite
/.history/home/models_20201029125342.py
Python
py
1,869
no_license
from django.db import models from wagtail.core.models import Page from wagtail.core.fields import StreamField from wagtail.admin.edit_handlers import FieldPanel, PageChooserPanel, StreamFieldPanel from wagtail.images.edit_handlers import ImageChooserPanel from wagtail.snippets.blocks import SnippetChooserBlock from st...
dcbab36549d573267b15be2502545a6b2eb33076
1b96b8a84fb66568f4dca6d1095fc9d42bf4bf4b
rfloriano/rshortner
/shortener/tests/views.py
Python
py
929
no_license
from django.test import TestCase from shortener.models import Bit from shortener.views import OnlyAjaxException class ViewsTest(TestCase): fixtures = ['shortenertestdata.json'] def test_renderHome(self): resp = self.client.get('/', {}, HTTP_HOST="testserver") self.assertEqual(resp.status_cod...
c57d70b918d037131c2746a2cbdb0666a05f7d9b
d41779c3d27af0d16b3a32345f33f720bd498e35
dmaugis/ellipse-detection
/ellipse_detection/ellipse_center_estimator.py
Python
py
7,920
no_license
import numpy as np import cv2 from segment import Segment from segment_pair import SegmentPair class EllipseCenterEstimator(object): def __init__(self): self._seg_pair_cache = {} def estimate(self, seg_a, seg_b, debug_image=None): """Estimate ellipse center indicated by segmtens and slopes o...
3213d6c2d8bc089ebc1d6a4c11a1e6832c621746
bfb9362f03bb500f0aaf79caaac4027dfd825771
browseinfo/7.0-opeida
/product_extended/__openerp__.py
Python
py
1,501
no_license
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
66fb11648927cc7dc857ee833b6d58cae86cd1a2
a507a8708177a70f06972161f9600b996b0ccca4
Courvoisier13/marketsimulator
/marketsim/observable/_wrap.py
Python
py
803
no_license
import marketsim from marketsim import wrap, ops, types, event, _, flags FunctionBase = types.Factory('FunctionBase', """(wrap.Base): _properties = {'impl' : (types.IFunction[%(T)s], flags.collapsed) } """, globals()) ObservableBase = types.Factory('ObservableBase', """(wrap.Base): def __init__(self...
870a077ce84f9d7d9dc5beec93485fea238cdfba
73d7cd2360144446528be55a1bfefdc67e0d29bb
MihaiAnton/tudelft-iic-reproduction
/src/scripts/cluster/analysis/colour_scheme_change.py
Python
py
2,781
permissive
import argparse import os from colorsys import hsv_to_rgb import numpy as np import torch from PIL import Image parser = argparse.ArgumentParser() parser.add_argument("--in_dir", type=str, required=True) parser.add_argument("--file_pattern", type=str, required=True) parser.add_argument("--file_indices", type=int, nar...
6fe5e4e95682807edcebfd0ae307b4927d488b8c
a4a22b8bdc9cde82a0128baa3a7d40e130cbb25b
kaustubhdhole/SPRINGS
/codes/new.py
Python
py
1,069
no_license
# SRINGS version 1.0 # Copyright (c) ABC Lab, BITS Pilani - K.K. Birla Goa Campus, India. # All Rights Reserved. # We advise the users to exercise the following code as it is. # Any alteration(s) made to the below given code may result in # the improper functioning of the software. # SPRINGS recommends Python 2.7.4 & G...
09db8918b888323f0aa9ef5494f23391ddb81aac
1e62c6075e1a538d302950bb74ea101fc2dbb005
shengxuesun/DI-engine
/dizoo/gfootball/envs/reward/gfootball_reward_runner.py
Python
py
747
permissive
import copy import torch from ding.envs.common import EnvElementRunner from ding.envs.env.base_env import BaseEnv from .gfootball_reward import GfootballReward class GfootballRewardRunner(EnvElementRunner): def _init(self, cfg, *args, **kwargs) -> None: # set self._core and other state variable ...
23d0d3c3b7b8fb096a5eb3243ca1c58163aa526b
fbf72e4f982c5cb0b9f68d009a816a6ebc4bb1a9
djmcmoran/BasicsPy
/KoalaPy_KoalaHab.py
Python
py
1,029
no_license
# KoalaPy Data Series 2019 # for use with CSV files generated # in ArcGIS or Excel # prior to use, read KoalaPy Reference Guide # import pandas module into python import pandas as pd # read data in the CSV file # note headers and data ordering before proceeding, *all data must be # formatted to work co...
98e5902d7ed8dc3151731729000a4d1c6b38600e
618e04c3559bd2429a4a3c99130b7028027624b8
SujialinPy/Second-Shop
/SecondShop_s/user/migrations/0001_initial.py
Python
py
1,495
no_license
# Generated by Django 2.1.9 on 2019-06-20 08:51 from django.db import migrations, models import user.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='MyUser', fields=[ ('id',...
baa8baeb91b1d3e46d3de2f7cf3b9b87c0bda677
b8268f0ad6c277f19e019f0f9631c0d4891d97a9
cbovino/CrossfitCMS
/backend/src/djreact/urls.py
Python
py
885
no_license
"""djreact URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
5c9d34292709f97c304436331af8af9968a4de10
ae7698ecd912ea92819797a3b3116226bbcb5ebf
Justgo13/sensor_library
/docs/X4_record_playback.py
Python
py
7,122
permissive
#!/usr/bin/env python from __future__ import print_function, division import sys from optparse import OptionParser from time import sleep import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation import pymoduleconnector from pymoduleconnector import DataType __version__ = 3 ...
1f046e302ab91165f67d44b4059362d205f5e9e5
a731010eb2cc43b188ec3659275dbb90986f356e
sunhuachuang/pytestdata
/main/automatic.py
Python
py
2,798
permissive
# automatic distinguish fileds type. # writed by sunhuachuang # # descs # name => str # key => str (pri or other) # type => tuple (typename, params) int str float datetime date bool text enum # default => str # nullable => bool (True or False) # extra => str #results # name => str # type ...
0e33c7ef4242453c1718467f77c397d65bc8aeb0
8e23bf7ff2ae8d40a4f5d7649b611f79a19bb64c
nsmedira/advent-of-code-2020
/days/02/part-2.py
Python
py
554
no_license
from parse import parse from split_n_strip import * if __name__ == "__main__": t = parse() number_valid = 0 # convert each entry in the list into a list for i in range(len(t)): u = split_n_strip(t[i]) # does it fit policy? letter = u[1] a = u[2][int(u[0][0]) - 1] ...
dcf360906452b3b0e0358eac75d974f1062830bd
c410d15f0f098126f50eb31e2834ea5c3a47af55
kzimms/cs1110_Assignment_4
/a4.py
Python
py
11,070
no_license
# a4.py # Kathryn Zimmerman (kpz8) and Max Senkovsky (mgs253) # 2 November 2014 """ Functions for Assignment A4""" # Task 1: Word Lists def build_word_list(filename): """Returns a list of words from the given file Each word in the file should stored on a separate line. The lines are trimmed to remo...
b6c38f76337af0dec0df0e255f1b07cb9ae5d807
4561924520302051f52449e68f73130b9a5939e5
kozakusek/ipp-2020-testy
/z2/part3/updated_part2_batch/jm/parser_errors_2/315535539.py
Python
py
2,668
permissive
from part1 import ( gamma_board, gamma_busy_fields, gamma_delete, gamma_free_fields, gamma_golden_move, gamma_golden_possible, gamma_move, gamma_new, ) """ scenario: test_random_actions uuid: 315535539 """ """ random actions, total chaos """ board = gamma_new(5, 3, 4, 3) assert board is...
5e39ee9e4b18d3d0aec6838c5e7e0409545484ff
3af7ed85b6950a7d4c16654ac848c395b2165cd4
Didir19/good_py_func
/email_automation.py
Python
py
866
no_license
import smtplib from email.mime.image import MIMEImage from email.mime.text import MIMEText def email(): # Create the container (outer) email message. msg = MIMEMultipart() msg['Subject'] = 'Mail TEST' # me == the sender's email address # family = the list of all recipients' email addresses ms...
73c683cfee6c1448f6a3c0b8a48d4150162bd50e
6c8da31eec6f734ea9fa003acc869a69c09ccb74
skhalil/DelphesAnalysis
/condor/batchDelphesTreesDummy.py
Python
py
737
no_license
universe = vanilla Executable = condor_delphes_tree.sh x509userproxy = $ENV(X509_USER_PROXY) Requirements = OpSys == "LINUX" && (Arch != "DUMMY" ) transfer_input_files = hadronizer.py, Delphes333pre16.tar, MinBias_100k.pileup should_transfer_files = YES WhenTOTransferOutput = ON_EXIT request_memory = 2100 request_dis...
fe94968f389cdb5997069f8e19c182919053d46f
41ae991968a095ee8500851116d983cc5b05cfe7
okwrtdsh/django_cbv_utils
/django_cbv_utils/views/json.py
Python
py
1,711
permissive
from django.http.response import JsonResponse from django.views.generic.base import TemplateResponseMixin, TemplateView from django.views.generic.edit import FormView class JSONResponseMixin(object): """ A mixin that can be used to render a JSON response. """ def render_to_json_response(self, context...
7df2655aaae98e785c6c3dc4d198db2b8273f5d3
5fe5f74d8971fecee973bff3359a8c1469275700
quioto/prova1programacao
/bd.py
Python
py
1,042
no_license
# Função validar login def get_idlogin(cursor, login, senha): # Executar o sql cursor.execute(f'select idlogin from login where login = "{login}" and senha = "{senha}"') # Recuperando o retorno do BD idlogin = cursor.fetchone() # Fechar o cursor cursor.close() # Retornar o idlogin ret...
fefe6eb354691b75ca05de84fd30c05891a6a8ef
dad62c9d95b3c4120f27fa548f5a78526d5a16dc
ejwillemse/sim-demog-NUK-open
/population/output_pop.py
Python
py
14,041
no_license
import os, time, datetime from glob import glob from .utils import load_probs #, create_thumbnail from .data_processing_pop import * from .plotting_pop import * #from Cheetah.Template import Template #def output_html_report(sim, ofile='summary.html'): # figs = [] # for infile in sorted(glob(os.path.join(sim.para...
fa00a84fc456c801625a6d381dc06fdd3c588298
97176589179496fbc972c5d1c6a8da4d6e590032
pat-and-mat/grammar-analyzer
/src/grammar_analyzer/slr_analyzer.py
Python
py
2,188
no_license
from functools import lru_cache from pycmp.parsing import SLR1Parser, build_lr0_automaton from grammar_analyzer.shift_reduce_analyzer import ( shift_reduce_info, build_conflict_str as __build_conflict_str, ) from grammar_analyzer.common import build_derivation_tree # TODO: Refactor all shift-reduce analyzers t...
7ea659fa751e7a1d9cb8d645888989fd2da684a6
bf485936dbd729b67b81d2ac67f6933ef8a2ada5
reduc-uc/reduc.stopspam
/reduc/stopspam/tests/test_logfile.py
Python
py
1,711
no_license
from unittest import TestCase from tempfile import mkstemp import sh from reduc.stopspam.logfile import LogFile class TestLogfile(TestCase): def setUp(self): file_, name = mkstemp() self.tmpfile = open(name, 'w') self.tmpfilename = name def tearDown(self): self.tmpfile.close...