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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e5589d3bff7547a4e78e0a762c775f7c94803ae7 | 342d6017bc5dec1eea9f2fd5a23df8d84f17e039 | /cube.py | ff3939e97e323eff26cfd128f4201ca2a40526c5 | [] | no_license | marcellmajor/rubik3x3solver | 510640257e849b927229d4cfcacfed19232c69ad | 26996efb39d963eb9c536edbf4537c267c80f959 | refs/heads/master | 2022-12-17T00:28:53.210899 | 2020-09-14T17:21:28 | 2020-09-14T17:21:28 | 269,984,412 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,849 | py | cube.py | #!python
#cython: language_level=3
from solution import *
import colorama
#import sty
import copy
from collections import defaultdict
block_size = 3
blocks_per_face = block_size * block_size
colors = [
"Y", # Yellow
"R", # Red
"W", # White
"O", # Orange
"G", # Green
"B" # Blue
]
color_selec... |
439979248c33b54588e4a7e5e7d0df397aa54b2e | afe6bb10e7406a28530682230671240cdf3ff5c8 | /c/requete/requete7.py | 1b36afd369f15bdf96f03666226eaae095d54b2f | [] | no_license | pastrouveedespeudo/exercice-neurone-arti-ou-un-truk-contre-la-douleur-contre-larrache-des-poiles-de-nez | a46370680abe8082a605cb5efd9528f918f70935 | 238173938108bd695dbceec989bc4405d2d353d1 | refs/heads/master | 2020-04-27T17:25:38.470629 | 2019-07-11T18:05:47 | 2019-07-11T18:05:47 | 174,518,605 | 0 | 0 | null | null | null | null | ISO-8859-1 | Python | false | false | 2,662 | py | requete7.py | #liste numero : 7
a = {'feminin': 1, 'masculin': 0}
b = {'.': 10, ',': 5, ';': 2, '!': 2, '?': 0, ':': 0}
c = {'nb_phrase': 7, 'mot_phrase_max': 30}
d = [['pronom_personnel', 'verbe', 'verbe', 'Aucun_mot_trouvé', 'verbe', 'verbe', 'préposition', 'forme_article_défini', 'forme_article_défini', 'forme_de_nom_commun',... |
a2cff97a63a17a3b4fc4da6201a6491952453acb | 8bb241c3fd27c041d652b9f1749e5fb06eced2fe | /LiceiYandex/GitTes.py | 2528447d2de74ed4aba625eb8163a7f40eec7c91 | [] | no_license | ARiT0-tech/PythonGitProject | 8742defe30bbc5d1d7e695efb8b95aca668f6eb3 | 37d4f0c5a373ef91d95d186b1a0274f546438109 | refs/heads/master | 2023-01-13T07:23:22.980851 | 2020-11-21T07:35:41 | 2020-11-21T07:35:41 | 314,756,887 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 75 | py | GitTes.py | print('Hey!')
for i in range(10):
print('Hello Git!')
print('you gay!') |
15aad81e60f27741bebc30624c9ec78fa95b979f | 88df82cdff5dd71016adac4d56465bc225b52057 | /facial.py | c9791bfe0644541aa8a178a6303c8f2ed54b24f6 | [] | no_license | TejasP182527/Advanced-Facial-Recognition-Software | 3dbacb5a032b1ed3ad6e002b66d430a620ddf70f | 25ef1d84495225e9c40c7da1089f594f90817342 | refs/heads/main | 2023-04-05T17:46:03.892748 | 2021-04-22T08:42:41 | 2021-04-22T08:42:41 | 360,449,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,103 | py | facial.py | from tkinter import *
from tkinter import ttk
from PIL import Image,ImageTk
from time import strftime
from datetime import datetime
from tkinter import messagebox
import mysql.connector
import cv2
import os
import numpy as np
class facialrecognition:
def __init__(self, root):
self.root=root
... |
8d5d671380cb23e8bb387d1075b33f9286a095a0 | 63efada838ca53008db059b067a3859f60c52e11 | /0x07-python-test_driven_development/4-print_square.py | c7203769b5f27cfefb343b0a9ed0be8dd4454267 | [] | no_license | AndrewB4y/holbertonschool-higher_level_programming | 216a15efadbfce8a392bbeb453fd59fa2f1fe9d0 | 281072f74cc2a333d87be58162e434c4ce0c974e | refs/heads/master | 2022-12-17T03:04:27.717163 | 2020-09-25T21:01:26 | 2020-09-25T21:01:26 | 259,469,535 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 931 | py | 4-print_square.py | #!/usr/bin/python3
"""4-print_square module
This module has only one function that prints a square with the character #.
Example:
>>> print_square = __import__('4-print_square').print_square
>>> print_square(4)
####
####
####
####
>>> print_square(10)
##########
##########
##########
##########
##########
#########... |
8c9754c6d86f8455a3a6b20c9bb58943daa48f97 | 8d8b598373ebae0d0bef737e13402c38c0337d14 | /Python基础/if.py | fa88455532e8dfc7e1290d21c2eb9a156b8cf58f | [] | no_license | eagle1949/python | f14bee728b7eac782f769a6a6825d005d53006cf | 22cd5d6fbd650072c5333a33640d59ae6efa3f68 | refs/heads/master | 2021-01-21T10:19:57.290782 | 2017-03-01T07:25:46 | 2017-03-01T07:25:46 | 83,411,954 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 269 | py | if.py | # -*- coding: utf-8 -*-
# @Author: caijw 573301753@qq.com
# @Date: 2017-02-28 14:43:36
# @Last Modified by: Administrator
# @Last Modified time: 2017-02-28 14:43:36
age = 3
if age >= 18:
print('adult')
elif age >= 6:
print('teenager')
else:
print('kid') |
eba977443a5c770b26c424ecc8d77006cb5ee20a | 7102f5d667da9b68622e96c17d22ae5e48c68878 | /Problems' Solution/iterToolsProduct.py | 682b829a105293008c794d1b5f433e8accf4440e | [] | no_license | shahnawaz-pabon/Python-with-HackerRank | 0032ff5c44fe9015f637131ae4d15d1bdc1812be | 53c68e82089f263f52b2c1431faccc979ccad5a3 | refs/heads/master | 2021-07-15T14:46:03.514436 | 2017-05-30T16:20:54 | 2017-05-30T16:20:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 138 | py | iterToolsProduct.py | from itertools import product
li = list(map(int, input().split()))
li1 = list(map(int, input().split()))
print(*product(li, li1)) |
28a92d741d17f261e4ee35f1857ca4073458486b | 8a0e684c8f0f6829a72027f27874a97d93b2e1dd | /interface/plugins/optimizer/OptimizerGAMeta.py | 9c2ad4b67bce1bf8edb55ce1c57d0497eafb5de7 | [
"MIT"
] | permissive | robertsj/poropy | 7ad14473c89dab4c8b6c3f7fcd86b4e3c98b1100 | 481a604339c9fa797817b2b0a55448329685c1d8 | refs/heads/master | 2016-08-07T00:08:44.178343 | 2012-12-08T20:15:00 | 2012-12-08T20:15:00 | 3,001,791 | 2 | 9 | null | null | null | null | UTF-8 | Python | false | false | 3,195 | py | OptimizerGAMeta.py | '''
Created on Feb 17, 2012
@author: robertsj
'''
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from poropy.coretools.optimizer_ga import OptimizerGA
import plugin
class OptimizerGAMeta(plugin.Plugin):
""" Defines metadata for OptimizerGA
"""
def __init__(self,model,parent=Non... |
5d1a3f90892e60a4582c021b098895eaab35e352 | 8fef0463766bd2ae969681fb609dc9a3990c47d1 | /beersite/beerstats/utils.py | fcb4c37c36156f1c1fc5598e813af2760cbdf4e3 | [] | no_license | poohzrn/beersite | 3097991f0e0be08775ee1753ed19fa77e101f3dd | cd76d09ada63052962af775c78ed005767707265 | refs/heads/master | 2016-09-13T11:13:21.811969 | 2016-05-05T11:35:44 | 2016-05-05T11:35:44 | 56,333,029 | 0 | 0 | null | 2016-05-02T09:05:22 | 2016-04-15T16:08:01 | Python | UTF-8 | Python | false | false | 1,824 | py | utils.py | """
Utils used to create highchart data
"""
from calendar import timegm
from datetime import timedelta
from django.utils import timezone
from beerstats.models import Brew
def get_chart_series(interval_size=2):
"""Return series for highcharts with a given interval in hours
:interval_size: interval in hours
... |
87dc4c0ea7ab11ef17e7ffa752f5d377775e15b4 | a8efc24e1688351a82a70e7b332d0eb03b12b810 | /ManjiApi/api/__init__.py | 115ba1bc0ea83ed2e1c7aa5ffeeb3fd70f40c9b2 | [
"Apache-2.0"
] | permissive | ombe1229/ManjiApi | ac8e6290d5f1f917636a164a93184b3ca69294a1 | f02d4b16d44f1e2ba0167b48da5bbf87207181bc | refs/heads/master | 2023-08-14T01:52:20.472920 | 2021-09-20T13:52:02 | 2021-09-20T14:14:47 | 406,831,452 | 1 | 0 | Apache-2.0 | 2021-09-15T15:47:21 | 2021-09-15T15:47:21 | null | UTF-8 | Python | false | false | 227 | py | __init__.py | from sanic.blueprints import Blueprint
from ManjiApi.api.yoshigall import yoshigall_endpoint
from ManjiApi.api.skill import skill_endpoint
api_endpoint = Blueprint.group(yoshigall_endpoint, skill_endpoint, url_prefix="/api")
|
9c270fb0ad0f9069efb41d8d4df37f4732563709 | ad18197306616416b3a90b493b1e8f53f1f423ce | /site_2_process_instrument/forms.py | 87c4d3d40aec843effeff57f35fa1b90fcbe488f | [] | no_license | pulkitmadaanit/heroku-django | f3b8f51503015f2d174e5b3a5f0853266955f1a9 | a8643599b5defb9cedc07e0c9b36e023288576c6 | refs/heads/main | 2023-04-12T13:10:51.937074 | 2021-05-05T16:07:37 | 2021-05-05T16:07:37 | 364,630,773 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | forms.py | from django import forms
from django.core import validators
from site_2_process_instrument.models import Contact
class ContactForm(forms.ModelForm):
class Meta:
model = Contact
fields = "__all__" |
5e9da89c9e6e1f3f6985ab1620dd15e546acc262 | a9c6ac04a314c106aa165291a33f0fc997ba6a79 | /cg/gc_solver.py | 6c98c049427997363a947e9b2d58851c170ece5b | [] | no_license | TristanMoers/IA_Assignment4 | ba6ae25ae18d8664091b3729a5bdc91e42a3d3d9 | 9a3d5beff1df6f5a68a40f362cb30565baae1585 | refs/heads/master | 2020-04-09T12:11:25.014967 | 2018-12-12T16:52:38 | 2018-12-12T16:52:38 | 160,338,986 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,108 | py | gc_solver.py | import sys
import graph
from clause import *
"""
For the graph coloring problem, the only code you have to do is in this file.
You should replace
# your code here
by a code generating a list of clauses modeling the graph coloring problem
for the input graph and give number of colors.
You should build clauses using... |
7dbfce1db083a391c582aba31bec1a4d1aba665e | b3dbaa7cbf471ee1b4a67f84b2441641e5910711 | /models/sbn.py | b777c391273d872d54eb1e7204f30a6748c6a876 | [
"MIT"
] | permissive | kuleshov/deep-learning-models | 4affebfc4f9ee1ed5c269abb7d024aedbaaf3da3 | fa755f54f5692739f71c969b1ae489b17de84ae3 | refs/heads/master | 2021-06-20T07:34:43.234101 | 2017-07-11T03:12:49 | 2017-07-11T03:12:49 | 75,018,376 | 28 | 22 | null | null | null | null | UTF-8 | Python | false | false | 6,422 | py | sbn.py | import time
import pickle
import numpy as np
from collections import OrderedDict
import theano
import theano.tensor as T
import lasagne
from theano.gradient import disconnected_grad as dg
from model import Model
from layers import BernoulliSampleLayer
from distributions import log_bernoulli
# ----------------------... |
cd88d7d44d5569eceb2b0bbc7bb0ffb6dde03305 | ed3ddf4671778bd46905a3e7c58c02d40c7dd20c | /pdf_bot/commands/photo.py | c3bf81574331fa94a7426052baef20c49dfd74f6 | [
"MIT"
] | permissive | TharukRenuja/PDF-Bot | 2b503f9663f10d7888c5a16db8411bc63bc47a41 | 113ff92a1a283b84c6d6d8e6178eb98c4ff270df | refs/heads/master | 2023-08-29T00:01:04.824796 | 2021-11-07T00:46:38 | 2021-11-07T00:46:38 | 425,807,883 | 1 | 0 | MIT | 2021-11-08T11:18:44 | 2021-11-08T11:18:43 | null | UTF-8 | Python | false | false | 7,756 | py | photo.py | import os
import tempfile
from collections import defaultdict
from threading import Lock
from typing import List
import img2pdf
import noteshrink
from telegram import (
ChatAction,
ParseMode,
ReplyKeyboardMarkup,
ReplyKeyboardRemove,
Update,
)
from telegram.constants import MAX_FILESIZE_DOWNLOAD
fr... |
0348b1c8e8ae14bda0c26bcdad7497d84bffc468 | 24025fac5a9c6c8930d85808059562afff3a5586 | /pre.py | 7f2f35ec2991e9ba3be7fa5cfe44826daf555aaa | [] | no_license | hhliu79/Fairness | 6da1709c2cd247df2fb4ec7483eef18603d4f48e | 4b5cb533f9c8c5f04bdd3dcc3a1488ddab6448b9 | refs/heads/master | 2020-08-07T15:04:51.702922 | 2020-02-14T18:22:22 | 2020-02-14T18:22:22 | 213,498,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,174 | py | pre.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 3 11:13:46 2019
@author: huihuiliu
"""
from aif360.algorithms.preprocessing.disparate_impact_remover import DisparateImpactRemover
from aif360.algorithms.preprocessing.lfr import LFR
from aif360.algorithms.preprocessing.optim_preproc import Optim... |
003931ddc3b4dd454fe3dd4ce116fe66015c6633 | 804c23bb1505ca652cb35ef66e5bfd5da041dd12 | /Assignment2/src/prob3.py | acaff031a7660013d19533e25b1a68281e547c1b | [] | no_license | gurjot273/ML-Assignments | 59bfc84c0c093d40b320e6e033e26b4968711ac2 | ae6f84451e8f3865752e62d900c0c6eeb706610f | refs/heads/master | 2023-04-05T20:01:02.626184 | 2021-04-24T05:57:16 | 2021-04-24T05:57:16 | 361,079,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,994 | py | prob3.py | import pandas as pd
import numpy as np
from sklearn.metrics import accuracy_score, precision_score, recall_score
from sklearn.model_selection import KFold, cross_validate
from sklearn.tree import DecisionTreeClassifier
#Part 1
class Node():
isLeaf=True
label=0 # if isLeaf=True, label of node
splitAttribute... |
b7ad7e2122bc0222340368b519db7221053f6e18 | 07f5718de8c45f7743b80e5ea402a15b8530e9db | /pylineid.py | 94d9de133aa13a0e458ef2bb41c8f768573768a0 | [
"BSD-3-Clause"
] | permissive | naumruso/pylineid | ff25e6f0c78cd3cc8e36ab584b49ece90fc0c7ae | 6fed99273c5cb1270fe249f7f6f4eeb18fdbb597 | refs/heads/master | 2016-09-05T20:21:08.119436 | 2015-02-15T21:30:25 | 2015-02-15T21:30:25 | 28,695,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,969 | py | pylineid.py | import numpy as np
import matplotlib.lines as mlines
__version__ = '0.1'
def _convert_to_array(x, size, name):
"""
Check length of array or convert scalar to array.
Check to see is `x` has the given length `size`. If this is true
then return Numpy array equivalent of `x`. If not then raise
Value... |
e5204ad4bb99064e3df1a1bcf77c4743510a3ca1 | 6f79722871e2650ef0ceb490ab3f2a720c8d29b2 | /Plot/3dplot.py | 391b93e88ecf7a45b2c6f409137ef265eac1f066 | [] | no_license | carollaurini/Bayesian-Network | b0d598b44ee6fdfd4539887e7f3e0c46c2c733ff | b3b7bd08d13249d5e7be92a77ef3e23536298b76 | refs/heads/master | 2021-01-22T04:33:45.964310 | 2015-07-20T13:34:07 | 2015-07-20T13:34:07 | 26,274,230 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | 3dplot.py | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from pylab import *
from mpl_toolkits.mplot3d import axes3d
df=pd.read_csv('Out.txt',sep=' ')
#print df
fig= plt.figure().gca(projection='3d')
fig.scatter(df.Twet,df.Load,df.Tset)
fig.set_xlabel('Twet ($^\circ$C)',size=30)
fig.set_ylabel('Load (Ton... |
cef02824f93c74e431432a2f5231abce5121ff8d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03088/s122549861.py | c024ebaaacadca9d47ff0b614621b8216c8d2aea | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 913 | py | s122549861.py | import sys
input = sys.stdin.readline
n = int(input())
dp = [[[[0]*4 for _ in range(4)] for _ in range(4)] for _ in range(n + 1)]
c = [0, 1, 2, 3]
import itertools
pers = itertools.product(c, repeat=3)
for p in pers:
if p in [(0, 1, 2), (0, 2, 1), (1, 0, 2)]:
continue
dp[3][p[0]][p[1]][p[2]] = 1
for i... |
7f53005fbc243fc79fa6d357f8e9b77870a471c1 | 0cdda1d1917f65b66dd694ca4a02d168106b2853 | /Twitoff-01/twitoff/models.py | f135c2fa287d24a071a995ef0f178a229e722343 | [
"Apache-2.0"
] | permissive | ivan-mihailov/LS-Unit-3-Sprint-3-Module-2 | fba6cfc9dcfc27ba9a10656e4b1b82364f83877c | 1ef17d182e3914b84ee9b2ae60b8dc823f7a81b0 | refs/heads/main | 2023-06-24T23:15:50.817169 | 2021-07-20T23:47:03 | 2021-07-20T23:47:03 | 387,852,375 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,069 | py | models.py | """SQLAlchemy models and utility functions for Twitoff Application"""
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
# Create a 'user' table
class User(db.Model):
"""Twitter User Table that will correspond to tweets - SQLAlchemy syntax"""
id = db.Column(db.Integer, primary_key = True) # id as Prim... |
5cc2f9f6d87cd62d4a277985df70be4f5dd2f4ec | 18b705e5f7f05fabab9d05f08e07a64cc57f97cc | /ex3.py | e9d2e0492cc4c293fbb449a9b7f6d9f0b54ccb55 | [] | no_license | sioLabs/lpthw | 91bedab67425c9b4aa198b6d72c772a30d99e6c4 | c5b1beb737fd482d400f4a4a7b34bf93c1eb2a4a | refs/heads/master | 2016-09-06T13:56:59.514544 | 2013-10-08T13:38:14 | 2013-10-08T13:38:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 609 | py | ex3.py | # Simple print
print "I will now count my chickens:"
# show in same line as hens
print "Hens", 25+30/6
#show in same line as Roosters
print "Roosters", 100-25 * 3 % 5
# directly print the calculation
print 3 + 2 + 1 -5 + 4 % 2 - 1 / 4 +6
# no calculation inside double quotes
print "Is is ture that 3+2 <5 -7 ?"
#dire... |
40d5ec5e4144b2380fc56ec4b3d7f9f03c1ebfd3 | b6662ade2cb76e561c16e25d21e08881ec596d56 | /1/1_2_remote_machine_info.py | 0bcce658deed1ff4c8d00cb52d3b8105008f40ee | [] | no_license | zjicmDarkWing/PythonNetwork | dc73bf811f6bb6e17d4f4d5ca1f8fcad7e866de9 | ffab0f3a910e9b23e627e45c11277654ed01ddc9 | refs/heads/master | 2021-01-17T11:34:42.789534 | 2016-04-18T14:19:30 | 2016-04-18T14:19:30 | 42,482,992 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 327 | py | 1_2_remote_machine_info.py | __author__ = 'DarkWing'
import socket
def get_remote_machine_info():
remote_host = "zjicmisa.org"
try:
print "IP address: %s" %socket.gethostbyname(remote_host)
except socket.error,err_msg:
print "%s: %s" %(remote_host,err_msg)
if __name__ == '__main__':
get_remote_machine... |
10f8c9c0137e88f3269aaeff367d995ae4261216 | d75e3bb585bc96bf0e6e8c65fb76aece3fcc2721 | /pycryptoclients/markets/stocks_exchange/api.py | 6bf6d369cd1447ae95605b4391841dd2a5094b65 | [
"MIT"
] | permissive | Vlsarro/pycryptoclients | a0e999ab30b7447c75cd45bd0cd6e364c59b5955 | 9f03d6b1d7fa69cce7de2cbfa9623f8bb2285b33 | refs/heads/master | 2020-03-26T01:15:22.878783 | 2018-09-26T10:04:35 | 2018-09-26T10:04:35 | 144,359,253 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,568 | py | api.py | from pycryptoclients.api import APIMethod, CCAPI
from pycryptoclients.markets.stocks_exchange.request import *
from pycryptoclients.markets.stocks_exchange.response import StocksExchangeResponseParser
DEFAULT_STOCKS_EXCHANGE_API_METHODS = (
# Public methods
APIMethod(name='ticker', request=TickerRequest, pa... |
d2b40ca45fac1b3c0896e3a1ce89e48683d28f30 | 85b5a47dc95d97a2db392a100c1a0bbcf81d82ca | /DP/bj11055.py | 0b68aa875af09c6d1ba6eec373501e63a4d04540 | [] | no_license | fromjwy/Algo | 5eb648757f6dd684f95733b98bb0628c2e2dd0cc | f227b97b8150159fb068af79e69daf413c200cd9 | refs/heads/master | 2023-03-11T06:18:48.439320 | 2021-02-25T03:42:13 | 2021-02-25T03:42:13 | 328,083,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 304 | py | bj11055.py | import copy
N = int(input())
num = list(map(int, input().split()))
DP = copy.deepcopy(num) # 자기 자신이 최대 증가부분 수열일 수 있기 때문에
for i in range(1, N):
for j in range(0, i):
if num[i] > num[j]:
DP[i] = max(DP[i], DP[j] + num[i])
print(max(DP))
|
6b896b23aaf5f31042088543fe67beccdad0b2f3 | 86c4115ad7ec1128a499eb46df2a74ede2b840cf | /VegeTestBot.py | 07539cbec6e2c58d1fdeec5a6641692da97280e5 | [] | no_license | VeikkaL/RenaissanceBot | 726966ec4ef405be330b64eb90444faf04b7fb08 | 946e50c3d2abeb9399ed84eb5f13bccba8f51574 | refs/heads/master | 2020-04-16T13:40:03.029432 | 2019-06-18T10:40:25 | 2019-06-18T10:40:25 | 165,637,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,177 | py | VegeTestBot.py | # TODO
# - Symbolilistat
# - Nousijat/laskijat
# - Aamuviestit
# - Lähetys jos ei usernamea
# Osaketietojen hakemiseen
from yahoo_fin.stock_info import *
# Telegram-botin käyttöön
import telepot
from telepot.loop import MessageLoop
import time
aika = time.gmtime(time.time())
token = '860817945:AAGQLppRDE0mtBTps3C0-... |
1bf3b09bee2d6d9ecedd5cd968ba91ff02767c60 | 8cdc0fbaee075f7cea312e07c794882dd69ad521 | /Regular_Expressions.py | 7d8f26815328be544a2d0dcf2f5d619eba8739c2 | [] | no_license | Anirban2404/Python_Coursera | 51af7889ae53a69e280ed05fafe3cd56fd539b3d | 77260ff38d02db4f5dde27f9a2ab1212cfe3f61d | refs/heads/master | 2016-09-01T11:50:12.189288 | 2016-02-14T15:25:13 | 2016-02-14T15:25:13 | 51,699,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,779 | py | Regular_Expressions.py | # Finding Numbers in a Haystack
# In this assignment you will read through and parse a file with text and numbers.
# You will extract all the numbers in the file and compute the sum of the numbers.
# Data Files
# We provide two files for this assignment.
# One is a sample file where we give you the sum for your testing... |
9a9ec3be3f112ffba25ec6d9fe3b1a0b4376024c | 2d152b6816979cc0cc4d851e0f08561e59b888b7 | /store/migrations/0011_auto_20210816_1604.py | 73685a44b9baacf95afda2d8bbf854d10de5ce61 | [
"MIT"
] | permissive | gamersdestiny/e-commerce | 06258a3baef8bc30ddb757f66ef804602f51ff19 | 0fb885a8439c1658a5fdca08e3d4ca6557c147a5 | refs/heads/main | 2023-07-18T05:05:40.255107 | 2021-08-24T04:50:29 | 2021-08-24T04:50:29 | 395,335,636 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 536 | py | 0011_auto_20210816_1604.py | # Generated by Django 3.2.6 on 2021-08-16 16:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('store', '0010_alter_product_slug'),
]
operations = [
migrations.AlterModelOptions(
name='ratings',
options={'verbose... |
01a634994051b2ce4042e256b2bc3dab7d105c5e | 144af44ed89e09798aa58bebdc9fe25527605160 | /Code/Implementation/Stable_baselines/stable_baselines_logging.py | a83c00644f0268b1bd3c138ff9d248c662690ff0 | [] | no_license | csingh27/Masterarbeit_minimal | d6d3b2307b24b8a6f1c3da92ad8f3aee6c648cc3 | 1ab8225431f989073520f2fa954e89aeca2e02b4 | refs/heads/main | 2023-06-25T18:50:24.496597 | 2021-07-29T21:43:25 | 2021-07-29T21:43:25 | 390,402,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,675 | py | stable_baselines_logging.py | import numpy as np
import matplotlib.pyplot as plt
from stable_baselines3 import SAC
from stable_baselines3.common.callbacks import BaseCallback, EvalCallback, StopTrainingOnRewardThreshold
from stable_baselines3.common.logger import Figure
from stable_baselines3.common.logger import Image
# from PIL import Image
impo... |
7259d4551cf4e0f9569bd559b705511e28d9f4b3 | 41cfb005a2a646896bc5999fc794d6f9eecb6592 | /cluster_50_scaffolds_sublib0_relto11ntR.py | fab6f441634a1c8562afb0cc69ab469493f73486 | [] | no_license | bonils/TL_TLR_CHIP_Data | a1414123633c6019cdfb32907daf351a2f1419e4 | 96ede92e7ea024cfdd1187b357798b6a989b2baf | refs/heads/master | 2020-03-17T19:42:31.408941 | 2019-01-15T19:10:51 | 2019-01-15T19:10:51 | 133,874,137 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,631 | py | cluster_50_scaffolds_sublib0_relto11ntR.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 24 17:00:43 2018
@author: Steve
"""
# Import sublibrary 0 and create a table with rows being each of the ~150 tetraloop
# receptors and each of the columns being dG measurements.
# Because there were 50 scaffolds for each TLR and each of these was ... |
360c7a06d81eadfdacd1e68014a3c605cdc13115 | 0c452531396c6918c84e4dff719f697f8d177bcb | /FreeRice.py | f4c7abbe234b0bb1e0996790b9442e1788bd646d | [] | no_license | mgovster/Freerice_Bot | 6f8c56771ebd9cfd88972bd8426bae05278b9bd4 | 255abcd6dc8d65733d767a02cb2bf965ed454040 | refs/heads/master | 2022-11-16T04:47:31.464514 | 2020-07-05T04:15:34 | 2020-07-05T04:15:34 | 276,719,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,395 | py | FreeRice.py | #Created By: Matt Govia (Started on: 7/1/20)
#This version cannot use selenium (as it is blocked from the website)
#therefore, we will have it download the html page everytime, (overwriting the previous one to save space)
#we will use pyautogui at start to download html file, open file, get question and answers, clo... |
25ae87aea3f21a0fcb93f5dbe8e31b60a0dd9864 | 96dd9cd4816530b51e68fd626ea0350deab64fd8 | /test-archive-process-email | 0570e9544918015b114d2e5c805e43aa81755d8a | [] | no_license | mhall119/debian-nm | df39b56f21cbc62d68ecde8ab8e76ea1773b97cf | 8593df2129b38fd615aaf16d04c28c322598d923 | refs/heads/master | 2020-04-28T21:28:18.706890 | 2014-01-19T23:52:18 | 2014-01-19T23:52:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,764 | test-archive-process-email | #!/usr/bin/python
import sys
# Avoid creating archive-process-emailc
if hasattr(sys, "dont_write_bytecode"):
sys.dont_write_bytecode = True
import imp
import unittest
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
import settings
import backend.models as bmodels
from cStringIO import String... | |
7508acba5180e137bf58dde33e5f6147eb6ecd28 | eff1ccf0ad6b136b5ed6bfca12e76ae50e776a5a | /python/11最大容器.py | b091d3deecb25d35bbea05d34e795c5ddbff8ecb | [] | no_license | jiushibushuaxie/my_leetcode_path | 905567d006ec794f7a92a2ebaaf59444fe760c0f | 2af4b934e626a13a2533543b1432cc537735c428 | refs/heads/master | 2020-08-03T07:58:54.079358 | 2020-07-15T16:09:14 | 2020-07-15T16:09:14 | 211,676,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | 11最大容器.py | # -*- coding: utf-8 -*-
# 双指针法
class Solution:
def maxArea(self, height) -> int:
i = 0 # 首
j = len(height) - 1 # 尾
maxarea = 0
for k in range(len(height)):
if j == i:
break
if height[i] <= height[j]:
maxarea = max(maxarea, h... |
ab24cce977a928363e05fc8a9345fe68370af8e6 | 78c032e42c0f4b136764857cc7b5f97e57ae3bae | /networks/alex_net/alex_net64_reg.py | 072172c154a5c29f4e14eab5ecf83fad749cc533 | [] | no_license | jachansantiago/learning_bee_fingerprints | 533ecd0d77f63c369241c709b54391dfe507cd11 | d0e22463aef12750e467b3cb8030415db5c1cd10 | refs/heads/master | 2021-10-20T16:35:26.967652 | 2019-02-28T23:10:19 | 2019-02-28T23:10:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,242 | py | alex_net64_reg.py | import sys
sys.path.append("../../")
from utils.utils import get_model_memory_usage
from keras.models import Sequential
from keras.layers import Flatten, Dense, Dropout, Conv2D, MaxPooling2D
from keras.layers.normalization import BatchNormalization
def alex_net64_reg(input_shape):
model = Sequential()
model.... |
3db5409a7fb44350bee8da63691dec9a1c429150 | fdcb91e07680b7df93534b2bf0022c1dacfb2ee9 | /python/userEffort.py | 045c73769e67cf061a17d8b2b44cc96e18ca84bb | [] | no_license | katariasahil/training | 6861759993bf17a3208ee2c7923913ccae0a239b | 07a63fe5452df5533fd06edd98bb1474f0679c14 | refs/heads/main | 2023-08-19T11:21:38.140566 | 2021-10-01T02:47:43 | 2021-10-01T02:47:43 | 406,339,943 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,341 | py | userEffort.py |
class Project:
def __init__(self,id,name):
self.id = id
self.name = name
self.users = []
def addUser(self , uid , usalary,effort):
self.users.append([uid , usalary,effort])
class Users(Project):
... |
2e428a2c1b28a2e0f834c4f9f6a863419ab0a9fe | e1ed70133f713e52774dff991ae19696b2f3b0d2 | /express/properties/convergence/ionic.py | f309b2990f036402cfb036cd5cdeb6ef07492150 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Exabyte-io/express | 9374356cc5e3b880f4657f10ba229253cbcae2b0 | 3cbcb5896f6e60773dc5408840dc2a05508d316d | refs/heads/dev | 2023-08-17T13:18:57.818440 | 2023-08-07T23:16:48 | 2023-08-07T23:16:48 | 98,949,355 | 3 | 2 | NOASSERTION | 2023-09-12T04:32:30 | 2017-08-01T02:16:21 | Python | UTF-8 | Python | false | false | 426 | py | ionic.py | from express.properties.non_scalar import NonScalarProperty
class ConvergenceIonic(NonScalarProperty):
"""
Convergence ionic.
"""
def __init__(self, name, parser, *args, **kwargs):
super(ConvergenceIonic, self).__init__(name, parser, *args, **kwargs)
def _serialize(self):
return ... |
0668978411a5462f9d2c8fad4deed4c5e4d8c854 | 455b03239d18d757e91d793c7fb9cb0240640fed | /MEMM/src/test/python/features_manager_tests.py | 17c8a465a7c489841b20c4df47cc86bee793cdda | [] | no_license | idansc/NLP_Course | 1e504f8baa4d8f3154c5068dc7ba7f55b59d2950 | 40b3c472801aec5cc11ad136cb244c3cbdb6d6a2 | refs/heads/master | 2020-06-30T16:52:37.882158 | 2016-01-28T06:19:09 | 2016-01-28T06:19:09 | 66,170,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,772 | py | features_manager_tests.py | import unittest
import constants
import numpy as np
import utils
from math import exp
from dataparser import Parser
from features_manager import FeaturesManager
from history import History
class FeaturesManagerTests(unittest.TestCase):
# def __init__(self, *args, **kwargs):
# super().__init__(*args,... |
2be695cb0d6e091d7c6c30852e18a0a959452b94 | 67145e12dbc2ec0ad587b900da1e7c2b5fb5ae96 | /python/swee-admin-client.py | 7c8b4d2a745b5b7f7251d41ce210633cb5f40213 | [] | no_license | S0l0m4n/random-code | 6337ee0ed0cba92ebc4c423fa2995ca8e0b636bf | 325da1753a6f67e7c6ad11b12befa5a6168f2b88 | refs/heads/master | 2021-12-03T19:41:07.041073 | 2021-12-03T15:04:11 | 2021-12-03T15:04:11 | 209,807,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 929 | py | swee-admin-client.py | #!/usr/bin/python3
# A web client in Python to connect to the SWEE admin server for
# automatically download device logs. In particular, I want to see if I can
# download the CO2 data from the NZ units. This data is obtained from a SWEE
# device's web page on the server as follows:
# - Click 'Logs'
# - View full lo... |
31fa73fa6e29b2a0a94404f269f4ad58f0fa5314 | 61384364d4df24d5f32bd3eb2fb443c981048d96 | /tests/models/remote_ref.py | d4ba9390ee1a68746986c100165a7850ca97bd6f | [
"MIT"
] | permissive | jacksmith15/statham-schema | 39728ad0217955d08932b0aed73694178673b5f9 | d283dccf26180f910efe2fe89c929852d24b07a5 | refs/heads/master | 2023-08-20T23:00:24.772056 | 2023-08-06T10:19:18 | 2023-08-06T10:19:18 | 219,737,673 | 39 | 12 | MIT | 2023-08-06T10:16:56 | 2019-11-05T12:17:15 | Python | UTF-8 | Python | false | false | 760 | py | remote_ref.py | from statham.schema.constants import Maybe
from statham.schema.elements import Object, String
from statham.schema.property import Property
class Category(Object):
"""Category with required name."""
required_name: str = Property(String(), required=True)
class NestedRemote(Object):
"""Local reference nes... |
d0a5ed61a1e66215a47c9b2a38d4dc1a9a5b7b0f | b1f758fe41032379701ec579d61d276834f7255e | /intermediate/python/ex1.py | 6273ab6ba2f71f0b13571748ad43a117c65572e0 | [] | no_license | hhhzzzsss/Programming2017 | 410bd8322501fce2dbdc32d29abb7816f62ea0c4 | 2876a6fbb046f7b40853dd58d7f25223bdf740a6 | refs/heads/master | 2021-09-03T08:56:02.431572 | 2018-01-07T20:24:29 | 2018-01-07T20:24:29 | 104,685,708 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 513 | py | ex1.py | def ternary(num):
val = range(8)
t=num;
for i in range(0,8):
val[7-i] = t % 3
t = t / 3
return val
for i in range(6561):
expr = "1"
permutation = ternary(i)
for j in range(1,9):
if permutation[j-1]==1:
... |
8e929949b4492a723f99196578c9dc5beb6a2b7b | 122306a7e284774ac80c6fc381e4db2f26ea0c30 | /emission/net/usercache/builtin_usercache.py | 234abb3b0cda734383720473ec9ef14b33f73397 | [
"BSD-3-Clause"
] | permissive | e-mission/e-mission-server | 4da028e34eaac32c0d27ec929f68b23905e6ca1e | 94e7478e627fa8c171323662f951c611c0993031 | refs/heads/master | 2023-09-01T06:53:33.926971 | 2023-08-15T23:39:00 | 2023-08-15T23:39:00 | 26,307,245 | 26 | 131 | BSD-3-Clause | 2023-09-14T05:08:59 | 2014-11-07T06:39:02 | Jupyter Notebook | UTF-8 | Python | false | false | 6,923 | py | builtin_usercache.py | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
# Standard imports
from future import standard_library
standard_library.install_aliases()
from builtins import *
import logging
import time
import pymongo
# Our imports
i... |
7fc1180262fa9046023ff29684367f675925db6e | 6d233ad2059a941e4ce4c5b5ee3857b8a4a0d212 | /Everyday_alg/2021/05/2021_05_11/remove-outermost-parentheses.py | 12ca6da595dd16467d5553329c86e7654ee1f8c3 | [] | no_license | Alexanderklau/Algorithm | 7c38af7debbe850dfc7b99cdadbf0f8f89141fc6 | eac05f637a55bfcc342fa9fc4af4e2dd4156ea43 | refs/heads/master | 2022-06-12T21:07:23.635224 | 2022-06-12T08:12:07 | 2022-06-12T08:12:07 | 83,501,915 | 5 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,851 | py | remove-outermost-parentheses.py | # coding: utf-8
__author__ = "lau.wenbo"
"""
有效括号字符串为空 ("")、"(" + A + ")" 或 A + B,其中 A 和 B 都是有效的括号字符串,+ 代表字符串的连接。例如,"","()","(())()" 和 "(()(()))" 都是有效的括号字符串。
如果有效字符串 S 非空,且不存在将其拆分为 S = A+B 的方法,我们称其为原语(primitive),其中 A 和 B 都是非空有效括号字符串。
给出一个非空有效字符串 S,考虑将其进行原语化分解,使得:S = P_1 + P_2 + ... + P_k,其中 P_i 是有效括号字符串原语。
对 S 进行原... |
fa7384539dd8ae3a9bb65bb8bdc7fc4f13842273 | b0f18f2cfb3628178a0ee3a3277dfb8e635b0db4 | /star_wars/url_history/admin.py | 5652b1e3ee8a50df1c82475b33bca0965dece7ce | [] | no_license | adamorat/technical_interview | 6cce8b28a1652c35be7f51128f8fbe9f969b3773 | baeb87f36e29a8f7f20f0ebdb5b2bda00cfea351 | refs/heads/master | 2022-07-28T06:36:25.351685 | 2019-06-13T20:33:34 | 2019-06-13T20:33:34 | 190,880,653 | 0 | 0 | null | 2022-07-05T21:29:23 | 2019-06-08T11:35:50 | Python | UTF-8 | Python | false | false | 120 | py | admin.py | from django.contrib import admin
from star_wars.url_history.models import UrlHistory
admin.site.register(UrlHistory)
|
05470b62785bb721b54ad0bd0bb3c7e347c004db | 22735b5ded6b2af2dfc45002c88a4ab30f7d4497 | /Controller/communication/server_utilities.py | f875c6963490ee7dda10b9d3592b6712bbaf79bf | [
"MIT"
] | permissive | Ernstsen/RC-car | 618b2852eb294cc34ebba92fa27590562004ab78 | 6ec176c74ef58ab4ee3e434765c01f25b6c5803b | refs/heads/master | 2023-06-09T05:51:33.907351 | 2023-06-04T14:36:14 | 2023-06-04T14:36:14 | 335,721,674 | 1 | 0 | MIT | 2023-06-04T14:36:15 | 2021-02-03T18:43:52 | Python | UTF-8 | Python | false | false | 2,562 | py | server_utilities.py | # Python program to implement client side of the control-flow
import socket
import sys
try:
from communication import Configurator
except ModuleNotFoundError:
from Controller.communication import Configurator
def create_server(port: int) -> socket:
"""
Establishes a connection to a server
:param... |
e14ea47ad782562adfea9d5c4281b26e55390a84 | 6ae839b988610d7fde00150525a1b8ba01673825 | /cache_image/models.py | 15658f4577bf8c3f4cd4c45090bb2f1d160c2baa | [] | no_license | humanalgorithm/flickrimagesearch | a49f78cc67feb95d5a814e2b30ef552d7600b32b | 5589ab599b756826a0e467eab1eead09e2d20ac4 | refs/heads/master | 2021-08-16T13:45:55.324907 | 2017-11-20T00:57:40 | 2017-11-20T00:57:40 | 111,261,936 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 368 | py | models.py | import base64
from django.db import models
class CacheImage(models.Model):
_data = models.BinaryField(
db_column='data',
blank=True)
def set_data(self, data):
self._data = base64.encodestring(data)
def get_data(self):
return base64.decodestring(self._... |
298c5d69ba6ac1a57132baa27506ca64525fac37 | 23f3349e8b50f0cb3e461bbd65c1ea8dec792d0b | /2_semestr/pygame_3.py | 2bcf411c70ff5d1d1940643a830b2830a542169b | [] | no_license | JacobLutin/Python_bmstu | d17866dbab0e74f0f9d600c4dbd9d53eb5c5b7be | 66fd8679de7556978b9cd1e9fd8646a8d7d6daa8 | refs/heads/master | 2020-05-29T14:40:09.310602 | 2017-03-27T05:18:58 | 2017-03-27T05:18:58 | 64,742,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 608 | py | pygame_3.py | class Position:
def __init__(self, x, y):
self.x = x
self.y = y
def __call__(self):
return (self.x, self.y)
class Collider:
def __init__(self, x, y, dx, dy):
self.x = x
self.y = y
self.dx = dx
self.dy = dy
def __call__(self):
return (x, ... |
43f6bafebaada5ad483cc3635eba3e65bc36748a | 19b8bd5efc22460ea3436f15e7ea6669c344a693 | /run.py | edc026359c6bd283059a87fff12c5217402618e2 | [] | no_license | thumb0422/bs4 | 52be25264b3fd6447a0d40c045df84cdd8fe0949 | b4f396d70ba3390a0425e6bc16825e159432b9e2 | refs/heads/master | 2020-03-08T03:06:50.198231 | 2018-05-17T10:11:57 | 2018-05-17T10:11:57 | 127,867,312 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,095 | py | run.py | # -*- coding=utf-8 -*-
import datetime
import urllib
from threading import Thread
urlStr = 'https://www.toutiao.com/i6537157013078540814/' #执行网址
threadCount = 100 #线程数量
threadColumn = 100 #每个线程执行次数
class MyThread(Thread):
def __init__(self,name):
Thread.__init__(self)
self.name = name
def ru... |
7a209d963565602e570d80125537d89a9a6031e1 | d726897bd5f4318f2e851f855417ded42dfc8ce9 | /PyCharm/Finding a Motif in DNA.py | b3261664789807c0a94b98c2f74998ff5bb356ad | [] | no_license | itslexiii/Rosalind | 7696e800eecda29404948b62d5be6dda24206bfc | c286d11b9b00d905457f8b0dc04a396c18e6232c | refs/heads/main | 2023-02-21T23:22:36.451204 | 2021-01-25T08:17:14 | 2021-01-25T08:17:14 | 331,555,700 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 717 | py | Finding a Motif in DNA.py | # http://rosalind.info/problems/subs/
# If using finditer in regular expression, only the first overlapped motif would be found.
import re
def getseq():
fname = input("Please input file location.")
f = open(fname, 'r').read().split('\n')
gene = f[0]
motif = f[1]
return gene, motif
def find(gene... |
ccae7f01efb72c94ee8bdd2be6b6367b992f2af1 | b803eb1ab9c7a98dc8b8a00729b12f9b45b56e08 | /others/fibonacci_modified.py | ed7175b3fd49f2d6a11e27a4a7f731e213de0955 | [] | no_license | eguru/dsa | 439784426c6462ca5e547b6dd9d8ec4cb3b6e474 | b5bdd2d6b8140b3eed5f885affac54f9b1272e99 | refs/heads/master | 2020-05-29T09:16:43.176032 | 2016-09-28T10:04:55 | 2016-09-28T10:04:55 | 69,448,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | fibonacci_modified.py |
n, n1, n2 = [int(i.strip()) for i in raw_input().split() if i.strip() ]
n_val = 0
for i in range(2, n2):
n_val = n1**2 + n
print i, n, n1, n_val
n = n1
n1 = n_val
print n_val
|
05ae467c04db4a48d66e451e3c2441d57ba01f85 | ef2cf849927462be49d44a742cc4d22c25355c3f | /src/convex_covering_spaces/torus.py | 0c05f8a5f13dd292c673566b7618b18daa4b71f1 | [
"MIT"
] | permissive | dyershov/quasi-delaunay-triangulation | 5db922aef116a68cc84cd5f3535a6381b36c9547 | 568355da5aab4ac8d6ed3329d2dfd6107f16a618 | refs/heads/main | 2023-05-30T14:54:07.855990 | 2021-05-14T16:10:27 | 2021-05-14T16:10:27 | 366,471,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,843 | py | torus.py | class Torus:
def __init__(self, dimension_number, period, sphere_radius=1.0):
import itertools
import numpy as np
self.__dimension_number = dimension_number
self.__period = np.array(period)
zero_pattern = (0,) * dimension_number
self.__replication = self.__period * ([... |
f383bdc08ff9e609d5131825ca3dc48f72cf7dc8 | 2d6310418b6237ff5bf7c038516872923a60d5ce | /dpf_particles/scripts/simulate_params.py | 5a1db825ffb4b2dc76fc29a290e7e5d1c451f4ac | [] | no_license | Roth-Lab/pgfa_experiments | c3b0743b0ade0271c39655d1ecbc8e648711d27c | bc528d4f34f1ae8ee915a6d02f24e655a8cc6b46 | refs/heads/master | 2023-06-11T13:26:48.261435 | 2021-06-25T22:36:14 | 2021-06-25T22:36:14 | 215,677,326 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,324 | py | simulate_params.py | import h5py
import numpy as np
import yaml
import pgfa.models.lfrm
import pgfa.models.linear_gaussian
import pgfa.models.pyclone.binomial
def main(args):
with open(args.config_file, "r") as fh:
config = yaml.load(fh, Loader=yaml.FullLoader)
if args.seed is not None:
np.random.seed(args.seed)... |
f3951e4a0da9ff98ad09a84af55cfee2230f7992 | de74d74ca18d4310cc78d43c2530598cfb3047e4 | /Web-Autotest-Python/Python-Selenium/自动化测试模型-第5章/数据驱动测试实例/参数化搜索关键字.py | 39fdace9a3e6af711f3f1475ef59371aaeb0cb85 | [] | no_license | JiangHuYiXiao/Test_Dev | b91c7d406d43368eada0fda347d0639db989ba0c | e55d92b51025e4b4ba8c8b16db012525e8d60e5a | refs/heads/master | 2023-07-27T12:05:54.096632 | 2021-09-08T11:10:54 | 2021-09-08T11:10:54 | 402,259,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | 参数化搜索关键字.py | #-*- coding:utf-8 -*-
from selenium import webdriver
import time
search_text = ['python','NBA','轩逸']
for i in search_text:
driver = webdriver.Chrome()
driver.maximize_window()
driver.implicitly_wait(10)
driver.get('http://www.baidu.com')
driver.find_element_by_css_selector('#kw').send_keys(i)
dr... |
0d480b8ac7bec0667dd14288983968b26cdb80ff | 4064e98264bbd6ad4cfafb8fec1260ae58e6dbf1 | /eod_historical_data/_utils.py | 88d7e2ae7a2787f7ca71fffe25a77660022c038e | [
"MIT"
] | permissive | bobfang1992/python-eodhistoricaldata | 4dc34fc276c22b83fe4aa5346d396a99ed98c6bf | d7080d32b02d46f5177ced602fb9bab51d36101a | refs/heads/master | 2023-08-26T15:21:57.673116 | 2021-10-10T12:59:41 | 2021-10-10T12:59:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,393 | py | _utils.py | import typing
import functools
import requests
import datetime
import traceback
import pandas as pd
from pandas.api.types import is_number
from urllib.parse import urlencode
from requests.exceptions import RetryError, ConnectTimeout
from config.config import Config
config_instance: Config = Config()
# NOTE do not remo... |
1439185cf5dce95b33b220950c755e5e9ba0a140 | 180fe45bfe6ce61bf879d8ca0535e774dd26d52c | /app.py | 207daee19cabb61448df16de291dbdf3869f5523 | [] | no_license | Odselmaa/portal-user | 738313e8b924e69c1580a210ff262d8b1f1ca72b | 51febb3c1d33a35de104073ada695aa99bb2a018 | refs/heads/master | 2023-01-06T07:49:19.853618 | 2018-06-28T21:18:54 | 2018-06-28T21:18:54 | 133,862,271 | 0 | 0 | null | 2022-05-25T01:24:24 | 2018-05-17T19:58:14 | Python | UTF-8 | Python | false | false | 16,744 | py | app.py | import random
import string
from functools import wraps
import bson
from flask import Flask
from werkzeug.exceptions import InternalServerError, BadRequest, MethodNotAllowed, NotFound, Unauthorized
from mongoengine.errors import FieldDoesNotExist
from flask import jsonify, request
import jwt
import requests
from flas... |
1f099934d7ff75314202cf2e7ab0510461e94455 | 2e7a8b51dde75439ae050212535594caf01a5f31 | /main.py | e2a99355dbb22dcc51fc491fff7276d44c5c219c | [] | no_license | shashank3199/VisioNxN-Sudoku | eea96b31da4b6482ded06ecadb1284ca3aac9e60 | 51d9d796595af9919b7834ceecb6c00bebc37f08 | refs/heads/master | 2023-08-21T19:40:00.431931 | 2021-10-19T10:08:28 | 2021-10-19T10:08:28 | 293,356,988 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,064 | py | main.py | """
main.py : This file contains the game and its working.
File created by : Shashank Goyal
Last commit done by : Shashank Goyal
Last commit date : 3rd September
"""
# import exists to check if a last loaded file exists in the directory
from os.path import exists
# import nu... |
3fdc8150e649171048ebeb5eacf504b326f8197e | 7bbe9e5e2d5edf36e95323acfa0e782258564957 | /check.py | 3b8a23b6fcf0abd1b0bbc6a6296351f6b3921f90 | [] | no_license | unasm/lanfish | 3e801bf9529bf7323046857f3270d87c6f203dcc | c14d0b654e7c230967c209168518aea1709db682 | refs/heads/master | 2020-04-03T06:41:12.152611 | 2018-11-01T16:19:09 | 2018-11-01T16:19:09 | 155,081,430 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,792 | py | check.py | # coding: utf-8
import time
from datetime import timedelta
import numpy as np
import sys
import csv
import os
from sklearn import metrics
import tensorflow.contrib.keras as kr
reload(sys)
sys.setdefaultencoding("utf8")
from tnn import TCNNConfig, TCNN
from collections import Counter
import tensorflow as tf
save_d... |
de70b1a78b3676f704299ff7bb541d3618f3482d | 3a849f5dcb5624a944a7f88bbc329fa0df56726e | /test/avitest/functional/example/test_azure_cluster_vip.py | f1c8e227cc7779303676a93ae4f9c120598b1b9f | [] | no_license | balajeen/avi-monitoring | 11f7028ee3f5e813b9d4ba93c395f88c329b89c1 | b741205fbb7ea0847413ceae7f999428c2f0ebd6 | refs/heads/master | 2021-05-13T15:38:09.574054 | 2018-03-30T20:23:16 | 2018-03-30T20:23:16 | 116,773,309 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,707 | py | test_azure_cluster_vip.py | import pytest
from random import randint
import time
import traceback
from avi_objects.infra_imports import *
from avi_objects.cluster import *
from avi_objects.infra_utils import get_config
from avi_objects.test_fixtures import cleanup_client_server
from cluster_lib import reboot_leader, wait_until_cluster_ready
cla... |
e3ee5ff697eb95361dd120fc9552f4daea0f0909 | a8fc0ff13c0be5f6b2506ba7b8c3667c4e1b6342 | /tests/portfolio_test/test_portfolio_view.py | 9d4b8b97374af33f6ab62beab9cc5f69762d5ae8 | [] | no_license | costamatthew/CriptoFacil | 58da92b82c4211a487c29194b260aae0a93217af | c4c36dd06b50a93e753317bfeabc76b4a383432d | refs/heads/main | 2023-06-29T06:51:58.613964 | 2021-07-22T12:12:29 | 2021-07-22T12:12:29 | 392,155,913 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,246 | py | test_portfolio_view.py | from flask.testing import FlaskClient
def test_should_retrieve_a_portfolio_with_transactions(
app_client: FlaskClient, new_user, new_transaction
):
app_client.post('/api/register', json=new_user)
credentials = {'email': new_user['email'], 'password': new_user['password']}
response = app_client.post(... |
03ebea3097f9f9027887c249fa196b28d60b1986 | e752fa8be1521e86473c9f1e112451255fb928ad | /pyhedrals/pyhedrals.py | 53879237186269cc5493b1c22504b2e5f8e922cf | [
"MIT"
] | permissive | StarlitGhost/pyhedrals | b443843968584495de4bd790c710023cb908bd0a | 2f01d7abf0484bdbeb783a0f9bde90d6c5665e8b | refs/heads/master | 2022-05-14T01:16:19.486313 | 2022-04-04T21:12:02 | 2022-04-05T17:03:45 | 145,691,363 | 5 | 3 | MIT | 2022-04-05T17:03:46 | 2018-08-22T10:06:26 | Python | UTF-8 | Python | false | false | 15,773 | py | pyhedrals.py | # -*- coding: utf-8 -*-
import random
import operator
from builtins import range
import heapq
from collections import Counter as mset
from sly import Lexer, Parser
class UnknownCharacterException(Exception):
pass
class SyntaxErrorException(Exception):
pass
class InvalidOperandsException(Exception):
p... |
aad30e2c26c7c5f22bbcacc0ba32fe089e581549 | c73f4fa9255390527ab3019c0db098cb6cc163b9 | /code/finale_inzending_shortened.py | c2bab61fcb86187e2095fa0fbbf68fcd47bf16ed | [
"BSD-3-Clause"
] | permissive | ingegno-student/Leerkracht | ea0e9877115934338235eb67b419aedf1551dd49 | fe6efb07741dbb45d9ec6ffa66b236903997f8c7 | refs/heads/master | 2020-08-11T21:56:08.882404 | 2020-02-15T14:10:35 | 2020-02-15T14:10:35 | 214,635,152 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,841 | py | finale_inzending_shortened.py | from sense_hat import SenseHat
from time import sleep as sl
from random import randint as ra
s = SenseHat()
s.set_rotation(270)
f = s.set_pixel
fs = s.set_pixels
for i in range(100):
xpos = ra(0,7)
ypos = ra(0,7)
color = ra(1, 3)
if color == 1:
f(xpos, ypos, (0, ra(100, 255), ra(100,255)))
elif color ... |
e6ad8e596ef9727bfc2b9b0793198f73cb44d09f | a0ca08c1be6ea6154e20c9caec95c702a650bf72 | /service/dict.py | 0e8dac072a3af2a58ae40b82ed3a12b30e196acd | [] | no_license | Yaoxuannn/CS744 | 39eaf1136108bb00b35cfb6250b36dc8b9c33ed3 | feff61706c0e9aee54612031659e69a2ff8a794b | refs/heads/master | 2023-02-03T11:27:44.620456 | 2020-04-27T18:05:39 | 2020-04-27T18:05:39 | 238,087,660 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,987 | py | dict.py | # coding=utf-8
from nameko.rpc import rpc
from sqlalchemy import Column, Text, Integer
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
engine = create_engine('sqlite:///../dict.db')
Session = sessionmaker()
S... |
b642ed09e8dbc48ac1a8577891aca4488d14a3f4 | 8ebd0243ae6a8e2876ad641b7709709781ce2acc | /Zadanie 4 - Pracownicy, klub piłakarski, artDB/artDB.py | 001f93f3305c8ee97705a63c2165d4d51feea8d4 | [] | no_license | omegamotor/testowanieOprogramowania | 1f7ba3bd060396613ac07417362d8942625a26f6 | 1acb47fd1839a72f07ac434c4adc1ab8926fe74e | refs/heads/main | 2023-05-04T17:07:38.483566 | 2021-05-22T17:45:38 | 2021-05-22T17:45:38 | 344,107,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,042 | py | artDB.py | import os
import sqlite3
from faker import Faker
import random
def create_database():
conn = sqlite3.connect("myDB.db")
cursor = conn.cursor()
# tworzenie tabeli
cursor.execute("""CREATE TABLE Kluby
(nazwa text, trener text, kraj text, liczba_pilkarzy INTEGER, najlepszy_zawodnik text, sponsor_glo... |
01a8d927b46151ef58d4d764a80f57b4ae960e95 | c9690ca9234b3e2984c4f6523f9d671d96d543f5 | /course/migrations/0006_auto_20210529_1227.py | b47db141dcdd2dec18960514c19d6270cdfa0495 | [] | no_license | ArshadAman/CodeInputMain | d6d2655b95b5075d8a52bbebcf1e02e269a92ddb | 1d59e8195b6833298fbbec1e9e76d6db7c7fd2cf | refs/heads/master | 2023-05-05T03:59:14.975222 | 2021-05-29T07:40:02 | 2021-05-29T07:40:02 | 371,423,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 372 | py | 0006_auto_20210529_1227.py | # Generated by Django 3.1 on 2021-05-29 06:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('course', '0005_delete_coursecomment'),
]
operations = [
migrations.RenameField(
model_name='courses',
old_name='youtube_id',
... |
2bef0933648518b04b8bc37c750548932eaedd5e | f328df7615fde375548066e7c6efe33c9cfde9b1 | /test_gps_health_daily.py | 93b0f40e2c5cdd9075d899193f4440582cf965f0 | [] | no_license | justcode-srihitha/datasharing | be0ce1224799605d50890ff0aef2bd0886e4ad65 | 24b124b1ca311b5b5feb5f371b171dcc5a1f7b31 | refs/heads/master | 2020-12-23T00:06:06.541945 | 2020-05-30T10:47:15 | 2020-05-30T10:47:15 | 236,970,880 | 0 | 0 | null | 2020-01-29T11:52:43 | 2020-01-29T11:52:41 | null | UTF-8 | Python | false | false | 384 | py | test_gps_health_daily.py | #!/usr/bin/env python
# coding: utf-8
import sys
#sys.path.insert(0, './my_proj_env/')
import gps_health_daily
def test_add_sub():
print('Hey')
add,sub = gps_health_daily.add_sub_actual()
print(add,sub)
def justlykthat():
print('simply')
#calling funtions
test_add_sub()
justlykthat()
def test_mu... |
776559989562aafeabe256eae0318b2cf71384e8 | 9274a13b844af681ab55c71261995a80c0fa6cfd | /models/hotel_user_role.py | f00a2852774bfdc1e3341e061f9ba384775fb846 | [] | no_license | KivutiBrian/Horesy-API | 9c66655437e07717f0bbcd194ffa792210d1e3f2 | ccdee21a2710ca7389f2b26a630f3fbbc17c91d8 | refs/heads/main | 2023-03-31T02:28:45.454395 | 2021-04-06T10:15:34 | 2021-04-06T10:15:34 | 345,598,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 833 | py | hotel_user_role.py | from sqlalchemy import Column, Integer, String, Boolean, DateTime,BIGINT, ForeignKey, JSON, Text
from sqlalchemy.orm import relationship, Session
from sqlalchemy import func
from .base import Model
from configurations.sqlalchemy_config import Base
class HotelUserRole(Model, Base):
__tablename__ = 'hotel_users_rol... |
c250d9889acc0282ab6458866915661fcbb643da | f8b40141d457376faf24132e7beb32a3446dbb65 | /src/Week 9-Power Laws and Rich-Get-Richer Phenomena/NormalDistributionTest.py | e494b334584cd3a1f9fe1189c9d02f57ea5856e3 | [] | no_license | Bidursahoo/SocialNetwork | 91f9dba9c8c4c139c2af97c5d5ba3901f0362b84 | 6cacb68d7b538261b1de39e10a08b0b76379413f | refs/heads/master | 2023-04-02T18:51:51.773776 | 2018-08-21T07:55:22 | 2018-08-21T07:55:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 473 | py | NormalDistributionTest.py | #How Do Normal Distribution Appear?
import matplotlib.pyplot as plt
import random
possiblesums=[x for x in range(10,1001)]
sum1=[]
j=0
while(j<991):
i=0
list1=[]
while(i<10):
list1.append(random.randint(1,100))
i+=1
j+=1
sum1.append(sum(list1))
list2=[]
for x in range(... |
351e7f6aef0f204e07e2656296bbd13f123d753a | 4ba9a6274d78ff47bc00920be790b62390fc8f42 | /322零钱兑换.py | e2a67b7910c8533ccb1abb0e8628c2ed8926d34c | [] | no_license | wzwhit/leetcode | 02b04f9f354de321a32d8e5b93f20a527100cca5 | e732ee7e99a015a0d124677ab73fb58fc8e64b59 | refs/heads/master | 2020-04-26T03:02:06.380171 | 2019-08-23T04:04:42 | 2019-08-23T04:04:42 | 173,253,697 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,319 | py | 322零钱兑换.py | # 给定不同面额的硬币 coins 和一个总金额 amount。编写一个函数来计算可以凑成总金额所需的最少的硬币个数。如果没有任何一种硬币组合能组成总金额,返回 -1。
# 示例 1:
# 输入: coins = [1, 2, 5], amount = 11
# 输出: 3
# 解释: 11 = 5 + 5 + 1
# 示例 2:
# 输入: coins = [2], amount = 3
# 输出: -1
# 说明:
# 你可以认为每种硬币的数量是无限的。
# 动态规划,f(n) = min(f(n - c1), f(n - c2), ... f(n - cn)) + 1
class Solution(ob... |
334eeae09097b119a151cf0cb8a43f9598fdad39 | 29456f01a994427149bddfb3c83e054a08860953 | /L4T2.py | c9045449ab3b690e1ae02de7ee42970193f6712f | [] | no_license | comradsnarky/PythonBasics | 6a25a79d6b36952f6f00bbc0cd78a7fdd5cd63cc | c0bdd9abf6784c349b98e8af6bc1cd4b12b3e8ad | refs/heads/master | 2022-12-03T14:54:43.860174 | 2020-08-16T18:12:40 | 2020-08-16T18:12:40 | 277,656,866 | 0 | 0 | null | 2020-08-16T18:00:29 | 2020-07-06T21:55:51 | null | UTF-8 | Python | false | false | 249 | py | L4T2.py | my_list = []
import random
for i in range(10):
my_list.append(random.randint(1, 1000))
genList = [my_list[i] for i in range(1, len(my_list)) if my_list[i] > my_list[i - 1]]
print(f'Original list: {my_list}')
print(f'Generated list: {genList}')
|
1e4e61cf5e7e169794e46582487559adf479515b | abf605ecb315c256243c242eaac4cd392973c6e2 | /GeoDocs/GeoDocs/cuentas/models.py | 3c9402a5c01122b0cf9eb077c890e7e700466d74 | [] | no_license | patriciozapata/Python-django-postgresql | 67f0cceea399939fe1d36bcf4b8682c9909b06c6 | 2fbd8142da0fa661f04ec166dac43a2ed6c6d9be | refs/heads/tesis | 2022-11-05T19:30:05.521923 | 2019-05-02T21:01:23 | 2019-05-02T21:01:23 | 184,653,172 | 0 | 1 | null | 2022-11-03T16:04:34 | 2019-05-02T21:21:03 | null | UTF-8 | Python | false | false | 2,324 | py | models.py | from django.db import models
from django.contrib.auth.models import (
BaseUserManager, AbstractBaseUser
)
class UserManager(BaseUserManager):
def create_user(self, email, nombre, apellido, perfil, password=None):
if not email:
raise ValueError('Users must have an email address')
... |
0258ae5733d9a44136b6b74ae14358321d2c94b5 | 86866edfc20f9351195377e76a47fe61b919ab20 | /pygotham/talks/models.py | 18d65d765301d0f7dd7bd8dd0f62a9ae48f89d03 | [
"BSD-2-Clause"
] | permissive | PyGotham/pygotham | 861058ae9d1bc13e5765861c2dae523307738f79 | 310508c16dabf2ce9aaf0c2624132d725f71143b | refs/heads/master | 2021-07-06T11:40:37.350376 | 2017-06-12T04:02:55 | 2017-06-12T04:02:55 | 18,300,298 | 19 | 21 | NOASSERTION | 2020-10-03T12:59:37 | 2014-03-31T16:42:14 | Python | UTF-8 | Python | false | false | 2,957 | py | models.py | """Talks models."""
from slugify import slugify
from pygotham.core import db
from pygotham.events.query import EventQuery
__all__ = ('Category', 'Duration', 'Talk')
class Category(db.Model):
"""Talk category."""
__tablename__ = 'categories'
id = db.Column(db.Integer, primary_key=True)
name = db.C... |
0551ba9f55557492daed8997bb842b85b594d19e | cb8b2d59cb348c023a4cc252c995ebfb93de5edc | /cc2020-old.py | c9faeba8d1fe9c8ab13472f1617408b28ea9d350 | [] | no_license | KateLibC/cc2020-writeup | b144b269f2917576ad1b3b79da89ad1d9152438f | 6f8085005cda6cc4aa3c1091007fdbf3b3616012 | refs/heads/main | 2023-02-03T20:00:12.383597 | 2020-12-27T03:51:48 | 2020-12-27T03:51:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,214 | py | cc2020-old.py | from collections import Counter
import re
from math import log
import matplotlib.pyplot as plt
import numpy as np
from functools import reduce
fname = 'crypto_christmas_2020.txt'
with open(fname) as f:
data = f.read()
with open('example.txt', encoding='utf-8') as f:
example = f.read()
def IC(data, alph=None... |
48dbf1b5f37d861fc7b758df38c3289a1b1fdea2 | f8ec61be9771047068c226dd02a918d2c94eb2c8 | /Check_VWShifter/plot_green.py | 0bb1cce75e76f4e9cddcc2afb5049957ec16867f | [] | no_license | jhbhom/MSLab | c87c3bd2552d999d588494332a3c27e0dad09f79 | dba9216d4e8cd261f3b6c91ae02073ac5617f994 | refs/heads/master | 2022-12-12T11:52:36.172783 | 2020-09-16T11:17:35 | 2020-09-16T11:17:35 | 295,002,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,994 | py | plot_green.py | from ROOT import *
import os
import csv
import pylab
import time
import matplotlib.pyplot as plt
from scipy.interpolate import InterpolatedUnivariateSpline
def offset(arr, off):
size=len(arr)
for i in xrange(0,size):
arr[i]=arr[i]-off
c1=TCanvas("c1", "c1", 800,600)
clear = 'WFM16/'
ws='WFM17/'
... |
67838a5b9d8d8ffcd1c38846d16ac3e230428942 | be659e0b90201b54fbdecbbc1821447d3393a824 | /utils/location.py | d2ba370b8319e92b90af4db3054262393883469a | [] | no_license | karansdoshi/Chatbot | 77617e776a8a8b35585bff03c79bdf306680cb15 | 93ab8a4f1b9bfe3104fe6036f5d3d2d02e527e2d | refs/heads/main | 2023-02-19T07:01:54.244375 | 2021-01-19T14:03:19 | 2021-01-19T14:03:19 | 327,029,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | location.py | import requests
import numpy as np
from .firebase import pathsdict
default = "I am still learning all possible routes, Sorry I dont know in detail about how to travel from {} to IIT MANDI as of now, The best I can suggest is:\n"
def guess(lat, lng):
user = np.array((lat, lng))
chandi = np.array((30.741482, 7... |
fdf4992887360b535373579e41dbb43565623067 | cf154ba745792c7e0cee5f21af25c7e526237e10 | /code/archive/sandbox/senti_use.py | 542d8abb80fcc63f7146eaac80db6d4d34b8adf9 | [] | no_license | CHR1597/IsThisSarcastic | f3b6d8f81312d9c6951c3e0ef16692601edd05a0 | fbd2a0828b9af0b8c792f429daf52aa594887901 | refs/heads/master | 2022-11-28T06:24:08.363712 | 2020-08-12T12:33:02 | 2020-08-12T12:33:02 | 287,004,394 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | senti_use.py | import senti_test
import nltk
sentiment = senti_test.senti_word_net()
mystr = ""
while True:
mystr = input("Enter sentence: ")
if mystr == "exit":
break
mystr = nltk.word_tokenize(mystr)
mystr = [(w.lower()) for w in mystr]
mean_sentiment = sentiment.score_sentence(mystr)
print("P... |
0790c2f5920fb02d87da1c0f990d677c3ea07103 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/jay-mahadeokar_pynetbuilder/pynetbuilder-master/tests/lego/test_base.py | f8a1c23f1c332276a55d8d6332536eabfb2eaa11 | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 1,606 | py | test_base.py | """
Copyright 2016 Yahoo Inc.
Licensed under the terms of the 2 clause BSD license.
Please see LICENSE file in the project root for terms.
"""
from caffe.proto import caffe_pb2
import google.protobuf as pb
from caffe import layers as L
from caffe import params as P
import caffe
import sys
sys.path.append('./netbuild... |
4800dd10d53d93f4d12ada0c14fef6772d060882 | 2864f186ae7cb0c6ba96ac20c983ef09a587f279 | /gluttony/tests.py | 40a17b3aa604d1c8e0c87e9a6f84a0fd72f02b4b | [] | no_license | selobesaw/gluttony | 66e18b290bdfef0ad5519823c2b29482027296fb | a8c209944418b3fc096af563544f99b7826b4a2e | refs/heads/master | 2020-07-22T21:00:27.842626 | 2019-09-09T14:29:04 | 2019-09-09T14:29:04 | 207,326,148 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,036 | py | tests.py | from django.conf import settings
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
class DishAPITests(APITestCase):
data = {
'category': 'Тестовая категория',
'energy': 1337,
'image': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA... |
217bbdaa77acc8bed77a2bdfe201aab19cf55354 | ab602e0f491888c082aa610a0d58fe5d1b33b3d0 | /by_tag_elcomercio.py | fdb26c7e3368bc299edc28da6f6ea4614019cfa2 | [] | no_license | cbpaguay/mineria_proyecto | 72a31284c013da88849748d8a9a9e79486a360f9 | db536cc22e22bea20101168d6b86caae9fbc055f | refs/heads/master | 2023-08-17T13:10:47.201495 | 2021-10-07T03:38:24 | 2021-10-07T03:38:24 | 400,635,848 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,027 | py | by_tag_elcomercio.py | # %%
from bs4 import BeautifulSoup
import requests
import pandas as pd
#%% [markdown]
## WEB SCRAPING ROBOS EL COMERCIO
df = pd.DataFrame()
fecha = list()
titulo = list()
desc = list()
# aplicar cada tag y el número de páginas
tags = {"tag":"asalto","paginas":73}
# %%
for i in range(1,tags['paginas']): # actualmente so... |
075dadb0c1a4345d2647367fbd7d6f50964c2234 | dcf4555bcca3ef967fa6a8411ee58596801ee2a3 | /src/scraping/scrapers/internalQAs_scraper.py | e7b1b00d9c544a0a8c65d0ba8fff94ab7c6951e8 | [
"Apache-2.0"
] | permissive | mfleming99/scraping-qas | 9981799ca1b0efd2b3d0ac4abfe3cda2dbee84f3 | 922e54d89965d735efa5a26afd59163129b25328 | refs/heads/master | 2022-09-16T20:56:22.429050 | 2020-06-04T04:33:23 | 2020-06-04T04:33:23 | 269,258,817 | 0 | 0 | Apache-2.0 | 2020-06-04T04:17:40 | 2020-06-04T04:17:40 | null | UTF-8 | Python | false | false | 2,908 | py | internalQAs_scraper.py | # Copyright (c) Johns Hopkins University and its affiliates.
# This source code is licensed under the Apache 2 license found in the
# LICENSE file in the root directory of this source tree.
"""
Internal COVID QAs crawler
Expected page to crawl is
COVID19infosheet - Info.tsv
"""
__author__ = "Adam Poliak", "Darius Irani... |
3ef33d8c9dce2c7915cf81770e3cf10605b7bda8 | 691eb08885e0145a8f0691de348133c80f264d25 | /apps/hello/admin.py | 5e7a75cc6b865cfca8b25a7fbb55325c82322b9e | [] | no_license | htrueman/FortyTwoTestTask | 749f6c8e37221d136bd2324004885cb72c77fa7a | 85d8cf8413924197a627d256689bdddc9bcf85a9 | refs/heads/master | 2021-01-09T07:40:41.705356 | 2016-09-13T07:28:13 | 2016-09-13T07:28:13 | 64,141,021 | 0 | 0 | null | 2016-07-25T14:24:22 | 2016-07-25T14:24:22 | null | UTF-8 | Python | false | false | 185 | py | admin.py | from django.contrib import admin
from .models import MyData, RequestKeeperModel, Signal
admin.site.register(MyData)
admin.site.register(RequestKeeperModel)
admin.site.register(Signal)
|
b8fd6db5cc04a52eafe2982492507e530e571db1 | cdc33cdf6d4e5c79a672bc78a7118ff868b7c6ec | /Урок 1. Практическое задание/task_4.py | 3890657b86e4bf93b9ec76e0235ac4a34d615990 | [] | no_license | Sin93/client-server | e2c62b8bf81f896694f60e5f7b5f0a6cb63166d8 | d007d25e5cc670f76144d0a66398ae9763a9e60b | refs/heads/main | 2023-04-22T12:18:01.226529 | 2021-05-04T11:46:40 | 2021-05-04T11:46:40 | 363,369,334 | 0 | 0 | null | 2021-05-08T12:24:34 | 2021-05-01T09:18:54 | Python | UTF-8 | Python | false | false | 1,246 | py | task_4.py | """
4. Преобразовать слова «разработка», «администрирование», «protocol»,
«standard» из строкового представления в байтовое и выполнить обратное
преобразование (используя методы encode и decode).
"""
WORD_LIST = ['разработка', 'администрирование', 'protocol', 'standard']
def encode_elements_by_list(word_list: list) ... |
124143a7627d53f263f69f885821e3951161c366 | ef7ea868663ccabad6673290d07b07dd7164fc6b | /flyMyTickets/urls.py | 264885e0fa5b3b72599b967505cd4924ca86eccc | [] | no_license | aalhsn/flymetothemoon_backend | e253b8be7a0e3870d769af22018c0579b5e54b68 | c3765f34236b55b90ec9b4b407c7375fb8d8bc1a | refs/heads/master | 2020-12-29T05:26:46.594524 | 2020-02-05T14:34:22 | 2020-02-05T14:34:22 | 238,470,309 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,560 | py | urls.py | """flyMyTickets URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cla... |
1fc95c627a0963e4c8de27d759a4684bed357975 | 35688634e2701349e16951ec0d975068cb4c0154 | /test.py | 8fde70015ad7f569cdee5fc35f3c59664047a046 | [
"MIT"
] | permissive | mentum/pictureflow | 5abc3307b0b7b79a213b7e66841a089137464fd8 | a2cdb4ab24e79a773e4604702042abb5f6ca332b | refs/heads/master | 2021-10-27T09:02:50.782604 | 2021-10-13T02:12:04 | 2021-10-13T02:12:04 | 89,013,971 | 5 | 2 | MIT | 2017-12-21T14:39:44 | 2017-04-21T18:46:37 | Python | UTF-8 | Python | false | false | 806 | py | test.py | from pictureflow.flow import Broadcast, Combine
from pictureflow.output import DiskOutput
from pictureflow.transform import Rotate, Scale
import cv2
import pictureflow as pf
inpt = pf.Placeholder(out_type=pf.Image)
broadcast = Broadcast(inpt, pf.Constant(2))
branch_a = Rotate(broadcast, rot_angle=pf.Constant(90))
... |
b87f2f7e6a50e87b9c18ab7d0d7c1a01a22b0bf8 | 4da08fd8e9ea3ac1b337c9a276709da4b8286156 | /bjcpy/what_style.py | 8a8b24009fc2c3de03f7eee52556a54512ce9005 | [
"MIT"
] | permissive | blackelbow/bjcpy | 22a6c9e8e2bcf825d36de7eca819d4bddb7093c2 | 98d6d93c9160f2c52b0b4cbc15bf78fef4ebee96 | refs/heads/master | 2021-05-23T14:01:56.172406 | 2020-04-05T22:08:48 | 2020-04-05T22:08:48 | 253,327,129 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 550 | py | what_style.py | from .fits_style import fits_style
from .all_styles import all_styles
def what_style(beer):
"""Return a list of styles that a given beer fits into.
Keyword arguments:
beer-- dictionary representing the vital stats of the target beer
"""
styles = all_styles()
matching_styles = [... |
e27dd96295df75e73088384b05d6ac1258a0941d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03738/s537242246.py | 0f53f481328657af88de290a6981e8ed7850dbef | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 578 | py | s537242246.py | import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy
A = input()
B = input()
if len(A) != len(B):
print("GREATER" if len(A... |
50c15e627612650a02c4b227bfbee815ea3b18ec | 2ec6e3f3dc5af9ebc57662a0506a2c4d9ab31b7b | /MostFreqWord.py | 9d723fd1c5f046ca3e0ab913d14955ffedd8b50e | [] | no_license | ivanlykhosherst/Pythonrapidtest | 0c90a18989bf87fa724f78950d9c7fb3e83f88fd | 7d62be2eaba163ae6317e42853575b5c493ad887 | refs/heads/main | 2023-07-04T10:17:58.856827 | 2021-08-04T19:38:12 | 2021-08-04T19:38:12 | 392,603,436 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,158 | py | MostFreqWord.py | """Quiz: Most Frequent Word"""
def most_frequent(s):
"""Return the most frequently occuring word in s."""
# HINT: Use the built-in split() function to transform the string s into an
# array
words = s.split(" ")
# HINT: Sort the new array by using the built-in sorted() function or
# ... |
34c242766590d62993351a73bc66a2f38ab969b8 | b89fc6d67df82c59c5abf2056890ba64ce2e2b30 | /ASM1/asm_init.py | bee29665ac13fb62138292ba7825a2b1e671247b | [] | no_license | polishdream/wastageplant | 063d268f772935ab8f7e66cb655ed05984da4168 | 8eaf4838a161c29425fd9d20d682ff8d76eb147b | refs/heads/master | 2021-01-10T06:18:15.316393 | 2016-04-11T11:41:53 | 2016-04-11T11:41:53 | 55,396,329 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 103 | py | asm_init.py | #!/usr/bin/python
import subprocess
subprocess.Popen(["nohup", "/var/www/demo/ASM1/bioTest.py", "&"])
|
4104c2a83065c9526e62f56c2a1eccf8b7b4f05e | 445c8493a4bf70767ee0db103ce2e8f19e228cdd | /MyWebApps/src/com/webapps/politics/Insult.py | 188d44696d7f878a01f03d8bbcd5c353c9d7e3e2 | [] | no_license | tectronics/my-web-apps | ffa8075622ff2ef3d0543bbe2d280c61f45ead0c | aca6d74ad4c4daebd5daf97c4bead6225ac41716 | refs/heads/master | 2018-01-11T15:02:07.478359 | 2014-02-13T09:22:29 | 2014-02-13T09:22:29 | 47,811,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,404 | py | Insult.py | '''
Created on Feb 12, 2014
@author: priya
'''
import random
class Insult(object):
'''
classdocs
'''
insultArray = ["chaddiwala",
"moditard",
"internet-hindu",
"hindu-jihadi",
"cow-lover",
... |
503c6d7a7cf89222225e549c31e19dff50dd57c1 | ed5ce0e5fd70f377813df2d79ffe1ccadd599ed8 | /1stClient.py | 59fb9863bf7f9ebb310f9fdd20e9387947fb3cbf | [] | no_license | pk1510/Emergency-Room-Protocol | c4296b152a8efa1a0f52e96f39d4ba5aeb7c1842 | c77ca995f63e4012439a63ca864545739f0f0d15 | refs/heads/master | 2023-02-25T16:43:15.092036 | 2021-01-29T17:29:49 | 2021-01-29T17:29:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,034 | py | 1stClient.py | import json
import threading
import googlemaps
import sys
import socket
import selectors
import types
messages = []
lat=0.0
lng = 0.0
API_key ='Your api key here' # enter your api key here
gmaps = googlemaps.Client(key=API_key)
def search():
while True:
place = str(input()) #despatcher s... |
f821334510eb1911e87f054e77a237718b182e83 | e2afe8f9d49b41d835094d100f9797f07c79ad7f | /forWhile.py | 0ce4dc0123c7cb4504e8240e6887e3eec320f34e | [] | no_license | impacevanend/python | 9aaaf9831359c4b5d3976d5a9f13a8d78b922f59 | 4838395a47ef3f56a863eac4205bf4ecdb6e40f3 | refs/heads/master | 2020-12-09T22:24:05.750155 | 2020-01-20T23:33:10 | 2020-01-20T23:33:10 | 233,433,704 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | forWhile.py | foods = ["apples", "bread", "cheese", "milk","banana","grapes"]
print(foods[3])
#Bucles para consultar lista de datos
for food in foods:
if food == "cheese":
print(f"\nYou have to buy this, {food}!")
#break(termina la ejecución.)
#continue(salta y registra los de mas.)
print(f"\nE... |
a75520211fafb7b383954b6748164131e6c03ea4 | c661ba7a3d539020a7191d57f0a85d715086a008 | /unit_tests/test_cleaning.py | 632d03c803c2c865ab18aeaf037d19bdd9d87ac9 | [] | no_license | M-Chin/vouchers | 4e87bb8af5348612fecb065bf5c1926b29052ee7 | c1fda860df4e2fff341b5cd5b9b75c99af83de43 | refs/heads/master | 2023-03-25T01:45:08.770898 | 2021-03-21T11:17:03 | 2021-03-21T11:17:03 | 349,740,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,260 | py | test_cleaning.py | import pandas as pd
from modules.cleaning import clean_up_data_set
DF_SCHEMA = {'timestamp': 'datetime64[ns, UTC]',
'country_code': 'string',
'last_order_ts': 'datetime64[ns, UTC]',
'total_orders': 'int',
'voucher_amount': 'int', }
def test_clean_up_data_set():
... |
fd324971a79466b7f749837fd734357c8a067ccd | 4260348426806e3335df9338560d152a110c8118 | /insert.py | e55a99472976cc3f01b3dc298f46efdfb16d7305 | [] | no_license | vinodh1988/pythondb | 83aa9fd2280765981fd541338224f1d680c7dc33 | a2df439eb2dd4509ea14dfcf48895d25a31c084a | refs/heads/master | 2023-03-17T08:36:30.382899 | 2021-03-12T08:07:51 | 2021-03-12T08:07:51 | 346,989,059 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | insert.py | import sqlite3
conn = sqlite3.connect('test.db')
print("Opened database successfully")
conn.execute("insert into person(sno,name,city) values(?,?,?)",(1,'Ram','Chennai'))
conn.execute("insert into person(sno,name,city) values(?,?,?)",(2,'Jay','Chennai'))
conn.execute("insert into person(sno,name,city) values(?,?,?... |
c9a7a612173ef9182365ee5678dd145231298c59 | e05f99c282f06e344b065eddffaa5173a8d3ab97 | /1463.py | a58cf60e6a17ea9e18e4004cace16e81b265a319 | [] | no_license | wow056/coding-practice | a90e4a953d2807a85c766247baeb78e94aacea6d | 1a0d21f44a114cbed1aaea682feca8741f0e4b3f | refs/heads/master | 2020-03-14T23:59:01.224688 | 2018-06-10T16:55:32 | 2018-06-10T16:55:32 | 131,857,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | 1463.py | dictionary = {}
def calculate(n):
if n >= 1:
return 0
else:
global dictionary
if n in dictionary:
return dictionary[n]
else:
templist = []
templist.append(calculate(n // 3) + n % 3 + 1)
templist.append(calculate(n // 2) + n % 2 + ... |
ad3bd457aef292eb791909f3ce6ee2f525b21a69 | 80c0472751047cceea41e205c0c924b2d5a0f629 | /blog/models.py | d90c00b0c968d1588c968992aee18446f24f85db | [] | no_license | projeshBasnet/my_coding_blog | 855a80086eacf27acae8160adf112ca729d2627e | 86eb807405792d776572249f498d487d61f3b2eb | refs/heads/master | 2023-07-05T15:17:02.379220 | 2021-08-28T03:02:59 | 2021-08-28T03:02:59 | 400,688,515 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,026 | py | models.py | from django.db import models
from django.contrib.auth import get_user_model
# from ckeditor.fields import RichTextField
from tinymce.models import HTMLField
from django.urls import reverse
mymodel = get_user_model()
BLOG_CATEGORY = (
('python','PYTHON'),
('machine_learning','MACHINE LEARNING'),
('javascr... |
b79914fb25ad72dce35ebcc182af0240f5033580 | 764f04ef7c9139eceb0921a94378c123ab8630a1 | /tests/test_utils/gtfs_utils.py | f5b1483fccf185e8efb41cc675224b1a52002b4f | [
"Apache-2.0"
] | permissive | WYishai/gtfs.py | 8be18b45b8078cb440ca0ea91fb0a405c469db17 | 129cbe5cfd77d92d435db9502b4bb70dd067365c | refs/heads/master | 2020-03-22T08:57:32.546918 | 2019-04-14T07:01:36 | 2019-04-14T07:01:36 | 139,804,132 | 10 | 2 | Apache-2.0 | 2019-04-14T07:01:38 | 2018-07-05T06:24:04 | Python | UTF-8 | Python | false | false | 1,925 | py | gtfs_utils.py | import csv
from zipfile import ZipFile
import unittest
ignored_keys = []
def clean_row(row):
for k, v in row.items():
if v is None or v == '':
del row[k]
elif k in ["drop_off_type", "pickup_type"] and v == "0":
del row[k]
for ignored_key in ignored_keys:
if ig... |
a2ba104912240432fee9b4899c5e2aa151284749 | 1b7f17ff9f31abd7abb42da5621c89a65130808a | /posrocket/models/catalog/tax.py | 60b9eead3c84e6a1063134d10639564cf7635773 | [] | no_license | bkayed/posrocket-python-sdk | ff604586e4d928366016726ce643c258982fd3ea | fec3ca9099faa1071b4e1d14cc0b3ac1d5c2ca4c | refs/heads/master | 2020-08-04T00:33:04.751579 | 2019-09-26T14:10:42 | 2019-09-26T14:10:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 961 | py | tax.py | """Catalog Tax Python model
"""
__author__ = "Ahmad Bazadough, Hamzah Darwish"
__copyright__ = "Copyright 2019, POSRocket"
__credits__ = ["Ahmad Bazadough", "Hamzah Darwish"]
__license__ = "GPL"
__version__ = "0.1.0"
__maintainer__ = "Ahmad Bazadough, Hamzah Darwish"
__email__ = "a.bazadough@posrocket.com"
__status__... |
26bd8c7b88ca2c618747b2dde15bc5f3ac300315 | 4aa96dfe97e8dd61d94c52660975bc28a93368e4 | /api/migrations/0007_auto_20210217_1403.py | 33c2bea6c080090eebf39d2123d1e64c7e4d2a52 | [] | no_license | JoeyAlpha5/whatsonsale-backend-new | c1059c79694aafed8acba61d32a45b45bec3f338 | 79cc5697577547851f6ac8028bf0cbf287631fa9 | refs/heads/main | 2023-04-07T02:19:40.875246 | 2021-04-19T12:28:08 | 2021-04-19T12:28:08 | 337,046,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 417 | py | 0007_auto_20210217_1403.py | # Generated by Django 3.1.6 on 2021-02-17 14:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0006_remove_postproduct_product_type'),
]
operations = [
migrations.AlterField(
model_name='postproduct',
nam... |
5ccfec854253901ca1289fb7f0712d4fd8b73833 | 0b4a9acd45a7a736e9e2b92071e5e186061dbd1a | /Source_Code/actors.py | 805ee4ad4216f5282df56a3ce41b7bb19ca96137 | [] | no_license | shampur/NaturalLanguageProcessing | 52569f4d8cd98a7200ae2fda1c1d2098324051e3 | 63914340b1c40988062ce64a136799afe3b7f465 | refs/heads/master | 2021-01-13T14:28:40.991250 | 2017-01-16T01:22:28 | 2017-01-16T01:22:28 | 79,071,120 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,915 | py | actors.py | __author__ = 'charanshampur'
import json
actorsFile = open("/Users/charanshampur/movie_genre_nlp/MovieSummaries/character.metadata.tsv","r")
movieFile = open("/Users/charanshampur/movie_genre_nlp/MovieSummaries/movie.metadata.tsv","r")
movieGenreFile = open("./NLP/movieGenreFile.txt","w")
movieActorFile=open("./NLP/mov... |
db86af88b3ec4bf9570de4bd9346d2daa9d8cd92 | c30dba02c52caf035bf1d21611e6b88fc9b29bd9 | /PFL-possion.py | 675edfb1dee99f929ca0913d3cb26c26cfee8513 | [] | no_license | gjn1228/Rating | 0f85c8983e16996210844331494921dc46451a80 | 99f429914271d374b5f47284f84b804ab35d10ae | refs/heads/master | 2020-04-08T21:43:45.019373 | 2018-11-30T02:19:30 | 2018-11-30T02:19:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,416 | py | PFL-possion.py | # coding=utf-8 #
# Author GJN #
import numpy as np
import scipy.stats as st
import matplotlib.pyplot as plt
import xlwings as xw
import sys
from PyQt5 import QtWidgets
import Rfunc
sup = -0.19
ttg = 3.09
dadj = 0.07
dsplit = 0.5
margin = {'had': 112.5, 'ttg': 131, 'crs': 149, 'hilo': 108.5}
def matrix(sup, ttg, dad... |
401855818bf08ca25769738082d3a3355af7fb9f | dade30b090de0cc152676d6fbceed0be2621bb02 | /Loop and Iterations - For While Loops.py | 15a9ac1012475889f60ff4cbeb3a0e433695d638 | [] | no_license | alemarioh/Lecciones-Basica-Python | b039467ccd091edef21fa64058bf357ee3c2de2f | 835d74a1b97978535a2752b561af6a1d7ababf3b | refs/heads/master | 2020-03-31T06:06:49.126628 | 2018-10-07T18:19:49 | 2018-10-07T18:19:49 | 151,968,742 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,014 | py | Loop and Iterations - For While Loops.py |
# Ejemplo 1 Ejecutar para todos los elementos de una lista
# nums = [1, 2, 3, 4, 5]
# for num in nums:
# print(num)
# Ejemplo 2 Realizar un alto en la iteracion del loop
# nums = [1, 2, 3, 4, 5]
# for num in nums:
# if num == 3:
# print('Found!')
# break
# print(num)
# Ejemplo 3 Ig... |
8fbb56012ba8e1b24b0cd467bcd3763cd5f6314f | 251ff6bd2fdce90a32254a4bdeaac1a70629aabf | /tests/river/unit/test_services.py | 9d239d2289eca243948424b7ca958fd34a82b257 | [
"Apache-2.0"
] | permissive | arkhn/fhir-river | a7d55a6315d8f00b8c0dfb66b157ae75c54cf21a | 63c798deaec82ba9f3eccb64be465b6ed535b5dc | refs/heads/main | 2022-10-16T03:51:25.326958 | 2021-11-25T16:53:04 | 2021-11-30T14:33:36 | 250,033,919 | 45 | 3 | Apache-2.0 | 2022-09-08T01:13:27 | 2020-03-25T16:38:34 | TypeScript | UTF-8 | Python | false | false | 1,559 | py | test_services.py | import pytest
from river.adapters.event_publisher import InMemoryEventPublisher
from river.adapters.topics import InMemoryTopicsManager
from river.domain.events import BatchEvent
from river.services import abort, batch, preview
from syrupy.filters import paths
pytestmark = pytest.mark.django_db
def test_batch(batch... |
d202762b625fb552bf3283dafb9591b3d51388d7 | 5546af6a32998a7cc6cc5ee24f85e95e13e83bbb | /django-common/exam/views.py | 2b560efc8aa959063fd604fad15d7956fa3b5fa4 | [] | no_license | wylliec/old-hkn | 051c83caf2e2157a2c39f9c230db716c8a42c2b9 | 4ebaa69f82421260ab397bd381d5bd66aa82a23f | refs/heads/master | 2021-01-19T12:15:00.347326 | 2010-11-01T21:09:36 | 2010-11-01T21:09:36 | 69,656,957 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,012 | py | views.py | from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponseRedirect, Http404, HttpResponse
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
import math
from course.models import *
from models import *
from forms import *
f... |