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
6041e49950fcf9e9b38ffba25bc93e94f804e06e
32a0f20512de28f0e75fcbf599786c896453fd3f
hvv1616/wechat-django
/wechat_django/utils/wechat.py
Python
py
413
permissive
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from wechat_django.patches import WeChatClient def in_wechat(request): """判断是否时微信环境""" ua = request.META["HTTP_USER_AGENT"] return bool(re.search(r"micromessenger", ua, re.IGNORECASE)) def get_wechat_client(wechat_app): """:...
39b39d0b43a9312c7744c5ba777d07bea4626c52
e8e11f17d73d0e9a2e9681a114e74d3460075e35
MarsStirner/nvesta
/setup.py
Python
py
1,875
no_license
#!/usr/bin/env python # -*- coding:utf-8 -*- import os try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='nvesta', version='0.2', url='https://s...
5512975c3f82be38855218cf14bc8f76a6a358b5
cc4d2dc8ad82ba18ea64af053558d9be62ae737f
akabhi5/Website-API
/v1/videos/serializers/video.py
Python
py
1,675
permissive
from django.core.exceptions import ValidationError from django.utils import dateparse from rest_framework import serializers from rest_framework.serializers import ModelSerializer from ..models.playlist import Playlist from ..models.video import Video class VideoSerializer(ModelSerializer): class Meta: f...
f144a9ba4a7475b0e0fdd5936c8c345afcd2998b
aa0ae1897ff9869efeea865e8c46c68fbfd8f951
superstar54/xcp2k
/xcp2k/classes/_cutoff_calib4.py
Python
py
363
no_license
from xcp2k.inputsection import InputSection class _cutoff_calib4(InputSection): def __init__(self): InputSection.__init__(self) self.Min = None self.Max = None self.Delta = None self.Eps = None self._name = "CUTOFF_CALIB" self._keywords = {'Min': 'MIN', 'Max...
088e96515f003eee2a6a56dfd74dcf315b4156d5
ac00aeb9135bd6ecb31937c67701420886ec4a11
dirkonet/verkehrsbot
/app.py
Python
py
778
permissive
""" This script runs the application using a development server. """ import bottle import os import sys # routes contains the HTTP handlers for our server and must be imported. import routes if '--debug' in sys.argv[1:] or 'SERVER_DEBUG' in os.environ: # Debug mode will enable more verbose output in the console ...
16ab4cad496081df7aaa6fc040998c673404dca5
8dcc30d99c42e76e7d0932657fa28e2630926f35
papaspiro/jail-manager
/sandbox.py
Python
py
4,472
no_license
#ra = ResidentialAddress(county="rr",address_area='Tema',address_locality='comm3',address_street="lovehill",address_housenumber ="1234") #pa = PostalAddress(country="ghana",city="accra",zipcode="0000",box_number="563") ''' @app.route('/upload', methods=['GET', 'POST']) def upload(): if request.method == 'POST': ...
6fe90ab4fa1cf7d775db35046ce6c4b77646aa1a
a7c6027de9b61bc5d7250705d39854cb51ccbf3d
ChaseDuncan/brats2020
/scheduler.py
Python
py
833
no_license
from torch.optim import lr_scheduler class PolynomialLR(lr_scheduler._LRScheduler): def __init__(self, optimizer, max_epoch, power=0.9, last_epoch=-1): self.max_epoch = max_epoch self.power = power super(PolynomialLR, self).__init__(optimizer, last_epoch) def _decay_rate(self): return (1 - self.l...
aec7bcc55de6cca5de90e1a424b180e77476dc22
379c691765ad54d9747c35bfaac540b459efc0b4
StivenMetaj/MNR_MUSCIMA_Notes_Recognition
/maskrcnn-benchmark/maskrcnn_benchmark/config/paths_catalog.py
Python
py
8,096
permissive
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """Centralized catalog of paths.""" import os class DatasetCatalog(object): DATA_DIR = "datasets" DATASETS = { "coco_2017_train": { "img_dir": "coco/train2017", "ann_file": "coco/annotations/instances_trai...
165c55b4d2fd2b9ad2421ff441988399395f8ec6
03a3788238f9ae06681fc4977b8af7fa832438b4
MariomarinS180/Act04_py_ListasEnlazadas_Git
/Actividad04_PythonListasEnlazadas/ListasEnlazadas.py
Python
py
2,410
no_license
''' Created on 11/10/2019 @author: Marín ''' class Nodo: def __init__(self, dato): self.siguiente = None self.info = dato def verNodo(self): return self.info class Temperatura: def __init__(self): self.primero = None def intertarTemperatura(self, dato): tempora...
f5e5bd86224118b098a66ea713f48339bb92eb78
f819fbaa68095940eaec9e700eb5990098553856
alyswidan/HeroUDP
/clients/udt_client.py
Python
py
1,329
permissive
from socket import * from helpers import get_stdout_logger # from packet import * # import logging # # from receivers import UDTReceiver # from senders import UDTSender # TODO: Bug-> sometimes client doesnt run till the end logger = get_stdout_logger('client') BUFFER_SIZE = 508 clientSocket = socket(AF_INET, SOCK_D...
fea2e5e493e0453dac2afb08fb2ae35e96ab0995
bd52c08920604f77807513f9ecf71a960bee3c26
hahahardik/Python-Misc
/PHY201 - Waves and Optics/DrivenOscillator.py
Python
py
1,617
no_license
# -*- coding: utf-8 -*- """ This script solves ODE for damped oscillator. Play with the parameters in "Edit parameters here" section. """ #%% Load packages import numpy as np import os import matplotlib.pyplot as plt import numpy.matlib from scipy.integrate import odeint #%% Define differential equation d...
5adf674a0f6ad67cf280387bd9eb9e20cff10495
ebf1797ace7d7072e3a06b0dbd223f045f64fcb3
Ascend/ModelZoo-PyTorch
/ACL_PyTorch/built-in/audio/Conformer_for_Pytorch/om_val.py
Python
py
14,011
permissive
# Copyright 2023 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
350b8aa9e6c95629484d0978655b313868e34a19
a6e963142e306edf942490625488d1e571391cbb
maofeng1709/Malphago
/Malphago_Q_learning.py
Python
py
3,092
no_license
''''''''''''''''' * Author : FENG Mao * Email : maofeng.fr@gmail.com * Last modified : 2018-02-16 16:42 * Filename : Malphago_Q_learning.py * Description : ''''''''''''''''' from flask import Flask, request, session, render_template, jsonify from flask.ext.session import Session app = Flask(__name__) app...
a27b1b99028fcbf77e9a7091197e7f400e71b1d3
66b73bedf4c1903ffd746b6d2e10d0a9d0f99358
boyhagemann/ccxt
/python/ccxt/async/__init__.py
Python
py
12,719
permissive
# -*- coding: utf-8 -*- """CCXT: CryptoCurrency eXchange Trading Library (Async)""" # ----------------------------------------------------------------------------- __version__ = '1.12.121' # ----------------------------------------------------------------------------- from ccxt.async.base.exchange import Exchange ...
e25de1f035ddd1fa7edb8242886da7251176453a
94296b0308849034e00154da1c0a31a086ea211d
noeul1114/deca
/todaycomment/migrations/0001_initial.py
Python
py
731
no_license
# Generated by Django 2.0.6 on 2018-06-30 03:36 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Comments', fields=[ ('id', models.AutoField...
3d67ef7caecef5f98ecc9b074eba0f1c0fd2f3d4
20dc81d866c515dcf10a893f08736eb50bce4ef2
isaiahiyede/lookfab
/general/forms.py
Python
py
1,210
no_license
from django import forms from django.contrib.auth.models import User from general.models import UserAccount from general.modelchoices import * # from tinymce.models import HTMLField from general.models import UserAccount, Category, Item attrs3 = {'class': 'form-control', 'required': 'required'} class DateInput(form...
cd61d40233efd0b5abe881ae5d0be110d41eac6b
3860f8ff13377ebf24f29242a9784e0bbd504526
WEZARD/FantasyBasketball
/FantasyBasketball/wsgi.py
Python
py
412
no_license
""" WSGI config for FantasyBasketball project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("D...
0a61273ba4db7c2b8c222ca6a211c059a3961cdd
4d098ee02ee932989299bdc39333578953a268ff
Riddhi023/Shah.Drashti_InternshipTasks
/python day10/myapp/migrations/0001_initial.py
Python
py
703
no_license
# Generated by Django 3.1.7 on 2021-06-10 12:22 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Employee', fields=[ ('id', ...
1125b0242330b973543d8b4e5c5275a2ae9e7873
8d8a11750d610d707abde427e7eeda604a17e2c6
algaebrown/scSecretome
/scSecretome/sc.py
Python
py
4,439
no_license
import numpy as np import pandas as pd # import annotation from scSecretome.annot import * import scanpy as sc from sklearn import preprocessing sc.settings.verbosity = 3 # verbosity: errors (0), warnings (1), info (2), hints (3) sc.logging.print_versions() sc.settings.set_figure_params(dpi=80) def read_...
ead7965e07b155bf04c0db2d27f33a5e3d49d38c
2349ca4f29859e30d7e42566c87f102526f14ae5
praveen97uma/ift6390_machine_learning_fundamentals
/documents/week_5/utilitaires5.py
Python
py
2,414
permissive
# coding=utf-8 import matplotlib import numpy as np import matplotlib.cm as cm import matplotlib.mlab as mlab import matplotlib.pyplot as plt from matplotlib import ticker import pylab def gridplot(classifieur,train,test,n_points=50): train_test = np.vstack((train,test)) (min_x1,max_x1) = (min(train_test[:,0...
2a5068f6e2a6ec7aca3a9eeb5cfe7c30a2076c35
84c2eea99e420c5eac9943ae7d93702b54542bb5
sominw/Face-Classifier
/src/extract_img_example.py
Python
py
653
no_license
import os import pymongo import argparse import gridfs parser = argparse.ArgumentParser() parser.add_argument('-person', type=str, default='Arvind Kejriwal') parser.add_argument('-label', type=str, default='positive') parser.add_argument('-part', type=str, default='train') args = parser.parse_args() conn = pymongo.M...
e2317103d6e7f10187158dc1c7d18c62410a94cb
60f285a6fec03f9d1a4895e0c0b78b4137313321
ChinnoDog/docker-sign-verify
/docker_sign_verify/gpgsigner.py
Python
py
3,020
permissive
#!/usr/bin/env python """Classes that provide signature functionality.""" import logging import io import os import tempfile from pathlib import Path from typing import Any import gnupg from .signer import Signer LOGGER = logging.getLogger(__name__) class GPGSigner(Signer): """ Creates and verifies dock...
4ee9429bb7495d175bca03b68537aedfe24b7f1c
9a53d7c2d0a30312bc96d58313b89da895ad329e
ac427/strava
/activities_stream_runs.py
Python
py
3,282
permissive
#!/bin/env pyton3 """ Plots strava data of last month runs """ import os import math from stravaio import strava_oauth2 from stravaio import StravaIO from matplotlib import pyplot as plt SECRET = os.environ['STRAVA_SECRET'] TOKEN = strava_oauth2(client_id=55889, client_secret=SECRET) CLIENT = StravaIO(access_token=...
b5b8997a04061460a8b2350dbadc736c61eebdf3
6213e5c19dd0049c042a48d095b4c4c7e5610a19
bherta/benchmarks
/scripts/tf_cnn_benchmarks/preprocessing.py
Python
py
32,675
permissive
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
48afe5943258e2aa6bcfffb7fa62451b56825aa3
16278b6dbce1a4e15982a442c2ff3d8ea741ec5a
rjenc29/numba
/numba/core/compiler.py
Python
py
29,139
permissive
from collections import namedtuple import copy import warnings from numba.core.tracing import event from numba.core import (utils, errors, typing, interpreter, bytecode, postproc, config, callconv, cpu) from numba.parfors.parfor import ParforDiagnostics from numba.core.errors import CompilerErr...
6afa1f2ead39bf14efc0ea2bd215aa0ada7c5e0d
827eaca12dd883a20de22d028bae7328eef68442
xiaoxue11/python_basic
/property方法/04_use_property_decorate.py
Python
py
619
no_license
class Celsius: def __init__(self, temperature=0): self._temperature = temperature def to_fahrenheit(self): return (self.temperature * 1.8) + 32 @property def temperature(self): print("Getting value") return self._temperature @temperature.setter def temperature(...
62f68b0452743c3fc8cd2aca61f70c68a1f84029
0ec8873cc0724feeac6e46acd011b024afcaaa57
AHeise/flink
/flink-python/pyflink/fn_execution/datastream/window/window_operator.py
Python
py
24,465
permissive
################################################################################ # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this...
16c5a884071332301f14da9f8bc32ef833b1cc05
2ec3724ac6f254c0c02f55861ad8f8feb3d6824c
gamayos/AACNN
/inference.py
Python
py
2,261
no_license
import os import numpy as np from time import gmtime, strftime from image_ops import get_image, save_image, save_images def generate_image(aacnn): """ Postconditions: saves to image file Args: aacnn: AACNN output_file: path to save image file [test.png] """ FLAGS = aacnn....
b378596d103057f789e75948953aa2ee61ccba80
d46c79ddf9531209edf7d993cb1b8e3d08a3aabc
artic-network/fieldbioinformatics
/artic/deprecated/filter_clusters/tagfastas.py
Python
py
3,547
permissive
#!/usr/bin/env python import sqlite3 import re import sys import os.path from Bio import SeqIO import json import subprocess from StringIO import StringIO """ go through the runsamples look up sample get fasta spit it out into a bin """ from collections import defaultdict samples = json.load(open('samples.json')) ...
b0a742e06aa54040bde79c18f3f5bb259f72f868
73824c9cd0d997733bb1c18b650afafca8118672
PatrickSys/pokemonGame
/pokemon/Pokemon.py
Python
py
5,589
no_license
import math import random import re import requests import json from pokemon.moves import Moves, create_mov class Pokemon: def __init__(self, name, types, moves, hp, attack, defense, speed, strengths, weaknesses, base_xp): # save variables as attributes self.name = name self.types = typ...
b5b6309eebe77010c34ce418c44e9bb3985562c3
8d6837a6bf645bf73dc54116cea6041004d8651e
sgudz/performance-qa
/ci/fuel-qa/fuel_tests/tests/test_scale_shaker.py
Python
py
535
no_license
import os import pytest from fuelweb_test.helpers.shaker import ShakerEngine @pytest.mark.scale_shaker class TestScaleShaker(object): def test_run_shaker(self): """OLOLO! Scenario: 1. Ololo Duration ololoshechka Snapshot mr. ololoshka """ path_to_run_...
8ee5e1e822715f76455cb91bcd492f777c6e3e5b
23d3f62004489737a456e67762aca05074af9828
zenzx/chatwithu
/chat/views.py
Python
py
393
no_license
from django.shortcuts import render # Create your views here. def login(request): return render(request, 'chat/login.html',) def room(requests, room_name): requests.encoding='utf-8' if 'user' in requests.GET and requests.GET['user']: return render(requests, 'chat/room.html', { 'room_na...
7d3d920e99644d094589ea5da9ff58f8513a3280
bd3f86baef6daa828cb385c606ccbf8c2c373fb3
yxh1990/fueltools
/fueldb/db_backup.py
Python
py
1,056
no_license
#!/usr/bin/env python # -*- coding:utf-8 -*- #author yanxianghui import sys import os from lib import utils #1.判断必须是否传递备份文件名称 if len(sys.argv) < 2: print("you must set backupfilename!") sys.exit() #2.判断设置的备份文件名是否已经存在 filename = sys.argv[1] if os.path.exists(filename): print("%s already exists,plea...
762648eb4f8899513d44a1754531666a1d96ffd1
d4080b882660898b48b2fbdf32c7a7c2033fdf0d
laughingwb/CloudClass
/account/views.py
Python
py
3,958
no_license
from django.shortcuts import render from django.contrib.auth import authenticate from django.core.exceptions import ObjectDoesNotExist from django.template import RequestContext from django.contrib.auth.models import User from .models import UserDetail from django.contrib.auth.decorators import login_required from dja...
189803ebc953afa25ccde2bcfa5be09321994014
30a55c5b022782ebd8a3145ea96c4dfcdecd9d91
TrafalgarSX/graduation_thesis_picture-
/histogramChart.py
Python
py
386
no_license
import matplotlib.pyplot as plt # 直方图 # frequencies ages = [10,20,30,40,50,60,70,80] #setting the ranges and no. of intervals range = (0,100) bins = 10 #plotting a histogram plt.hist(ages, bins, range, color = 'purple', histtype = 'bar', rwidth = 0.8) plt.xlabel('age') plt.ylabel('No. of people') #plot title plt.ti...
66ac9538b02651390e81b580fbde0fa5785e58ac
1ec9e26108952048cfe55c0051165c67799c6bd7
ppwwyyxx/pytorch
/torch/cuda/nvtx.py
Python
py
2,317
permissive
from contextlib import contextmanager try: from torch._C import _nvtx except ImportError: class _NVTXStub: @staticmethod def _fail(*args, **kwargs): raise RuntimeError("NVTX functions not installed. Are you sure you have a CUDA build?") rangePushA = _fail rangePop =...
501039815f86ca951057722cb965997e8585433b
a959c8ca4a228d7ea583d86297a5501206af7939
eljlee/hb-ratings-lab
/seed.py
Python
py
2,729
no_license
"""Utility file to seed ratings database from MovieLens data in seed_data/""" from sqlalchemy import func from model import User from model import Movie from model import Rating from model import connect_to_db, db from server import app from datetime import datetime def load_users(): """Load users from u.user i...
9a711effd21391dfb60365a56776aa1469d712d7
55b45c6bf79d78f0f9b1dceae7e5a98db05fab1b
beren5000/ghosttown
/imagemap/applications/user_profiles/models.py
Python
py
3,409
permissive
import importlib from random import randint from PIL import Image, ImageOps from datetime import datetime from django.db import models from django.contrib.auth.models import User from django.utils.text import slugify from utils.utils import Master from django.utils.translation import ugettext_lazy as _ from sorl.thumbn...
ebe6acf9f4a71d4dfb4cddd3a71ab8ea10f10616
f2f7d77093ffa36a3bb90ccbae4c8a4009adbef5
SaifulAbir/django-js-api
/feedback/migrations/0001_initial.py
Python
py
1,714
no_license
# Generated by Django 3.0.3 on 2020-11-15 11:42 from django.db import migrations, models import p7.validators class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Feedback', fields=[ ('...
7414563343f60c10413c4070cb1f0164e7e4396e
0f5776044e57a6a926ae7f9137194882d6c38b5e
fredericosachweh/amostra2
/demonstrations/migrations/0001_initial.py
Python
py
7,133
no_license
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Demonstration' db.create_table(u'demonstrations_demonstra...
1e3baf4c5f39bb279765684f405f5ce4abdf9147
3a326ee262e38b7297a51cf9a2d8a3a23734ed45
SimonVu1208/Web_app
/Web_app/urls.py
Python
py
1,081
no_license
"""Web_app URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.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...
f13128e8895596bb791cf64e1b5544001e8cc4a2
47b0308ddf3614b16bc9fc9d295fa431c636f8aa
yufeiminds/ucloud-sdk-python3
/ucloud/services/udb/client.py
Python
py
63,883
permissive
import typing from ucloud.core.client import Client from ucloud.services.udb.schemas import apis class UDBClient(Client): def __init__(self, config: dict, transport=None, middleware=None): super(UDBClient, self).__init__(config, transport, middleware) def delete_udb_log_package( s...
db87aed1dc82a66ae84d2a130d6431a0ff7dbcae
cf8d26e17acaddedb71ab03a87d9da72dfe20e74
hfoffani/play-docker
/ws-server.py
Python
py
415
no_license
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket class SimpleEcho(WebSocket): def handleMessage(self): # echo message back to client self.sendMessage(self.data) def handleConnected(self): print self.address, 'connected' def handleClose(self): print self....
771e3f81db0157c990f2f98b1b306240b856e3cb
a121a67c3c9ba3ee5b528b6d262c952a08bc3af5
Onyejekwe1/deca-wallet
/deca_wallet_main/urls.py
Python
py
813
no_license
"""deca_wallet_main URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/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') Cl...
ce880e85a46e3574b7a3658aef6f114ff8a4f197
647c215151b413196b5ed4782d13ef555833fab2
youngmo87/hello
/deep/0417-03.py
Python
py
1,155
no_license
import struct # labelFile = open("./data/t10k-labels-idx1-ubyte", "rb") # def writeCsv(name): labelFile = open("./data/" + name + "-labels.idx1-ubyte", "rb") imageFile = open("./data/" + name + "-images.idx3-ubyte", "rb") csvFile = open("./data/" + name + ".csv", "w", encoding="utf-8") magicNo, label...
d8badbf3f29143668bc5fa70df57deecd10672a5
b36abfa7c3c6730964ec076e3242090a5922f731
lzhang1/python30
/sample/multiprocess3.py
Python
py
682
no_license
#!/usr/bin/python # -*- coding: utf-8 -*- from multiprocessing import Pool import os,time,random def long_time_task(name): print ('Run task %s (%s)...' % (name, os.getpid())) start = time.time() time.sleep(random.random()*3) end = time.time() print('Task %s runs %0.2f seconds.' % (name, (end - star...
96d9e26f4e9086dbd460d8cb95b4f750e9f5d1df
6942deacf71ff666068b5e1f36e7164454b63b59
nlitsme/pyidbutil
/tstbs.py
Python
py
300
permissive
def binary_search(a, k): # c++: a.upperbound(k)-- first, last = 0, len(a) while first<last: mid = (first+last)>>1 if k < a[mid]: last = mid else: first = mid+1 return first-1 for x in range(8): print(x, binary_search([2,3,5,6], x))
780bf4a4f31be828129291b4e4598ca8f23bf657
52b7d2b3904935848be08c2cdb6eb41f22e81004
Lab603/PicEncyclopedias
/jni-build/jni-build/jni/include/tensorflow/python/kernel_tests/sparse_serialization_ops_test.py
Python
py
6,687
permissive
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
667814fd114290dae9db9d0d4c9eaac5936f83fd
ee2d522cf8f3a5bb22bf0c4f3140e9858bf18134
JulianOrlowski/LieDetectionExperiments
/data_analysis/features_extraction_from_db_phone.py
Python
py
27,738
no_license
#!/usr/bin/python # This code is a compliment to "Covert lie detection using keyboard dynamics". # Copyright (C) 2017 Riccardo Spolaor # See GNU General Public Licence v.3 for more details. # NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. import MySQLdb import sqlite3 import json import ast import pandas as...
ce8e6e65c2d15ef389f133d4857ae13a900ddf67
9aed79e0a333762b9301764e9c5d096e67b37036
StackStorm-Exchange/stackstorm-vsphere
/actions/host_get.py
Python
py
2,966
permissive
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
a0807252c73828298ee0b339a216f5997b8ac107
ec7620ed58a49496302e70af932a2a44cc561aa9
Tryweirder/googleapis-gen
/google/cloud/retail/v2/retail-v2-py/google/cloud/retail_v2/services/product_service/transports/base.py
Python
py
7,220
permissive
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
dff6a97b1182cf8c3916fecf3e188e4af198470d
0d9b6bf0091d6fb05228b0038e4cc730541c6370
theXtroyer1221/Cloud-buffer
/env/Lib/site-packages/bcrypt/__about__.py
Python
py
1,320
permissive
# Author:: Donald Stufft (<donald@stufft.io>) # Copyright:: Copyright (c) 2013 Donald Stufft # License:: Apache License, Version 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:/...
874108f5851b5b01a486a22173d3856a45b48c59
a79b563207737ace2769e904acefb272e57b78da
xyh-cosmo/EoS_plots
/JW9/ks_tests/ReadMock.py
Python
py
750
no_license
import sys,os from pylab import * def read_jla_mock(snfile): jla = [] fp = open(snfile,'r') lines = fp.readlines() for l in lines: snname,z,mu,mu_std,mu0=l.split() sn = [] sn.append(float(z)) sn.append(float(mu)) sn.append(float(mu_std)) sn.append(float(m...
4d888a0f37b973c57b043af79e8e94da42000ce8
e7793a95f99023d69c8547a5c697a263b1a5ccb3
MelJan/PyDeep
/pydeep/base/basicstructure.py
Python
py
27,868
no_license
""" This module provides basic structural elements, which different models have in common. :Implemented: - BipartiteGraph - StackOfBipartiteGraphs :Version: 1.1.0 :Date: 06.04.2017 :Author: Jan Melchior :Contact: JanMelchior@gmx.de :License: ...
c80b6aabba337bba19083ef721dced7b276adcfc
10e58fa1888725d9b43428ea87fd153919d1de20
dktim/autoops
/autoops/execute/tasks.py
Python
py
712
no_license
from celery import task import time from shelltask import shelltask,para_conn from execute.salttask import salttask from execute.salttask import saltModuleTask @task def file_task(a,b): time.sleep(10) c=a+b return c @task def shell_task_by_celery(task_name,tgt,cmd): t=shelltask(task_name,tgt,cmd) ...
6ad091624a54d39f51001812f208067cae87f949
1e9a5f6813a0971de20f84b8b2b3550b7e3f8759
OmniZ3D/tpDcc-dccs-maya
/tpDcc/dccs/maya/api/__init__.py
Python
py
56,365
permissive
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains functions and classes related with Maya API """ from __future__ import print_function, division, absolute_import import os import logging import maya.cmds import maya.OpenMaya import maya.OpenMayaAnim import maya.api.OpenMaya import maya.api.Op...
c53e065bd68d52d49977615b1baa3317e15b130f
d3bb37f1d84f6a5b959537cd89acee972bce2ede
isabella232/personfinder
/app/create.py
Python
py
17,159
permissive
# Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
4caeb616858921fe2d1acfe47eab0df29f04779d
ec063705528ffd365bd5662bd3667f22d76bb4ec
bigdatamatic/Analytics
/Django/bigdatamatica/numapp/models.py
Python
py
547
no_license
from django.db import models # Create your models here. class HousingData(models.Model): crim = models.IntegerField() zn = models.IntegerField() indus = models.IntegerField() chas = models.IntegerField() nox = models.IntegerField() rm = models.IntegerField() age = models.IntegerField() ...
ddb88410cd757729e3bec47522b5c937245b4c36
026c88cae50deb824d30cb75a35c9d5b9c38dedf
774133886/learn
/python/内置函数/test_base64.py
Python
py
318
no_license
import base64 def safe_base64_decode(s): res = s + b'=' * (len(s)%4) resB64 = base64.urlsafe_b64decode(res) return resB64 # 测试: assert b'abcd' == safe_base64_decode(b'YWJjZA=='), safe_base64_decode('YWJjZA==') assert b'abcd' == safe_base64_decode(b'YWJjZA'), safe_base64_decode('YWJjZA') print('ok')
378f2e136294a2a5fa0789d4a63f20bf5e5be840
bd6e9a78696cb2ae3980f16b39cb1ef800f539f5
matheusvictor/estudos_python
/curso_em_video/mundo_03/ex115/lib/arquivo/__init__.py
Python
py
2,740
no_license
from time import sleep from curso_em_video.mundo_03.ex115.lib.interface import * def arquivoExiste(nome_arquivo='repositorio.txt'): try: print('Localizando arquivo de dados...') sleep(1) arquivo = open(nome_arquivo, 'rt') arquivo.close() except FileNotFoundError: print(...
a574b8b440013a55be6aeda807d55b28b2239797
5838f84de27bd13df8db12e0edd96d1b421ee301
MolSSI/QCEngine
/qcengine/programs/util/hessparse.py
Python
py
1,705
permissive
import math import re import numpy as np from qcelemental.exceptions import ValidationError from qcelemental.util import filter_comments def load_hessian(shess: str, dtype: str) -> np.ndarray: """Construct a Hessian array from any recognized string format. Parameters ---------- shess Multili...
751299858c5dad508b5c0845cd0ee18b69d0c9bc
234530cdc812c7324da504add2e48c71b92c6a19
amandamorris/codewars
/convert-to-camel.py
Python
py
917
no_license
def to_camel_case(text): """Converts a string to camel case, returns the converted string # returns "theStealthWarrior" to_camel_case("the-stealth-warrior") # returns "TheStealthWarrior" to_camel_case("The_Stealth_Warrior") """ if not text: return "" newstring...
077ee20962126f9b5727284e6a2fd341ecd7c36d
ce96c6c120b20f869004e786e0797c63ea0aa3c1
shamanthaka/mypython_work
/day03/list_iter.py
Python
py
370
no_license
friends = ["Kevin", "Karen", "Jim", "Venkatram","Srijan"] def iter1(): for i, val in enumerate(friends): print(i, val) def iter2(): iter = friends.__iter__() while True: try: print(iter.__next__()) except StopIteration: break if __name__ == '__main__': ...
19b1d7df1116e5ed9c8630ddb819aa8994381dcb
056a8a6d83814ce31bfbcf0ebc7774b7382452f2
jod35/keep-notes
/notes/migrations/0001_initial.py
Python
py
662
no_license
# Generated by Django 3.1.3 on 2021-03-07 22:55 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Note', fields=[ ('id', models.AutoField(aut...
e13dc9e60feaadfc6e310ea7b1115b6d8eb47cfe
6fdbfe7f4b876dd3676f85062770247e87a19424
lgior/apollo_ammonites_lunar_landing_nmadl
/minimum_working_example_model_based_DQN.py
Python
py
7,680
no_license
""" Minimum working example to train a Lunar Lander Agent using a DQN algorithm Apollo Ammonites - NMA Deep Learning 2021 Team members: J. A. Moreno-Larios Haoqi Sun Giordano Ramos-Traslosheros Requirements: xvfb - X-display for headless systems python-opengl - for movie rendering ffmpeg - for...
64cc845aafc183244e555a1729a1c0ee0885e705
8f11676bb211ce1b7a980ae232d55c86f0dae051
hungborung/exercise
/prj3/app/views_staff.py
Python
py
4,413
no_license
from django.shortcuts import render, redirect from .models import * from django.views.generic.edit import CreateView, UpdateView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from or...
67bc7e9d269f8109db8cc5a6049197e916176273
9d24ba90aa4880d19948f53cf5ff6fdc8340bf4e
codaxor/Billboard-hit-song-predictor
/logistic_regresion.py
Python
py
787
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: codaxor """ import pandas as pd import matplotlib.pyplot as plt import numpy as np data = pd.read_csv('appended_songs.csv',index_col=0) X = data.iloc[:,4:].values y = data.iloc[:,2].values from sklearn.model_selection import train_test_split X_train,X_te...
54993fb22f3bab3950e24c9f84141aef842deacd
51080ffb75571b74684552ac6d6750efb7ddc915
swj0418/Selenium_Web_Scrapers
/TextQuery/NaverQ2/core.py
Python
py
5,002
no_license
from bs4 import BeautifulSoup from threading import Thread import requests from requests import Request import time import sys import os NAVERIN = 'https://kin.naver.com/' QNA = 'qna/' LISTING = 'list.nhn?' DIR = 'dirId=' # NAVERIN + QNA + LISTING + DIR + DIRIDs ENGINES = [] class Query_Engine(Thread): Req = requ...
da9fb5b77d280449ee792a3bee9d7d104197552f
bbadc1f2d0d16138e86ed58214b2ee7787923eba
Isopach/LeetCode
/Python/hamming-distance.py
Python
py
503
no_license
class Solution(object): def hammingDistance(self, x, y): """ :type x: int :type y: int :rtype: int """ x = bin(x)[2:].zfill(100) y = bin(y)[2:].zfill(100) #super hacky way to getting past length mistmatch assertion assert len(x) == len(y), "Hou...
99ae935b4d625b417d94db67c8c28caea6e6f230
ed93e3989c1789bd9b0c7740bb5834c962045976
biadasiewicz/pyNotes
/tests/test_note.py
Python
py
360
no_license
import note from datetime import datetime text = "hello #tag1 #tag1 #tag2 #tag_3" def test_tags(): n = note.Note(text, datetime.now()) assert(n.is_tagged('tag1')) assert(n.is_tagged('tag2')) assert(n.is_tagged('tag_3')) def test_equal(): ts = datetime.now() n1 = note.Note(text, ts) n2 = n...
d464ed14bed8dcdd9c25bb694fd5e10b02db181b
990bb7cc84730e6a09c4a294af2cdd55afb7e4e1
prateekmaj21/Python-Programs
/1. Loan Feasibility Determination/Loan Feasibility Determination.py
Python
py
3,801
no_license
#Loan Feasibility Determination #Check if paying back a certain loan is possible #Based on loan interest rate and monthly payments the user wants to make def get_loan_info(): #Getting the basic information about the loan loan={} #User input #These are important inputs we have to tak...
2821d8ab1913e2d509ead04f53d41898e6b64dc3
1ab985a076181aa1bf5caa67ac49a0bade1eb87d
paik11012/Algorithm
/lecture/day08_0827_stack2/01.py
Python
py
1,162
no_license
TC = int(input()) #테스트 횟수 for tc in range(1, TC+1): data = list(input().split()) #공백기준 나눈 후 리스트로 변환 n = len(data) #반복횟수 stack = [] result = 0 errorFlag = False #예외발생여부 for i in range(n-1): #연산식 만큼 반복 #숫자이면 스택에 저장 try: if data[i].isdigit(): #숫자냐? sta...
09116f47582564e8a4abccc6af28439a1ab027f8
96906072be698dfdf703806e24b6e776eb53f649
thaReal/MasterChef
/codeforces/round_638/beauty.py
Python
py
1,281
no_license
#!/usr/bin/python3 # Codeforces Round 638 # Author: Daniel Ruland # Problem B Phoenix and Beauty from collections import deque def read_int(): n = int(input()) return n def read_ints(): ints = [int(x) for x in input().split(" ")] return ints #--- def solve(n,k,a): if k == 1: if len(set(a)) != 1: retur...
23219170ac9d30dc7c2cad188028ce51b05b2a27
2c9a1ed661f8103fcec39c3cae7e50c79bd883de
bertbuchholz/Blender-2.5-Exporter
/presets/render/MY_Default_Preset.py
Python
py
1,643
no_license
import bpy scene = bpy.context.scene scene.render.use_color_management = False scene.gs_ray_depth = 2 scene.gs_shadow_depth = 2 scene.gs_threads = 1 scene.gs_gamma = 2.2 scene.gs_gamma_input = 2.2 scene.gs_tile_size = 32 scene.gs_tile_order = 'random' scene.gs_auto_threads = True scene.gs_clay_render = Fal...
81fc1d16c1f1dd8b3bb5b3df0afbe797d6556cb7
99b2868c013b420ac43a9d9c701aaf488844b417
VeraZen/alpha
/MOLO/dip_calculator_page.py
Python
py
1,176
no_license
class DipCalcPage: def __init__(self, browser, url=None): self.browser = browser if url: self.browser.visit(url) @property def driver(self): return self.browser.driver @property def company_button(self): return self.browser.find_by_xpath('/html/body/div[...
3e8e7fdaea2116fb4fd04939a4b335302505d4f0
456dad2e939fd9820b7cc871af57c577a432b75e
ohtack/ARIMA_implementation
/dfTest.py
Python
py
524
no_license
#Results of Dickey-Fuller Test def dfTest(data): from statsmodels.tsa import stattools adfuller = stattools.adfuller(data) print('ADF Statistic: {}'.format(adfuller[0])) print('p-value: {}'.format(adfuller[1])) print('Critical Values:') for key, value in adfuller[4].items(): print('{}: ...
966021ee00a14df6899ad59dc58988df3d77fa39
46cf2b3fd9e1f6734d073bbceb395e3b68391faf
liqi0126/FTP_server
/autograde.py
Python
py
3,600
no_license
#! /usr/bin/python import subprocess import random import time import filecmp import struct import os import shutil import string from ftplib import FTP credit = 40 minor = 3 major = 8 def build(): global credit proc = subprocess.Popen( 'make', stdout=subprocess.PIPE, stderr=subprocess.PIPE) whil...
2b95d4569e773859d629b78b8d15506f5f68a064
b01a0d05602dc1ebcf2bf31b05cac07e680d7c6d
ikibalin/cryspy
/cryspy/A_functions_base/function_1_objects.py
Python
py
3,205
permissive
"""Module realized some operations with python objects """ from types import FunctionType def get_functions_of_objet(obj): """Get list of object function. """ ls_out = [] l_method = [_1 for _1, _2 in type(obj).__dict__.items() if ((type(_2) == FunctionType) & (not(...
ed0781909fad892873a4124215a44d577d231c1e
afedd5dac41298df7bf998e6a5e5f3efec5e7b74
sylos/grongusgame
/grongusRoom.py
Python
py
2,199
no_license
#GrongusRoom2 #For room stuff import GrongusCharacter class Room: #name,x coords, y coords, energyCost,discovered,canContainGrongus,icon def __init__(self,name,x,y,energyCost,discovered,canContain,icon): self.name = name self.roomCoords = {'x':x,'y':y} self.energyCost = energyCost self.discovered = discove...
1a2bbe90478aa4b59a048a6293d7455d057ea2b4
13f387eb8ca33c44efca39180a1e64ff45a5e7fd
CrissAlvarezH/CrudAwsS3
/testbackend/wsgi.py
Python
py
399
no_license
""" WSGI config for testbackend project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_S...
e74454e9c601eae703f639701164aaa8c0a374e3
0596b047cf2052bf189f60c6a2551968a91afe12
JacobCross/newsbie
/taxonomyGetter.py
Python
py
2,638
no_license
#WHEN RUNNING THIS FILE - MUST RUN AS: # > sudo python3 newspaperTester.py import newspaper import datetime import urllib import json from operator import itemgetter, attrgetter from newsbie_config import * from url_lists import * base_url = "http://gateway-a.watsonplatform.net/calls/url/URLGetCombinedData?extract=p...
2af039962b3bcbeea20fc49b2f780786892f520a
1c134ef865048252bd22a28c86c3c39dfb8feb14
DanieleGravina/ProceduralWeapon
/client/tuning_single_weapon/old_single_weapon/simulation_50_kill/Costants.py
Python
py
1,274
no_license
# num bot in the server side NUM_BOTS = 2 INITIAL_PORT = [3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 3750, 3751] PORT = INITIAL_PORT #num of server NUM_SERVER = 10 MAX_DURATION = 3600 GOAL_SCORE = 40 TIMEOUT = 1000000 #1200 : 8 (MAX_DURATION / GAMESPEED) NUM_PAR = 10 ############### # Weapon ###### #######...
f529099ede236f7d85176e07efaff9a331ff6a00
37da449834868b87f598f3f78bcd9e1dc0351a55
xiaol/news_api_ml
/graphlab_kmeans/timed_task.py
Python
py
977
no_license
# -*- coding: utf-8 -*- # @Time : 16/12/23 上午10:37 # @Author : liulei # @Brief : 定时任务 # @File : timed_task.py # @Software: PyCharm Community Edition from util.doc_process import get_postgredb from redis_process import nid_queue from graphlab_kmeans.kmeans_for_update import chnl_k_dict #定义取用户点击的循环周期 period = ...
a2e8c378b4ff8eef79981a84481d69361b3210df
c0251da294a43ca9b5705fad8cafb8003c7d5cd9
qubit-finance/algostudy
/w6/M139.py
Python
py
1,869
no_license
""" 139. Word Break Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words. Note that the same word in the dictionary may be reused multiple times in the segmentation. 1 <= s.length <= 300 1 <= wordDict.length ...
5a84466671bd0ad88b131681bef003a5b6544a7c
a0d45c856fb4f30e26c297782a8e9aa0d605230a
gubatron/AoC
/2021/4.py
Python
py
2,964
permissive
import aoc # Giant Squid (Bingo) input = aoc.readFileToStringList("4.1.txt") bingoNumbers = list(map(int, input[0].split(','))) # filter out empty lines, then split each line by spaces and convert to int lists bingoBoardsData = list( map(lambda line: list(map(int, line.split())), filter(lambda line: len(li...
91229bb1db58ac339e1bd68596b606241c5a3f59
0553912a0b2cea3eb63d94cb39d20c351a803f2d
breusens/Drawing
/quaternioDFT.py
Python
py
3,176
no_license
import os import numpy as np import matplotlib.pyplot as plt import cv2 #sum(x[n]exp(-i*2pi*k*n/N),n,0,N-1) #sum(x[n,m]exp(-i*2pi*k*n/N)exp(-j*2pi*l*n/N)) def QFT(A0,Ai,Aj,Ak): ha=A0+(1j)*Ai hb=Aj+(1j)*Ak H1=np.fft.fft2(ha) H1=np.fft.fftshift(H1) H2=np.fft.fft2(np.fliplr(hb))#j H2=np.fft.ffts...
ad0ce9c6dd5e9570b199ee93c5ae9bacce95a16f
0fc6492b009636a86d48a6e63f947ce0595e4fa8
cyrilpawelko/poolstarmon
/micropython/main.py
Python
py
3,532
no_license
# Thanks to https://github.com/cribskip for its help import uos,machine,binascii,socket,time from umqtt.robust2 import MQTTClient from machine import WDT uart = machine.UART(2) uart.init(10000, bits=8, parity=None, stop=1, timeout=90) myFrame = bytearray(200) watchdog = WDT(timeout=60000) # 1 min timeout s = socket....
4cfddbbb02bc5fe721101e8e3a0899c74cb2f3a2
99cf7d06e7fc83a4259f899c9d99a7945ae58538
rohanaggarwal7997/Studies
/Python new/classes.py
Python
py
265
no_license
class Enemy: life=3 def attack(self): print('Ouch!') self.life-=1 def checklife(self): if self.life<=0: print('I am dead') else: print('Not dead') enemy1=Enemy() enemy1.attack() enemy1.checklife()
b81ea201879924f20256e8eed3aee0c06333bb32
7c59d1d3df46d4aa85852a0f93341b22f8c39a12
tmt514/maze-game
/PokeFight/maze/migrations/0002_auto_20161203_1908.py
Python
py
930
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-03 19:08 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('maze', '0001_initial'), ] operations = [ m...
62191e38b1383b4834abc20644d171c8717549a1
9a105f96ace1a699cf5ecb24ef62dc81c174ad89
zyy1504189051/fangs
/fang/ihome/api_1_0/demo.py
Python
py
556
no_license
# coding:utf-8 from . import api from ihome import db, models # import logging from flask import current_app @api.route("/index") def index(): #print("hello") # logging.error() # 记录错误信息 # logging.warn() # 警告 # logging.info() # 信息 # logging.debug() # 调试 # current_app.logger.error("erro...
fe56f6e2cc990622aca3172df9606ecb46c1e86d
dafdc58e8991c67a632bbe469f9ad1c37cddb988
TimPchelintsev/moonshot
/tests/test_trade_date_validation.py
Python
py
32,907
permissive
# Copyright 2018 QuantRocket LLC - All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
5fc1c24c6d4c207e2fc40231f0cd044e513a7cd4
095e0acf9ab90d36856931dbbd4cf6a15e0aec3d
leen19-meet/YL1-201718
/Project/agario.py
Python
py
6,111
no_license
from turtle import * import turtle import time import random import math from ball import Ball turtle.tracer(0) turtle.hideturtle() writer= turtle.clone() writer.penup() writer.goto(250,250) writer.pencolor("red") writer.shapesize(100) turtle.bgcolor("gold") RUNNING = True SLEEP = 0.05 SCREEN_WIDTH = turtle.getcanvas(...
0f53d25441bab545663df7b799ee92699c7ac51b
5164fd0d8e1e224bb5a99f34c1fbb538db7ff376
Bonjuor-zyx/OCGGS
/examples/resnet.py
Python
py
9,843
permissive
import os # os.environ["CUDA_VISIBLE_DEVICES"] = "0" import taso as ts import onnx import argparse import re def resnet_block(graph, input, strides, out_channels): w1 = graph.new_weight(dims=(out_channels,input.dim(1),3,3)) t = graph.conv2d(input=input, weight=w1, strides...
698938aa1800fe79b331d2b624de3ee8b3017885
39dc3675c8b443ec76dee1c0495f6e884d825d63
thomaslzb/warehouse
/warehouse/settings.py
Python
py
5,718
no_license
""" Django settings for warehouse project. Generated by 'django-admin startproject' using Django 3.0.9. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os ...
241fa44bdcece90552a255537054150f961cdef2
0f25641131825d3a041a1c93ab69c40c685048f3
Liwei-Master/Today-s-Release
/spider/News_spider/News_spider/MyUtils.py
Python
py
861
no_license
# -*- coding: utf-8 -*- # @Time : 2018/1/19 9:54 # @Author : 蛇崽 # @Email : 643435675@QQ.com # @File : MyUtils.py(工具类信息) import datetime import hashlib import random import re import time from lxml.html.clean import Cleaner class Util(): @classmethod def to_md5(self, target): if isinstance...
ed4ae03e423b84c5e5f3ddf19290538e3cd36895
ec2ff9a6b00182e997332456546fd532adfcd1ac
marcomix54/server-client-python
/samples/list.py
Python
py
1,684
permissive
#### # This script demonstrates how to list all of the workbooks or datasources # # To run the script, you must have installed Python 2.7.X or 3.3 and later. #### import argparse import getpass import logging import tableauserverclient as TSC def main(): parser = argparse.ArgumentParser(description='Get all of ...
05a7e20a5efb2bf1fb468704192350e4661267d4
1230aab8938fd56801f6e9c5a9dd68fa7ecf61d1
arunkumar0606/Projet_Chatbot
/chatbot_tutorial/form/admin.py
Python
py
338
no_license
from django.contrib import admin from django.contrib import admin from .models import Feedback class FeedbackAdmin(admin.ModelAdmin): list_display = ('date',) list_filter = ('date',) search_fields = ('Ce que vous Pensez de MrBot:',) class Meta: model = Feedback admin.site.register(Feedbac...
ce651677caab325164f1521ec2477befdc37dbf7
63b1a48b569cf43ab10dd90929d7e2dffb9d999e
sandipansaha1/IPL
/.history/iplApi/urls_20210501230901.py
Python
py
895
no_license
"""iplApi URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.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 ...
e0f28e0e5d6224ab61142865e1b0badf917be52f
9f1cffc54a6ff58a3b9565f31dee8250401087fe
Koyomin21/OOP-Tic-Tac-Toe-with-Minimax-Algorithm
/main.py
Python
py
362
no_license
from Game import Game from os import system, name import os def clear(): # for windows if name == 'nt': _ = system('cls') # for mac and linux(here, os.name is 'posix') else: _ = system('clear') def main(): clear() game = Game() game.run_menu() clear() ...
f6b90e83074e84f0a240e389db0fa6298edc7320
2309bbc7a3989f6695d406d68ae625ea9e01ac3e
madeleinedaly/spatchwork
/twitter.py
Python
py
4,488
permissive
import segment as s import keys import sqlite3 import time, urllib, traceback, tempfile, os, re from cStringIO import StringIO import tweepy auth = tweepy.OAuthHandler(keys.twitter.api_key, keys.twitter.api_secret) auth.set_access_token(keys.twitter.access_token, keys.twitter.access_secret) twitter = tweepy.API(auth, ...