blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3db853acfe41b60b78264833c7ff7b4581ec5633 | f39e2ac29cc69118565af006940b6f3032b5e59d | /CEN4010/AudioFeatures.py | 95a082dfdf95e16629f8757a91452bad9b7dea50 | [] | no_license | AmShei57/SchoolWork | 252ceeeaa581b6927d19801627f6616bf188653a | 1809ecdbece48c76c7a982b1fe02dfc3242832d9 | refs/heads/master | 2023-05-27T20:40:39.973184 | 2021-06-07T07:43:22 | 2021-06-07T07:43:22 | 374,553,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,380 | py | AudioFeatures.py | import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
import spotipy.util as util
cid ="3f0e293f3d364d33911339833af8a563"
secret = "bdf5575475844f67b956986517f76e5e"
username = "aminspects"
redirect_url = "http://localhost:8888/callback"
client_credentials_manager = SpotifyClientCredentials(client_id=cid... |
de96ff8dc206a43334adf41d6a524bf8ed1bc61a | 5b74ef9c89002d80e5529e06971fb56f400f6fd4 | /GetRabbitDump.py | 603e89d62afe8690c02babf672e004c01b8a9bf7 | [] | no_license | Mr-P1nqu3/RSA-NetWitness-Scripts | 424e72a31d9cfde3987ce5c865288e17497bd46b | 46913ad5066003f4213eea27bea7d4aa49a8b9e9 | refs/heads/master | 2022-12-18T11:07:30.925005 | 2020-09-30T21:14:49 | 2020-09-30T21:14:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,543 | py | GetRabbitDump.py | #!/bin/python
#This script is supposed to continiously monitor the rabbitmq usage of file descriptors and create a dump file when we violate a threshold.
import subprocess
import json
import logging
import os
#This is the threshold I have defined. Feel free to change it.
MAX_ALLOWED_DESCRIPTORS=3600
# Sets the loggi... |
7da02cce5ba8f60a27935c9f1f09734156865258 | f8e7d029cd34d97b7a7a8140a83c379bef770030 | /data/dnd/enums.py | 12f729cc346bb86a466907645a2fa2ebfe0718a1 | [
"MIT"
] | permissive | marco262/my_wiki | db1a127b6dbc362f649dcea5330ab1ae03460b5b | 8131fcd5d1378da736cf26dbc214ca2c882cae4e | refs/heads/master | 2023-08-28T12:25:33.761450 | 2023-08-27T23:24:13 | 2023-08-27T23:24:13 | 207,376,556 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,514 | py | enums.py | from pprint import pprint
races = [
"dwarf",
"elf",
"halfling",
"human",
"dragonborn",
"gnome",
"half-elf",
"half-orc",
"tiefling"
]
classes = [
"artificer",
"barbarian",
"bard",
"cleric",
"druid",
"fighter",
"monk",
"paladin",
"ranger",
"rog... |
cee431163575e563533deb9c945a4f354924f513 | b7d6bad5ab7f2d05167a7816868fdb391b5328d5 | /discrete_fourier_transformation.py | 9ee6a9b72d8fe374d1200735e574aace42c924d0 | [] | no_license | oleksa-oleksa/Computer_Vision | 82248284b56ed488199f5a0e4c8f92ef1709faf2 | 3c287a435522cf3c207501bf4a22579ab54e9c91 | refs/heads/master | 2021-07-10T00:55:23.790431 | 2020-06-30T11:36:01 | 2020-06-30T11:36:01 | 147,095,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,843 | py | discrete_fourier_transformation.py | import numpy as np
import matplotlib.pyplot as plt
import pylab
def dft_matrix(n):
"""
Implement the Discrete Fourier Transformation with Matrix Multiplication.
Returns the Discrete Fourier Transformation Matrix of order `n`.
"""
# your code here
# we can use j as in Matlab to work with co... |
f717a7857a5a63cf8982b8551d9e6812ac7b32d9 | 24b6f000bc218f047244acb6cb9a0a72cfe909e1 | /checkers/mbaidu.py | 3ef493c83233cade3c5d40bc4a3121332d352c66 | [] | no_license | cash2one/rank-checker | 7fa99a20b17545418a22eda48e62ecb62afc6cca | 97e06eb95c6f4e970109aebff86b98f60d4097f1 | refs/heads/master | 2021-07-20T18:50:24.736149 | 2014-05-06T11:16:24 | 2014-05-06T11:16:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,538 | py | mbaidu.py | #!/usr/bin/env python
# _*_ encoding: utf-8 _*_
# ---------------------------------------
# Created by: Jlfme<jlfgeek@gmail.com>
# Created on: 2014-03-07 21:40:18
# ---------------------------------------
import re
from pyquery import PyQuery
from httpclient.http import get_html
from httpclient.http import get_effe... |
b281dcee175d544f8aa0b3ca640b8bc499d61216 | e4c56c627027b6ed935b4bb0703b7ad1f9040d00 | /mainApp/views.py | 0fc6d7c6f2db90eaa929c7eb7500f2cbcb17153f | [] | no_license | himanshusankhala04/spaceExp | 6b23c4b565dc62803f100bd7b5d3bf57189db26b | 0f6ec56fb1cecbdbb997194638ca02301bb3438d | refs/heads/master | 2023-03-20T19:11:26.884998 | 2021-03-15T07:14:18 | 2021-03-15T07:14:18 | 347,426,799 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,383 | py | views.py | from django.shortcuts import render, HttpResponse
import requests
import json
# Create your views here.
def index(request):
element=[]
if request.method == "GET" and request.is_ajax():
url = "https://api.spaceXdata.com/v3/launches?limit=100"
url += request.GET['addurl']
else:
... |
0ebc79d99cc4a01a2f44e3bee0270f074ee9c62c | 5181d3b3ef8fe301ea2d6b095260e9d327c2fd79 | /scripts/coop/compute_0000.py | 94e6e42fb9f218a1c805f370f3c96099c47ddd88 | [] | no_license | danhreitz/iem | 88113ef9c9c4a2918c9c2abdfd0510d5ca4ec819 | ed490dcd6c2a8359f88cb805ccee8f6707566f57 | refs/heads/master | 2021-01-18T15:27:28.607250 | 2015-08-10T21:33:54 | 2015-08-10T21:33:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,652 | py | compute_0000.py | """
Compute the statewide and climate division average data based on gridded
COOP obs
"""
import netCDF4
import psycopg2
import numpy as np
from scipy.interpolate import NearestNDInterpolator
from pyiem import iemre
import sys
import datetime
COOP = psycopg2.connect(database="coop", host='iemdb')
ccursor = COOP.curs... |
bff7bffc2ca8b5f68b8bff0fd23d8373058a7370 | 153dd5f3064cfcddf00a1aafa6166afbfe1e1fc8 | /googleCol.py | 46983e69a5391191521cda4c5c2c6fa297320a95 | [] | no_license | Galit1321/neuroevolution | 40202ff9406906478a5d72b667c8c117601c9e5b | b31826558414ea5e6b9b2e64d24d5cf55314c86d | refs/heads/master | 2020-03-19T13:47:59.516337 | 2018-07-22T18:16:18 | 2018-07-22T18:16:18 | 136,595,610 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,109 | py | googleCol.py |
from keras.datasets import mnist
from keras import backend as K
import numpy as np
def softmax(x):
e_x = np.exp(x - np.max(x))
return e_x / e_x.sum()
def forward(weights, x, y, activation_fun):
# Follows procedure given in notes
w1, b1, w2, b2, w3, b3 = [weights[key] for key in ('W1', 'b1', 'W2',... |
982b09390987bbdae419d556ae027af90da7744f | 47f83587c864333e09d0c26181934fa261d06d0d | /cap04 - condições/exer4_6.py | 756a222e8a18bcb3f84fd9620719c0bd52232c51 | [] | no_license | elianekelm/livroPython | 57f5669d48a1166390c046e6be399d90f1841dc1 | 3f05a990a9105f803b5bc3775f6ef8a1a0c7df83 | refs/heads/master | 2023-03-25T14:46:58.781410 | 2021-03-26T11:10:03 | 2021-03-26T11:10:03 | 344,596,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 228 | py | exer4_6.py | print("**** CÁLCULO VALOR DA PASSAGEM ****")
km = float(input("Distância a percorrer (km): "))
if km <= 200:
price = 0.5
else:
price = 0.45
vl_passagem = km * price
print(f"Valor da passagem R$: {vl_passagem:5.2f}") |
f839e5926b55208d5b34fdd8cfad655fb367d3de | 5fcfe5ceda1ede9114ea8cd272f0dca8386b94bb | /demo06.py | 9e2f25391a4144d4e97918cbb2ff575f8473746a | [] | no_license | lei50505/tensorflow | fe9ba2ec5b45fec1914ca3fa8d8a67c3aa97872d | 49e3633bdabca00bfa1a5fcfd6934c6bfbb72cd0 | refs/heads/master | 2020-03-24T21:10:29.596771 | 2019-01-25T14:13:15 | 2019-01-25T14:13:15 | 143,017,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | demo06.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
'''doc'''
from __future__ import print_function
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
weights = tf.Variable(tf.random_normal([2, 3], stddev=2))
biases = tf.Variable(tf.zeros([3]))
w2 = tf.Variable(weights.initialized_value())
w3 = ... |
fdf1b531888a6d3c58e0ecff49f7024aee26b18a | 95d3926a34703748788272e75e7c504f50c41120 | /Nptel_PythonProgramming_Week3_2.py | 70d5a2eb90da4dbe2eba9678b930dbdc14c5e567 | [] | no_license | avinashrulz/PythonDump | 66ddff15299be2820aecec2675921e90e94a4f53 | 5acbc82bb3187db26fceda32d8cf48e5870ce0e2 | refs/heads/main | 2023-03-26T06:11:22.270019 | 2021-03-23T04:59:34 | 2021-03-23T04:59:34 | 326,181,389 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | Nptel_PythonProgramming_Week3_2.py | def BinarySearch(l, a):
start = 0
end = len(l)
midPos = (start+end)//2
if l[midPos] == a:
return(midPos)
if l[midPos] > a:
for i in range(start, midPos):
if l[i] == a:
return(i)
if l[midPos] < a:
for i in range(midPos+1, end - 1):
i... |
16bb1c5ec38b368f6b7e2f0f8bcf5c2e70cb8498 | 358719e638319b09927d075b98423343c8a2f3d3 | /mcf/corrupt_data.py | deb7d0842add4bac4827c14d0b090b3ee49d275c | [] | no_license | cjf00000/research_scripts | 3c595502229bb878259c9805af1caec0a7e97cad | 80b0724b931ca65515f137752b5b6ee659549db0 | refs/heads/master | 2021-01-19T00:30:09.970587 | 2014-03-20T13:42:45 | 2014-03-20T13:42:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,147 | py | corrupt_data.py | import os, sys, random
if (len(sys.argv) != 4):
print 'Usage: corrupt_data <input file name> <ndim> <percentage of corruption (0~1)>'
sys.exit(0)
else:
prefix = sys.argv[1]
ndim = int(sys.argv[2])
corruption = float(sys.argv[3])
ncorrupt = int(ndim * corruption)
data_raw = open(prefix, 'r').readlines()
ndata = ... |
3c4928f94d425c655ce73afd191f7ed6831a83ff | 9b8dd140c71668c116a5f8924c466939be5499f3 | /Algorithms and Data Structures/Data Structures/LinkedLists/Circular Linked List.py | cc8052faf456145373f0f1a2b1b830886fb5618d | [] | no_license | MisterMomito/Learning | 014f69921aeefa719bddcb1a58c223cd0a6c2bbc | 7ac39abbb2c61fb81cb569edc4ccbb7420f1fbb9 | refs/heads/master | 2023-02-19T05:04:41.917210 | 2021-01-21T11:07:27 | 2021-01-21T11:07:27 | 331,603,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,135 | py | Circular Linked List.py | class Node:
def __init__(self, value, n=None):
self.value = value
self.next = n
def __str__(self):
return '(' + str(self.value) + ')'
class CircularLinkedList:
def __init__(self, h=None):
self.head = h
self.size = 0
def add(self, value):
if self.size =... |
9696934785841ce51ff00c5d7215f120e2f8b5d3 | ed7badfc7ecd738001f4d3e9945cce3a2d8b059d | /tashSchedualer.py | 08c961fa21d47b3e3d1477f10590a310acf82d13 | [] | no_license | tanjingjing123/LeetcodeAlgorithms | ab41f20bfca1305d07af00ae8db725fef6d059b8 | 2bb2881824cc4e84ab6afad6085e02e1b682c96d | refs/heads/master | 2023-02-04T12:22:52.665477 | 2020-01-01T00:11:20 | 2020-01-01T00:11:20 | 284,194,379 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 481 | py | tashSchedualer.py | import collections
def leastInterval(tasks, n):
freq = collections.Counter(tasks)
max_freq = max(freq.values())
freq = list(freq.values())
max_freq_ele_count = 0
i = 0
while i < len(freq):
if freq[i] == max_freq:
max_freq_ele_count += 1
i += 1
ans = (max_freq - 1)... |
4c76257d29a87e6cb78c71abd9ddb2a844ab7d2c | 696b54a7f2c457d85003bd462c50fc9ac321fe0f | /SBaseEditor.py | e265f41a76e7329664e8eef1fcf97f8bc7a0c714 | [] | no_license | GarriGrem/Python-Antivirus | 98e99d0fd654fb5c9c27d5d9afb5cfc4b246e346 | 88b60f75dacfe9c4c97b32458a226dab3459c401 | refs/heads/main | 2023-04-18T15:35:08.638603 | 2021-04-29T12:49:52 | 2021-04-29T12:49:52 | 351,834,758 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,984 | py | SBaseEditor.py | from time import sleep
def input_bytes():
hexes = input().split()
return ''.join(chr(int(h, 16)) for h in hexes)
if __name__ == '__main__':
print("Здесь вы можете добавить сигнатуру в базу.")
filepath = 'D:\\Antivirus\\Server\\Signatures.bin'
with open(filepath, "rb") as file:
... |
8255af89847c5d4d4bca95169b18d9ad80f55309 | 6d0d4965a3cb94748a13017c30ec32244022c2b7 | /souffle/physics/thermo.py | 4817249595f3ff2c6b6600742648dd2c7408d5c0 | [
"MIT"
] | permissive | pauljxtan/souffle | 757a1516f62a0b8a634411fad498f06e6a434032 | 7dcb8a99e0c9749089f07a5cc2732747944cbac6 | refs/heads/master | 2021-07-06T11:17:13.936207 | 2017-09-30T13:38:17 | 2017-09-30T13:38:17 | 24,035,296 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,632 | py | thermo.py | """
Thermodynamics.
"""
import math
import souffle.constants as const
from souffle.datatypes import Vector
def ideal_gas_pressure(rho, mu, T):
"""
Returns the ideal gas pressure and its derivative with respect to density.
@type rho: number
@param rho: density [kg m^{-3}]
@type mu: number
@... |
6b97489f23f8abe296054378c54f6326d1253695 | 614b904f07232109248ee8f9f81ec6f1106cae61 | /app/models.py | 0544c18d6eeabf1f832eefabf682bb112bb779d0 | [] | no_license | anaf007/project_management | f566bad655df76669c9de9e255a8fefdb449e73b | a4a792638f63bbde3b2aad2ad53960126522cc5d | refs/heads/master | 2021-06-25T15:07:22.582828 | 2017-07-06T07:46:33 | 2017-07-06T07:46:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,219 | py | models.py | #coding=utf-8
"""filename:app/models.py
Created 2017-05-30
Author: by anaf
note:数据库模型函数
"""
from werkzeug.security import generate_password_hash,check_password_hash
from app import db
from flask.ext.login import UserMixin,AnonymousUserMixin
from .import login_manager
from datetime import datetime
import ha... |
4fd599c89ff8849380469be3e4b8997659afe364 | 74d8a861fe1c8e7f2e4413e4bdeaa0f6ad40ed7c | /school/homework.py | fedd57fcc1a87342670b235b657f8d8e503199ba | [
"MIT"
] | permissive | knut0815/Education-Scripts | 353c2a1335914bcff170342da04196d2326100a7 | 340ea7c2e674eaad25963460e391123b4aea4228 | refs/heads/master | 2023-08-10T17:37:16.812615 | 2021-09-25T14:13:01 | 2021-09-25T14:13:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,565 | py | homework.py | """A module for handling homework."""
from datetime import date, datetime
from random import choice
from string import ascii_lowercase
from subprocess import call
from course import Course, Courses
from utilities import *
HW_FOLDER = ".homework"
@dataclass
class Homework(Strict):
# these three are not in the YA... |
d01ae5c5e8f1e01ed31b3b04959c71de8acc37cd | a1764e0443d3739ca8543f23732a2c9981d9130d | /novelSpider/forms.py | 1d1b314fffcce1509946bd0e8d769c939a985ec1 | [] | no_license | molunshang/novelEngine | de90e1bd8b3d371c3e7146278d2a491b561d16e9 | 6796e373d48d80c98bea0d372d7d8d23014a567b | refs/heads/master | 2020-04-06T05:48:29.455715 | 2016-07-21T16:27:57 | 2016-07-21T16:27:57 | 58,562,366 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,217 | py | forms.py | from flask_wtf import Form;
from wtforms import (StringField, IntegerField, BooleanField)
from wtforms.validators import DataRequired
class siteConfigForm(Form):
SiteName = StringField("siteName", validators=[DataRequired()]);
SiteHost = StringField("siteHost", validators=[DataRequired()]);
SiteEncoding =... |
2c3debe0d0654708d70da71a7b882c9246a25a83 | 918724ab7709bb93cbb5f88a48e6fb732f1b222e | /matteautils/dataset/nuggets.py | 8955f6c00e2b4b943001b5fc975990f0d1505c39 | [
"Apache-2.0"
] | permissive | mattea/mattea-utils | 4d5d1640f8f7b6caeb6ef9d89f22d27b5d195c10 | 030ba2d4014b62b05eb8e00006d6e98c790b5650 | refs/heads/master | 2021-01-10T07:19:52.676040 | 2016-10-08T06:24:07 | 2016-10-08T06:24:07 | 50,869,895 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,916 | py | nuggets.py | import csv
import glob
import os
import codecs
import re
import sys
import traceback
#import random
from collections import Counter
from itertools import chain
import nltk
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
from matteautils.randomdict imp... |
387188c4c66644c06b5e86eb32d78324b8cc0f13 | ed8affff7d9bd4574d7488edc43f7f0a25192995 | /todo_app/models.py | ff56e16328b5a02be506c50895b7793b58a43359 | [] | no_license | Jitbhuin/todo | 0d761a558d63040048260034a799a8d7ae7e5a68 | 73f30c94658b9596447bee1b118819ae71d85ca0 | refs/heads/master | 2023-03-28T11:29:57.848456 | 2021-03-31T17:16:07 | 2021-03-31T17:16:07 | 353,431,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 806 | py | models.py | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
class Todo(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
todo_title = models.CharField(max_length=250, default='Add your TODO h... |
9a0d7dd1182073106d938bbabb3f5ee549c27256 | 4e9c8e7d16f33049bacf7a3ff40366d07c41f3eb | /locarise_drf_oauth2_support/users/migrations/0004_auto_20170201_0306.py | 55a59274087385da9ad13987b9cb3b4d598e1a0d | [
"MIT"
] | permissive | locarise/locarise-drf-oauth2-support | cb0ab0e964e68fb7aa8d493afaecaaaab4c1ea22 | 5ae23fd0ca6cec54552a223eb93ac6d0ef3fcbda | refs/heads/develop | 2021-01-17T13:18:16.295821 | 2020-09-11T07:44:06 | 2020-09-11T08:16:41 | 57,175,601 | 0 | 0 | null | 2016-09-01T01:32:22 | 2016-04-27T02:02:46 | Python | UTF-8 | Python | false | false | 444 | py | 0004_auto_20170201_0306.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-01 09:06
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0003_user_organization_set'),
]
operations = [
migrations.RenameField(
... |
6c4cb61aefa1121570f0a6a7251c5b2c1e6b4708 | 5a34f3e60c884d64683895dcd6ca7eae43d5edb7 | /mkdocs_awesome_pages_plugin/meta.py | cd0cfca7139376b154d41c1c7e24a00fdab71825 | [
"MIT"
] | permissive | rarescosma/mkdocs-awesome-pages-plugin | 433a5c7e9aa171436e1b27acbf40da3573385f3c | 2788b3709f8dd0285e14d86a251b7e68c7020720 | refs/heads/master | 2022-04-19T14:51:11.074649 | 2020-04-15T08:37:08 | 2020-04-15T08:37:08 | 255,853,104 | 0 | 0 | MIT | 2020-04-15T08:28:32 | 2020-04-15T08:28:31 | null | UTF-8 | Python | false | false | 5,036 | py | meta.py | import yaml
from typing import Optional, List
class DuplicateRestTokenError(Exception):
def __init__(self, context: str):
super().__init__(
'Arrange rest token "..." is only allowed once [{context}]'.format(
context=context
)
)
class Meta:
TITLE_ATTRI... |
471045d0c7b3aa4e97bd379478d82fb61792254a | 3a662ff308f5f472e931581f7b31a1cee98c8661 | /Packages/ecommerce/SalesModule.py | 0bc633bc8dad57cf99183f623a52d6d925787395 | [] | no_license | Ahmed-Abdelhak/Python | 8d148ce1507e1390fbd1fc5ce19ad897144a1b6d | 7db253e54e61097616b85d52e88f1bd3632f73dc | refs/heads/master | 2022-11-14T20:15:59.414913 | 2020-07-12T23:56:20 | 2020-07-12T23:56:20 | 257,808,178 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23 | py | SalesModule.py | class Sales:
pass |
c2fcab7d483ad942ad6bc079c3e98a0bead188a4 | 39ee27dbb809c70edf66c3ed10677f01b6965fc9 | /phd/migrations/0001_initial.py | cf376cdfe39e5ca40ec251888f7a751b3b72c722 | [] | no_license | m4ra/research | f4ad3b4a2f08f133963c288471bd2f47318078ee | 2e8e62811150c32ab32f8bf462e9c78bdacc0ee3 | refs/heads/master | 2023-04-27T12:06:02.608454 | 2020-06-22T13:00:27 | 2020-06-22T13:00:27 | 124,120,002 | 0 | 0 | null | 2023-04-21T20:31:09 | 2018-03-06T18:19:10 | Python | UTF-8 | Python | false | false | 4,223 | py | 0001_initial.py | # Generated by Django 2.0.2 on 2018-02-06 15:17
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Chapter',
fields=[
... |
3e8888f91639d6e6a2e1c9283db4eeff3ac71cbe | c1764ab75b6e74229ba0f9768db629f34d016ecb | /assignments/assignment-4/src/lr_mnist.py | d5e005aa4b41a9219bda0fdc13fd81e0f58a6d08 | [
"MIT",
"GPL-2.0-only"
] | permissive | JakubR12/cds-visual | c0fbdae226ed9d7abf66ec90e56fe3da8240ca37 | 5fa90ecb39ddfee5365478d4d6d2ed4a9cddc364 | refs/heads/main | 2023-04-21T02:05:46.976362 | 2021-05-19T07:45:42 | 2021-05-19T07:45:42 | 340,381,395 | 0 | 0 | MIT | 2021-02-19T13:43:51 | 2021-02-19T13:43:51 | null | UTF-8 | Python | false | false | 5,260 | py | lr_mnist.py | #!/usr/bin/python
# importin modules
import argparse
import os
import sys
sys.path.append(os.path.join(".."))
import numpy as np
# Import utils for classification, preprocessing
import utils.classifier_utils as clf_util
import utils.ml_preprocessing as mlp
# Import sklearn metrics
from sklearn import metrics
from sk... |
0c2e51b539870958177bfd0721f760f896233089 | 466fe2851d646f9a048206c4cf2e8681a438fc13 | /hackerrank/car/car_day4.py | a604a7ba05a94381a282a9053e0356bea09edd97 | [] | no_license | curious2015/30-days-of-code-python | e7b9de00585854849f847a2c44636af4b48c070a | d60bd480a2019e5b22d6339ea12537e6638195c8 | refs/heads/master | 2023-03-16T17:29:51.674695 | 2020-07-07T00:44:01 | 2020-07-07T00:44:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,731 | py | car_day4.py | class Car:
def __init__(self, max_speed, min_speed, weight, is_the_car_on, condition, name_of_car,
max_fuel, current_fuel, mpg, number_of_ppl_in_car):
# instance variables
self.max_speed = max_speed
self.min_speed = min_speed
self.weight = weight
self.is_the... |
edeb939ecfd567ec62dd787785414ea175b3e79b | 4ea00994f1293bcc020bdde5a2e0b3740cd3afbf | /_openai/schemas.py | 4c00893fd8f51073087119a3937d9a330eaf6b74 | [] | no_license | NishantJoshi00/distributer-api | 316970b99234c2ae33f9189bc1648833b2c55504 | 02e83ba16334cb068e039ddd929334d6f60dc0ae | refs/heads/main | 2023-07-26T19:44:54.491456 | 2021-09-07T19:07:31 | 2021-09-07T19:07:31 | 404,093,545 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,930 | py | schemas.py | from typing import Tuple
from graphene import String, ObjectType, ID, Int, Float, Date, Mutation
from graphene.types.argument import Argument
from graphene.types.field import Field
from graphene.types.scalars import Boolean
from datetime import datetime
from graphene.types.schema import Schema
from _openai.config imp... |
30e216db712666a256fafdf68009fe6f6ca40c70 | 76cecf24be6522c2d37679e5d2b55f4ad1f07ae5 | /billplzshop/products/models.py | fedcaf6ee8abc5b36661c795edf7b991c75c40ab | [] | no_license | SyafiqTermizi/billplz-poc | 971e352d46e4baf94847732db4f5cb542547345b | 1170ffd71462e1f68ce2ce914baf1a683701200b | refs/heads/master | 2022-12-09T23:11:16.692993 | 2020-03-25T15:44:14 | 2020-03-25T15:44:14 | 249,997,295 | 0 | 0 | null | 2022-12-08T03:53:15 | 2020-03-25T14:14:17 | Python | UTF-8 | Python | false | false | 589 | py | models.py | from django.db import models
from billplzshop.billplz.models import Billplzbill as Bill
class Product(models.Model):
name = models.CharField(max_length=255)
price = models.DecimalField(max_digits=100, decimal_places=2)
def __str__(self):
return self.name
class ProductBill(models.Model):
pr... |
ebe2f68d7b1bde83b67ee8a8afd32142dc361334 | 6009e9d4fdb8c0ed45f4759b7e5af4fc2362f439 | /parsers/human_parser.py | dbc2b5c04b26e6a38d1f229758dbf193245ebe83 | [] | no_license | dmRohach/df_executor | 68204131ba1cbbd9cb8f94a858516941f3caf597 | 8f755c0fe0a301fcb9c88b2cd3b58b04a6f9d8ca | refs/heads/main | 2023-04-25T13:47:11.648639 | 2021-05-15T17:30:23 | 2021-05-15T17:30:23 | 367,177,883 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | human_parser.py | from . import BaseParsing
class HumanParser(BaseParsing):
def __init__(self, result):
super().__init__(result)
self.keys = ['Filesystem', 'Size', 'Used', 'Avail', 'Use%', 'Mounted on']
|
22562b05c4dac1c1d3a5441680da6ce1033e37d6 | 6b9619d7ca4b7bf1acf41345a7994e1f3487ba0b | /volttrontesting/testutils/test_platformwrapper2.py | 825699b4e6f374ad294fec2e5a1b20e339278c95 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause"
] | permissive | GHYOON/volttron | 4020db35edbb321a17b06015f6f99519dea21e1b | ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3 | refs/heads/master | 2023-03-11T18:26:16.273889 | 2020-08-11T18:34:03 | 2020-08-11T18:34:03 | 266,911,217 | 1 | 0 | NOASSERTION | 2020-11-30T08:20:41 | 2020-05-26T00:55:39 | null | UTF-8 | Python | false | false | 3,045 | py | test_platformwrapper2.py | import gevent
import pytest
import warnings
import os
from gevent import subprocess
from volttron.platform import get_examples
from volttrontesting.utils.utils import get_rand_port
from volttrontesting.utils.platformwrapper import PlatformWrapper
from gevent.subprocess import Popen
@pytest.mark.wrapper
def test_can... |
0dd92df970d83e7bb5873d5d6a8bac518370f629 | 3e42821b90e5f254c657ad1af0a9aecde569a250 | /Adversarial-attacks-with-Keras-and-Tensorflow/pyimagesearch/utils.py | d5e3c9705fe822cf1aaa0070f70a9111a8899fe0 | [] | no_license | trunglv1912/KLTN_2021 | 41de6852426a11a414e26fc8dbfccfb781bcd74a | 33782700c2ce82eaa7a355401f131553c6adb5a3 | refs/heads/master | 2023-06-22T21:13:50.958206 | 2021-07-18T13:39:40 | 2021-07-18T13:39:40 | 387,169,943 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 689 | py | utils.py | # import necessary packages
import json
import os
def get_class_idx(label):
# build the path to the ImageNet class label mappings file
labelPath = os.path.join(os.path.dirname(__file__),
"imagenet_class_index.json")
# open the ImageNet class mappings file and load the mappings as
# a dictionary with the human-r... |
4792378e157f106c0676c460e8e1c608c754f0bd | 64d8d80c9a292f1552190af17cf1fe984968d5dc | /python/8kyu/8kyu - MakeUpperCase.py | eb7059df5242e848bc01d422b1eeb53593a56ca9 | [] | no_license | zurgis/codewars | 3acc880e0f3a40fc77532bcac537452d419fc268 | 045d74d6a36f4bc8a69a76dd3f21fef22c338ca2 | refs/heads/master | 2021-04-20T22:47:45.833147 | 2020-05-19T14:01:55 | 2020-05-19T14:01:55 | 249,723,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 77 | py | 8kyu - MakeUpperCase.py | # Write function makeUpperCase.
def make_upper_case(s):
return s.upper() |
2a4ce22f8c14d44e3ec7d14c57571eafefb886c8 | ee328635caa6330a45493c25ebd597de1235db13 | /matr.py | 7523dc86e5783e7ba1594f25300aa8ca410cfccc | [] | no_license | lmusr/test | e4491be62175c008bb435b62bd786face1738cae | 91608435385f1f55ebf866c831d8176f90db412f | refs/heads/master | 2021-06-25T07:18:09.969021 | 2021-03-06T17:30:00 | 2021-03-06T17:30:00 | 204,540,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,463 | py | matr.py | def matr_input():
n, m = map(int, (input("Enter size of matrix:").split()))
matrix1 = []
print("Enter matrix:")
for i in range(n):
temp = list(map(float, input().split()))
matrix1.append(temp)
return n,m,matrix1
def matr_output(n,m,matrix1):
print("The result is:")
for i... |
c815a9037224192400c99755ceb7269435bcd91f | 553d95904186b4a3664efd07c9de3e30a3cbf2d9 | /base/models.py | ab7b9888f5b11aa19ed3d49544febf34c3401aa3 | [] | no_license | meetrks/SiteMonitor | 10295c52858d98569f67421a426aa650d7418bbe | 14edaa0892909c5e24ceeaaf2ae58da360e3f87e | refs/heads/master | 2022-12-22T23:43:03.056670 | 2019-02-24T09:52:21 | 2019-02-24T09:52:21 | 148,200,690 | 1 | 0 | null | 2022-12-08T02:53:12 | 2018-09-10T18:28:43 | Python | UTF-8 | Python | false | false | 775 | py | models.py | # -*- coding: utf-8 -*-
import uuid
from django.db import models
from base.utils import generate_short_id
class BaseModel(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4)
short_id = models.CharField(max_length=8, null=True, blank=True, unique=True, db_index=True)
is_deleted =... |
557a5531cb91f0fcdbcb529ebe8993a557ac0188 | 04e98d4f0d6f92de1fac2e6833095c0d95da18a1 | /firenet.py | 3c18f7afaf97c2e2fe83a1bff52aab81a87e044e | [] | no_license | mm1729/firedrone | ab2f0c15152a0b51a281adaf67dc40657b619a4a | 8a2731702a86e8c75a560db1300d9a9ca97f0399 | refs/heads/master | 2020-06-23T11:41:05.185149 | 2019-07-25T20:43:51 | 2019-07-25T20:43:51 | 198,612,503 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,131 | py | firenet.py | import tensorflow as tf
import numpy as np
import cv2
import os
import sys
import math
class CNN(object):
def __init__(self, model_filepath):
self.model_filepath = model_filepath
self.load_graph(model_filepath = self.model_filepath)
def load_graph(self, model_filepath):
print('Lo... |
693668942863a3dc88abc2565117670dedbfad5f | 89b7a0d4f96ef5140c6634df0891787b83832753 | /db_startup.py | ea95ad78ad8459cc49917f6cf4bf6859f5661b20 | [] | no_license | Stupnitskiy/TaxiService | f4c5ba026c8320bf2aa0288c1621752871fe372f | ee5fc0d91e1f50d9747c7990b3cfd38fc3c328b9 | refs/heads/master | 2021-09-07T06:11:44.813842 | 2018-02-18T13:22:55 | 2018-02-18T13:22:55 | 113,102,230 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 339 | py | db_startup.py | from app import base, engine, session
import app.controller as ctr
try:
base.metadata.create_all(engine)
ctr.user_add('user', 'user', False)
ctr.user_add('admin', 'admin', True)
ctr.order_add('+380971234567', 'ул. Крещатик, 1')
except:
session.rollback()
print("Oops, i know, app starts a lot of... |
edd4172f2604811a083345693c7c9a1aeff68a5a | ccfb1737f9bfaf8618bbc2bdb9743c1f56c493b6 | /pyutils/build.py | 7e41f890768a3cbdb1e00846c736d09e2bcc7ebd | [] | no_license | mono/release | a0543362b2637d1c0d446481fb4861f1664d2fe8 | 7a5d4d9fbd43d54139d578a7f2fd978da5145fd5 | refs/heads/master | 2023-08-29T16:03:50.158788 | 2017-06-13T02:34:26 | 2017-06-13T02:34:26 | 791,430 | 4 | 8 | null | 2015-10-06T14:44:57 | 2010-07-22T16:48:09 | HTML | UTF-8 | Python | false | false | 3,503 | py | build.py |
import os
import os.path
import sys
import re
import pdb
# User packages...
import config
import packaging
import utils
debug = 1
# Private method
def _web_index_sort(web_index_objs):
"""Args: dictionary objects with an optional 'web_index' key in the 'info' member
returns: sorted objects, according to web_index... |
af42f235d0c46dd3070793802d27ccbf2ba0e1ff | 67dcc9573a72f1cece31f128147f8582896cf8d0 | /200425/grade.py | d56ce112ea69dbce4ef9ee66cbadba23b8efbca8 | [] | no_license | haileytornado/CIT_JWP | 548f61f14dae82bbfe8cda908b4b40caecd88d86 | 370b7928b1ad94134b0c4cabfe341109d7328e86 | refs/heads/master | 2022-08-15T00:17:20.147647 | 2020-05-23T02:04:22 | 2020-05-23T02:04:22 | 262,461,880 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 121 | py | grade.py | score=85
if(score>90):
print("A")
elif(score>80):
print("B")
elif(score>70):
print("C")
else:
print("F")
|
f8ffb37811797033b967691076848d43ae0df8f3 | c702380db766ffc64b72a6c6f98e1b2ed0ed8140 | /rough.py | 1f983fc745e05c0d2711d84233e0f36040314853 | [] | no_license | AnuragSinghKushwah/DataAnalyticsAndMining | 74c22bc63c798d5e1cc4a9abc858037eac21687c | 3615508bf1dade439ec85625194f028d6c6b588f | refs/heads/master | 2020-03-20T18:03:32.098226 | 2018-06-25T07:24:33 | 2018-06-25T07:24:33 | 137,570,718 | 0 | 6 | null | null | null | null | UTF-8 | Python | false | false | 182 | py | rough.py | import numpy as np
list1 = np.ones(10000)
s = np.arange(10000)
print("first time ")
print(s)
np.random.shuffle(s)
list2= list1[s[:300]]
print("second time ")
print(s)
print(s[:10])
|
3b415f2b73928fbb606dea2a55d305c293d010ff | 4a162740380ee3884d190752ad14c1344d3152e8 | /server.py | 97777dd523f47f30acd64b74e2fb7049c302bff9 | [] | no_license | PWAckerman/fantastic-backend-python | abb8cfa4494ccef16a235bce72c97c1ba411dfd0 | 70c9255209dfca41615002c45c247db2db95a5e4 | refs/heads/master | 2021-01-20T02:20:08.405447 | 2017-03-03T16:09:00 | 2017-03-03T16:09:00 | 83,816,252 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,750 | py | server.py | from flask import request, url_for
from flask.ext.api import FlaskAPI, status, exceptions
from controllers import UserController, BlurbController, SkillsController
from controllers import EntryController, ProjectController
from util import encoder
jsonEncoder = encoder.JSONEncoder()
app = FlaskAPI(__name__)
@app.rou... |
600660385bbc06ca2e9ae6ea481b301dd3c575f5 | 7dc80048f72e106f977b49ea882c63cc9623e3ef | /notebooks/production/Y2018M11D29_RH_Hybas6_U_GADM36L01_PostGIS_V01.py | 91691c0571600b6fb2b229563d9acd5454c42594 | [] | no_license | YanCheng-go/Aqueduct30Docker | 8400fdea23bfd788f9c6de71901e6f61530bde38 | 6606fa03d145338d48101fc53ab4a5fccf3ebab2 | refs/heads/master | 2022-12-16T03:36:25.704103 | 2020-09-09T14:38:28 | 2020-09-09T14:38:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,611 | py | Y2018M11D29_RH_Hybas6_U_GADM36L01_PostGIS_V01.py |
# coding: utf-8
# In[1]:
""" Union of hydrobasin and GADM 36 level 1 using postGIS
-------------------------------------------------------------------------------
Author: Rutger Hofste
Date: 20181128
Kernel: python35
Docker: rutgerhofste/gisdocker:ubuntu16.04
"""
TESTING = 0
SCRIPT_NAME = "Y2018M11D29_RH_Hybas6_U... |
b7e9ffec0c28a5f9dc90a7ad79f4c9c987620e2f | 91a4547885a68339377dbcc9476730614b0cbe47 | /config/yaml_config.py | b2c59dbfdf02d39eaf896530b5e4eac14442f36a | [] | no_license | JeffXue/python_libs | 8496b510ca0785fe142565e166fa6c6013de627b | 90321fc83982d249b081184f3dd2cf16752a0344 | refs/heads/master | 2020-12-27T12:34:52.295997 | 2020-02-05T10:16:45 | 2020-02-05T10:16:45 | 237,904,822 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 247 | py | yaml_config.py | #!/usr/bin/env python3.7
# Requirement:
# PyYAML==5.3
import yaml
CONFIG_PATH = './config.yml'
config = yaml.safe_load(open(CONFIG_PATH))
if __name__ == '__main__':
import json
print('config.yaml:', json.dumps(config, indent=4))
|
0f894ce4dc50903d571ee1b4d6e7f7345d8a5ee3 | 92a1e0a3676dd55e618e8bb5c09679a8f541ca8f | /python-genomic/week4/processbio.py | 3d1ba4496450cb5c30b542c5f649f503db244ce1 | [] | no_license | gglee89/genomic-data-science-specialization | 0b2710b393dcdf1a45177b01fa3529ab5c044fa8 | f529535809c1deddd793b0303ec3727d5c0aaae1 | refs/heads/master | 2023-09-04T15:02:41.984014 | 2021-11-18T08:08:42 | 2021-11-18T08:08:42 | 426,948,179 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,767 | py | processbio.py | """
Using BioPython
We can useBiopython to find out where the sequence comes from.
We're not exactly going to use Python itself.
We're going to use a program called BLAST.
BLAST is one of the most successfully, and most widely used
program ever developed in bioinformatics.
It takes a short sequence or maybe a slight... |
214a5a95eef4aff2aa50a9affe07ec2975d6e2d8 | 66207c5881567f50cc30179cfe205a194212d4f1 | /users/migrations/0005_auto_20161018_1540.py | c06d46e1dc40ee9c51288b125a454ff1774f32df | [] | no_license | 6256163/Django_Blog | fe214a81f0231775a13e2e8ccbdbe8114cf3e0be | a20ae86f1728363b7a317723156f7c21ffa1c9d0 | refs/heads/master | 2020-05-21T17:49:11.113551 | 2016-12-14T04:17:02 | 2016-12-14T04:17:02 | 64,593,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,636 | py | 0005_auto_20161018_1540.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-18 07:40
from __future__ import unicode_literals
from django.conf import settings
import django.contrib.auth.models
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
... |
cc57ce2ef4213356005157ba419ebe1194705655 | 545032427b650f9f895d207a1f155fb746b02aea | /src/utils.py | b242513851d44d248d54f1cf92cb603c16ff60b6 | [] | no_license | seyuboglu/free-the-envy | 5a2166b3a90f1a080ced3cdefd969c614d49ab25 | c8954b49c12e981f2d902796b327d05eeb9e9f2e | refs/heads/master | 2020-04-05T10:13:51.888796 | 2019-04-12T22:54:31 | 2019-04-12T22:54:31 | 156,792,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,484 | py | utils.py | import json
import os
import logging
import numpy as np
class Process():
"""
"""
def __init__(self, dir):
self.dir = dir
self.update(os.path.join(dir, "params.json"))
set_logger(os.path.join(dir, "process.log"))
def run(self, overwrite=False):
"""
"""... |
e8b5e968c37b71c6f6f36114adb4ad19421b5949 | 82b98650e68d4f05c7605c7b2fcbf662ab1fd0b9 | /2019/Tic-Tac-Toe-Python/helpers.py | fa5bbb7ad1113b5900bfe8f334cf78e4694aeb4d | [] | no_license | code-afrique/bootcamps | 29dca3bf6254c1e53f39903dda699ad848d9b51c | a61888c0b1b36006905f40820fb5b57e5ff53df7 | refs/heads/master | 2020-04-08T07:04:44.837724 | 2020-01-28T23:25:19 | 2020-01-28T23:25:19 | 159,125,719 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | helpers.py | """
Created by Jesse Phillips on January 3, 2019
Module which contains some helper functions for Tic-Tac-Toe-Python
"""
from game2d import *
GAME_WIDTH = 800
GAME_HEIGHT = 600
def newLine(x1, y1, x2, y2):
""" Helper function to create a line on the canvas starting at point (x1,y1)
and ending at point (x2, y... |
8bd917be300302e7e0f1d5954e5698de81525b01 | 6961ba384b3b4484a916049827e5d87c3852c350 | /django_gearman_proxy/backends/mail.py | 2251840667f038a976527cd4fe779d88d128e3d5 | [
"BSD-3-Clause"
] | permissive | char0n/django-gearman-proxy | 6001a85b1d51cdbcc56c61a85eb386896eee087c | 0b62e3d869388d7beb9f1ad634c9cbf48e7859a3 | refs/heads/master | 2020-04-29T03:59:30.271988 | 2013-04-26T10:31:59 | 2013-04-26T10:31:59 | 7,467,033 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,099 | py | mail.py | from django.core.mail.backends.base import BaseEmailBackend
from django.core.management import load_command_class
from django_gearman_commands import submit_job
import django_gearman_proxy.settings
from django_gearman_proxy import load_object
PROXY_TASK_NAME = load_command_class('django_gearman_proxy', 'send_mail')... |
37ff18a05d1febc6065e0d9abc7fb4e2b8393eb3 | f35cb32ca4ab5d35971e1df678083822482143cc | /Practice 09 - Guessing Game.py | e88f1b761ed78495adc1f11adc6ecfbc4d9eae3c | [] | no_license | ScottNg49/Practice_Python_Complete | 231476b34dfe0789e211954f5ca1844a2d4b9f93 | 92e468dc9a9bcc64005fc32d6881e2b8093bb8ff | refs/heads/master | 2020-03-20T07:37:46.070950 | 2018-06-14T00:40:34 | 2018-06-14T00:40:34 | 137,286,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,884 | py | Practice 09 - Guessing Game.py | #Date ??/??/2017
#create a guessing game
#count the number of correct and total guesses
import random, time, os
def main():
#pastGuess = past user guesses
#noGuess = number of guesses
print("\nWelcome to the guessing game."
"\nGuess the number between 1 and 100.")
guess =... |
15eaf00bafb5d2c35b080e7cd765293193f18496 | 5e3776d8e56aab57cbc73fbc1f1b6bd571b243b0 | /web/hello.py | af94646acb096bbbb2b6d762e188e3a06c81796e | [] | no_license | sheepshine/xiaojiba | 98542e546b0e1c25cfa979a26c0405ce2ee4b798 | fd201a4fe428877ba1ff3529293375f342ca3b0d | refs/heads/master | 2021-05-07T07:14:29.452000 | 2017-11-14T02:49:48 | 2017-11-14T02:49:48 | 109,108,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 966 | py | hello.py | import web
import MySQLdb
from urls import urls
import dbsetting
app = web.application(urls, globals())
render = web.template.render('temp')
class index:
def GET(self):
query = web.input()
return query
class blog:
def POST(self):
data = web.input()
return data
def GET... |
4aadcd4d4014692de3f7eb0d599d9feec8ac62b6 | a9c205c5dbd185b5af3d213b53abbeeca0ef5843 | /main.py | e0f46177214d393412e6c1885e7b9ef551b0dbfb | [
"MIT"
] | permissive | Kyu/teenserv_irl | 6e0fb985cefd0d438da809526e4092fb3e364d34 | 17667adf4373f9c089c4304f5d562b08c8cda777 | refs/heads/master | 2021-08-31T23:26:25.383823 | 2017-12-23T13:09:36 | 2017-12-23T13:09:36 | 114,542,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,380 | py | main.py | import sys
import logging
from datetime import datetime, timedelta
from configparser import ConfigParser
import asyncio
import discord
import twitter
log = logging.getLogger(__name__)
formatter = logging.Formatter(
'%(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s')
logging.basicC... |
98f08346a84688cd3ab25fc230da0c86ba1e3e6a | cdd24d99e0d78449cbf62f74c682b61335fb87ae | /flask_app_local/tests/pwm_test.py | 6b018b2172cfa46223b9a5fbb1a78f797783086c | [
"Unlicense"
] | permissive | mohammadfatemieh/Light_control | d8d53f043e9b02bcca7c5c3007ad63af4fceec83 | 70d8168fa763a9165f6372a6342b5cce749517f5 | refs/heads/master | 2020-12-04T19:32:17.978266 | 2019-05-28T20:11:38 | 2019-05-28T20:11:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 441 | py | pwm_test.py | from __future__ import division
import time
import Adafruit_PCA9685
pwm = Adafruit_PCA9685.PCA9685(0x40)
pwm_max = 4096
pwm_min = 0
pwm_freq = 300
pwm.set_pwm_freq(pwm_freq)
while True:
for led in range(0, 2):
for i in range(pwm_min, pwm_max, 8):
pwm.set_pwm(led, 0, i)
time.sle... |
ffbc9e1f93dde0a79c165ae6b74ce1a3f0f9db4b | 0c1ee00f6361420e4e8e598a0c8fe2b56440f2ab | /yacms/forms/__init__.py | 4171746a7c7f9c0fa8aca8a5c27908fa70fbc18e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | minhhoit/yacms | 0f95dbe5c0c04c8efe573de46768c3713fd0ab86 | 39a9f1f2f8eced6d4cb89db36f3cdff89c18bdfe | refs/heads/master | 2020-06-09T23:40:38.266441 | 2019-07-09T02:17:47 | 2019-07-09T02:17:47 | 76,122,846 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216 | py | __init__.py | """
A port of django-forms-builder for yacms. Allows admin users to create
their own HTML5 forms and export form submissions as CSV.
"""
from __future__ import unicode_literals
from yacms import __version__ # noqa
|
5c840415c65fa2084822d45366e1d508575525df | 5da86cf3e911859aa37c8e953b2e42f4461c4158 | /collect_sample.py | 377549bb41584be6417964f3e179f6233834ec4c | [] | no_license | liziniu/dagger | 25dee8df0cc06049ae44c65b5ca467a6abf4668f | 450570f6861b33781e838502d78cdf5f158b56c9 | refs/heads/master | 2020-09-07T20:35:28.418371 | 2019-11-11T05:29:56 | 2019-11-11T05:29:56 | 220,906,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,746 | py | collect_sample.py | import argparse
import numpy as np
import tensorflow as tf
import os.path as osp
import os
from ppo import build_model
from utils import get_env_type, get_default_network
from baselines.common.cmd_util import make_vec_env
from baselines.common.tf_util import get_session
from baselines.common.vec_env import VecEnvWrap... |
0a4017e655ef16dd939ec1978f016fe135acf930 | 3d28f66a3870e42f4b41e2e8ca0c0bec727bbdb3 | /plug_Discriminator.py | 038dbffaf6cb333acaf44d4f3647f9e6b7429b1b | [] | no_license | avinsit123/Keyphrase-Generation-GANs | 95d0984f4e162f63be7d651444ceb575efe77b70 | 6b5427f6fa95b7b7ee1aea08704ab493cbe98546 | refs/heads/master | 2020-06-18T01:45:35.385861 | 2019-11-13T02:56:31 | 2019-11-13T02:56:31 | 196,126,271 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,230 | py | plug_Discriminator.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 14 08:29:10 2019
@author: r17935avinash
"""
#############################################################################################################################################################################################################... |
26d4ca2214da106de871a6e9d98f7d0c01f53514 | 61807eb8029b416770ce8d4d08a8d1ab4b95e454 | /config.py | e48342e7b6022f1428c45c2cb56b12c3f6ca6405 | [] | no_license | popoff1998/SiguClean | da66eac313ca0e832df617d1c252de39bf2e3a6b | 5fee1af601b398416ab751599e596612da2a54f3 | refs/heads/master | 2023-03-17T06:22:30.906292 | 2023-03-13T12:19:01 | 2023-03-13T12:19:01 | 10,169,752 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,977 | py | config.py | # -*- coding: utf-8 -*-
"""
Created on Wed May 22 09:27:33 2013
@author: tonin
"""
from enum import Enum
class Mrelax(Enum):
NONE = '1'
CANCELADOS = '2'
TODOS = '3'
class Cestado(Enum):
CADUCADO = '4'
CANCELADO = '6'
class Status(object):
def __init__(self,mandatory,optional):
"Inici... |
b8578f4b0c0c9df7bebefb69d0ccded62c2cc9ce | 9cf6b31876b6fe3652e9d2613afff41793cc7d49 | /apps/importer/reader/yml.py | bfb0cc93e15286abf5d5da0e0ab69452d9607918 | [] | no_license | amyard/findinshopGit | 2a3b56c845691573b33ccc66b036cab0effa0e8e | b642bc81cf633c95ccd978d5e9fb4177eee38be4 | refs/heads/master | 2022-12-13T19:17:45.031095 | 2019-10-31T13:08:51 | 2019-10-31T13:08:51 | 213,323,148 | 0 | 0 | null | 2022-12-10T04:48:01 | 2019-10-07T07:44:13 | Roff | UTF-8 | Python | false | false | 14,931 | py | yml.py | # -*- coding: utf-8 -*-
from apps.website.models import Point
from .base import BaseReader
from apps.catalog.models import Category, Item, Vendor
from apps.catalog.static_names import Color
from django.db import transaction
from django.core.exceptions import MultipleObjectsReturned
import xml.etree.cElementTree as E... |
8b0e8f31ae22d020f8b6f856cd46622e79bf9eff | 22d4a696b4505add024c508c761148b0dd538776 | /src/woc/outliers.py | 722757ac0499299dc7f5e45230223cf9377938f9 | [] | no_license | MBrouns/world-of-churn | f523b22420837701144969104b731d0bf40d4846 | 2619bffc50e6ec47d0927273211278946606f4c3 | refs/heads/master | 2023-04-08T09:50:35.150232 | 2021-04-22T15:07:06 | 2021-04-22T15:07:06 | 360,560,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | outliers.py | from woc.utils import log_info, log_debug
@log_debug
def _remove_below_min_level(df, min_lvl=10):
"""removes all characters from the dataset that didn't reach at least level `lvl`"""
return df.loc[lambda d: d.groupby('char')['level'].transform('max') > min_lvl]
@log_info
def remove(df, min_lvl):
return (... |
c35feab7718dd45cee6ca55b5388399df1ef3bb5 | 4e8dafde04611e5f33a45d77272f91427dcaa130 | /morpfw/crud/model.py | 626d4f15309b735a85b74161c152e9a09f84b045 | [
"MIT"
] | permissive | adixsyukri/morp | 91dbf0121117761a7747e8eb5f41e2562fabda0f | 6ed6f93d8584e3a3cebe71737025b8ee431f5e86 | refs/heads/master | 2021-04-07T05:04:30.783628 | 2019-02-22T07:40:13 | 2019-02-22T07:40:13 | 125,462,610 | 0 | 0 | null | 2018-03-16T04:15:02 | 2018-03-16T04:15:02 | null | UTF-8 | Python | false | false | 12,477 | py | model.py | import morepath
from jsonschema.validators import Draft4Validator
from jsonschema import validate, ValidationError
from .util import jsl_nullable
from .util import dataclass_to_jsl
from .const import SEPARATOR
from . import permission
from . import signals
from .log import logger
from rulez import validate_condition, p... |
b6b08c793e7073076b3176ad02627fd0e14caa3a | 95f5673beccda06edeeed9b65c1880b398c25632 | /src/fuzzy_asteroids/fuzzy_controller.py | 26b1988d8843d13c1e186735fe5e2e366409da55 | [
"MIT"
] | permissive | TimArnettThales/FuzzyAsteroids | 3d44f90df2814a48e48608f630c9859930955d96 | e76a2475f7e3913b86664e8a132133d153c7bb9d | refs/heads/master | 2023-07-28T01:03:21.812972 | 2021-09-08T16:33:45 | 2021-09-08T16:33:45 | 329,964,042 | 3 | 3 | MIT | 2021-09-08T16:33:46 | 2021-01-15T16:24:27 | Python | UTF-8 | Python | false | false | 4,141 | py | fuzzy_controller.py | import math
from typing import Tuple, Dict, Any, List
from .sprites import ShipSprite
class SpaceShip:
"""
Space Ship class to be used to interact with the ShipSprite in the environment
At each time step the user's controller class will receive a SpaceShip object which limits the amount of
informati... |
96be038a8cd65674b7a3e60f5952d976e901744b | fb3855b468b08f335dfb84233c923e10514b7ef2 | /myapp/models/WorkField.py | 7ff1057e7af6c0359d1831208b6e00e93e5f5f7e | [] | no_license | ngotuan12/ASEProject | f3acf347e3121405ba126505ec7cda4321553086 | cf04ecd11e0e1bdda64ee13c057cd26c6c525f79 | refs/heads/master | 2021-01-13T14:19:50.947272 | 2014-07-28T08:16:20 | 2014-07-28T08:16:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | WorkField.py | '''
Created on Apr 3, 2014
@author: TuanNA
'''
from mongoengine.document import Document
from mongoengine.fields import StringField
class WorkField(Document):
code= StringField(max_length=5)
type_name = StringField()
status = int()
|
5db4b3ac5ab2a368006c8570f86da08fa59878ee | d83cd7bfec9c71ef3186546fd7423082415fca39 | /src/old/make-drug-list-for-analysis.py | 948f7af3ba8094e70792bfcba56dfe058d2948e1 | [] | no_license | mac389/phikal | e139d7e20e6cda0fcedca9eb4a5a5ff397f5f49a | b5162a3bab7320ed3d67bb6b7c9c3a3f03c2ba5a | refs/heads/master | 2021-01-15T15:36:37.568339 | 2016-09-04T18:18:23 | 2016-09-04T18:18:23 | 56,150,837 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 249 | py | make-drug-list-for-analysis.py | import json
import utils as tech
READ = 'rb'
WRITE = 'wb'
drugs = json.load(open('drug_misnaming.json',READ))
drugs = list(set(list(tech.flatten(drugs.values()))))
with open('master-drug-list',WRITE) as fid:
for drug in drugs:
print>>fid,drug |
9b249871326e7081bb761e81f3ac036d771623b4 | a8c7b7d7a2bb1ad5479e1f040e37ef353019d5ee | /handbook/00BaseType/04TupleOpt.py | 226af23c40f05446629f64a38802e704083ed2dc | [] | no_license | aghxjk/pythonStudy | 4b94b356a13201c4a900957940bad01dea541f12 | 728dec54799a01ea42102b31d674b256c240b1bc | refs/heads/main | 2022-05-16T14:08:10.550606 | 2022-04-08T08:01:17 | 2022-04-08T08:01:17 | 181,684,221 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,904 | py | 04TupleOpt.py | #encoding: utf-8
__author__ = 'zhaoyimeng'
print('>>>>>>>>初始化操作:')
tpNull = () # 空元组
print('tpNull = () =>', tpNull)
tp0 = (0,) # 单个元素元组, 注意: (0) 与 (0,)的区别
print('tp0 = (0,) =>', tp0)
tp1 = (1, 2, 3, 'a') # 四个元素元组
print("tp1 = (1, ... |
4120dee282f965e7cddfd107a070f8390667d5b2 | b64ac06f9e2889dd8d42094817c82c43f3126454 | /sms_automation.py | 05a2a137a190aef6caf2d5d533a89c8d89eeed0d | [
"Apache-2.0"
] | permissive | keegan2149/g1_automation | 9b896696d34665073553201ddfab3e10f42174f5 | c14def5efb77d72f66a2e3c6014f3673eff2d706 | refs/heads/master | 2022-11-07T08:49:52.242474 | 2020-07-07T22:47:59 | 2020-07-07T22:47:59 | 273,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,299 | py | sms_automation.py | from selenium.webdriver.common.by import By
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
import json
import time
import datetime
import os
def l... |
52459e1cdccecbdc8fbc215a4f69dc50c17488ad | 2328e0d8cd7e9b734908628d884682f03242acd6 | /Применение Python анализ текста/Task3.py | 08ca40deff3a3cf5985d509acd644a236872220a | [] | no_license | itrem95/Python_stepik_course2 | fea084696b0f6be29d0c32b29f82dbf64e294eb0 | d959947091c9abc1ce28ec59232254fc053e070f | refs/heads/master | 2020-05-26T23:37:16.760464 | 2019-05-24T12:05:09 | 2019-05-24T12:05:09 | 188,412,786 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 603 | py | Task3.py | # Вам дана последовательность строк.
# В каждой строке поменяйте местами две первых буквы в каждом слове, состоящем хотя бы из двух букв.
# Буквой считается символ из группы \w.
# Sample Input:
#
# this is a text
# "this' !is. ?n1ce,
# Sample Output:
#
# htis si a etxt
# "htis' !si. ?1nce,
import re
impor... |
6a03b2bc76b02a042e505e43da51f776cd68f1f7 | 547db725624a0556b5b794654c089c1d89cdf74f | /slack_integration.py | 9f7a033f90069ae1b8aedc6d19c7e253e209afcc | [] | no_license | NDI2k17/integration | d2187a473f3cca57c92daa58eed7ce1fad9f5057 | 45a0c2dc044fe86677597684970a293d63ecf31e | refs/heads/master | 2021-05-06T15:07:08.443752 | 2017-12-08T05:05:34 | 2017-12-08T05:05:34 | 113,526,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,242 | py | slack_integration.py | from slackclient import SlackClient
import requests, json
import argparse
parser = argparse.ArgumentParser(description='Launch integration')
parser.add_argument('--name', default='westebot', help='The name of our bot')
parser.add_argument('--token', help='Slack API token', required=True)
parser.add_argument('--url', ... |
3eb9832275ec1464f31cb038fcff50b1d7e01785 | 9de1b42b03f3916148127f4cd5e80ab268b5c619 | /auto_meander/printing.py | 02846bec837acaa2e85d5f3b4f199ce643b3baf9 | [
"MIT"
] | permissive | alts/auto_meander | a494eae186b2c5518c619c2a5c349dbaf52c715d | a4ff3be87feea5ca25b5f8a5cf11b0bb41493ace | refs/heads/master | 2021-06-10T22:12:47.371348 | 2021-01-10T13:04:34 | 2021-01-10T13:04:34 | 35,531,337 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,631 | py | printing.py | from .grid_ops import shift_up, shift_right, shift_down, shift_left
import numpy
def create_screen(cell_grid, shape):
sy, sx = shape
canvas = numpy.ones((2 * sy - 1, 2 * sx - 1))
# draw vertices
for gx in range(sx):
for gy in range(sy):
canvas[gy * 2, gx * 2] = 0
assignment_m... |
8f6dbc24fd2e8cd1159a4831dc6ba6376df71ba8 | aa154a82e889f9a283f4890edb8ec9c4b28894ee | /algorithms/distinct_elements.py | 554ccd6c640caafbc18c4f45aa5159ad4251e25f | [] | no_license | jdht1992/PythonScript | 35af30721b16937813981678bda4c8ec78db43c1 | 3faed6037a000d9ec70ec4c4b4fe80bc9b40fa7d | refs/heads/master | 2023-06-27T01:06:18.801756 | 2023-06-16T19:18:02 | 2023-06-16T19:18:02 | 147,234,036 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 677 | py | distinct_elements.py | # count distinct elements in an array
# Given an unsorted array, count all distinct elements in it.
arr = [10, 20, 20, 10, 30, 10]
#arr = [10, 20, 20, 10, 20]
#arr = [10, 20, 20, 10, 20, 40, 50]
num = []
for x in arr:
for y in arr:
if x == y:
if not x in num:
num.append(x)
... |
891ce973bb52a30a558fc9114bbd4155c532c5a1 | 9d060dc6ee333a07d7d83097f5913021a27ad605 | /jax_agents/common/data_processor.py | f6d7879a120112d5bf6bd287caf4f60582366bba | [
"MIT"
] | permissive | chisarie/jax-agents | 76826c055be37a3a015c84009cc2f8c8b43dcf1f | daf42edb2186b1edca1ad4d3ab67427d969f9426 | refs/heads/master | 2022-11-12T14:13:35.463818 | 2020-06-30T18:04:10 | 2020-06-30T18:04:10 | 273,669,817 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,018 | py | data_processor.py | # MIT License
# Copyright (c) 2020 Authors:
# - Eugenio Chisari <eugenio.chisari@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limita... |
04ce42c061f63de4c9e02e034d84b20cb2fd1b09 | bd7fad507928f478fdf627f9059af684ce0ece23 | /manage.py | 3f957a782fc5076205d4aa584f2b6eab10ddb02f | [] | no_license | yuanxiaobo-0814/flask-demo | 081429e5fd5b7e903c4b0dcdaa108dde3a28fe38 | 63e378d291dc7eef4c82cbb422d2435bc9fd93a4 | refs/heads/master | 2023-01-11T04:39:42.769238 | 2019-09-20T08:41:58 | 2019-09-20T08:41:58 | 209,740,199 | 1 | 0 | null | 2022-09-16T18:09:49 | 2019-09-20T08:15:30 | Python | UTF-8 | Python | false | false | 442 | py | manage.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import create_app
from app.models import db
app = create_app()
# app = create_app('product')
# # 初始化manager
manager = Manager(app)
# # 绑定app和数据库,以便进行操作
migrate = Migrate(app, db)... |
19d64dbe7bbd90eeae4b65d5bcae5110964ace87 | 213138df675e7155cec61be3687a1857d8ea8713 | /helios/vorstudie/migrations/0010_auto_20211117_1425.py | a5f4035e40cd6cc5ce9f6bc78fe2622596dcb2e6 | [] | no_license | andreasbaumgartner/helios_raumbuch | b1dbb3b4f770a059e95d955ab1393c90e8e2e1b9 | be23d936368ac2dc5c2ea77236aafecfab443a37 | refs/heads/master | 2023-09-02T16:59:45.967743 | 2021-11-23T17:04:55 | 2021-11-23T17:04:55 | 428,567,809 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,083 | py | 0010_auto_20211117_1425.py | # Generated by Django 3.1.13 on 2021-11-17 13:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vorstudie', '0009_auto_20211117_1420'),
]
operations = [
migrations.AddField(
model_name='technikflaechen',
name='l... |
2165793ab0459d1b06a29502e8b947fe8cb817ef | 4f0c66711bf74c578b72893151e42a58d561e352 | /app/models.py | 57ae9426b99afcb388ae3f804d9efbadb4df0db7 | [] | no_license | Victornguli/python-flask | a09027dbc9249c772e02a9be621da70102557623 | b22825c7d29f701b00f5f9653b47d556ad70a62e | refs/heads/master | 2023-05-11T13:25:07.709002 | 2021-05-04T20:00:01 | 2021-05-04T20:00:01 | 238,419,593 | 0 | 0 | null | 2023-05-01T21:21:30 | 2020-02-05T10:05:56 | Python | UTF-8 | Python | false | false | 2,800 | py | models.py | from datetime import datetime, timedelta
import jwt
from app import db
from flask import current_app
from flask_bcrypt import Bcrypt
from sqlalchemy.dialects.postgresql import UUID
class BaseModel(db.Model):
__abstract__ = True
"""Base Model class. Other models inherit this class for repetitive fields"""
id = db.... |
c527e55352ffd3e33e5b9fc53610721896cbb6d2 | 18578789673bf5577608451293c20a8865c3159b | /preprocessing/make_topic_features.py | f9b3d9eb582411c590d12d3e75baaef676dd8ad8 | [] | no_license | njchiang/LanguageMVPA | da0f47eea0226ec4d4010a889512a1ebd1062d7d | 0340a6e370cdb7aa7bcfb6d05d02c3e102dee407 | refs/heads/master | 2021-01-23T14:03:48.701593 | 2020-12-20T20:33:15 | 2020-12-20T20:33:15 | 45,317,854 | 0 | 0 | null | 2015-10-31T21:36:29 | 2015-10-31T20:49:17 | Matlab | UTF-8 | Python | false | false | 3,322 | py | make_topic_features.py |
import sys
# initialize stuff
if sys.platform == 'darwin':
plat = 'usb'
# plat = 'mac'
sys.path.append('/Users/njchiang/GitHub/LanguageMVPA/multivariate/python/analysis')
sys.path.append('/Users/njchiang/GitHub/python-fmri-utils/utils')
debug = True
else:
plat = 'win'
sys.path.append('D:\\G... |
b77e6215262ed39d6baf5285765e5cb722ba5fa2 | c6c103dede646b0e402da7fdd4d3f65b80dd54e1 | /game_class.py | 7f370fe3659437a1e5794c8d4df92f7ab3a55260 | [] | no_license | w5688414/Tangram-Pieces-Matching-and-Recognition-demo | 86d8d95242a8acbf2b1de01e70df39411fde5ab4 | df69abd4607fd80298c391966497b8b1cdcea816 | refs/heads/main | 2023-04-24T11:02:27.572913 | 2021-05-08T15:37:02 | 2021-05-08T15:37:02 | 365,548,187 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 24,524 | py | game_class.py | import cv2
import copy
import numpy as np
import time
import pic_process
from pic_process import Graph, Pic_feature
import random
import os
#搜索图节点,存储在open表中
class Node_open_list():
def __init__(self, all_tri):
self.closed = False #是否已被放入closed表
self.parent_node = -1
self.all_tri = all_tri
... |
cfac4527793e349cbf600adce80e1d0613520e3d | 7e0eb9def47321ffba84b210c2e6447809f6e125 | /concierge_freshdesk_plugin/migrations/0005_auto_20180917_1024.py | ff632feb835da4bb155356b4ea306f20c5c6ac1f | [
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | gctools-outilsgc/concierge-freshdesk-plugin | 628fbe9d3575d8dacdaaa4fd545269c17be62aa8 | b020d3c3f2462bf5dd3adb63f3dc7d86f1ede3be | refs/heads/master | 2020-04-04T12:00:20.183873 | 2018-11-02T19:13:23 | 2018-11-02T19:13:23 | 148,367,404 | 0 | 0 | MIT | 2018-10-11T19:58:32 | 2018-09-11T19:14:39 | Python | UTF-8 | Python | false | false | 505 | py | 0005_auto_20180917_1024.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-09-17 14:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('concierge_freshdesk_plugin', '0004_auto_20180917_1020'),
]
operations = [
m... |
661d45561405f23b3131bcb08296407582874254 | dad70e820339826c331a2f81c8075c1bb5b4b0b9 | /online_pca_methods.py | 678817022e8bd476d220363d0ab36833da84d1e2 | [] | no_license | eamid/implicit | b623139aaaf945937a47ebc39eb6071b7fae7fa9 | 857a1ed3e872d60895c084c86d4e483042768ec7 | refs/heads/master | 2022-05-11T12:40:25.396962 | 2022-03-15T23:26:38 | 2022-03-15T23:26:38 | 223,263,765 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,450 | py | online_pca_methods.py | import numpy as np
from numpy.linalg import norm
from numpy.linalg import eig
from scipy.sparse.linalg import eigs
import numba
from numba import jit
from scipy.linalg import qr
from scipy.linalg import qr_update
from scipy.linalg import inv
from scipy.linalg import pinv
def project_eigs(sig, k):
d = len(sig)
unique... |
1ed14679978d8a711c1c43d9f136a20df74da771 | fdb7bcbbdfb311a8630af2bf8313be73fa811395 | /yellowhsvp.py | 98d5385f3abd5bdd70d98fc2b5848a35b71d1bbe | [] | no_license | phonginnocent98/image-processing | 815ec0db8e455f1572f7b7b2a5f649224512921e | 5c4a3fe37008ddc38d6261bd69d21f09fa51414a | refs/heads/main | 2023-03-15T04:51:15.354735 | 2021-03-11T22:37:12 | 2021-03-11T22:37:12 | 336,833,005 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,594 | py | yellowhsvp.py | #!/usr/bin/env python
#encoding: utf8
import numpy as np
import cv2
# メイン関数
image = cv2.imread('lemon1.jpg') # ファイル読み込み
hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV) # 画像をHSVに変換
# HSVでの色抽出
# HSVで黄色の上限と下限
lower = np.array([10, 100, 100])
upper = np.array([35, 255, 255])
#マスクを作成する
mask1 = cv2.inRange(hsv, lower, uppe... |
5addd3512355419d20ea46500eef8c935482b5c7 | edfb33798a01447c1a6feba17f15e2ea31d8b447 | /MPS_QFT/circuit.py | a5bd464ef2dbc8a9d5a4d94a7258a3e38b2d9d42 | [] | no_license | mballarin97/QFT | 0ee3ca8ac20be00b20aaba62a99758c6129a910c | c884e0d00dfef8a6c1f8d3599e84f74c46467a84 | refs/heads/main | 2023-03-14T16:30:25.610430 | 2021-03-17T11:37:10 | 2021-03-17T11:37:10 | 330,622,596 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 9,600 | py | circuit.py | # Import necessary packages
import quimb as quimb
import cirq as cirq
import numpy as np
from qiskit import QuantumCircuit, execute, Aer
from qiskit.circuit import library as lb
from .gates import cphase_swap_qiskit, cphase_swap_quimb, GATES, cphase_and_swap_cirq
from .manual import apply_two_qubit_gate_full, max_bond_... |
40842140db8704af7d0201b1f0c74af5e15d8966 | 67d39968b0835ff887777655870b0ccc3dad5d49 | /tools/airflow-v1-to-v2-migration/airflow_migration/migration.py | d8d9a38dbb22347d0a7fac6c4d9f3d5dabc0eeea | [
"Apache-2.0"
] | permissive | juliocc/professional-services | 3210ed3e56bbbd7c72111ba114ae3b96f6be1d36 | 05bdedfa5cd9d5164393e2afe5dda514aa4c25e0 | refs/heads/master | 2023-06-23T09:31:11.654073 | 2023-06-13T10:10:49 | 2023-06-13T10:10:49 | 192,344,445 | 1 | 0 | Apache-2.0 | 2019-06-17T12:39:29 | 2019-06-17T12:39:28 | null | UTF-8 | Python | false | false | 5,787 | py | migration.py | import csv
import glob
from pathlib import Path
import re
def clean_input(arg):
return arg.strip().replace('\n', '')
def parse_import_statement(import_statement):
pattern = r'^(?:from\s+([\w.]+)\s+)?import\s+(?:\(([^)]+)\)|([\w., ]+))$'
match = re.search(pattern, import_statement)
if match:
... |
238f6cfec15f1c20603518ee7dd6fb56347f7b96 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-1/d44fd70d021454f4d5e4e13464669c0beb828fe8-<_permissions_service>-fix.py | 752e847f9b4f5407f8b47c8cb05f5a46ea68b04c | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 577 | py | d44fd70d021454f4d5e4e13464669c0beb828fe8-<_permissions_service>-fix.py |
def _permissions_service(connection, module):
if module.params['user_name']:
service = connection.system_service().users_service()
entity = next(iter(service.list(search='usrname={0}'.format('{0}@{1}'.format(module.params['user_name'], module.params['authz_name'])))), None)
else:
servi... |
4039928e3100755c366b72b2a6b165890b39d248 | f8d181002f01c4b421e3b7b32e1d02f466e9af60 | /2017/pytest.py | 7f9d2eae450e713f327b92b4c758988c4e6e00a7 | [] | no_license | backmanification/birdroadscup | 1bdfcdde41b2506d6a476efcaff37eb5235d00e9 | d5dace0c59add28eb29a1e6a8b8d51919b7e657d | refs/heads/master | 2020-12-02T21:24:39.643425 | 2019-12-12T14:05:03 | 2019-12-12T14:05:03 | 96,307,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | pytest.py | from birdroadscup import stats_reader, playerstats_to_html, show_profiles
import pdb
c = show_profiles('Magnus_Ahlm')
while True:
a = stats_reader('static/stats/goaliestats.csv')
pdb.set_trace()
b = playerstats_to_html(a)
print playerstats_to_html(stats_reader('static/stats/goaliestats.csv'),'2')
|
5d85e373e1f1769823a5f753fbf67fd0957bef96 | 7bd7e90621894f1c07c8d4d274f0b72bbaf924dc | /NPTSP.py | a742c6423d4290fcd203e5d16db16487138598a5 | [] | no_license | christiandennis/Non-Partisan-Travelling-Senator-Problem | 591cf083bb47b682e913a893fb941ddb23557b08 | 27cb65162c82996cebb32f742e46ff976b4a380f | refs/heads/master | 2020-05-17T15:19:49.140745 | 2015-05-09T00:07:14 | 2015-05-09T00:07:14 | 35,307,463 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,843 | py | NPTSP.py | import networkx as nx
import matplotlib.pyplot as plt
import time
import itertools as ite
import os
class ArrayUnionFind:
"""Holds the three "arrays" for union find"""
def __init__(self, S):
self.group = dict((s,s) for s in S) # group[s] = id of its set
self.size = dict((s,1) for s in S) # si... |
d2dcb2e0eab52e8d1665618191e606a20bf797db | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /125_algorithms/_examples/_algorithms_challenges/pybites/intermediate/184/stats.py | dc8a3e690b062d18d4e03d34b710785e9fa93ffb | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 2,456 | py | stats.py | from collections import defaultdict, Counter
from csv import DictReader
import os
from u__.r.. import u..
TMP = os.getenv("TMP", "/tmp")
LOGS = 'bite_output_log.txt'
DATA = os.path.join(TMP, LOGS)
S3 = 'https://bites-data.s3.us-east-2.amazonaws.com'
if not os.path.isfile(DATA):
u..(f'{S3}/{LOGS}', DATA)
class Bi... |
76495e1536597374651ffe36344cd675b5836ff0 | 959b95f8645172742e57521cd9fbeeff16f646cf | /saloon_api/settings/remote.py | 1fef4cfc15c7ba19992735e77dcc96d1ed1da6c4 | [] | no_license | DeveshDutt2710/saloonApi_PostgreSQL | 8c7059a111bfd3774521e6dc2a6d37bae10b81a4 | fe0728403facdb6c8ab9655ade0545dfe7c9904d | refs/heads/main | 2023-05-08T21:21:55.226630 | 2021-05-23T08:01:42 | 2021-05-23T08:01:42 | 355,273,202 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 292 | py | remote.py | from .local import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'fpyzgsmx',
'USER': 'fpyzgsmx',
'PASSWORD': 'Fza21U4q7MT0c0LJ6tikW6NyXjEyr73J',
'HOST': 'lallah.db.elephantsql.com',
'PORT': 5432 ,
}
}
|
622fad86ff606cd26241344b7d634e5d68de4732 | 21a8c7c7217ba87ffa118bc8087a84b6cf49e751 | /es27_pag190.py | 31fc80c7f147de7e9d5890707c3e44d82e555b93 | [] | no_license | Rich-Mala-05/Esercizi-di-pagina-73 | 964c926be446596485905e9add6992cea4806338 | 82cc358263d35ca6711b605aa1f919fe4ebe8aa1 | refs/heads/master | 2023-03-23T13:38:43.386342 | 2021-03-17T16:34:41 | 2021-03-17T16:34:41 | 316,036,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 816 | py | es27_pag190.py | rubrica = {
"Alberto Giampietri":39493839,
"Alberto Zelioli":7402559120,
"Alessandra Quartieri":3667930185,
"Arianna Gambini":2930571834,
"Davide Buglione":3895031945,
"Pit":8394016345,
"Fedeculo":1234567890}
nomi = ["Alberto Giampietri",
"Alberto Zelioli",
"Alessandra Quarti... |
08a95677014c6a51e28dcfabffa706bc634f8a9e | 5d71d42dda4534723eccaf765d634cc8cd1ebf67 | /0002_auto_20210119_0305.py | 3665afa596d93a0ae20263eef067bdf74db602cf | [] | no_license | shenbagapriya78/Solartis-Hackathon- | 27ab380d1321f47f5e93080cc008bca670481510 | 1bb23acda527fefa64a5558623ad95833f029dce | refs/heads/main | 2023-02-18T07:49:44.156379 | 2021-01-20T05:27:39 | 2021-01-20T05:27:39 | 331,201,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 792 | py | 0002_auto_20210119_0305.py | # Generated by Django 3.1.4 on 2021-01-18 21:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Register',
fields=[
... |
5fedfc238881d14506bb3fcde8d7b56e2ebbd8f1 | b737a40c57e87b5acc5bea57d371e30a489ac1dc | /python/Nogo/1_temp_not_use_pc/game.py | becf64e4cbd80076304c2f0c717f1be7f15303f0 | [] | no_license | GG-yuki/bugs | b89a4a2cdfa082823beb90d9b4cb05916295d25b | bcd9e3b59f05203e0d02921a5f1dc13720dc7bbe | refs/heads/main | 2022-11-08T06:46:09.239289 | 2022-04-10T11:59:13 | 2022-04-10T11:59:13 | 480,004,488 | 2 | 1 | null | 2022-10-26T14:38:52 | 2022-04-10T12:01:48 | Python | UTF-8 | Python | false | false | 8,910 | py | game.py | # -*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
class Board(object):
"""board for the game"""
def __init__(self, **kwargs):
self.width = int(kwargs.get('width', 9))
self.height = int(kwargs.get('height', 9))
# board states stored as a dict,
# ... |
9acb3b55a185930429625a4acc5b38201f106acc | 74b3da5304fd82d6d4e84e90812f175f17069129 | /fahreinheitToDegrees.py | 55b557d5a21827c1cbac311b332884e98b78c0c9 | [] | no_license | soloasiedu/PythonBeginnerProjects | 192f6c16ae5841672df36f28722042dfc848975b | 1610173afcb449ccc6c4020c82332c94e7703ab8 | refs/heads/main | 2022-12-28T06:08:23.049191 | 2020-10-04T13:52:18 | 2020-10-04T13:52:18 | 300,981,109 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | fahreinheitToDegrees.py | temp = float(input("Enter temperature in fahrenheit"))
degrees = (temp - 32) / 1.8
print(str(temp) + " fahrenheit is " + str(degrees) + " degrees") |
bc6c4c604b7d91cabb103afd5ccdb1af77022eb3 | e39300d16e151539923ceabc44d4e8220405aa29 | /client/office365/outlookservices/message_collection.py | b485d3d06c6d07cdb66bcceaea0c48c7ecf25d0b | [
"MIT"
] | permissive | codingo/Office365-REST-Python-Client | 12edbd9f5dd3e161317f6fba78d2c37cda516c84 | d0641e741cabe2066ddcbb5b76a8ef125edcf15e | refs/heads/master | 2021-01-21T11:16:20.895384 | 2017-02-28T10:03:21 | 2017-02-28T10:03:21 | 83,545,564 | 1 | 1 | null | 2017-03-01T11:07:08 | 2017-03-01T11:07:07 | null | UTF-8 | Python | false | false | 167 | py | message_collection.py | from client.office365.runtime.client_object_collection import ClientObjectCollection
class MessageCollection(ClientObjectCollection):
"""Message's collection"""
|
8e504520a843b513bd4cc8c2a663e8f6c19547b4 | d585fd88da2efed765f0ef246ce735cc78ecd516 | /assignment1/query4.py | 9db651ea32d9fd866e6738401cbdae7ea44de9c4 | [] | no_license | ladheniliya/Dataease_assignment | c1832ce6aae3d6ffe518b20c019dbc019e471c35 | 608b1124e8ddaccc987593e3bac1c7bc65ada268 | refs/heads/main | 2023-03-10T17:31:53.966693 | 2021-02-25T13:24:13 | 2021-02-25T13:24:13 | 342,243,515 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 351 | py | query4.py | #!/usr/bin/python3
#4. What Zip Code in Virginia has the highest number of projects?
from merge import virginiaData
import pyspark.sql.functions as f
Virginia_data = virginiaData()
q4 = Virginia_data.groupBy("Zipcode").agg(f.count("ProjectName").alias("Count"))
q4 = q4.sort("Count", ascending = False)
q4.show()
prin... |
94f974ef86531298180f8b49834667705da2ae28 | 5f8f3edd4ec31fb51f97d252afa00c8af92a447e | /tfmsarest/views/dataframe_base.py | 147137a31e8857b721504f6106d171417628db47 | [] | no_license | TensorMSA/tensormsa_server_old | 80a71f9ad7d83d033ef24f94d9c305cb22f753e8 | 17216fd58619b56b6a397178d327687c274c238c | refs/heads/master | 2021-06-10T01:30:57.538931 | 2016-11-28T04:54:50 | 2016-11-28T04:54:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,387 | py | dataframe_base.py | import json
from rest_framework.response import Response
from rest_framework.views import APIView
from tfmsacore import data
class DataFrameSchema(APIView):
"""
1. POST :
2. PUT :
3. GET :
4. DELETE :
"""
def post(self, request, baseid):
"""
create data base with given nam... |
fb18d37873440f513e2d47098855fcaa446e7fda | e851e981f9c8e800457b4171f9f6efda218cf945 | /email_client_triggered.py | 525f093b91430c06d53920b4b7740a28d74a8a6c | [] | no_license | Nyko281/triggered_email_client | 03469e64ada620a7a0f886d1254a92a3c7b5337f | e48ca43504775cdb3757496a30028cbc4cb02cfc | refs/heads/main | 2023-02-01T00:55:08.189954 | 2020-12-15T14:20:41 | 2020-12-15T14:20:41 | 321,681,346 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,957 | py | email_client_triggered.py | #import für Abrfage des Währungskurs
from forex_python.converter import CurrencyRates
#imports für Datum
from datetime import date
import datetime
#imports für E-Mail erstellen/versenden
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
#Funktion zum Versenden der Mail... |
936024b792ced57d63ab3613d18bf8cb1cb989fa | 55efe44e91a4e1466d0cba8fede1c8b9cf26327b | /graph_graph.py | 3f80fe527ba9b2fb7857386416f8e65210dc9259 | [] | no_license | deepakdp1989/Python | 3e30627556b6f5d8ce19915fcedd1dded66e39d9 | 2e12547cb9a019eeb6811d964db3255f72ea7fb9 | refs/heads/master | 2021-07-06T08:15:02.196702 | 2021-03-21T12:41:48 | 2021-03-21T12:41:48 | 227,978,781 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,212 | py | graph_graph.py | """
Graph is a data structure that consists of following two components:
1. A finite set of vertices also called as nodes.
2. A finite set of ordered pair of the form (u, v) called as edge. The pair is
ordered because (u, v) is not same as (v, u) in case of directed
graph(di-graph). The pair of form (u, v) indicat... |
7c82729959b531265eabf71e2b0fc4ce5c66312a | 2848d05c2451dabb6256564f7559be6ec32e32b9 | /models/SSD.py | 87deb120698c8f7aec6a3a3e099e6154c0e9a9de | [
"MIT"
] | permissive | u1353279/SSD-Anysize-1 | e2bc4aa2b9ab65941a89d307fa2df88aeeddb8ff | da11de50ceaa15978861667272193b442b018565 | refs/heads/main | 2023-05-23T20:15:48.302516 | 2021-07-01T05:37:25 | 2021-07-01T05:37:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,293 | py | SSD.py | import torch
from torch import nn
import torch.nn.functional as F
from math import sqrt
from itertools import product as product
import torchvision
import numpy as np
from utils.utils import cxcy_to_xy, cxcy_to_gcxgcy, xy_to_cxcy, find_jaccard_overlap, gcxgcy_to_cxcy
class AuxiliaryConvolutions(nn.Module):
def _... |
af50e3a65c74da36f17823e1929a93f98a003574 | 4edbacc2d5084df35681f250ffe63419882271f0 | /libra/statsd/main.py | defcf7dc30b4e6842557dfca4d7a6a87b9557f36 | [] | no_license | dlenwell/libra | b1392dfa13ebf8567c04c53442b44a6702e00bbd | 94a71b1b25d170a4393f10bb8f4f57ad0ca4ce60 | refs/heads/master | 2021-01-23T23:20:17.992271 | 2013-04-25T21:07:28 | 2013-04-25T21:07:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,393 | py | main.py | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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 applicabl... |
f69ca2823dea8d4b81551cd4bf5b99ce76681947 | ef256b8e6f8f15c61686255ae1133b091c0b5bd5 | /get_samples.py | c9febe77870dd1c765ddfea190fde532cbfe2ade | [] | no_license | Martinsl/mach_learn | 296e62f378aca869834532eb6ed115a6c37e8a44 | 4e3fb5ae278d172308b93f8744b397388770274c | refs/heads/master | 2021-06-08T21:12:00.377455 | 2016-11-17T00:25:24 | 2016-11-17T00:25:24 | 72,660,931 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 731 | py | get_samples.py | import numpy as np
import random
from datetime import datetime
from sklearn.model_selection import train_test_split
def readFile(fileName):
mat = []
classes = []
with open(fileName) as fileobject:
for line in fileobject:
row = line.strip().split(' ')
classes.append(int(row.... |
b3de08d3250d9167817e8e516c6cc9a208662584 | 876757ec7d77bd504e5f574a7c7692e20ed1d66a | /canvas/items.py | a310ae2a38eee34752d3144b54bb5bf6848e637e | [] | no_license | echodarkstar/book_scraper | 9e311f127e16a5c237ee1d964d7fd9c71eb89ee8 | 6794b8270bb1c27dba88420ce7a0bcdef18cc703 | refs/heads/master | 2020-06-19T13:09:49.082603 | 2016-11-27T19:27:04 | 2016-11-27T19:27:04 | 74,903,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | items.py | # -*- coding: utf-8 -*-
import scrapy
class Book(scrapy.Item):
website = scrapy.Field()
title = scrapy.Field()
author = scrapy.Field()
price = scrapy.Field()
btype = scrapy.Field()
rating = scrapy.Field()
blurb = scrapy.Field()
count = scrapy.Field() |
36751aaee6843ff49b6545356b11043d99b35a17 | ffa4713dff9464f3adfe2e40ef655ec0b81053d7 | /fetch-git/src/fetchgit/command.py | 7f5392277ea696bd169138550bbf09f2204f232b | [
"MIT"
] | permissive | target/nix-fetchers | 48cb9da58ecff59af3933d276184e85cd546f056 | b7cc311fd5ea4e56f05e31be3d14e0712831f5d5 | refs/heads/master | 2023-05-04T07:16:16.143305 | 2019-09-01T21:37:00 | 2019-09-01T21:37:00 | 132,016,212 | 43 | 6 | MIT | 2023-04-23T10:16:33 | 2018-05-03T15:38:10 | Python | UTF-8 | Python | false | false | 455 | py | command.py | import subprocess
from fetchgit import log
def cmd(cwd, command):
log.debug("Running {} in {}".format(
" ".join(command),
cwd
))
result = subprocess.run(command,
cwd=cwd,
stdout=subprocess.PIPE,
univer... |
b62cce7278ea88a98b21b66625b45b259390b58f | e43485c025a0ab90bdc8de53bb98f5129515c34e | /parsers/export_to_file.py | fd70b9b411dd693749abb045b4950d208ea00897 | [] | no_license | sidfeiner/FBTools | fa4fdbe4af1b29ef51e6a5f356ca61de002c2422 | f43b813ba944cd373ddd2cf8b44d9630a891756b | refs/heads/master | 2021-06-16T20:17:23.951045 | 2017-05-19T16:00:18 | 2017-05-19T16:00:18 | 52,167,477 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,327 | py | export_to_file.py | __author__ = 'Sid'
################
#
# Write FB group
# users to file
#
################
from fb_main import blankify
from logging import Logger
_ACTION_AUTHOR = 1
_ACTION_COMMENTER = 2
_ACTION_DICT = {
_ACTION_AUTHOR: 'author',
_ACTION_COMMENTER: 'commenter'
}
NEW_RECORD_PREFIX = u'new_record '
NEWLINE ... |
244e1fc40b34567fc322691a4edc33c0c4a28406 | ff287709a2ec2aa9ce1541f5abb3fc94ff4e97dc | /cv19index/shap_top_factors.py | 461c00c2243c18607b74bc6ff017039482deb81c | [
"BSD-3-Clause"
] | permissive | lkrishna-cs/cv19index | bad0628563d307a045853989cca5d4ffdd5dfac9 | 8d3eee13564167745cbcaeca6dfe5f0676cecdf7 | refs/heads/master | 2022-04-21T20:31:50.126390 | 2020-04-23T20:18:18 | 2020-04-23T20:18:18 | 258,040,920 | 0 | 0 | NOASSERTION | 2020-04-22T23:10:15 | 2020-04-22T23:10:14 | null | UTF-8 | Python | false | false | 7,046 | py | shap_top_factors.py | import logging
import operator
import numpy as np
import pandas as pd
import shap
__all__ = [
"append_empty_shap_columns",
"calculate_shap_percentile",
"filter_rows_with_index",
"generate_shap_top_factors",
"reset_multiindex",
"select_index",
"shap_score_to_percentile",
]
logger = logging... |