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
74c50ad7057bb95cc6cdf1c97df343a1bc38b69d
9d64336d5ecfa52edfe51a0c4bd640375fd8b755
agdsn/pycroft
/tests/model/test_host.py
Python
py
8,151
permissive
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from itertools import chain import pytest from sqlalchemy import inspect from sqlalchemy.exc import IntegrityEr...
536bf9e466e8e5eb0061c318b6be8703ecbdd301
69e18941e08f291f5e588711dfa9ad5077b64841
slimui/demo-friends-management
/server/app/blueprints/views.py
Python
py
1,338
permissive
from ..models import User from ..graphql import schema import requests from flask import (Blueprint, render_template, current_app, Response, stream_with_context, jsonify, abort) blueprint = Blueprint('views', __name__) @blueprint.route('/') def index(): q = User.query.order_by(User.first_name,...
1de6b1bad765a3fd4589996b42c46a80cd93cf72
634056e173abbef77de0899e5cf3fef2121d8584
coll-gate/collgate
/server/accession/migrations/0009_auto_20180409_1309.py
Python
py
940
permissive
# Generated by Django 2.0.4 on 2018-04-09 11:09 import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accession', '0008_auto_20180404_1430'), ] operations = [ migrat...
99a3db019be2691e359152a6523f8459b33db888
77e9b5edded6fab092a44c68c4f7b431c5a93bba
juliandavidpineda/Business.co_joyeria
/Joyeria/CitasVentas/migrations/0003_auto_20211001_2148.py
Python
py
2,133
no_license
# Generated by Django 3.2.7 on 2021-10-02 02:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('CitasVentas', '0002_auto_20211001_2111'), ] operations = [ migrations.AddField( model_name='ordencompra', name='peso...
57e6537b641ef8aa5a3e1a430203d8c9c37fdde9
8378dd59a130476c1d6ec179568f6cbef7f58d13
xiringlama/manutd.org.np
/muscn/sitemap.py
Python
py
2,332
no_license
import datetime from django.contrib.sitemaps import Sitemap from django.core.urlresolvers import reverse from apps.events.models import Event from apps.page.models import Page from apps.partner.models import Partner from apps.post.models import Post from apps.stats.models import SeasonData, Player from apps.users.mode...
f44e31ccc6fe324d761d5c73642920c0a1441700
9e517e4d202d7bec44a73b5d34edac40ee23c4c5
anaissia/GUI_deg_Econs
/degradation module/run_dualfoil_V9 charge.py
Python
py
6,945
no_license
#This code intends to run the dualfoil5.2.f Newman's model to include battery degradation #with cycling # V1: 08-04 Added change in concentration of lithium at negative electrode due to degradation #V2: 08-05 Modified the calculation of the SEI growth rate and volume-averaged capacity lost due to parasitic reaction...
079ee66bd34fcf133783278fceb5abd891d88d58
67dcd9eeb51e9c7213424f72c8ab11c0ca98771c
yiulau/all_code
/input_data/manipulate_data.py
Python
py
3,104
no_license
import pandas as pd from sklearn.datasets import load_boston from sklearn.datasets import load_breast_cancer from sklearn.datasets import load_diabetes from sklearn.datasets import load_digits from input_data.convert_data_to_dict import get_data_dict input_data = get_data_dict("mnist") digits = input_data["input"] ta...
9dc89a6006bd3fbc407c0ac0660772aa57f92575
2cfb3f393090213ac9fa73a6df5645f191e94fff
cms-sw/cmssw-cfipython
/RecoTauTag/RecoTau/pfRecoTauDiscriminationAgainstElectronMVA6_cfi.py
Python
py
1,662
no_license
import FWCore.ParameterSet.Config as cms pfRecoTauDiscriminationAgainstElectronMVA6 = cms.EDProducer('PFRecoTauDiscriminationAgainstElectronMVA6', method = cms.string('BDTG'), loadMVAfromDB = cms.bool(True), returnMVA = cms.bool(True), mvaName_NoEleMatch_woGwoGSF_BL = cms.string('gbr_NoEleMatch_woGwoGSF_BL'), ...
15189fc78bcda234bef39a4b1212d4f90c10877a
9bc12be55db7eba349f804028adb547cd0504a5b
mraahemi/Simon_Says
/backend/simonsays/asgi.py
Python
py
395
no_license
""" ASGI config for simonsays project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SET...
120b7736e79d701d249200aea142b7fe0a0fee38
b8ac3829edf74664791c2af4df8c86f3c2079950
theja/shp_to_html_map
/contraflow_map.py
Python
py
4,582
no_license
import folium import shapefile import geopandas as gpd import numpy as np import json from bisect import bisect from branca.element import Template, MacroElement def line_color(row): if row['StOperNEU'] == 1 and row['FEDERALFUN'] == 7: return ['red', 'Local and oneway'] elif row['StOperNEU'] == 21: ...
76ceb7663a6eadcf5c5715afd395a242a69a7247
259a1346cc6a4cf9ea204974e7061316bd8f05ad
dennysrmorales/coffee_cart
/coffeecart/cart/views.py
Python
py
3,409
permissive
from django.shortcuts import render, redirect from django.http import HttpResponse from .models import Drinks,Snacks from .forms import ItemForm def index(request): snacks_list = Snacks.objects.order_by('id') drinks_list = Drinks.objects.order_by('id') context = {'snacks_list': snacks_list, 'drinks_list': drinks_l...
00e51eb5d5b7a3bf960d021f884d44cb76d8e4da
2bbc37a9067b9555f13b7f53217a0800a9c2dddf
xiangxing98/xiangxing98.github.io
/.history/Python_Learning/lesson15_20200407234057.py
Python
py
476
no_license
# -*- encoding: utf-8 -*- # !/usr/bin/env python ''' @File : lesson15.py @Time : 2020/04/07 23:35:14 @Author : Stone_Hou @Version : 1.0 @Contact : xiangxing985529@163.com @License : (C)Copyright 2010-2020, Stone_Hou @Desc : None ''' # here put the import lib # 输出5个 *, 分5行 for i in range(0, 5):...
90e6c3bbe78b3e608ee8f24a8503fcf4ee4cbe43
9705c46ae177393e52e94529d944ea5282dd580c
Jaclawiciel/Analiza-i-przetwarzanie-danych-w-Python
/Zajęcia 1/kwadrat.py
Python
py
412
no_license
class Prostokat: def __init__(self, a, b): self.a = a self.b = b def oblicz_pole(self): return self.a * self.b class Kwadrat(Prostokat): def __init__(self, a): Prostokat.__init__(self, a, a) prostokat = Prostokat(2, 3) kwadrat = Kwadrat(2) print("Pole prostokata: {}"...
cc22579dc7be0ad5f172d4356dbb3df0e03a0770
96883c0c4ec6911d2f7ad75dcbcb391924d9d1aa
ixylis/adventofcode
/2015/5/part2.py
Python
py
415
no_license
#import statements here f = open("input.txt", "r") inpa = [] ans = 0 for line in f: inpa.append(line) c1 = False c2 = False for ci in range(len(line)-1): c = line[ci] if line[ci:ci+2] in line[ci+2::]: c1 = True for ci in range(len(line)-2): c = line[ci] ...
5caffe7c540cc05b646783f321833b66d61fbd0b
11c4217d85535df6fea99ac5e745e1fbcb99d169
desertzk/pythondemo
/flaskimage/fskimg1.py
Python
py
995
no_license
from flask import render_template import io import base64 from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure @app.route("/mysuperplot", methods=["GET"]) def plotView(): # Generate plot fig = Figure() axis = fig.add_subplot(1, 1, 1)...
e09ab4f570dea19ed3eb35b96124036de92c5917
839177dbfd098fde3bb372718aa164f8515bc3d1
thebetterz/eightpuzzle
/eightpuzzle.py
Python
py
15,555
no_license
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_eightPuzzle(object): def setupUi(self, eightPuzzle): eightPuzzle.setObjectName("eightPuzzle") eightPuzzle.resize(939, 408) font = QtGui.QFont() font.setFamily("微软雅黑") eightPuzzle.setFont(font) self.init6 = QtWidget...
73fcdd0473fb0c3a6d563a8d03a77412b1b0ea21
030c135800f46ee2059935da03afd49c49a27455
UCLA-SEAL/QDiff
/benchmark/startQiskit_noisy63.py
Python
py
2,430
permissive
# qubit number=3 # total number=10 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collectio...
a42ae5c4be3d5dcd5837c3d26216488b3e8b8869
11cabbe90188db9fe0c92bd1a852edc3c657963f
smartaec/trimesh
/tests/test_gltf.py
Python
py
4,590
permissive
try: from . import generic as g except BaseException: import generic as g class GLTFTest(g.unittest.TestCase): def test_duck(self): scene = g.get_mesh('Duck.glb') # should have one mesh assert len(scene.geometry) == 1 # get the mesh geom = next(iter(scene.geometr...
10f7959ce0fbfde58b649f5d30630f3333a9f71a
5379841643b5f46b4ad6534f0b00b980cc428691
ttytango/scss-script
/directories.py
Python
py
681
no_license
"""Add or remove directories here within the square brackets to taste, or add any extra directories you want on a new line within dir_dict using the same format as below """ dir_dict = { "abstracts": ["_functions.scss", "_mixins.scss", "_variables.scss"], "base": ["_animations.scss", "_base.scss", "_typog...
450e9e1587481fdb32626bcc8526a55fe56f7eae
5a8b3f0806ff7bb30e9276d31568c99a4b42b0a7
xingjian215/DLFPCC
/data_process.py
Python
py
8,403
no_license
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import keras def load_data_at(): resultfile = np.loadtxt('abnormal.txt', delimiter=',', dtype=np.str) # 主叫号码转独热,170位 temp_ndarray1 = resultfile[:, 0:17] temp_ndarray...
ab17ba542bc82db09ed153788040086ff20cd6a5
bceee497f7100e3db91627558a9e867da012bd78
hackward/first_project
/first_project/__main__.py
Python
py
1,590
permissive
import argparse # pragma: no cover from . import BaseClass, base_function # pragma: no cover def main() -> None: # pragma: no cover """ The main function executes on commands: `python -m first_project` and `$ first_project `. This is your program's entry point. You can change this function t...
fdeacdc59a7d6356b79f0d1c9a7a07ce7788915e
88ec7567edf08e5dd87c95ac84530cacbf7895a8
ShirkeJR/PythonLearn
/Zajecia18.10.2017/zad3.py
Python
py
312
no_license
def fiboGen(): fib0, fib1 = 0, 1 yield fib0 yield fib1 while True: fib0, fib1 = fib1, fib1+ fib0 yield fib1 liczba = input("Podaj liczbe fibonachi: ") j = 0 listafib = [] for i in fiboGen(): listafib.append(i) if(liczba == j): break j = j + 1 print listafib
e9e78aff147b3a944ac1941478d1c3580f486618
22d8c713e459f2a2d2aeaeb61c9896b1eb8e8d51
andrewsheng2/super-py-gon
/CustomSplash.py
Python
py
1,529
no_license
# Splash screen for the Custom mode of the game import pygame as pg from Buttons import * class CustomSplash(): def __init__(self, width, height): self.width, self.height = width, height self.fontMedium = pg.font.Font('resources/font.ttf', 36) self.fontBig = pg.font.Font('reso...
640e4c569efa31698072bc639b10bb7902fd6292
9f216e07220a4d020739e1dff620f2ca0e7ea34e
MSD-LASSO/GNU
/GNU_code/old/old_2/filter_sig/filter_sig.py
Python
py
6,579
no_license
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph # Title: Filter Sig # GNU Radio version: 3.7.13.5 ################################################## if __name__ == '__main__': import ctypes import sys if sys.platform.startswith...
4d40d7126a2d77aadb71166985c508479e9c27c9
ecc3f93fa81993e2beeefdfb761fb0bba8520330
rperi/adversarial-robustness-toolbox
/art/estimators/classification/xgboost.py
Python
py
10,158
permissive
# MIT License # # Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2018 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation the # r...
e2f9f24f5abde781a5e16c3e099d68f0d0bbf988
10d70f4422b3058d57de2b72b54985ae34350151
MaryanneNjeri/pythonModules
/.history/frogjump_20200717122413.py
Python
py
306
no_license
# use the brute force approach then optimize # and test edge cases # o(n) def jump(X,Y,D): if X == Y: return 0 if D < 1: return 0 else: count = 0 while X <= Y: X = X+D count +=1 return count print(jump(10,60,40)
aa4ea4126613962bc4eacef1af7b700e97c0fdc4
3d4b277950ab4721842313ae26d930d1cd5fe8bb
fast3dd13sa/plotly.py
/packages/python/plotly/plotly/graph_objs/layout/scene/_xaxis.py
Python
py
95,709
permissive
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class XAxis(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.xaxis" _valid_props = { "autorange", ...
7a68f5089048663ca823316f6e6cee1373237a79
e704b45f7fa0093bf5cfbf1bc84a0291a8cf79f3
jrobnett/chiles-pipeline
/CHILES_pipe_phasecal_rerun.py
Python
py
35,398
no_license
# CHILES_pipe_phasecal_rerun.py # This module of the CHILES pipeline reruns the phasecal module # 9/21/16 DJP logprint ("Starting CHILES_pipe_phasecal_rerun.py", logfileout='logs/phasecal.log') time_list=runtiming('phase', 'start') # Step 1: Set default parameters (to match previous modules), and clean up old...
e6d794ad41df252629986e9f5f353f32c66380e2
17737478dd768e92118c8cc1dbd1bdd36c8c94a0
Code-Institute-Submissions/ms4-ecommerce-2
/profiles/views.py
Python
py
1,404
no_license
from django.shortcuts import render, get_object_or_404 from .models import UserProfile from .forms import UserProfileForm from django.contrib import messages from django.contrib.auth.decorators import login_required from checkout.models import Order, OrderLineItem @login_required def profile(request): """ User's ...
54e9822ce43c48324da360115b06d3b78648afd2
a34513684a017e079bf4b8b7b5e0ea9e71edb151
isaactolstoi/rtorrent-cleanup
/tests/test_rtorrent-cleanup.py
Python
py
3,448
permissive
import nose import bencode import rtorrent_cleanup from os.path import join, realpath, dirname, exists from os import remove import shutil PLACEHOLDER = "{{pathtotestenv}}" testsdirectory_path = realpath(__file__) testenvtemplate_path = join(dirname(testsdirectory_path), "testenv_template") testenv_path = join(dirname...
d02f5355930ac23e81adeff31ecf8594a3184860
ee727fd91fe565f307e5171ec2747021fbf3b21f
NFrajesh/FlendzzTask
/result_analysis_app/models.py
Python
py
863
no_license
from django.db import models from django.db.models.signals import post_save class Students(models.Model): name=models.CharField(null=False,max_length=100) rollno=models.CharField(unique=True,null=False,max_length=15) dateofbirth=models.DateField(null=False,auto_now=False,auto_now_add=False) def __str_...
fb3056b1d56af842382653ec45777254d5354d76
3641709807ace21f17ca4af8967d83313fad2f11
ppaanngggg/ParadoxTrading
/samples/fetch/crypto.py
Python
py
855
permissive
import diskcache from ParadoxTrading.Fetch.Crypto import RegisterSymbol, FetchDepth, FetchTicker print('--register symbol--') register = RegisterSymbol('binance', 'BTC_USDT') print(register) json_str = register.toJson() print(json_str) new_register = RegisterSymbol.fromJson(json_str) print(new_register) print('--fet...
68656cc1a1ed4462df0502cee350fbb2c9bbe68e
9a8e579ebd0078c609272ed0d7d3906f4e1b0617
ernesttsenre/home_accounting
/money/migrations/0023_auto_20160311_1712.py
Python
py
1,277
no_license
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('money', '0022_auto_20150608_1119'), ] operations = [ migrations.AlterField( mod...
bd2f4ad37b33f46d83c082a15893d7f9eae342ea
99a4fb5bb43fd798d0b500ccbf93fc27e35c3a77
AbstractCoder98/Rutanio-Electrum
/electrum/simple_config.py
Python
py
20,681
permissive
import json import threading import time import os import stat from decimal import Decimal from typing import Union, Optional from numbers import Real from copy import deepcopy from . import util from .util import (user_dir, make_dir, NoDynamicFeeEstimates, format_fee_satoshis, quantize_feerate) fr...
0b521c3df81a96baa36b324659ea1d7be57659ed
c705c079a3ffadbb09175c8fe634b8126609237b
zlav/ServerSetup
/database_load.py
Python
py
3,905
no_license
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Category, Base, Item, User engine = create_engine('sqlite:///shoppingcatalog.db') # Bind the engine to the metadata of the Base class so that the # declaratives can be accessed through a DBSession instance Base.met...
58d3095ae2d0bbea5455d9c65c9f76aad842c830
88fc5fbb62542d1c3c1bd0a18edb305bca5680f5
shimaomao/planb-cassandra
/planb/cli.py
Python
py
8,840
permissive
import re import click import logging from .common import boto_client, list_instances from .show_cluster import show_instances from .create_cluster import create_cluster, extend_cluster from .update_cluster import update_cluster from .remote_command import run_shell, run_nodetool, run_cqlsh def configure_logging(lev...
fd76889468e57edab8f168d6e3865e382390952c
9d19ab1412658871c57132daf5d3c40cc6047f72
davidespihernandez/graphql
/graphqltest/models.py
Python
py
776
no_license
from enum import Enum from django.db import models class Status(Enum): OPEN = 0 CLOSED = 1 class Master(models.Model): name = models.CharField(max_length=255) status = models.IntegerField( choices=[(c.value, c.name) for c in Status], default=Status.OPEN, ) deleted = models.B...
9656411b962962543da2677454257197b2f18e3b
9c443160abb87b64457c79c722f52c5680d93cdd
shankar7791/MI-10-DevOps
/Personel/Tejaswini/Python/15Mar/1winner.py
Python
py
565
no_license
# Function to find winner of an election where votes from collections import Counter votes = [item for item in input("Enter the list items : ").split()] votecount=Counter(votes) #Count the votes and stores in the dictionary print("Make Voter Dictionary with Conter: ",votecount) maxvotes=max(votecount.values())...
24f997c475c8f6013a9f388e87e2ff34c95eb60e
170b320ed30313f53c7bb2d4168d1dd70a014f81
HiFiSamurai/CCCP
/cccpIO.py
Python
py
1,390
no_license
import csv,sys,ConfigParser,os,gzip import lxml.etree as ET import cccpStructs as structs from datetime import datetime # Fetches config file for cccp. Quits if arguments are invalid. def getConfig(): if len(sys.argv) < 2 or ".cfg" not in sys.argv[1]: print "Usage: cccp.py configFile.cfg" sys.exit() cfgName = sy...
7d92e1166061461fe909d3c2f11ed4a190362d36
db459bbd7984094a33a60279c1ee1d1c937a8b6d
ChanganXLTZ/project_test
/P04/ex03_value.py
Python
py
297
no_license
# -*- coding:UTF-8 -*- #! /usr/bin/python3 # 赋值运算符 a = 1 print("初值:",a) a += 3 print("加3:",a) a -= 9 print("减9:",a) a *= 8 print("乘8:",a) a /= 2 print("除2:",a) a //= 3 print("整除3:",a) a **= 4 print("4次方:",a) a %= 2 print("余2:",a)
31b6b0fbf03e1695048be277811b396995e4d791
3238bd78cd55c21482817b9ba3bd1b85ad5fa914
danielpradilla/python-anagrams
/anagram_finder.py
Python
py
1,271
no_license
''' Find all anagrams from a dictionary file Find tuples of anagrams Calculate Levenshtein distance for word combinations and pick the highest ones ''' from collections import defaultdict from Levenshtein import distance dictionary = [] anagrams_index = defaultdict(set) with open('dictionary.txt') as f: for line i...
7c86a1c6b53f82b68331054f56747e9b83ee7458
fbdb8efc039106c3b603e98411fb807a982e65c7
scikit-hep/decaylanguage
/src/decaylanguage/modeling/ampgen2goofit.py
Python
py
5,361
permissive
#!/usr/bin/env python # Copyright (c) 2018-2023, Eduardo Rodrigues and Henry Schreiner. # # Distributed under the 3-clause BSD license, see accompanying file LICENSE # or https://github.com/scikit-hep/decaylanguage for details. """ Function that takes a filename of an AmpGen options file and either prints out or retur...
938987a6e1991141fd92ed452ebce35b570db1fd
fe38399cd9003654ca8bdba262f5d2dbd1fd9668
ryanhake/python_fundamentals
/02_basic_datatypes/1_numbers/02_02_days_seconds.py
Python
py
566
no_license
''' Write a script that takes in a number in days from the user between 1 and 1,000,000,000 and convert it to seconds. NOTE: We will use the input() funtion to collect users input. An example is demonstrated below. ''' # the input of the user will be saved in the variable days. # because the input() function collec...
71491b253b313d381587c93e51ad6fee0f8a680d
c982788f1449a5c69803dfbde09578b22cb67399
SaravanaPrashanth/PNG_to_JPG
/JPGtoPNGConvertor.py
Python
py
465
no_license
import sys import os from PIL import Image #received from user src_folder = sys.argv[1] dest_folder = sys.argv[2] #to check if the file exists!! if not os.path.exists(dest_folder): os.makedirs(dest_folder) #iterate through each element and change it to png for filename in os.listdir(src_folder): img = Image.open...
5501dda3d05a5097e8178de368f160b13685af5d
4dbfa5bdc5adde3a6ac6528ca3844d8c5cb222b5
shijianjian/kornia
/kornia/constants.py
Python
py
3,358
permissive
from enum import Enum, EnumMeta from typing import Iterator, Type, TypeVar, Union import torch from kornia.core import Tensor __all__ = ['pi', 'DType', 'Resample', 'BorderType', 'SamplePadding', 'TKEnum'] pi = torch.tensor(3.14159265358979323846) T = TypeVar('T', bound=Enum) TKEnum = Union[str, int, T] class _K...
ea6dfc4f5b49e9b911e00e7787392806506ec598
1f26e7419ba66e763c4c23ac331857a8b3f55e66
KevinVarney/BookExercises
/BookExercises/blankRowInserter.py
Python
py
1,026
no_license
#! python3 # blanRowInserter.py import openpyxl, sys, os if len(sys.argv) != 4: print('Incorrect number of arguments') exit(0) # Get command line parameters rowNum = int(sys.argv[1]) numRows = int(sys.argv[2]) wbName = sys.argv[3] # Open source workbooks wb = openpyxl.load_workbook(wbName) sheet = wb.get_ac...
6f65d56ca1fd29bf758b38abdcb116e02cf3dd2f
b285497ca60f5d54e3f6fddfa6f7669c70b7ad0b
pcfreak1201/e-Paper
/RaspberryPi_JetsonNano/python/examples/epd_2in66b_test.py
Python
py
3,775
no_license
#!/usr/bin/python # -*- coding:utf-8 -*- import sys import os picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic') libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib') if os.path.exists(libdir): sys.path.append(libdir) import logging from ...
529ba94ad0902a2a889caa03178592f0159ac79c
54da08f1b50ae34bb0eae7a1361a46be3902a39d
bkhoward/aciDOM
/venv/Lib/site-packages/cobra/modelimpl/hinventory/ctxcidr.py
Python
py
7,118
no_license
# coding=UTF-8 # ********************************************************************** # Copyright (c) 2013-2020 Cisco Systems, Inc. All rights reserved # written by zen warriors, do not modify! # ********************************************************************** from cobra.mit.meta import ClassMeta from cobra.m...
c69787d968132e181addca1aea0424ccfcc68d70
ff1f9950381481d1099445433a49420b294b4dd4
patallen/fiber
/example/tasks.py
Python
py
643
no_license
from example.models import CashFlowStatement import requests from example.worker import app import time BASE_URL = "https://financialmodelingprep.com/api/v3/financials/cash-flow-statement" @app.task def fetch_cashflow_statements(abbrev): time.sleep(1) return requests.get(f"{BASE_URL}/{abbrev}").json()["fina...
f63040dec7362a571af58f88a6cc5315aa6f4a29
0a31d592aef989c80bddfb1cea20cbfccf83c433
dr-dos-ok/Code_Jam_Webscraper
/solutions_python/Problem_1/225.py
Python
py
1,556
no_license
import sys def switch_count(engines, searches): switches = 0 unused = set(engines) for s in searches: if s in unused: unused.remove(s) if len(unused) == 0: switches += 1 unused = set(engines) unused.remove(s) return str(switche...
0fae74efc5fad408b6da67fac1beef0967b9096d
9ad5a5974d08b8d5d9132fdffd533c55fa8f511d
moustachio/lastfm-Crawler
/recovery.py
Python
py
774
no_license
import os import sys from dbSetup import * errorLogs = [fi for fi in os.listdir('.') if 'errorLog' in fi ] if len(errorLogs) != 3: print 'SOMETHING WRONG' sys.exit() latestEntries = [open(f).readlines()[-1].strip().split(',') for f in errorLogs] cursor = db.cursor() for entry in latestEntries: print entry user...
1e4eb737db2896adc4a6988e9efea9d5ce8c91a2
32d4cdb30f78095eaaab8fc2cae0b67247f58b9f
hiraditya/fool
/tensorflow/taxifare-trainer-model.py
Python
py
4,143
permissive
#!/usr/bin/env python # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
3958a854aa9fdb491806919bd91682a9fa8223a9
1f004fb83409fc99d561c3fb61095f34bc66e684
abreza/secure-delegation
/nodes/certificate-authority/models.py
Python
py
673
no_license
from peewee import * from x509_certificate import generate_x509 from os.path import exists db_name = 'db.sqlite3' database = SqliteDatabase(db_name) class BaseModel(Model): class Meta: database = database class Certificate(BaseModel): address = CharField(unique=True) public_key = CharField(un...
2b5053f26171da5fce7d8622d9fb8f37a46bf3bb
1f84e0bab541fdecdbd4b0a7246f2dbdb59b0d44
bunq/sdk_python
/tests/http/test_pagination_scenario.py
Python
py
2,762
permissive
from typing import List, Dict from bunq import Pagination from bunq.sdk.context.bunq_context import BunqContext from bunq.sdk.http.bunq_response import BunqResponse from bunq.sdk.json import converter from bunq.sdk.model.generated.endpoint import Payment from bunq.sdk.model.generated.object_ import Amount from tests.b...
1144766028f0d2096e85a2d85aca709abbb662fb
2f159300dcc7fa232d6117693bbcde62a80276eb
MartinsGabrielC/bud-batch-insert
/Model/Cycle.py
Python
py
1,367
no_license
class Cycle: def __init__(self, period, cadence, date_start, date_end, team_name, parent_period): self.period = period self.cadence = cadence self.date_start = date_start self.date_end = date_end self.team_name = team_name self.parent_period = parent_period @classmethod def fromlist(cls, list): retur...
4c85d92fced06eecfe868490c424bdb663e7c1bb
e4201be73c6228c7067066c8d8380db52bb307db
Logstay/CoisasEmprestadas
/coisasemprestadas/app/migrations/0002_coisa_usuario.py
Python
py
573
no_license
# Generated by Django 2.2.5 on 2019-10-04 01:42 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('app', '0001_initial'), ...
be6dfbbe6c68f6748704f2d3f2389a47748da928
c703969d2c4e16a1ae09a7d9781cb6b8c28fc4db
amoretti86/PSVO
/src/runner_flag.py
Python
py
13,158
no_license
import tensorflow as tf import tensorflow_probability as tfp import os import numpy as np from runner import main np.warnings.filterwarnings('ignore') # to avoid np deprecation warning os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" # to avoid lots of log about the device os.environ['KMP_DUPLICATE_LIB_OK'] = '...
a86bd1196105c45c5fc85b69990432c2e9937cb7
50697d30629a4487b6dd8c38c829479f9fe4cd1b
BiaoChan/LearningPythonCrashCourse
/python_work/moive_tickets.py
Python
py
283
no_license
while True: age = input("How old are you? ") if age == "": break age = int(age) if age <= 0: break elif age <= 3: print("Watch moive for free") elif age <= 12: print("You have to pay 10 dollers for the movie") else: print("You have to pay 15 dollers for the movie")
56b0ad86e0705b72ee1fcd873e60009d21c5648b
2f2d638ce40b3d8f66622c0a5333f6d74df393af
YukunGrantZhang/Basic-Machine-Learning
/Bayesian Logistic Regression Single Weight Set.py
Python
py
3,732
no_license
# -*- coding: utf-8 -*- """ Created on Mon Dec 14 13:02:52 2020 @author: Grant """ import numpy import math #simplistic example with n = 1 data = [[1, 3], [2, 4], [3, 5], [4, 3], [5, 8], [6, 3], [8, 1]] B = 7 alpha = 0.1 w = [0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8] #spread c out evenly between 1 ...
ea84b6ab46c3ec68f13da153020d6606f7852325
b9d670c0125f43290ae152fa288e91817f6cd64b
MaxIV-KitsControls/netspot
/netspot/views_netmagis.py
Python
py
3,805
permissive
# -*- coding: utf-8 -*- """Views.""" from __future__ import unicode_literals import operator import nm_helper import cdb_helper import netspot_settings from django.shortcuts import render from django.contrib.auth.decorators import login_required from .lib.spotmax import netspot @login_required def netmagis(reque...
e33839eb0caeabbcf74599250cb22321a20e49d3
085e517bd8a9f8f1b7ebd99d86f4b7d596c26f0a
Jlevjean/SFT-Protocol
/scripts/deployment.py
Python
py
1,070
permissive
#!/usr/bin/python3 import itertools from brownie import * def main(token_contract=SecurityToken): kyc = accounts[0].deploy(KYCRegistrar, [accounts[0]], 1) issuer = accounts[0].deploy(IssuingEntity, [accounts[0]], 1) token = accounts[0].deploy(token_contract, issuer, "Test Token", "TST", 1000000) iss...
023a0ed7ab453f4faf1d25c89c1b4db455af41e5
f95560bc93a80f1e4b6121571716734eee2cca34
gabry247/linee-guida-cataloghi-dati-dcat-ap-it
/src/conf.py
Python
py
9,733
permissive
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # -- PROJECT Variables ---------------------------------------------------- settings_project_name = "Linee guida per i cataloghi dati" settings_copyright_copyleft = 'AgID - Agenzia per l\'Italia Digitale' settings_editor_name = 'AgID - Agenzia per l\'Italia Digitale' sett...
8ed98e9f29324ae35450ffc3a35e6f3a83a80986
fb2f691c15e32e9a6e1ac5341738d85e631fe6c8
Bruce98/MxshopDjango
/apps/user_operation/serializers.py
Python
py
1,143
no_license
from rest_framework import serializers from .models import UserFav from rest_framework.validators import UniqueTogetherValidator from .models import UserLeavingMessage from goods.serializers import GoodsSerializer class UserFavDetailSerializer(serializers.ModelSerializer): goods = GoodsSerializer() class M...
407af871f7891ae012c2cc2bc43cb4a57305d79e
cf7b2ecf65bd9da1b9bbaed07202d23e19175484
Lcrypto/CGO2019-AE
/fb-tc/fb-w-tuning/input_tccg_5.py
Python
py
974
permissive
# tccg-5 import time import tensor_comprehensions as tc import torch lang = """ def tccg5(float(G, E, A, C) L, float(D, F, G, B) R) -> (O) { O(a, b, c, d, e, f) +=! L(g, e, a, c) * R(d, f, g, b) } """ print ("tccg-44: O(a, b, c, d, e, f) +=! L(g, e, a, c) * R(d, f, g, b)") print ("(a,b,c,d,e,f,g) = (24,16,16,24,16,1...
b2de6041cf99965dd1a907745e7da02cd0824a77
f947410448899052ba33442084333dc00a7150f7
ryonzhang/dl-supertuxkart
/tournament/utils.py
Python
py
9,184
no_license
import pystk import numpy as np class Player: def __init__(self, player, team=0): self.player = player self.team = team @property def config(self): return pystk.PlayerConfig(controller=pystk.PlayerConfig.Controller.PLAYER_CONTROL, kart=self.player.kart, team=self.team) de...
f282817f8f33bdc3377d67ee3bb3c41ea81f5e7f
0ae91504a59118b71aab26c66a52a04671360fc8
Constantine19/ecec-412-fall-2018
/NewPipelineCPU/helper/mips.py
Python
py
5,605
no_license
""" Generates mips bytecode from assembler Author: Anshul Kharbanda Created: 12 - 7 - 2018 """ from sys import argv from functools import reduce from re import compile # ------------------------------ REGISTER HELPER ------------------------------- # Register regular expression register_regex = compile(r'\$([a-z]+)...
ae0151429d3fcc00f790e089d96e3b5e229af0c4
a5cc50f52b41ef74637619fab05559fdc4b19627
TPMSCEPRPG2018/rpg-engine
/plugin_quitable.py
Python
py
253
no_license
import pygame from plugin_core import Window __all__ = ['QuitableWindow'] class QuitableWindow(Window): def on_event(self, event: pygame.event.EventType): super().on_event(event) if event.type == pygame.QUIT: exit()
4f1552d3ee88de337258ecabd656cabd71d59b26
a61f5309f8ba34a66983a6ff437e69afe268a753
DAC2020-AI/RobustnessResilienceDNN
/models/tidigits/tidigits_gru.py
Python
py
2,257
no_license
import numpy as np import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms from torch.autograd import Variable from dl_models.models.tidigits.tidigits_utils import * import operator as op from dl_models.models.base import * import h5py import sys import num...
1360bed197e844c0299549e59abb7c91b3b4de26
e67f62cc646f791fbc1cfa79c0a4fb36b1753d37
xueyuanl/leetcode-py
/problems/1217_minimum_cost_to_move_chips_to_the_same_position.py
Python
py
361
no_license
class Solution(object): """ a quite confused problem """ def minCostToMoveChips(self, chips): """ :type chips: List[int] :rtype: int """ even, odd = 0, 0 for i in chips: if i % 2 == 0: even += 1 else: ...
9c27443ff3f3a7364ada781d1f9cca2381497484
852cbfbd1c2f94f05fdca0803e78224ebd2530e1
bgz10/System_Integration
/Week 45/Python/app.py
Python
py
379
no_license
import requests import json headers = {'content-type' : 'application/x-www-form-urlencoded'} data ={'email':'sm@lrd.com'} url = "https://w3certified.com/easyid/signup.php" headers = {'content-type': 'application/x-www-form-urlencoded'} response = requests.post(url=url, data=data) try: print(response.json()) exce...
d749bd8f43bad182cbcf19172606c773a0fd09e7
f8cceb969680e44811296e735bda860d7a04ac7c
pramttl/tstl
/generators/randomtester.py
Python
py
35,210
permissive
import os import sys # Appending current working directory to sys.path # So that user running randomtester from the directory where sut.py is located current_working_dir = os.getcwd() sys.path.append(current_working_dir) import sut as SUT import random import time import traceback import argparse from collections imp...
9f850ce458085a6e6f0cf10d79a09bf01a204cd8
92709c8efa0d7d839f43ddfa7ea7b555748b10bd
jhon-palma/vicitimas
/victimas/apps/beneficiario/migrations/0044_auto_20170225_1619.py
Python
py
609
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2017-02-25 16:19 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('beneficiario', '0043_auto_20170225_1612'), ] operations = [ migrations.RenameField(...
89f916fa81c07116ffed2edb09fcbc5c7aad3227
4e5e8501508fc167bc4b965063823bd2657b3602
thisisyusuf/gaffer
/python/GafferSceneUI/SceneInspector.py
Python
py
76,292
permissive
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
a84b80bfd68bf0ce0337245ab26ea286a95e5e31
b96727c570379a6b70c00d588cfa8311f3127730
Utsabab/online-bookstore
/manage.py
Python
py
672
no_license
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'online_bookstore.settings') try: from django.core.management import execute_from_command_line ex...
3a8d629da08087bbfc3ed8ea441664b4781e759d
d4cc5273d470ed88de8b0caf1331f0c12d62bb6c
kevin510610/Book_Python-Tensorflow_PoWen-Ko
/ch11-MYSQL/04MySQL_delete-update.py
Python
py
816
no_license
#!/usr/bin/env python # -*- coding=utf-8 -*- __author__ = "Powen Ko, www.powenko.com" try: import MySQLdb # pip install MySQL-python except: import pymysql as MySQLdb # pip install MySQLdb db = MySQLdb.connect(host="127.0.0.1", user="admin", passwd="admin", db="mydatabase...
5e97a6d9a4c7ed7a8c16ef17ca5dc69ddb98e9eb
b6b6c0a00e2e326a2134611c4851d609b1349845
fuyineva/COMP9021
/Assignment/z5097690@unsw.edu.au3.files/perimeter.py
Python
py
931
no_license
# Written by *** for COMP9021 # Insert your code here import sys open_file = input('Which data file do you want to use? ') try: f = open(open_file,'r') except FileNotFoundError: print("Your file not be founded,give up") sys.exit() def jisuan(l): s=0 for m in l: x=m[0] y=m...
3ce761703e4afa70f71eb724acafc6aeb9bc57b7
ee202f64468d8bbad2495f1953aa3e36bca6a3c3
DakshChan/DQN-CF
/test.py
Python
py
5,054
no_license
# -*- coding: utf-8 -*- from time import * import random import game as cf import numpy as np from collections import deque from keras.models import Sequential from keras.layers import Dense from keras.optimizers import Adam from keras.losses import huber_loss from keras import backend as K EPISODES = 2001 class DQNAg...
7aa25d08cbd5dcf4f03ad3ec88c200bbcff9e21d
599f06578c00c7e131e026d82b6978a60bedb2a8
D4RK-PH1N1X/EmailBomber
/emailbomber.py
Python
py
2,262
no_license
#!/usr/bin/python #E-bomber #This code for education purpose only. #Use it at your own risk !!! import os import smtplib import getpass import sys import time print ' ' print ' ' pri...
912f72d5ebe070f29633111169cf7177ed3bbb54
b72e0d03020726b25473c64c125ea183a963422e
abhinay-b/Leetcode-Submissions
/wrong_answer_codes/Partition_Equal_Subset_Sum/Partition Equal Subset Sum_294081756.py
Python
py
372
no_license
class Solution: def canPartition(self, nums: List[int]) -> bool: if not nums: return True nums.sort() total = sum(nums) if total % 2: return False mid = total/2 count = 0 i = 0 while count < mid: count += nums[i] ...
00005058e1f0b5ed4250aefede3ecfcd2acaf065
7b11fccab3a11c8539d35cad9b0bdca5541f1ee4
thony242/vumi
/vumi/transports/smpp/processors/sixdee.py
Python
py
6,727
permissive
# -*- test-case-name: vumi.transports.smpp.tests.test_sixdee -*- from vumi.config import ConfigInt from vumi.components.session import SessionManager from vumi.message import TransportUserMessage from vumi.transports.smpp.processors import default from twisted.internet.defer import inlineCallbacks, returnValue def ...
80dbf3d03376a4822c214f61e1f37f057fd05a37
3dc9699a4699b6a6d329e7be495dceb8fba751e4
josephsdavid/MYO-Transfer-Capstone
/src/old/stateful2.py
Python
py
1,709
no_license
import tensorflow as tf import numpy as np import utils as u import callbacks as cb from tensorflow.keras.layers import Input, Dense, LSTM from tensorflow.keras.optimizers import SGD from tensorflow.keras.models import Model from tensorflow.keras.callbacks import Callback, EarlyStopping, ModelCheckpoint from tensorflow...
4c4fe8f467bd168c6a8743054516cec808561ce2
57984a0e47863b673c7dbcb1359526d5ea397553
ksomemo/Competitive-programming
/atcoder/abc/105/B.py
Python
py
255
no_license
def main(): N = int(input()) ans = f(N) print(ans) def f(N): for f in range(25+1): for s in range(14+1): if (f * 4 + s * 7) == N: return "Yes" return "No" if __name__ == '__main__': main()
27417f1dc310f5c41d0773b09498c8f25948b3df
2569bdca4ac7b90d32f919409adc4b9c08c2c8ca
rid47/lecture4
/api.py
Python
py
317
no_license
import requests url = "https://api-football-v1.p.rapidapi.com/v2/predictions/157462" headers = { 'x-rapidapi-host': "api-football-v1.p.rapidapi.com", 'x-rapidapi-key': "9b353d1bc4msheb1f6e0bd8ea6ddp1c5536jsn8c1bd9bfef20" } response = requests.request("GET", url, headers=headers) print(response.text)
1877afeaad25905933c70aa20ed5574c4ece99f3
c2f6482040cc760807b3d9a373519ff35c55eeb8
gtsueng/mark2cure
/mark2cure/task/relation/serializers.py
Python
py
2,438
permissive
from .models import Relation, ConceptDocumentRelationship from rest_framework import serializers from . import relation_data_flat class RelationCereal(serializers.BaseSerializer): def __init__(self, *args, **kwargs): context = kwargs.pop('context', {}) self.sub_dict = context.get('sub_dict', None...
c9a748aefcf5f7fd399de8a4ecc2d26a7650e035
d9dd94a3522890fb36a113b58760a3f74fcdc53d
dnoonan08/CalibrationScripts
/ChargeInjection/adcTofC_linearized.py
Python
py
4,874
no_license
# Import tools from ROOT import * from math import sqrt import sys import re from array import array import os import string import sqlite3 as lite import csv #from linearADC import * gROOT.SetBatch(kTRUE) nominalMapping = { 1 : 4, 2 : 4, 3 : 4, 4 : 4, ...
dc75fcdee52cd2ef972a25f259d2fb09b7ca0122
2dc40491b6ea69439e5b06889b3f2800b9909158
BackupTheBerlios/codehack-svn
/trunk/lib/codehack/server/__init__.py
Python
py
798
no_license
# Copyright (C) 2004 Sridhar .R <sridhar@users.berlios.de> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This p...
70564ec9a9e70e0f8420fefff26d749c6681fa47
0ebe380d083667b11f1609d5924e4f7900c82421
fjsanguino/INLR
/code/parser.py
Python
py
1,693
no_license
from __future__ import absolute_import import argparse def arg_parse(): parser = argparse.ArgumentParser(description='DLCV TA\'s tutorial in image classification using pytorch') # Datasets parameters parser.add_argument('--train_dir', type=str, default='../data/train_data_waterloo', ...
2b7f447ea592a90476721dbf6c77e5bac9a0d509
48f960bdb817b12dc0a2185eeb258ec5a49d03f1
lijw97/188P1-Pacman
/search/searchAgents.py
Python
py
24,612
no_license
# searchAgents.py # --------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley...
26436a5f8a9659f3f29040dd60c59e701c8810f0
229328871ff544466d01acbc6aa319a13d437b45
RuturajSutar/Rest-API-Project
/test.py
Python
py
621
no_license
import requests BASE = "http://127.0.0.1:5000/" a = 10 # data = [{"likes" : 10 , "name" : "Ruturaj" , "views" : 100}, # {"likes" : 100 , "name" : "Tony" , "views" : 1000}, # {"likes" : 1000 , "name" : "Stark" , "views" : 10000}, # {"likes" : 10000 , "name" : "Sutar" , "views" : 100000}] # # f...
b5a2bf23101ffaa2798d02e73fe7c5ba2580e716
6394d7ca64ae5bdf4183d6e407a5b6045306af0a
chalkchisel/django-tastypie
/setup.py
Python
py
1,551
permissive
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup setup( name='django-tastypie', version='0.11.0.bolster1', description='A flexible & capable API layer for Dj...
5b8a844f359eb1f5cbc12079d54e9c0b71ac3b65
f0c4dedac2055f01f9d8547138850732d0998801
gofr1/django-practise
/myproject/myproject/settings.py
Python
py
3,741
no_license
""" Django settings for myproject project. Generated by 'django-admin startproject' using Django 3.1.7. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathl...
f969590d3c8a96c6fc1a11abc30344b9f8de9d9c
3f024473b6687baa134b71e4e6434eb0092f4256
rafal55/my-site
/to_do_list/admin.py
Python
py
415
no_license
from django.contrib import admin from .models import DueDate, Task # Register your models here. class TaskInline(admin.StackedInline): model = Task extra = 3 class DueDateAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields':['due_date',]}), ('Tasks', {'fields':['task_text',],'classes...
886272211fd34618cf0eb92b2a175ee2f2bb71c2
e4862660e8caf796e30eec8c423e571ce7292f58
xyzhou-puck/self-critical.pytorch
/captioning/models/FCModel.py
Python
py
8,939
permissive
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import * from . import utils from .CaptionModel import CaptionModel class LSTMCore(nn.Module): def __init__(self, opt...
12bbd83a41a0f04642359aec1cf9a4c1b08bc8ce
321cff3be0565abb1c04d2c6102d0d0953438f07
mengqiDyangge/HierKD
/configs/atss/distill_featuremap/atss_r50_fpn_1x_coco_zsd_sfl_fp_be_not_fix_l1_max_pt3_ns_0.1_iou.py
Python
py
1,978
permissive
_base_ = [ '../../_base_/models/atss_r50_fpn_zsd.py', '../../_base_/datasets/coco_zero_shot_detection.py', '../../_base_/schedules/schedule_1x_zsd.py', '../../_base_/default_runtime.py' ] # log log_config = dict( interval=50, hooks=[ dict(type='TextLoggerHook'), dict(type='Tens...
0bbbd630bde4b0ed344896494f3a181354d14d85
31901acaabf21d20c857023e9acd6e3fcc283bf3
wahello/gesdatos
/ZuheGesdatos/src/login/Correo.py
Python
py
1,062
no_license
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText class Correo: __username ='gesdatosud@hotmail.com' #poner correo que enviara el email __password ='gesdatos2015' #password del correo __server= smtplib.SMTP('smtp.live.com') def ...
cf9a76211a69edc38d2a7693cfc41090cece23cc
e3223d0c07f1729baf4a8ffd0878dc7f77b6fc3f
lawrencesiao/twpowercompetition
/tmp8.py
Python
py
525
no_license
type 2 7 other arrive_month 8 other stname stname_梧棲 stname_淡水 stname_臺中 stname_蘇澳 stname_鞍部 stname_高雄 ['梧棲','淡水','臺中','蘇澳','鞍部', '高雄'] cate_fs = ['type','magnitude','stname',\ 'double_kill','arrive_month'] cont_fs = ['hpa','wind_speed','r10_km','duration_h','p2','p5','p6',\ 'p7','pole_counts','people_total','area',...
3444536fd9aec694597274beb2a5e437d2cb8dc4
d9303d32cb3cf4b1751e51d0d75db71d374fd028
RPCSX/xed
/pysrc/regmap.py
Python
py
3,763
permissive
#!/usr/bin/env python #BEGIN_LEGAL # #Copyright (c) 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
2365ad29fa960b189853abd330206af7eba176a9
00d335911425dd7d02acf8f66b1f0d2d42ef25b8
xxxfly/PythonStudy
/ProjectBaseTest1/python核心编程/03-linux系统编程/01-进程/05-Process创建的子进程和主进程的结束.py
Python
py
828
no_license
# coding:utf-8 from multiprocessing import Process import time #fork 只能用于 Unix/Linux,不能在windows执行 #multiprocessing模块可以实现在windows上执行多进程 # def test(): # for i in range(5): # print('--test--') # time.sleep(1) # #等待子进程 都结束,主进程才能结束 # p=Process(target=test) # p.start() #让这个进程开始执行test函数里面的代码 def test(...
1cba2f019b508f24c64d7efc829b7b4b785bc4e3
49b93a8b78199b6e3f1d660489b88e74812cd585
AlexCPU7/task-1
/technics/templatetags/poll_extras.py
Python
py
646
no_license
from django import template register = template.Library() @register.filter(name='overload') def overload(value, max): remainder = int(value) - int(max) if remainder > 0: try: overload = round(100 / int(max) * remainder, 2) return 'Перегруз составляет ' + str(overload) + '%' ...
3e52b5bc79c483534228d5c0ccc64a535d9b2c7b
ed6d231f9ca4849865f5dba4731af6eb89c8f13e
tonysimpson/pointbreak
/pointbreak/debugger.py
Python
py
26,080
permissive
from __future__ import print_function, absolute_import import os import sys import signal import struct import time import re import distorm3 import intervaltree from elftools.elf.elffile import ELFFile from elftools.elf.enums import ENUM_D_TAG from elftools.dwarf.descriptions import describe_form_class import ctypes i...