Skip to content

Instantly share code, notes, and snippets.

@s2t2
s2t2 / DATA.md
Created February 4, 2022 16:46
column_name datatype description
user_id INTEGER unique identifier for each user in our "impeachment 2020" dataset
created_on DATE date the user was created
screen_name_count INTEGER number of screen names used
screen_names STRING all screen names used
is_bot BOOLEAN whether or not we classified this user as a "bot" / automated account
bot_rt_network INTEGER for bots, which retweet network (0:anti-trump, 1:pro-trump)
is_q BOOLEAN whether or not this user tweeted Q-anon language / hashtags
@kylemcdonald
kylemcdonald / Collect Parler Metadata.ipynb
Last active September 20, 2023 11:45
Collect video URLs and GPS data for Parler videos.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@prateekchandrayan
prateekchandrayan / MNISTwithKeras.py
Last active June 17, 2021 07:10
MNIST prediction using Keras and building CNN from scratch in Keras
#Step 1
import cv2 # working with, mainly resizing, images
import numpy as np # dealing with arrays
import os # dealing with directories
from random import shuffle # mixing up or currently ordered data that might lead our network astray in training.
from tqdm import tqdm # a nice pretty percentage bar for tasks. Thanks to viewer Daniel BA1/4hler for this suggestion
import tensorflow as tf #Import Tensorflow
import glob #This will extract all files from the folder
import keras
from keras.preprocessing.image import ImageDataGenerator
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails", "5.0.3"
@s2t2
s2t2 / student_website_exercise.md
Last active March 6, 2022 08:49
Fork the Repo (Student Personal Website)

Fork the Repo

Leverage an existing open source website to publish your own.

Note: your website content will be available to the public.

Objectives

  1. Develop a familiarity with open source software, software version control, and website hosting.
  • Gain exposure to a basic website, noting its directory structure and observing HTML document structures and content.
@eikes
eikes / gist:5a64b661022c756bd6522ed94770e2a6
Created July 4, 2016 14:02
List of Ruby on Rails Timezone names and their alias
["Africa/Algiers", "West Central Africa"],
["Africa/Cairo", "Cairo"],
["Africa/Casablanca", "Casablanca"],
["Africa/Harare", "Harare"],
["Africa/Johannesburg", "Pretoria"],
["Africa/Monrovia", "Monrovia"],
["Africa/Nairobi", "Nairobi"],
["America/Argentina/Buenos_Aires", "Buenos Aires"],
["America/Bogota", "Bogota"],
["America/Caracas", "Caracas"],
@quadrolls
quadrolls / add_headers_spec.rb
Created April 7, 2016 20:39
Adding headers to a request in a controller spec in RSpec 3 and Rails 4
require 'rails_helper'
RSpec.describe Api::LoginsController, type: :controller do
before :each do
@header_code = 'AZSALE12345'
end
describe 'logout', focus: true do
it 'returns status 204' do
@alecrajeev
alecrajeev / README.md
Last active June 8, 2016 19:52
Democratic Primary 2016

Democratic Primary 2016 by CD

Background

The purpose of this map as detailed on Daily Kos is to represent the congressional districts in the United States accurately. Currently it is difficult to show the districts because some such as those in New York City are very small, while others like Montana are the size of an entire state. Previosly the maps needed to be zoomable to see the districts containing cities. Other represntations such as cartograms warped the country's shape. This map attempts to fix that by giving each congressional district equal area i.e. five regular hexagons.

The map was built by Daniel Donner.

I ported the map using d3 to make it easier to use.

The raw data on the race comes from The Green Papers, but I adapted it slightly to my use in [google s

@subfuzion
subfuzion / curl.md
Last active April 26, 2024 09:43
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@alecrajeev
alecrajeev / README.md
Last active March 26, 2016 08:30
United States Congressional Districts Hexagons

U.S. Congressional Districts as Hexagons.

Background

The purpose of this map as detailed on Daily Kos is to represent the congressional districts in the United States accurately. Currently it is difficult to show the districts because some such as those in New York City are very small, while others like Montana are the size of an entire state. Previosly the maps needed to be zoomable to see the districts containing cities. Other represntations such as cartograms warped the country's shape. This map attempts to fix that by giving each congressional district equal area i.e. five regular hexagons.

According to the original Daily Kos article, the map was built by Daniel Donner.

Porting the Map

I did not design the map. This project's purpose is to port the map to a more useable format. I ported the map t